@wormhole-foundation/wormhole-connect 2.5.0-beta.8-development → 2.5.0-beta.9-development
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.
- package/dist/assets/aptos-Cutllx5i.js +3 -0
- package/dist/assets/{ccip-DoYNnipC.js → ccip-C6cz5NqJ.js} +1 -1
- package/dist/assets/events-MYC_Tkdh.js +1 -0
- package/dist/assets/{evm-Cg9_Z6ON.js → evm-DzwJdvcV.js} +2 -2
- package/dist/assets/{evm-DSNDNefN.js → evm-LJDXipdh.js} +3 -3
- package/dist/assets/{index-Bhi-Ol-W.js → index-BECoIARf.js} +1 -1
- package/dist/assets/{index-TVGCRxSf.js → index-BO5vFz_J.js} +1 -1
- package/dist/assets/{index-IFf5IHmZ.js → index-BVJL1orJ.js} +1 -1
- package/dist/assets/{index-CuW_tQti.js → index-BwNyYZxM.js} +1 -1
- package/dist/assets/{index-CLAfmegc.js → index-C6UKJUdm.js} +1 -1
- package/dist/assets/index-CJZzjIow.js +1 -0
- package/dist/assets/{index-CItGJ_dO.js → index-CSiH4dly.js} +1 -1
- package/dist/assets/{index-CrZXNnmG.js → index-CqEHg303.js} +1 -1
- package/dist/assets/{index-Ba5OrqB6.js → index-D3R8fZfr.js} +1 -1
- package/dist/assets/{index-DPi-hS0A.js → index-Ds_BlDdN.js} +2 -2
- package/dist/assets/{index-7lgoK4KP.js → index-DwJjUFus.js} +1 -1
- package/dist/assets/{index-mE5izIg0.js → index-Dxpp9NXJ.js} +1 -1
- package/dist/assets/{index-DShwbc4p.js → index-EvC_Tjca.js} +1 -1
- package/dist/assets/{index-TctZ2EQK.js → index-RZp63Yuv.js} +1 -1
- package/dist/assets/{index-CD-O7bSQ.js → index-iiAA6CTH.js} +1 -1
- package/dist/assets/{index-CmR0e8xk.js → index-m7pOREIu.js} +1 -1
- package/dist/assets/{index-D2Ev-0A_.js → index-wwvQRwKh.js} +1 -1
- package/dist/assets/{index.es-e2znZrg8.js → index.es-C9O0OD76.js} +6 -6
- package/dist/assets/solana-B0Eox3vZ.js +2 -0
- package/dist/assets/{solana-DCCw_nmt.js → solana-BGWrrBcM.js} +2 -2
- package/dist/assets/solanaEmbed.esm-C9Mwa0DJ.js +37 -0
- package/dist/assets/{sui-ByNmqUgP.js → sui-COEHPNCD.js} +2 -2
- package/dist/assets/{tokens-BSV7gluG.js → tokens-CzZADlQh.js} +1 -1
- package/dist/main.js +54 -54
- package/dist/src/AppRouter.d.ts.map +1 -1
- package/dist/src/components/v2/Button.d.ts.map +1 -1
- package/dist/src/config/tokens.d.ts +1 -2
- package/dist/src/config/tokens.d.ts.map +1 -1
- package/dist/src/icons/Chains/APT.d.ts.map +1 -1
- package/dist/src/icons/Chains/OSMO.d.ts.map +1 -1
- package/dist/src/icons/Chains/SOL.d.ts.map +1 -1
- package/dist/src/icons/Chains/SUI.d.ts.map +1 -1
- package/dist/src/icons/Chains/UNI.d.ts.map +1 -1
- package/dist/src/icons/Chains/XLAYER.d.ts.map +1 -1
- package/dist/src/icons/Routes/CCTP.d.ts.map +1 -1
- package/dist/src/icons/SvgDefs.d.ts +4 -0
- package/dist/src/icons/SvgDefs.d.ts.map +1 -0
- package/dist/src/icons/Tokens/BNB.d.ts.map +1 -1
- package/dist/src/icons/Tokens/BUSD.d.ts.map +1 -1
- package/dist/src/icons/Tokens/DAI.d.ts.map +1 -1
- package/dist/src/icons/Tokens/INJ.d.ts.map +1 -1
- package/dist/src/icons/Tokens/NTT.d.ts.map +1 -1
- package/dist/src/icons/Tokens/OSMO.d.ts.map +1 -1
- package/dist/src/icons/Tokens/POLY.d.ts.map +1 -1
- package/dist/src/icons/Tokens/SOL.d.ts.map +1 -1
- package/dist/src/icons/Tokens/USDT.d.ts.map +1 -1
- package/dist/src/icons/Tokens/WBTC.d.ts.map +1 -1
- package/dist/src/theme.d.ts +1 -0
- package/dist/src/theme.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/AssetPicker/index.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/WalletConnector/index.d.ts.map +1 -1
- package/lib/{aptos-BG8ndPcW.mjs → aptos-CNOw8kcO.mjs} +58 -42
- package/lib/{aptos-DxDdKfid.js → aptos-CdOJRI0R.js} +1 -1
- package/lib/aptos-D_QSCYMR.js +2 -0
- package/lib/{aptos-CzXBQ5wx.mjs → aptos-tn2jO8K3.mjs} +2 -2
- package/lib/{base64-BFLeU3MK.mjs → base64-CNYMRf7S.mjs} +1 -1
- package/lib/{base64-B0sAJgP2.js → base64-Ds8M0J4c.js} +1 -1
- package/lib/{ccip-Cbpf1wJo.js → ccip-B1tGU3IZ.js} +1 -1
- package/lib/{ccip-Bm7IOUCL.mjs → ccip-CJG_3SRo.mjs} +1 -1
- package/lib/{chunk-IMTC3J2M-DwURKwAV.mjs → chunk-IMTC3J2M-C67AHEC7.mjs} +3 -3
- package/lib/{chunk-IMTC3J2M-BGGrA_WC.js → chunk-IMTC3J2M-DhIJb7y6.js} +1 -1
- package/lib/{evm-l6ukE6CV.mjs → evm-BBI017hN.mjs} +6 -6
- package/lib/{evm-DJcjc-_C.js → evm-Bb5iqY3o.js} +3 -3
- package/lib/{evm-1rdXpiv3.mjs → evm-Bx1LcD14.mjs} +5 -5
- package/lib/{evm-defRIE54.js → evm-CJNdFS0I.js} +2 -2
- package/lib/{index-B2xDzy7A.js → index-1pV294K4.js} +1 -1
- package/lib/{index-lPrZfOXi.mjs → index-4bm5RrMg.mjs} +2 -2
- package/lib/{index-BQqU6Wly.js → index-677G66rd.js} +1 -1
- package/lib/{index-CNIZSAFU.mjs → index-B8jKT8hS.mjs} +1 -1
- package/lib/{index-BloVXId9.js → index-BCRcCl3p.js} +1 -1
- package/lib/{index-BI7xYeBM.mjs → index-BHH4psXr.mjs} +34 -34
- package/lib/{index-B_MUS6zc.mjs → index-BILxmVr6.mjs} +1 -1
- package/lib/{index-BmCFLdEX.js → index-BJc9lWin.js} +1 -1
- package/lib/{index-EDktb6S4.js → index-BLlDozHI.js} +1 -1
- package/lib/{index-DtqirkNJ.js → index-BQirQqhY.js} +1 -1
- package/lib/{index-CFJ0wajU.mjs → index-BSUsUG2w.mjs} +1 -1
- package/lib/{index-5NBqfbfS.mjs → index-BhqL4iKE.mjs} +1 -1
- package/lib/{index-BegFjogX.mjs → index-BjKp2_FS.mjs} +1 -1
- package/lib/{index-BgOfWrzS.mjs → index-BkY7MdDS.mjs} +3 -3
- package/lib/{index-pNMjrl4H.js → index-BoSypod5.js} +1 -1
- package/lib/{index-BwAyuZmy.mjs → index-Bt5YpmVV.mjs} +1 -1
- package/lib/{index-OVEyrgEm.js → index-C2b7cmIz.js} +1 -1
- package/lib/{index-Dxs-J9dD.mjs → index-CEiBhm2k.mjs} +1 -1
- package/lib/{index-BWOiAGve.js → index-CF4eoE6Y.js} +1 -1
- package/lib/index-CPrRSa2B.js +374 -0
- package/lib/{index-8FtdcDhM.mjs → index-CRsKK4Wj.mjs} +3 -3
- package/lib/{index-DYb7vb-V.js → index-CS6zPhdi.js} +1 -1
- package/lib/index-CcRm6XfT.js +1 -0
- package/lib/{index-DcKSwYsA.js → index-CccxsNz1.js} +1 -1
- package/lib/{index-DicZFeR7.mjs → index-CdREsgaL.mjs} +2 -2
- package/lib/{index-D6N53skz.js → index-Cjmq0C8h.js} +1 -1
- package/lib/{index-CIC3ywMJ.js → index-CjuEl-J-.js} +1 -1
- package/lib/{index-IjHFzfzT.mjs → index-CkznFwK1.mjs} +6 -6
- package/lib/{index-CVoCwjDl.js → index-ClfCpirL.js} +1 -1
- package/lib/{index-BxQJKr_h.js → index-CpnIGxuI.js} +1 -1
- package/lib/{index-B2xZ6kt4.mjs → index-Cz7lvPUn.mjs} +29272 -27282
- package/lib/{index-CPcdt_MH.js → index-D0uASZTF.js} +1 -1
- package/lib/{index-mZitl_HA.mjs → index-D1VXS7yd.mjs} +2 -2
- package/lib/{index-Dh8BTmR_.mjs → index-DAYkgaNq.mjs} +2 -2
- package/lib/{index-EyD8yuwm.mjs → index-DDW07uFl.mjs} +2 -2
- package/lib/{index-CelSnuJI.mjs → index-DGr-Gzdg.mjs} +1 -1
- package/lib/{index-BMEVNQXB.js → index-DJrtKnre.js} +1 -1
- package/lib/{index-VhqEeF9I.mjs → index-DNZXTDXa.mjs} +2 -2
- package/lib/{index-Cx9TS0XH.mjs → index-DUOERLRj.mjs} +8 -10
- package/lib/{index-CDRjrfnz.mjs → index-DfWcL4P6.mjs} +1 -1
- package/lib/{index-C3dHeQ6j.js → index-OBs6XFzT.js} +1 -1
- package/lib/{index-BsOOcqS5.js → index-Snn4BI2R.js} +1 -1
- package/lib/{index-DJLQFXCy.js → index-aqgK4OhT.js} +1 -1
- package/lib/{index-CVlcHpc6.mjs → index-kYNBaZzW.mjs} +4 -4
- package/lib/{index-BtsATNxk.js → index-lmBnBbjj.js} +1 -1
- package/lib/{index-Bq9Xcog1.js → index-mBnUIOuA.js} +1 -1
- package/lib/{index-DW-aptRt.mjs → index-tGvYiLKw.mjs} +2 -2
- package/lib/{index-NgGkgCpa.mjs → index-wMpCRV7E.mjs} +1 -1
- package/lib/{index.es-B_1fLcW-.mjs → index.es-D5MZxe7R.mjs} +5 -5
- package/lib/{index.es-DCm0D4jx.js → index.es-Dvk4tueQ.js} +2 -2
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/lib/{signer-9vI5B7UW.mjs → signer-CNO6jgxp.mjs} +3 -3
- package/lib/{signer-BQc7Wphd.js → signer-aa3XAM1g.js} +1 -1
- package/lib/solana-CFESTPH_.js +1 -0
- package/lib/{solana-DuIMWd_Y.js → solana-CLTYTqZY.js} +1 -1
- package/lib/solana-DJmdwuns.mjs +17 -0
- package/lib/{solana-CjANz7Fi.mjs → solana-rVF30oAK.mjs} +4 -4
- package/lib/{solanaEmbed.esm-Ck3n8zZh.mjs → solanaEmbed.esm-BhoGryRA.mjs} +2 -2
- package/lib/{solanaEmbed.esm-CIh3hnnF.js → solanaEmbed.esm-D4kizK0g.js} +1 -1
- package/lib/src/AppRouter.d.ts.map +1 -1
- package/lib/src/components/v2/Button.d.ts.map +1 -1
- package/lib/src/config/tokens.d.ts +1 -2
- package/lib/src/config/tokens.d.ts.map +1 -1
- package/lib/src/icons/Chains/APT.d.ts.map +1 -1
- package/lib/src/icons/Chains/OSMO.d.ts.map +1 -1
- package/lib/src/icons/Chains/SOL.d.ts.map +1 -1
- package/lib/src/icons/Chains/SUI.d.ts.map +1 -1
- package/lib/src/icons/Chains/UNI.d.ts.map +1 -1
- package/lib/src/icons/Chains/XLAYER.d.ts.map +1 -1
- package/lib/src/icons/Routes/CCTP.d.ts.map +1 -1
- package/lib/src/icons/SvgDefs.d.ts +4 -0
- package/lib/src/icons/SvgDefs.d.ts.map +1 -0
- package/lib/src/icons/Tokens/BNB.d.ts.map +1 -1
- package/lib/src/icons/Tokens/BUSD.d.ts.map +1 -1
- package/lib/src/icons/Tokens/DAI.d.ts.map +1 -1
- package/lib/src/icons/Tokens/INJ.d.ts.map +1 -1
- package/lib/src/icons/Tokens/NTT.d.ts.map +1 -1
- package/lib/src/icons/Tokens/OSMO.d.ts.map +1 -1
- package/lib/src/icons/Tokens/POLY.d.ts.map +1 -1
- package/lib/src/icons/Tokens/SOL.d.ts.map +1 -1
- package/lib/src/icons/Tokens/USDT.d.ts.map +1 -1
- package/lib/src/icons/Tokens/WBTC.d.ts.map +1 -1
- package/lib/src/theme.d.ts +1 -0
- package/lib/src/theme.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/AssetPicker/index.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/WalletConnector/index.d.ts.map +1 -1
- package/lib/{sui-DXobmCof.mjs → sui-BbBH_HT2.mjs} +1 -1
- package/lib/{sui-C3Hk0XoB.js → sui-CjVsY3mn.js} +1 -1
- package/lib/{sui-BDz0ND8Q.js → sui-DP2zgcH5.js} +1 -1
- package/lib/{sui-BaNlF5eU.mjs → sui-DPCoQlHx.mjs} +5 -5
- package/lib/{tokens-Dr0VPGjM.js → tokens-DbXdl7J8.js} +1 -1
- package/lib/{tokens-BMcb2BBp.mjs → tokens-TdYDSawW.mjs} +2 -2
- package/package.json +19 -18
- package/dist/assets/aptos-h3S6O6Gp.js +0 -3
- package/dist/assets/index-BMLcq4no.js +0 -1
- package/dist/assets/solana-BNhbIgt5.js +0 -2
- package/dist/assets/solanaEmbed.esm-D6aTKNPa.js +0 -37
- package/dist/src/utils/theme.d.ts +0 -11
- package/dist/src/utils/theme.d.ts.map +0 -1
- package/lib/aptos-BI3SOFlh.js +0 -2
- package/lib/index-B-3CdahH.js +0 -374
- package/lib/index-BjH74c5e.js +0 -1
- package/lib/solana-3AW1_2QL.js +0 -1
- package/lib/solana-DyGkYgAN.mjs +0 -17
- package/lib/src/utils/theme.d.ts +0 -11
- package/lib/src/utils/theme.d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./index-B-3CdahH.js"),ds=require("./index-Bq9Xcog1.js");function As(e){"@babel/helpers - typeof";return As=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},As(e)}function M1(e,t){if(As(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(As(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function x1(e){var t=M1(e,"string");return As(t)=="symbol"?t:t+""}var pc={exports:{}},Wb=W.eventsExports.EventEmitter,Rl,Ug;function D1(){if(Ug)return Rl;Ug=1;function e(x,v){var C=Object.keys(x);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(x);v&&(B=B.filter(function(P){return Object.getOwnPropertyDescriptor(x,P).enumerable})),C.push.apply(C,B)}return C}function t(x){for(var v=1;v<arguments.length;v++){var C=arguments[v]!=null?arguments[v]:{};v%2?e(Object(C),!0).forEach(function(B){r(x,B,C[B])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(C)):e(Object(C)).forEach(function(B){Object.defineProperty(x,B,Object.getOwnPropertyDescriptor(C,B))})}return x}function r(x,v,C){return v=f(v),v in x?Object.defineProperty(x,v,{value:C,enumerable:!0,configurable:!0,writable:!0}):x[v]=C,x}function o(x,v){if(!(x instanceof v))throw new TypeError("Cannot call a class as a function")}function s(x,v){for(var C=0;C<v.length;C++){var B=v[C];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(x,f(B.key),B)}}function u(x,v,C){return v&&s(x.prototype,v),Object.defineProperty(x,"prototype",{writable:!1}),x}function f(x){var v=h(x,"string");return typeof v=="symbol"?v:String(v)}function h(x,v){if(typeof x!="object"||x===null)return x;var C=x[Symbol.toPrimitive];if(C!==void 0){var B=C.call(x,v);if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(x)}var l=W.bufferPolyfill,p=l.Buffer,b=W.require$$3,w=b.inspect,I=w&&w.custom||"inspect";function A(x,v,C){p.prototype.copy.call(x,v,C)}return Rl=function(){function x(){o(this,x),this.head=null,this.tail=null,this.length=0}return u(x,[{key:"push",value:function(C){var B={data:C,next:null};this.length>0?this.tail.next=B:this.head=B,this.tail=B,++this.length}},{key:"unshift",value:function(C){var B={data:C,next:this.head};this.length===0&&(this.tail=B),this.head=B,++this.length}},{key:"shift",value:function(){if(this.length!==0){var C=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,C}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(C){if(this.length===0)return"";for(var B=this.head,P=""+B.data;B=B.next;)P+=C+B.data;return P}},{key:"concat",value:function(C){if(this.length===0)return p.alloc(0);for(var B=p.allocUnsafe(C>>>0),P=this.head,S=0;P;)A(P.data,B,S),S+=P.data.length,P=P.next;return B}},{key:"consume",value:function(C,B){var P;return C<this.head.data.length?(P=this.head.data.slice(0,C),this.head.data=this.head.data.slice(C)):C===this.head.data.length?P=this.shift():P=B?this._getString(C):this._getBuffer(C),P}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(C){var B=this.head,P=1,S=B.data;for(C-=S.length;B=B.next;){var m=B.data,j=C>m.length?m.length:C;if(j===m.length?S+=m:S+=m.slice(0,C),C-=j,C===0){j===m.length?(++P,B.next?this.head=B.next:this.head=this.tail=null):(this.head=B,B.data=m.slice(j));break}++P}return this.length-=P,S}},{key:"_getBuffer",value:function(C){var B=p.allocUnsafe(C),P=this.head,S=1;for(P.data.copy(B),C-=P.data.length;P=P.next;){var m=P.data,j=C>m.length?m.length:C;if(m.copy(B,B.length-C,0,j),C-=j,C===0){j===m.length?(++S,P.next?this.head=P.next:this.head=this.tail=null):(this.head=P,P.data=m.slice(j));break}++S}return this.length-=S,B}},{key:I,value:function(C,B){return w(this,t(t({},B),{},{depth:0,customInspect:!1}))}}]),x}(),Rl}function j1(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,W.dist.process.nextTick(bc,this,e)):W.dist.process.nextTick(bc,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(u){!t&&u?r._writableState?r._writableState.errorEmitted?W.dist.process.nextTick(au,r):(r._writableState.errorEmitted=!0,W.dist.process.nextTick(kg,r,u)):W.dist.process.nextTick(kg,r,u):t?(W.dist.process.nextTick(au,r),t(u)):W.dist.process.nextTick(au,r)}),this)}function kg(e,t){bc(e,t),au(e)}function au(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function U1(){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.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function bc(e,t){e.emit("error",t)}function k1(e,t){var r=e._readableState,o=e._writableState;r&&r.autoDestroy||o&&o.autoDestroy?e.destroy(t):e.emit("error",t)}var qb={destroy:j1,undestroy:U1,errorOrDestroy:k1},Vi={};function F1(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Gb={};function Wr(e,t,r){r||(r=Error);function o(u,f,h){return typeof t=="string"?t:t(u,f,h)}var s=function(u){F1(f,u);function f(h,l,p){return u.call(this,o(h,l,p))||this}return f}(r);s.prototype.name=r.name,s.prototype.code=e,Gb[e]=s}function Fg(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(o){return String(o)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function H1(e,t,r){return e.substr(0,t.length)===t}function W1(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function q1(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}Wr("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Wr("ERR_INVALID_ARG_TYPE",function(e,t,r){var o;typeof t=="string"&&H1(t,"not ")?(o="must not be",t=t.replace(/^not /,"")):o="must be";var s;if(W1(e," argument"))s="The ".concat(e," ").concat(o," ").concat(Fg(t,"type"));else{var u=q1(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(o," ").concat(Fg(t,"type"))}return s+=". Received type ".concat(typeof r),s},TypeError);Wr("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Wr("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Wr("ERR_STREAM_PREMATURE_CLOSE","Premature close");Wr("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Wr("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Wr("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Wr("ERR_STREAM_WRITE_AFTER_END","write after end");Wr("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Wr("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Wr("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Vi.codes=Gb;var G1=Vi.codes.ERR_INVALID_OPT_VALUE;function V1(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function z1(e,t,r,o){var s=V1(t,o,r);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var u=o?r:"highWaterMark";throw new G1(u,s)}return Math.floor(s)}return e.objectMode?16:16*1024}var Vb={getHighWaterMark:z1},Al,Hg;function zb(){if(Hg)return Al;Hg=1,Al=ue;function e(R){var O=this;this.next=null,this.entry=null,this.finish=function(){be(O,R)}}var t;ue.WritableState=Q;var r={deprecate:W.requireBrowser()},o=Wb,s=W.bufferPolyfill.Buffer,u=(typeof W.commonjsGlobal<"u"?W.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function f(R){return s.from(R)}function h(R){return s.isBuffer(R)||R instanceof u}var l=qb,p=Vb,b=p.getHighWaterMark,w=Vi.codes,I=w.ERR_INVALID_ARG_TYPE,A=w.ERR_METHOD_NOT_IMPLEMENTED,x=w.ERR_MULTIPLE_CALLBACK,v=w.ERR_STREAM_CANNOT_PIPE,C=w.ERR_STREAM_DESTROYED,B=w.ERR_STREAM_NULL_VALUES,P=w.ERR_STREAM_WRITE_AFTER_END,S=w.ERR_UNKNOWN_ENCODING,m=l.errorOrDestroy;W.inherits_browserExports(ue,o);function j(){}function Q(R,O,q){t=t||Oo(),R=R||{},typeof q!="boolean"&&(q=O instanceof t),this.objectMode=!!R.objectMode,q&&(this.objectMode=this.objectMode||!!R.writableObjectMode),this.highWaterMark=b(this,R,"writableHighWaterMark",q),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var oe=R.decodeStrings===!1;this.decodeStrings=!oe,this.defaultEncoding=R.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ye){Y(O,ye)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=R.emitClose!==!1,this.autoDestroy=!!R.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}Q.prototype.getBuffer=function(){for(var O=this.bufferedRequest,q=[];O;)q.push(O),O=O.next;return q},function(){try{Object.defineProperty(Q.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var ce;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ce=Function.prototype[Symbol.hasInstance],Object.defineProperty(ue,Symbol.hasInstance,{value:function(O){return ce.call(this,O)?!0:this!==ue?!1:O&&O._writableState instanceof Q}})):ce=function(O){return O instanceof this};function ue(R){t=t||Oo();var O=this instanceof t;if(!O&&!ce.call(ue,this))return new ue(R);this._writableState=new Q(R,this,O),this.writable=!0,R&&(typeof R.write=="function"&&(this._write=R.write),typeof R.writev=="function"&&(this._writev=R.writev),typeof R.destroy=="function"&&(this._destroy=R.destroy),typeof R.final=="function"&&(this._final=R.final)),o.call(this)}ue.prototype.pipe=function(){m(this,new v)};function te(R,O){var q=new P;m(R,q),W.dist.process.nextTick(O,q)}function Se(R,O,q,oe){var ye;return q===null?ye=new B:typeof q!="string"&&!O.objectMode&&(ye=new I("chunk",["string","Buffer"],q)),ye?(m(R,ye),W.dist.process.nextTick(oe,ye),!1):!0}ue.prototype.write=function(R,O,q){var oe=this._writableState,ye=!1,d=!oe.objectMode&&h(R);return d&&!s.isBuffer(R)&&(R=f(R)),typeof O=="function"&&(q=O,O=null),d?O="buffer":O||(O=oe.defaultEncoding),typeof q!="function"&&(q=j),oe.ending?te(this,q):(d||Se(this,oe,R,q))&&(oe.pendingcb++,ye=F(this,oe,d,R,O,q)),ye},ue.prototype.cork=function(){this._writableState.corked++},ue.prototype.uncork=function(){var R=this._writableState;R.corked&&(R.corked--,!R.writing&&!R.corked&&!R.bufferProcessing&&R.bufferedRequest&&H(this,R))},ue.prototype.setDefaultEncoding=function(O){if(typeof O=="string"&&(O=O.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((O+"").toLowerCase())>-1))throw new S(O);return this._writableState.defaultEncoding=O,this},Object.defineProperty(ue.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function me(R,O,q){return!R.objectMode&&R.decodeStrings!==!1&&typeof O=="string"&&(O=s.from(O,q)),O}Object.defineProperty(ue.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function F(R,O,q,oe,ye,d){if(!q){var g=me(O,oe,ye);oe!==g&&(q=!0,ye="buffer",oe=g)}var _=O.objectMode?1:oe.length;O.length+=_;var E=O.length<O.highWaterMark;if(E||(O.needDrain=!0),O.writing||O.corked){var J=O.lastBufferedRequest;O.lastBufferedRequest={chunk:oe,encoding:ye,isBuf:q,callback:d,next:null},J?J.next=O.lastBufferedRequest:O.bufferedRequest=O.lastBufferedRequest,O.bufferedRequestCount+=1}else U(R,O,!1,_,oe,ye,d);return E}function U(R,O,q,oe,ye,d,g){O.writelen=oe,O.writecb=g,O.writing=!0,O.sync=!0,O.destroyed?O.onwrite(new C("write")):q?R._writev(ye,O.onwrite):R._write(ye,d,O.onwrite),O.sync=!1}function $(R,O,q,oe,ye){--O.pendingcb,q?(W.dist.process.nextTick(ye,oe),W.dist.process.nextTick(re,R,O),R._writableState.errorEmitted=!0,m(R,oe)):(ye(oe),R._writableState.errorEmitted=!0,m(R,oe),re(R,O))}function G(R){R.writing=!1,R.writecb=null,R.length-=R.writelen,R.writelen=0}function Y(R,O){var q=R._writableState,oe=q.sync,ye=q.writecb;if(typeof ye!="function")throw new x;if(G(q),O)$(R,q,oe,O,ye);else{var d=K(q)||R.destroyed;!d&&!q.corked&&!q.bufferProcessing&&q.bufferedRequest&&H(R,q),oe?W.dist.process.nextTick(V,R,q,d,ye):V(R,q,d,ye)}}function V(R,O,q,oe){q||ne(R,O),O.pendingcb--,oe(),re(R,O)}function ne(R,O){O.length===0&&O.needDrain&&(O.needDrain=!1,R.emit("drain"))}function H(R,O){O.bufferProcessing=!0;var q=O.bufferedRequest;if(R._writev&&q&&q.next){var oe=O.bufferedRequestCount,ye=new Array(oe),d=O.corkedRequestsFree;d.entry=q;for(var g=0,_=!0;q;)ye[g]=q,q.isBuf||(_=!1),q=q.next,g+=1;ye.allBuffers=_,U(R,O,!0,O.length,ye,"",d.finish),O.pendingcb++,O.lastBufferedRequest=null,d.next?(O.corkedRequestsFree=d.next,d.next=null):O.corkedRequestsFree=new e(O),O.bufferedRequestCount=0}else{for(;q;){var E=q.chunk,J=q.encoding,ie=q.callback,se=O.objectMode?1:E.length;if(U(R,O,!1,se,E,J,ie),q=q.next,O.bufferedRequestCount--,O.writing)break}q===null&&(O.lastBufferedRequest=null)}O.bufferedRequest=q,O.bufferProcessing=!1}ue.prototype._write=function(R,O,q){q(new A("_write()"))},ue.prototype._writev=null,ue.prototype.end=function(R,O,q){var oe=this._writableState;return typeof R=="function"?(q=R,R=null,O=null):typeof O=="function"&&(q=O,O=null),R!=null&&this.write(R,O),oe.corked&&(oe.corked=1,this.uncork()),oe.ending||_e(this,oe,q),this},Object.defineProperty(ue.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function K(R){return R.ending&&R.length===0&&R.bufferedRequest===null&&!R.finished&&!R.writing}function ae(R,O){R._final(function(q){O.pendingcb--,q&&m(R,q),O.prefinished=!0,R.emit("prefinish"),re(R,O)})}function de(R,O){!O.prefinished&&!O.finalCalled&&(typeof R._final=="function"&&!O.destroyed?(O.pendingcb++,O.finalCalled=!0,W.dist.process.nextTick(ae,R,O)):(O.prefinished=!0,R.emit("prefinish")))}function re(R,O){var q=K(O);if(q&&(de(R,O),O.pendingcb===0&&(O.finished=!0,R.emit("finish"),O.autoDestroy))){var oe=R._readableState;(!oe||oe.autoDestroy&&oe.endEmitted)&&R.destroy()}return q}function _e(R,O,q){O.ending=!0,re(R,O),q&&(O.finished?W.dist.process.nextTick(q):R.once("finish",q)),O.ended=!0,R.writable=!1}function be(R,O,q){var oe=R.entry;for(R.entry=null;oe;){var ye=oe.callback;O.pendingcb--,ye(q),oe=oe.next}O.corkedRequestsFree.next=R}return Object.defineProperty(ue.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(O){this._writableState&&(this._writableState.destroyed=O)}}),ue.prototype.destroy=l.destroy,ue.prototype._undestroy=l.undestroy,ue.prototype._destroy=function(R,O){O(R)},Al}var Tl,Wg;function Oo(){if(Wg)return Tl;Wg=1;var e=Object.keys||function(p){var b=[];for(var w in p)b.push(w);return b};Tl=f;var t=Jb(),r=zb();W.inherits_browserExports(f,t);for(var o=e(r.prototype),s=0;s<o.length;s++){var u=o[s];f.prototype[u]||(f.prototype[u]=r.prototype[u])}function f(p){if(!(this instanceof f))return new f(p);t.call(this,p),r.call(this,p),this.allowHalfOpen=!0,p&&(p.readable===!1&&(this.readable=!1),p.writable===!1&&(this.writable=!1),p.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",h)))}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function h(){this._writableState.ended||W.dist.process.nextTick(l,this)}function l(p){p.end()}return Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(b){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=b,this._writableState.destroyed=b)}}),Tl}var qg=Vi.codes.ERR_STREAM_PREMATURE_CLOSE;function K1(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];e.apply(this,o)}}}function J1(){}function Y1(e){return e.setHeader&&typeof e.abort=="function"}function Kb(e,t,r){if(typeof t=="function")return Kb(e,null,t);t||(t={}),r=K1(r||J1);var o=t.readable||t.readable!==!1&&e.readable,s=t.writable||t.writable!==!1&&e.writable,u=function(){e.writable||h()},f=e._writableState&&e._writableState.finished,h=function(){s=!1,f=!0,o||r.call(e)},l=e._readableState&&e._readableState.endEmitted,p=function(){o=!1,l=!0,s||r.call(e)},b=function(x){r.call(e,x)},w=function(){var x;if(o&&!l)return(!e._readableState||!e._readableState.ended)&&(x=new qg),r.call(e,x);if(s&&!f)return(!e._writableState||!e._writableState.ended)&&(x=new qg),r.call(e,x)},I=function(){e.req.on("finish",h)};return Y1(e)?(e.on("complete",h),e.on("abort",w),e.req?I():e.on("request",I)):s&&!e._writableState&&(e.on("end",u),e.on("close",u)),e.on("end",p),e.on("finish",h),t.error!==!1&&e.on("error",b),e.on("close",w),function(){e.removeListener("complete",h),e.removeListener("abort",w),e.removeListener("request",I),e.req&&e.req.removeListener("finish",h),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",h),e.removeListener("end",p),e.removeListener("error",b),e.removeListener("close",w)}}var qc=Kb,Il,Gg;function X1(){if(Gg)return Il;Gg=1;var e;function t(S,m,j){return m=r(m),m in S?Object.defineProperty(S,m,{value:j,enumerable:!0,configurable:!0,writable:!0}):S[m]=j,S}function r(S){var m=o(S,"string");return typeof m=="symbol"?m:String(m)}function o(S,m){if(typeof S!="object"||S===null)return S;var j=S[Symbol.toPrimitive];if(j!==void 0){var Q=j.call(S,m);if(typeof Q!="object")return Q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(S)}var s=qc,u=Symbol("lastResolve"),f=Symbol("lastReject"),h=Symbol("error"),l=Symbol("ended"),p=Symbol("lastPromise"),b=Symbol("handlePromise"),w=Symbol("stream");function I(S,m){return{value:S,done:m}}function A(S){var m=S[u];if(m!==null){var j=S[w].read();j!==null&&(S[p]=null,S[u]=null,S[f]=null,m(I(j,!1)))}}function x(S){W.dist.process.nextTick(A,S)}function v(S,m){return function(j,Q){S.then(function(){if(m[l]){j(I(void 0,!0));return}m[b](j,Q)},Q)}}var C=Object.getPrototypeOf(function(){}),B=Object.setPrototypeOf((e={get stream(){return this[w]},next:function(){var m=this,j=this[h];if(j!==null)return Promise.reject(j);if(this[l])return Promise.resolve(I(void 0,!0));if(this[w].destroyed)return new Promise(function(te,Se){W.dist.process.nextTick(function(){m[h]?Se(m[h]):te(I(void 0,!0))})});var Q=this[p],ce;if(Q)ce=new Promise(v(Q,this));else{var ue=this[w].read();if(ue!==null)return Promise.resolve(I(ue,!1));ce=new Promise(this[b])}return this[p]=ce,ce}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var m=this;return new Promise(function(j,Q){m[w].destroy(null,function(ce){if(ce){Q(ce);return}j(I(void 0,!0))})})}),e),C),P=function(m){var j,Q=Object.create(B,(j={},t(j,w,{value:m,writable:!0}),t(j,u,{value:null,writable:!0}),t(j,f,{value:null,writable:!0}),t(j,h,{value:null,writable:!0}),t(j,l,{value:m._readableState.endEmitted,writable:!0}),t(j,b,{value:function(ue,te){var Se=Q[w].read();Se?(Q[p]=null,Q[u]=null,Q[f]=null,ue(I(Se,!1))):(Q[u]=ue,Q[f]=te)},writable:!0}),j));return Q[p]=null,s(m,function(ce){if(ce&&ce.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ue=Q[f];ue!==null&&(Q[p]=null,Q[u]=null,Q[f]=null,ue(ce)),Q[h]=ce;return}var te=Q[u];te!==null&&(Q[p]=null,Q[u]=null,Q[f]=null,te(I(void 0,!0))),Q[l]=!0}),m.on("readable",x.bind(null,Q)),Q};return Il=P,Il}var Ol,Vg;function Z1(){return Vg||(Vg=1,Ol=function(){throw new Error("Readable.from is not available in the browser")}),Ol}var Cl,zg;function Jb(){if(zg)return Cl;zg=1,Cl=te;var e;te.ReadableState=ue,W.eventsExports.EventEmitter;var t=function(g,_){return g.listeners(_).length},r=Wb,o=W.bufferPolyfill.Buffer,s=(typeof W.commonjsGlobal<"u"?W.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function u(d){return o.from(d)}function f(d){return o.isBuffer(d)||d instanceof s}var h=W.require$$3,l;h&&h.debuglog?l=h.debuglog("stream"):l=function(){};var p=D1(),b=qb,w=Vb,I=w.getHighWaterMark,A=Vi.codes,x=A.ERR_INVALID_ARG_TYPE,v=A.ERR_STREAM_PUSH_AFTER_EOF,C=A.ERR_METHOD_NOT_IMPLEMENTED,B=A.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,P,S,m;W.inherits_browserExports(te,r);var j=b.errorOrDestroy,Q=["error","close","destroy","pause","resume"];function ce(d,g,_){if(typeof d.prependListener=="function")return d.prependListener(g,_);!d._events||!d._events[g]?d.on(g,_):Array.isArray(d._events[g])?d._events[g].unshift(_):d._events[g]=[_,d._events[g]]}function ue(d,g,_){e=e||Oo(),d=d||{},typeof _!="boolean"&&(_=g instanceof e),this.objectMode=!!d.objectMode,_&&(this.objectMode=this.objectMode||!!d.readableObjectMode),this.highWaterMark=I(this,d,"readableHighWaterMark",_),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.paused=!0,this.emitClose=d.emitClose!==!1,this.autoDestroy=!!d.autoDestroy,this.destroyed=!1,this.defaultEncoding=d.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,d.encoding&&(P||(P=W.requireString_decoder().StringDecoder),this.decoder=new P(d.encoding),this.encoding=d.encoding)}function te(d){if(e=e||Oo(),!(this instanceof te))return new te(d);var g=this instanceof e;this._readableState=new ue(d,this,g),this.readable=!0,d&&(typeof d.read=="function"&&(this._read=d.read),typeof d.destroy=="function"&&(this._destroy=d.destroy)),r.call(this)}Object.defineProperty(te.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(g){this._readableState&&(this._readableState.destroyed=g)}}),te.prototype.destroy=b.destroy,te.prototype._undestroy=b.undestroy,te.prototype._destroy=function(d,g){g(d)},te.prototype.push=function(d,g){var _=this._readableState,E;return _.objectMode?E=!0:typeof d=="string"&&(g=g||_.defaultEncoding,g!==_.encoding&&(d=o.from(d,g),g=""),E=!0),Se(this,d,g,!1,E)},te.prototype.unshift=function(d){return Se(this,d,null,!0,!1)};function Se(d,g,_,E,J){l("readableAddChunk",g);var ie=d._readableState;if(g===null)ie.reading=!1,Y(d,ie);else{var se;if(J||(se=F(ie,g)),se)j(d,se);else if(ie.objectMode||g&&g.length>0)if(typeof g!="string"&&!ie.objectMode&&Object.getPrototypeOf(g)!==o.prototype&&(g=u(g)),E)ie.endEmitted?j(d,new B):me(d,ie,g,!0);else if(ie.ended)j(d,new v);else{if(ie.destroyed)return!1;ie.reading=!1,ie.decoder&&!_?(g=ie.decoder.write(g),ie.objectMode||g.length!==0?me(d,ie,g,!1):H(d,ie)):me(d,ie,g,!1)}else E||(ie.reading=!1,H(d,ie))}return!ie.ended&&(ie.length<ie.highWaterMark||ie.length===0)}function me(d,g,_,E){g.flowing&&g.length===0&&!g.sync?(g.awaitDrain=0,d.emit("data",_)):(g.length+=g.objectMode?1:_.length,E?g.buffer.unshift(_):g.buffer.push(_),g.needReadable&&V(d)),H(d,g)}function F(d,g){var _;return!f(g)&&typeof g!="string"&&g!==void 0&&!d.objectMode&&(_=new x("chunk",["string","Buffer","Uint8Array"],g)),_}te.prototype.isPaused=function(){return this._readableState.flowing===!1},te.prototype.setEncoding=function(d){P||(P=W.requireString_decoder().StringDecoder);var g=new P(d);this._readableState.decoder=g,this._readableState.encoding=this._readableState.decoder.encoding;for(var _=this._readableState.buffer.head,E="";_!==null;)E+=g.write(_.data),_=_.next;return this._readableState.buffer.clear(),E!==""&&this._readableState.buffer.push(E),this._readableState.length=E.length,this};var U=1073741824;function $(d){return d>=U?d=U:(d--,d|=d>>>1,d|=d>>>2,d|=d>>>4,d|=d>>>8,d|=d>>>16,d++),d}function G(d,g){return d<=0||g.length===0&&g.ended?0:g.objectMode?1:d!==d?g.flowing&&g.length?g.buffer.head.data.length:g.length:(d>g.highWaterMark&&(g.highWaterMark=$(d)),d<=g.length?d:g.ended?g.length:(g.needReadable=!0,0))}te.prototype.read=function(d){l("read",d),d=parseInt(d,10);var g=this._readableState,_=d;if(d!==0&&(g.emittedReadable=!1),d===0&&g.needReadable&&((g.highWaterMark!==0?g.length>=g.highWaterMark:g.length>0)||g.ended))return l("read: emitReadable",g.length,g.ended),g.length===0&&g.ended?q(this):V(this),null;if(d=G(d,g),d===0&&g.ended)return g.length===0&&q(this),null;var E=g.needReadable;l("need readable",E),(g.length===0||g.length-d<g.highWaterMark)&&(E=!0,l("length less than watermark",E)),g.ended||g.reading?(E=!1,l("reading or ended",E)):E&&(l("do read"),g.reading=!0,g.sync=!0,g.length===0&&(g.needReadable=!0),this._read(g.highWaterMark),g.sync=!1,g.reading||(d=G(_,g)));var J;return d>0?J=O(d,g):J=null,J===null?(g.needReadable=g.length<=g.highWaterMark,d=0):(g.length-=d,g.awaitDrain=0),g.length===0&&(g.ended||(g.needReadable=!0),_!==d&&g.ended&&q(this)),J!==null&&this.emit("data",J),J};function Y(d,g){if(l("onEofChunk"),!g.ended){if(g.decoder){var _=g.decoder.end();_&&_.length&&(g.buffer.push(_),g.length+=g.objectMode?1:_.length)}g.ended=!0,g.sync?V(d):(g.needReadable=!1,g.emittedReadable||(g.emittedReadable=!0,ne(d)))}}function V(d){var g=d._readableState;l("emitReadable",g.needReadable,g.emittedReadable),g.needReadable=!1,g.emittedReadable||(l("emitReadable",g.flowing),g.emittedReadable=!0,W.dist.process.nextTick(ne,d))}function ne(d){var g=d._readableState;l("emitReadable_",g.destroyed,g.length,g.ended),!g.destroyed&&(g.length||g.ended)&&(d.emit("readable"),g.emittedReadable=!1),g.needReadable=!g.flowing&&!g.ended&&g.length<=g.highWaterMark,R(d)}function H(d,g){g.readingMore||(g.readingMore=!0,W.dist.process.nextTick(K,d,g))}function K(d,g){for(;!g.reading&&!g.ended&&(g.length<g.highWaterMark||g.flowing&&g.length===0);){var _=g.length;if(l("maybeReadMore read 0"),d.read(0),_===g.length)break}g.readingMore=!1}te.prototype._read=function(d){j(this,new C("_read()"))},te.prototype.pipe=function(d,g){var _=this,E=this._readableState;switch(E.pipesCount){case 0:E.pipes=d;break;case 1:E.pipes=[E.pipes,d];break;default:E.pipes.push(d);break}E.pipesCount+=1,l("pipe count=%d opts=%j",E.pipesCount,g);var J=(!g||g.end!==!1)&&d!==W.dist.process.stdout&&d!==W.dist.process.stderr,ie=J?Ie:_t;E.endEmitted?W.dist.process.nextTick(ie):_.once("end",ie),d.on("unpipe",se);function se(Ye,Ve){l("onunpipe"),Ye===_&&Ve&&Ve.hasUnpiped===!1&&(Ve.hasUnpiped=!0,Ue())}function Ie(){l("onend"),d.end()}var Be=ae(_);d.on("drain",Be);var Ce=!1;function Ue(){l("cleanup"),d.removeListener("close",bt),d.removeListener("finish",et),d.removeListener("drain",Be),d.removeListener("error",He),d.removeListener("unpipe",se),_.removeListener("end",Ie),_.removeListener("end",_t),_.removeListener("data",Re),Ce=!0,E.awaitDrain&&(!d._writableState||d._writableState.needDrain)&&Be()}_.on("data",Re);function Re(Ye){l("ondata");var Ve=d.write(Ye);l("dest.write",Ve),Ve===!1&&((E.pipesCount===1&&E.pipes===d||E.pipesCount>1&&ye(E.pipes,d)!==-1)&&!Ce&&(l("false write response, pause",E.awaitDrain),E.awaitDrain++),_.pause())}function He(Ye){l("onerror",Ye),_t(),d.removeListener("error",He),t(d,"error")===0&&j(d,Ye)}ce(d,"error",He);function bt(){d.removeListener("finish",et),_t()}d.once("close",bt);function et(){l("onfinish"),d.removeListener("close",bt),_t()}d.once("finish",et);function _t(){l("unpipe"),_.unpipe(d)}return d.emit("pipe",_),E.flowing||(l("pipe resume"),_.resume()),d};function ae(d){return function(){var _=d._readableState;l("pipeOnDrain",_.awaitDrain),_.awaitDrain&&_.awaitDrain--,_.awaitDrain===0&&t(d,"data")&&(_.flowing=!0,R(d))}}te.prototype.unpipe=function(d){var g=this._readableState,_={hasUnpiped:!1};if(g.pipesCount===0)return this;if(g.pipesCount===1)return d&&d!==g.pipes?this:(d||(d=g.pipes),g.pipes=null,g.pipesCount=0,g.flowing=!1,d&&d.emit("unpipe",this,_),this);if(!d){var E=g.pipes,J=g.pipesCount;g.pipes=null,g.pipesCount=0,g.flowing=!1;for(var ie=0;ie<J;ie++)E[ie].emit("unpipe",this,{hasUnpiped:!1});return this}var se=ye(g.pipes,d);return se===-1?this:(g.pipes.splice(se,1),g.pipesCount-=1,g.pipesCount===1&&(g.pipes=g.pipes[0]),d.emit("unpipe",this,_),this)},te.prototype.on=function(d,g){var _=r.prototype.on.call(this,d,g),E=this._readableState;return d==="data"?(E.readableListening=this.listenerCount("readable")>0,E.flowing!==!1&&this.resume()):d==="readable"&&!E.endEmitted&&!E.readableListening&&(E.readableListening=E.needReadable=!0,E.flowing=!1,E.emittedReadable=!1,l("on readable",E.length,E.reading),E.length?V(this):E.reading||W.dist.process.nextTick(re,this)),_},te.prototype.addListener=te.prototype.on,te.prototype.removeListener=function(d,g){var _=r.prototype.removeListener.call(this,d,g);return d==="readable"&&W.dist.process.nextTick(de,this),_},te.prototype.removeAllListeners=function(d){var g=r.prototype.removeAllListeners.apply(this,arguments);return(d==="readable"||d===void 0)&&W.dist.process.nextTick(de,this),g};function de(d){var g=d._readableState;g.readableListening=d.listenerCount("readable")>0,g.resumeScheduled&&!g.paused?g.flowing=!0:d.listenerCount("data")>0&&d.resume()}function re(d){l("readable nexttick read 0"),d.read(0)}te.prototype.resume=function(){var d=this._readableState;return d.flowing||(l("resume"),d.flowing=!d.readableListening,_e(this,d)),d.paused=!1,this};function _e(d,g){g.resumeScheduled||(g.resumeScheduled=!0,W.dist.process.nextTick(be,d,g))}function be(d,g){l("resume",g.reading),g.reading||d.read(0),g.resumeScheduled=!1,d.emit("resume"),R(d),g.flowing&&!g.reading&&d.read(0)}te.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function R(d){var g=d._readableState;for(l("flow",g.flowing);g.flowing&&d.read()!==null;);}te.prototype.wrap=function(d){var g=this,_=this._readableState,E=!1;d.on("end",function(){if(l("wrapped end"),_.decoder&&!_.ended){var se=_.decoder.end();se&&se.length&&g.push(se)}g.push(null)}),d.on("data",function(se){if(l("wrapped data"),_.decoder&&(se=_.decoder.write(se)),!(_.objectMode&&se==null)&&!(!_.objectMode&&(!se||!se.length))){var Ie=g.push(se);Ie||(E=!0,d.pause())}});for(var J in d)this[J]===void 0&&typeof d[J]=="function"&&(this[J]=function(Ie){return function(){return d[Ie].apply(d,arguments)}}(J));for(var ie=0;ie<Q.length;ie++)d.on(Q[ie],this.emit.bind(this,Q[ie]));return this._read=function(se){l("wrapped _read",se),E&&(E=!1,d.resume())},this},typeof Symbol=="function"&&(te.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=X1()),S(this)}),Object.defineProperty(te.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(te.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(te.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(g){this._readableState&&(this._readableState.flowing=g)}}),te._fromList=O,Object.defineProperty(te.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function O(d,g){if(g.length===0)return null;var _;return g.objectMode?_=g.buffer.shift():!d||d>=g.length?(g.decoder?_=g.buffer.join(""):g.buffer.length===1?_=g.buffer.first():_=g.buffer.concat(g.length),g.buffer.clear()):_=g.buffer.consume(d,g.decoder),_}function q(d){var g=d._readableState;l("endReadable",g.endEmitted),g.endEmitted||(g.ended=!0,W.dist.process.nextTick(oe,g,d))}function oe(d,g){if(l("endReadableNT",d.endEmitted,d.length),!d.endEmitted&&d.length===0&&(d.endEmitted=!0,g.readable=!1,g.emit("end"),d.autoDestroy)){var _=g._writableState;(!_||_.autoDestroy&&_.finished)&&g.destroy()}}typeof Symbol=="function"&&(te.from=function(d,g){return m===void 0&&(m=Z1()),m(te,d,g)});function ye(d,g){for(var _=0,E=d.length;_<E;_++)if(d[_]===g)return _;return-1}return Cl}var Yb=Jn,Ru=Vi.codes,Q1=Ru.ERR_METHOD_NOT_IMPLEMENTED,eA=Ru.ERR_MULTIPLE_CALLBACK,tA=Ru.ERR_TRANSFORM_ALREADY_TRANSFORMING,rA=Ru.ERR_TRANSFORM_WITH_LENGTH_0,Au=Oo();W.inherits_browserExports(Jn,Au);function nA(e,t){var r=this._transformState;r.transforming=!1;var o=r.writecb;if(o===null)return this.emit("error",new eA);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),o(e);var s=this._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}function Jn(e){if(!(this instanceof Jn))return new Jn(e);Au.call(this,e),this._transformState={afterTransform:nA.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",iA)}function iA(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){Kg(e,t,r)}):Kg(this,null,null)}Jn.prototype.push=function(e,t){return this._transformState.needTransform=!1,Au.prototype.push.call(this,e,t)};Jn.prototype._transform=function(e,t,r){r(new Q1("_transform()"))};Jn.prototype._write=function(e,t,r){var o=this._transformState;if(o.writecb=r,o.writechunk=e,o.writeencoding=t,!o.transforming){var s=this._readableState;(o.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}};Jn.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};Jn.prototype._destroy=function(e,t){Au.prototype._destroy.call(this,e,function(r){t(r)})};function Kg(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new rA;if(e._transformState.transforming)throw new tA;return e.push(null)}var oA=Ts,Xb=Yb;W.inherits_browserExports(Ts,Xb);function Ts(e){if(!(this instanceof Ts))return new Ts(e);Xb.call(this,e)}Ts.prototype._transform=function(e,t,r){r(null,e)};var Ll;function sA(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var Zb=Vi.codes,aA=Zb.ERR_MISSING_ARGS,uA=Zb.ERR_STREAM_DESTROYED;function Jg(e){if(e)throw e}function fA(e){return e.setHeader&&typeof e.abort=="function"}function lA(e,t,r,o){o=sA(o);var s=!1;e.on("close",function(){s=!0}),Ll===void 0&&(Ll=qc),Ll(e,{readable:t,writable:r},function(f){if(f)return o(f);s=!0,o()});var u=!1;return function(f){if(!s&&!u){if(u=!0,fA(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();o(f||new uA("pipe"))}}}function Yg(e){e()}function cA(e,t){return e.pipe(t)}function dA(e){return!e.length||typeof e[e.length-1]!="function"?Jg:e.pop()}function hA(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o=dA(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new aA("streams");var s,u=t.map(function(f,h){var l=h<t.length-1,p=h>0;return lA(f,l,p,function(b){s||(s=b),b&&u.forEach(Yg),!l&&(u.forEach(Yg),o(s))})});return t.reduce(cA)}var gA=hA;(function(e,t){t=e.exports=Jb(),t.Stream=t,t.Readable=t,t.Writable=zb(),t.Duplex=Oo(),t.Transform=Yb,t.PassThrough=oA,t.finished=qc,t.pipeline=gA})(pc,pc.exports);var Qb=pc.exports;const{Transform:vN}=Qb,{Transform:SN}=Qb;var e_={};const Xg=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];e_.p1600=function(e){for(let t=0;t<24;++t){const r=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],f=e[4]^e[14]^e[24]^e[34]^e[44],h=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],p=e[7]^e[17]^e[27]^e[37]^e[47],b=e[8]^e[18]^e[28]^e[38]^e[48],w=e[9]^e[19]^e[29]^e[39]^e[49];let I=b^(s<<1|u>>>31),A=w^(u<<1|s>>>31);const x=e[0]^I,v=e[1]^A,C=e[10]^I,B=e[11]^A,P=e[20]^I,S=e[21]^A,m=e[30]^I,j=e[31]^A,Q=e[40]^I,ce=e[41]^A;I=r^(f<<1|h>>>31),A=o^(h<<1|f>>>31);const ue=e[2]^I,te=e[3]^A,Se=e[12]^I,me=e[13]^A,F=e[22]^I,U=e[23]^A,$=e[32]^I,G=e[33]^A,Y=e[42]^I,V=e[43]^A;I=s^(l<<1|p>>>31),A=u^(p<<1|l>>>31);const ne=e[4]^I,H=e[5]^A,K=e[14]^I,ae=e[15]^A,de=e[24]^I,re=e[25]^A,_e=e[34]^I,be=e[35]^A,R=e[44]^I,O=e[45]^A;I=f^(b<<1|w>>>31),A=h^(w<<1|b>>>31);const q=e[6]^I,oe=e[7]^A,ye=e[16]^I,d=e[17]^A,g=e[26]^I,_=e[27]^A,E=e[36]^I,J=e[37]^A,ie=e[46]^I,se=e[47]^A;I=l^(r<<1|o>>>31),A=p^(o<<1|r>>>31);const Ie=e[8]^I,Be=e[9]^A,Ce=e[18]^I,Ue=e[19]^A,Re=e[28]^I,He=e[29]^A,bt=e[38]^I,et=e[39]^A,_t=e[48]^I,Ye=e[49]^A,Ve=x,Dt=v,Lt=B<<4|C>>>28,at=C<<4|B>>>28,Bt=P<<3|S>>>29,fr=S<<3|P>>>29,er=j<<9|m>>>23,kt=m<<9|j>>>23,lr=Q<<18|ce>>>14,zr=ce<<18|Q>>>14,Kr=ue<<1|te>>>31,sn=te<<1|ue>>>31,an=me<<12|Se>>>20,tr=Se<<12|me>>>20,Or=F<<10|U>>>22,rr=U<<10|F>>>22,Ln=G<<13|$>>>19,Jr=$<<13|G>>>19,un=Y<<2|V>>>30,N=V<<2|Y>>>30,D=H<<30|ne>>>2,Ee=ne<<30|H>>>2,ve=K<<6|ae>>>26,Te=ae<<6|K>>>26,yt=re<<11|de>>>21,St=de<<11|re>>>21,fn=_e<<15|be>>>17,Pt=be<<15|_e>>>17,ln=O<<29|R>>>3,Pn=R<<29|O>>>3,cn=q<<28|oe>>>4,dn=oe<<28|q>>>4,Yr=d<<23|ye>>>9,Gt=ye<<23|d>>>9,Cr=g<<25|_>>>7,yr=_<<25|g>>>7,nr=E<<21|J>>>11,Ft=J<<21|E>>>11,Ti=se<<24|ie>>>8,Ii=ie<<24|se>>>8,Bn=Ie<<27|Be>>>5,hn=Be<<27|Ie>>>5,gn=Ce<<20|Ue>>>12,Lr=Ue<<20|Ce>>>12,Oi=He<<7|Re>>>25,pn=Re<<7|He>>>25,ti=bt<<8|et>>>24,ri=et<<8|bt>>>24,ni=_t<<14|Ye>>>18,ii=Ye<<14|_t>>>18;e[0]=Ve^~an&yt,e[1]=Dt^~tr&St,e[10]=cn^~gn&Bt,e[11]=dn^~Lr&fr,e[20]=Kr^~ve&Cr,e[21]=sn^~Te&yr,e[30]=Bn^~Lt&Or,e[31]=hn^~at&rr,e[40]=D^~Yr&Oi,e[41]=Ee^~Gt&pn,e[2]=an^~yt&nr,e[3]=tr^~St&Ft,e[12]=gn^~Bt&Ln,e[13]=Lr^~fr&Jr,e[22]=ve^~Cr&ti,e[23]=Te^~yr&ri,e[32]=Lt^~Or&fn,e[33]=at^~rr&Pt,e[42]=Yr^~Oi&er,e[43]=Gt^~pn&kt,e[4]=yt^~nr&ni,e[5]=St^~Ft&ii,e[14]=Bt^~Ln&ln,e[15]=fr^~Jr&Pn,e[24]=Cr^~ti&lr,e[25]=yr^~ri&zr,e[34]=Or^~fn&Ti,e[35]=rr^~Pt&Ii,e[44]=Oi^~er&un,e[45]=pn^~kt&N,e[6]=nr^~ni&Ve,e[7]=Ft^~ii&Dt,e[16]=Ln^~ln&cn,e[17]=Jr^~Pn&dn,e[26]=ti^~lr&Kr,e[27]=ri^~zr&sn,e[36]=fn^~Ti&Bn,e[37]=Pt^~Ii&hn,e[46]=er^~un&D,e[47]=kt^~N&Ee,e[8]=ni^~Ve&an,e[9]=ii^~Dt&tr,e[18]=ln^~cn&gn,e[19]=Pn^~dn&Lr,e[28]=lr^~Kr&ve,e[29]=zr^~sn&Te,e[38]=Ti^~Bn&Lt,e[39]=Ii^~hn&at,e[48]=un^~D&Yr,e[49]=N^~Ee&Gt,e[0]^=Xg[t*2],e[1]^=Xg[t*2+1]}};const du=e_;function $s(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}$s.prototype.initialize=function(e,t){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1};$s.prototype.absorb=function(e){for(let t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(du.p1600(this.state),this.count=0)};$s.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<8*(this.count%4),e&128&&this.count===this.blockSize-1&&du.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),du.p1600(this.state),this.count=0,this.squeezing=!0};$s.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const t=W.dist.Buffer.alloc(e);for(let r=0;r<e;++r)t[r]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(du.p1600(this.state),this.count=0);return t};$s.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing};var pA=bA;function bA(e){e=e||{};var t=e.max||Number.MAX_SAFE_INTEGER,r=typeof e.start<"u"?e.start:Math.floor(Math.random()*t);return function(){return r=r%t,r++}}const _A=W.getDefaultExportFromCjs(pA);var _c={exports:{}},Pl,Zg;function yA(){if(Zg)return Pl;Zg=1;var e=1e3,t=e*60,r=t*60,o=r*24,s=o*7,u=o*365.25;Pl=function(b,w){w=w||{};var I=typeof b;if(I==="string"&&b.length>0)return f(b);if(I==="number"&&isFinite(b))return w.long?l(b):h(b);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(b))};function f(b){if(b=String(b),!(b.length>100)){var w=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(b);if(w){var I=parseFloat(w[1]),A=(w[2]||"ms").toLowerCase();switch(A){case"years":case"year":case"yrs":case"yr":case"y":return I*u;case"weeks":case"week":case"w":return I*s;case"days":case"day":case"d":return I*o;case"hours":case"hour":case"hrs":case"hr":case"h":return I*r;case"minutes":case"minute":case"mins":case"min":case"m":return I*t;case"seconds":case"second":case"secs":case"sec":case"s":return I*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return I;default:return}}}}function h(b){var w=Math.abs(b);return w>=o?Math.round(b/o)+"d":w>=r?Math.round(b/r)+"h":w>=t?Math.round(b/t)+"m":w>=e?Math.round(b/e)+"s":b+"ms"}function l(b){var w=Math.abs(b);return w>=o?p(b,w,o,"day"):w>=r?p(b,w,r,"hour"):w>=t?p(b,w,t,"minute"):w>=e?p(b,w,e,"second"):b+" ms"}function p(b,w,I,A){var x=w>=I*1.5;return Math.round(b/I)+" "+A+(x?"s":"")}return Pl}function wA(e){r.debug=r,r.default=r,r.coerce=l,r.disable=f,r.enable=s,r.enabled=h,r.humanize=yA(),r.destroy=p,Object.keys(e).forEach(b=>{r[b]=e[b]}),r.names=[],r.skips=[],r.formatters={};function t(b){let w=0;for(let I=0;I<b.length;I++)w=(w<<5)-w+b.charCodeAt(I),w|=0;return r.colors[Math.abs(w)%r.colors.length]}r.selectColor=t;function r(b){let w,I=null,A,x;function v(...C){if(!v.enabled)return;const B=v,P=Number(new Date),S=P-(w||P);B.diff=S,B.prev=w,B.curr=P,w=P,C[0]=r.coerce(C[0]),typeof C[0]!="string"&&C.unshift("%O");let m=0;C[0]=C[0].replace(/%([a-zA-Z%])/g,(Q,ce)=>{if(Q==="%%")return"%";m++;const ue=r.formatters[ce];if(typeof ue=="function"){const te=C[m];Q=ue.call(B,te),C.splice(m,1),m--}return Q}),r.formatArgs.call(B,C),(B.log||r.log).apply(B,C)}return v.namespace=b,v.useColors=r.useColors(),v.color=r.selectColor(b),v.extend=o,v.destroy=r.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>I!==null?I:(A!==r.namespaces&&(A=r.namespaces,x=r.enabled(b)),x),set:C=>{I=C}}),typeof r.init=="function"&&r.init(v),v}function o(b,w){const I=r(this.namespace+(typeof w>"u"?":":w)+b);return I.log=this.log,I}function s(b){r.save(b),r.namespaces=b,r.names=[],r.skips=[];const w=(typeof b=="string"?b:"").trim().replace(" ",",").split(",").filter(Boolean);for(const I of w)I[0]==="-"?r.skips.push(I.slice(1)):r.names.push(I)}function u(b,w){let I=0,A=0,x=-1,v=0;for(;I<b.length;)if(A<w.length&&(w[A]===b[I]||w[A]==="*"))w[A]==="*"?(x=A,v=I,A++):(I++,A++);else if(x!==-1)A=x+1,v++,I=v;else return!1;for(;A<w.length&&w[A]==="*";)A++;return A===w.length}function f(){const b=[...r.names,...r.skips.map(w=>"-"+w)].join(",");return r.enable(""),b}function h(b){for(const w of r.skips)if(u(b,w))return!1;for(const w of r.names)if(u(b,w))return!0;return!1}function l(b){return b instanceof Error?b.stack||b.message:b}function p(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}var mA=wA;(function(e,t){t.formatArgs=o,t.save=s,t.load=u,t.useColors=r,t.storage=f(),t.destroy=(()=>{let l=!1;return()=>{l||(l=!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`."))}})(),t.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"];function r(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let l;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(l=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(l[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function o(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const p="color: "+this.color;l.splice(1,0,p,"color: inherit");let b=0,w=0;l[0].replace(/%[a-zA-Z%]/g,I=>{I!=="%%"&&(b++,I==="%c"&&(w=b))}),l.splice(w,0,p)}t.log=console.debug||console.log||(()=>{});function s(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function u(){let l;try{l=t.storage.getItem("debug")}catch{}return!l&&typeof W.dist.process<"u"&&"env"in W.dist.process&&(l=W.dist.process.env.DEBUG),l}function f(){try{return localStorage}catch{}}e.exports=mA(t);const{formatters:h}=e.exports;h.j=function(l){try{return JSON.stringify(l)}catch(p){return"[UnexpectedJSONParseError]: "+p.message}}})(_c,_c.exports);var EA=_c.exports,nn={},Ei={},Gc=Is;Is.default=Is;Is.stable=n_;Is.stableStringify=n_;var hu="[...]",t_="[Circular]",Wi=[],Fi=[];function r_(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Is(e,t,r,o){typeof o>"u"&&(o=r_()),yc(e,"",0,[],void 0,0,o);var s;try{Fi.length===0?s=JSON.stringify(e,t,r):s=JSON.stringify(e,i_(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Wi.length!==0;){var u=Wi.pop();u.length===4?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return s}function Ro(e,t,r,o){var s=Object.getOwnPropertyDescriptor(o,r);s.get!==void 0?s.configurable?(Object.defineProperty(o,r,{value:e}),Wi.push([o,r,t,s])):Fi.push([t,r,e]):(o[r]=e,Wi.push([o,r,t]))}function yc(e,t,r,o,s,u,f){u+=1;var h;if(typeof e=="object"&&e!==null){for(h=0;h<o.length;h++)if(o[h]===e){Ro(t_,e,t,s);return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){Ro(hu,e,t,s);return}if(typeof f.edgesLimit<"u"&&r+1>f.edgesLimit){Ro(hu,e,t,s);return}if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)yc(e[h],h,h,o,e,u,f);else{var l=Object.keys(e);for(h=0;h<l.length;h++){var p=l[h];yc(e[p],p,h,o,e,u,f)}}o.pop()}}function vA(e,t){return e<t?-1:e>t?1:0}function n_(e,t,r,o){typeof o>"u"&&(o=r_());var s=wc(e,"",0,[],void 0,0,o)||e,u;try{Fi.length===0?u=JSON.stringify(s,t,r):u=JSON.stringify(s,i_(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Wi.length!==0;){var f=Wi.pop();f.length===4?Object.defineProperty(f[0],f[1],f[3]):f[0][f[1]]=f[2]}}return u}function wc(e,t,r,o,s,u,f){u+=1;var h;if(typeof e=="object"&&e!==null){for(h=0;h<o.length;h++)if(o[h]===e){Ro(t_,e,t,s);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){Ro(hu,e,t,s);return}if(typeof f.edgesLimit<"u"&&r+1>f.edgesLimit){Ro(hu,e,t,s);return}if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)wc(e[h],h,h,o,e,u,f);else{var l={},p=Object.keys(e).sort(vA);for(h=0;h<p.length;h++){var b=p[h];wc(e[b],b,h,o,e,u,f),l[b]=e[b]}if(typeof s<"u")Wi.push([s,t,e]),s[t]=l;else return l}o.pop()}}function i_(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(Fi.length>0)for(var o=0;o<Fi.length;o++){var s=Fi[o];if(s[1]===t&&s[0]===r){r=s[2],Fi.splice(o,1);break}}return e.call(this,t,r)}}const SA=W.getDefaultExportFromCjs(Gc);Object.defineProperty(Ei,"__esModule",{value:!0});Ei.EthereumProviderError=Ei.EthereumRpcError=void 0;const RA=Gc;class o_ extends Error{constructor(t,r,o){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=t,o!==void 0&&(this.data=o)}serialize(){const t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return RA.default(this.serialize(),IA,2)}}Ei.EthereumRpcError=o_;let AA=class extends o_{constructor(t,r,o){if(!TA(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,o)}};Ei.EthereumProviderError=AA;function TA(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function IA(e,t){if(t!=="[Circular]")return t}var Vc={},vi={};Object.defineProperty(vi,"__esModule",{value:!0});vi.errorValues=vi.errorCodes=void 0;vi.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}};vi.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."}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=vi,r=Ei,o=t.errorCodes.rpc.internal,s="Unspecified error message. This is a bug, please report it.",u={code:o,message:f(o)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function f(I,A=s){if(Number.isInteger(I)){const x=I.toString();if(w(t.errorValues,x))return t.errorValues[x].message;if(p(I))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return A}e.getMessageFromCode=f;function h(I){if(!Number.isInteger(I))return!1;const A=I.toString();return!!(t.errorValues[A]||p(I))}e.isValidCode=h;function l(I,{fallbackError:A=u,shouldIncludeStack:x=!1}={}){var v,C;if(!A||!Number.isInteger(A.code)||typeof A.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(I instanceof r.EthereumRpcError)return I.serialize();const B={};if(I&&typeof I=="object"&&!Array.isArray(I)&&w(I,"code")&&h(I.code)){const S=I;B.code=S.code,S.message&&typeof S.message=="string"?(B.message=S.message,w(S,"data")&&(B.data=S.data)):(B.message=f(B.code),B.data={originalError:b(I)})}else{B.code=A.code;const S=(v=I)===null||v===void 0?void 0:v.message;B.message=S&&typeof S=="string"?S:A.message,B.data={originalError:b(I)}}const P=(C=I)===null||C===void 0?void 0:C.stack;return x&&I&&P&&typeof P=="string"&&(B.stack=P),B}e.serializeError=l;function p(I){return I>=-32099&&I<=-32e3}function b(I){return I&&typeof I=="object"&&!Array.isArray(I)?Object.assign({},I):I}function w(I,A){return Object.prototype.hasOwnProperty.call(I,A)}})(Vc);var Tu={};Object.defineProperty(Tu,"__esModule",{value:!0});Tu.ethErrors=void 0;const zc=Ei,s_=Vc,Yt=vi;Tu.ethErrors={rpc:{parse:e=>jr(Yt.errorCodes.rpc.parse,e),invalidRequest:e=>jr(Yt.errorCodes.rpc.invalidRequest,e),invalidParams:e=>jr(Yt.errorCodes.rpc.invalidParams,e),methodNotFound:e=>jr(Yt.errorCodes.rpc.methodNotFound,e),internal:e=>jr(Yt.errorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||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 jr(t,e)},invalidInput:e=>jr(Yt.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>jr(Yt.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>jr(Yt.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>jr(Yt.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>jr(Yt.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>jr(Yt.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>hs(Yt.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>hs(Yt.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>hs(Yt.errorCodes.provider.unsupportedMethod,e),disconnected:e=>hs(Yt.errorCodes.provider.disconnected,e),chainDisconnected:e=>hs(Yt.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:o}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new zc.EthereumProviderError(t,r,o)}}};function jr(e,t){const[r,o]=a_(t);return new zc.EthereumRpcError(e,r||s_.getMessageFromCode(e),o)}function hs(e,t){const[r,o]=a_(t);return new zc.EthereumProviderError(e,r||s_.getMessageFromCode(e),o)}function a_(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const t=Ei;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const r=Vc;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const o=Tu;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const s=vi;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})})(nn);function Ne(e,t,r){return(t=x1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var OA={exports:{}},Bl={exports:{}};let CA=class extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);let r="";for(let o=0;o<t.length;o++)r+=` ${t[o].stack}
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./index-CPrRSa2B.js"),ds=require("./index-mBnUIOuA.js");function As(e){"@babel/helpers - typeof";return As=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},As(e)}function M1(e,t){if(As(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(As(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function x1(e){var t=M1(e,"string");return As(t)=="symbol"?t:t+""}var pc={exports:{}},Wb=W.eventsExports.EventEmitter,Rl,Ug;function D1(){if(Ug)return Rl;Ug=1;function e(x,v){var C=Object.keys(x);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(x);v&&(B=B.filter(function(P){return Object.getOwnPropertyDescriptor(x,P).enumerable})),C.push.apply(C,B)}return C}function t(x){for(var v=1;v<arguments.length;v++){var C=arguments[v]!=null?arguments[v]:{};v%2?e(Object(C),!0).forEach(function(B){r(x,B,C[B])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(C)):e(Object(C)).forEach(function(B){Object.defineProperty(x,B,Object.getOwnPropertyDescriptor(C,B))})}return x}function r(x,v,C){return v=f(v),v in x?Object.defineProperty(x,v,{value:C,enumerable:!0,configurable:!0,writable:!0}):x[v]=C,x}function o(x,v){if(!(x instanceof v))throw new TypeError("Cannot call a class as a function")}function s(x,v){for(var C=0;C<v.length;C++){var B=v[C];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(x,f(B.key),B)}}function u(x,v,C){return v&&s(x.prototype,v),Object.defineProperty(x,"prototype",{writable:!1}),x}function f(x){var v=h(x,"string");return typeof v=="symbol"?v:String(v)}function h(x,v){if(typeof x!="object"||x===null)return x;var C=x[Symbol.toPrimitive];if(C!==void 0){var B=C.call(x,v);if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(x)}var l=W.bufferPolyfill,p=l.Buffer,b=W.require$$3,w=b.inspect,I=w&&w.custom||"inspect";function A(x,v,C){p.prototype.copy.call(x,v,C)}return Rl=function(){function x(){o(this,x),this.head=null,this.tail=null,this.length=0}return u(x,[{key:"push",value:function(C){var B={data:C,next:null};this.length>0?this.tail.next=B:this.head=B,this.tail=B,++this.length}},{key:"unshift",value:function(C){var B={data:C,next:this.head};this.length===0&&(this.tail=B),this.head=B,++this.length}},{key:"shift",value:function(){if(this.length!==0){var C=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,C}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(C){if(this.length===0)return"";for(var B=this.head,P=""+B.data;B=B.next;)P+=C+B.data;return P}},{key:"concat",value:function(C){if(this.length===0)return p.alloc(0);for(var B=p.allocUnsafe(C>>>0),P=this.head,S=0;P;)A(P.data,B,S),S+=P.data.length,P=P.next;return B}},{key:"consume",value:function(C,B){var P;return C<this.head.data.length?(P=this.head.data.slice(0,C),this.head.data=this.head.data.slice(C)):C===this.head.data.length?P=this.shift():P=B?this._getString(C):this._getBuffer(C),P}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(C){var B=this.head,P=1,S=B.data;for(C-=S.length;B=B.next;){var m=B.data,j=C>m.length?m.length:C;if(j===m.length?S+=m:S+=m.slice(0,C),C-=j,C===0){j===m.length?(++P,B.next?this.head=B.next:this.head=this.tail=null):(this.head=B,B.data=m.slice(j));break}++P}return this.length-=P,S}},{key:"_getBuffer",value:function(C){var B=p.allocUnsafe(C),P=this.head,S=1;for(P.data.copy(B),C-=P.data.length;P=P.next;){var m=P.data,j=C>m.length?m.length:C;if(m.copy(B,B.length-C,0,j),C-=j,C===0){j===m.length?(++S,P.next?this.head=P.next:this.head=this.tail=null):(this.head=P,P.data=m.slice(j));break}++S}return this.length-=S,B}},{key:I,value:function(C,B){return w(this,t(t({},B),{},{depth:0,customInspect:!1}))}}]),x}(),Rl}function j1(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,W.dist.process.nextTick(bc,this,e)):W.dist.process.nextTick(bc,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(u){!t&&u?r._writableState?r._writableState.errorEmitted?W.dist.process.nextTick(au,r):(r._writableState.errorEmitted=!0,W.dist.process.nextTick(kg,r,u)):W.dist.process.nextTick(kg,r,u):t?(W.dist.process.nextTick(au,r),t(u)):W.dist.process.nextTick(au,r)}),this)}function kg(e,t){bc(e,t),au(e)}function au(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function U1(){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.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function bc(e,t){e.emit("error",t)}function k1(e,t){var r=e._readableState,o=e._writableState;r&&r.autoDestroy||o&&o.autoDestroy?e.destroy(t):e.emit("error",t)}var qb={destroy:j1,undestroy:U1,errorOrDestroy:k1},Vi={};function F1(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Gb={};function Wr(e,t,r){r||(r=Error);function o(u,f,h){return typeof t=="string"?t:t(u,f,h)}var s=function(u){F1(f,u);function f(h,l,p){return u.call(this,o(h,l,p))||this}return f}(r);s.prototype.name=r.name,s.prototype.code=e,Gb[e]=s}function Fg(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(o){return String(o)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function H1(e,t,r){return e.substr(0,t.length)===t}function W1(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function q1(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}Wr("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Wr("ERR_INVALID_ARG_TYPE",function(e,t,r){var o;typeof t=="string"&&H1(t,"not ")?(o="must not be",t=t.replace(/^not /,"")):o="must be";var s;if(W1(e," argument"))s="The ".concat(e," ").concat(o," ").concat(Fg(t,"type"));else{var u=q1(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(o," ").concat(Fg(t,"type"))}return s+=". Received type ".concat(typeof r),s},TypeError);Wr("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Wr("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Wr("ERR_STREAM_PREMATURE_CLOSE","Premature close");Wr("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Wr("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Wr("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Wr("ERR_STREAM_WRITE_AFTER_END","write after end");Wr("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Wr("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Wr("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Vi.codes=Gb;var G1=Vi.codes.ERR_INVALID_OPT_VALUE;function V1(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function z1(e,t,r,o){var s=V1(t,o,r);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var u=o?r:"highWaterMark";throw new G1(u,s)}return Math.floor(s)}return e.objectMode?16:16*1024}var Vb={getHighWaterMark:z1},Al,Hg;function zb(){if(Hg)return Al;Hg=1,Al=ue;function e(R){var O=this;this.next=null,this.entry=null,this.finish=function(){be(O,R)}}var t;ue.WritableState=Q;var r={deprecate:W.requireBrowser()},o=Wb,s=W.bufferPolyfill.Buffer,u=(typeof W.commonjsGlobal<"u"?W.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function f(R){return s.from(R)}function h(R){return s.isBuffer(R)||R instanceof u}var l=qb,p=Vb,b=p.getHighWaterMark,w=Vi.codes,I=w.ERR_INVALID_ARG_TYPE,A=w.ERR_METHOD_NOT_IMPLEMENTED,x=w.ERR_MULTIPLE_CALLBACK,v=w.ERR_STREAM_CANNOT_PIPE,C=w.ERR_STREAM_DESTROYED,B=w.ERR_STREAM_NULL_VALUES,P=w.ERR_STREAM_WRITE_AFTER_END,S=w.ERR_UNKNOWN_ENCODING,m=l.errorOrDestroy;W.inherits_browserExports(ue,o);function j(){}function Q(R,O,q){t=t||Oo(),R=R||{},typeof q!="boolean"&&(q=O instanceof t),this.objectMode=!!R.objectMode,q&&(this.objectMode=this.objectMode||!!R.writableObjectMode),this.highWaterMark=b(this,R,"writableHighWaterMark",q),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var oe=R.decodeStrings===!1;this.decodeStrings=!oe,this.defaultEncoding=R.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ye){Y(O,ye)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=R.emitClose!==!1,this.autoDestroy=!!R.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}Q.prototype.getBuffer=function(){for(var O=this.bufferedRequest,q=[];O;)q.push(O),O=O.next;return q},function(){try{Object.defineProperty(Q.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var ce;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ce=Function.prototype[Symbol.hasInstance],Object.defineProperty(ue,Symbol.hasInstance,{value:function(O){return ce.call(this,O)?!0:this!==ue?!1:O&&O._writableState instanceof Q}})):ce=function(O){return O instanceof this};function ue(R){t=t||Oo();var O=this instanceof t;if(!O&&!ce.call(ue,this))return new ue(R);this._writableState=new Q(R,this,O),this.writable=!0,R&&(typeof R.write=="function"&&(this._write=R.write),typeof R.writev=="function"&&(this._writev=R.writev),typeof R.destroy=="function"&&(this._destroy=R.destroy),typeof R.final=="function"&&(this._final=R.final)),o.call(this)}ue.prototype.pipe=function(){m(this,new v)};function te(R,O){var q=new P;m(R,q),W.dist.process.nextTick(O,q)}function Se(R,O,q,oe){var ye;return q===null?ye=new B:typeof q!="string"&&!O.objectMode&&(ye=new I("chunk",["string","Buffer"],q)),ye?(m(R,ye),W.dist.process.nextTick(oe,ye),!1):!0}ue.prototype.write=function(R,O,q){var oe=this._writableState,ye=!1,d=!oe.objectMode&&h(R);return d&&!s.isBuffer(R)&&(R=f(R)),typeof O=="function"&&(q=O,O=null),d?O="buffer":O||(O=oe.defaultEncoding),typeof q!="function"&&(q=j),oe.ending?te(this,q):(d||Se(this,oe,R,q))&&(oe.pendingcb++,ye=F(this,oe,d,R,O,q)),ye},ue.prototype.cork=function(){this._writableState.corked++},ue.prototype.uncork=function(){var R=this._writableState;R.corked&&(R.corked--,!R.writing&&!R.corked&&!R.bufferProcessing&&R.bufferedRequest&&H(this,R))},ue.prototype.setDefaultEncoding=function(O){if(typeof O=="string"&&(O=O.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((O+"").toLowerCase())>-1))throw new S(O);return this._writableState.defaultEncoding=O,this},Object.defineProperty(ue.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function me(R,O,q){return!R.objectMode&&R.decodeStrings!==!1&&typeof O=="string"&&(O=s.from(O,q)),O}Object.defineProperty(ue.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function F(R,O,q,oe,ye,d){if(!q){var g=me(O,oe,ye);oe!==g&&(q=!0,ye="buffer",oe=g)}var _=O.objectMode?1:oe.length;O.length+=_;var E=O.length<O.highWaterMark;if(E||(O.needDrain=!0),O.writing||O.corked){var J=O.lastBufferedRequest;O.lastBufferedRequest={chunk:oe,encoding:ye,isBuf:q,callback:d,next:null},J?J.next=O.lastBufferedRequest:O.bufferedRequest=O.lastBufferedRequest,O.bufferedRequestCount+=1}else U(R,O,!1,_,oe,ye,d);return E}function U(R,O,q,oe,ye,d,g){O.writelen=oe,O.writecb=g,O.writing=!0,O.sync=!0,O.destroyed?O.onwrite(new C("write")):q?R._writev(ye,O.onwrite):R._write(ye,d,O.onwrite),O.sync=!1}function $(R,O,q,oe,ye){--O.pendingcb,q?(W.dist.process.nextTick(ye,oe),W.dist.process.nextTick(re,R,O),R._writableState.errorEmitted=!0,m(R,oe)):(ye(oe),R._writableState.errorEmitted=!0,m(R,oe),re(R,O))}function G(R){R.writing=!1,R.writecb=null,R.length-=R.writelen,R.writelen=0}function Y(R,O){var q=R._writableState,oe=q.sync,ye=q.writecb;if(typeof ye!="function")throw new x;if(G(q),O)$(R,q,oe,O,ye);else{var d=K(q)||R.destroyed;!d&&!q.corked&&!q.bufferProcessing&&q.bufferedRequest&&H(R,q),oe?W.dist.process.nextTick(V,R,q,d,ye):V(R,q,d,ye)}}function V(R,O,q,oe){q||ne(R,O),O.pendingcb--,oe(),re(R,O)}function ne(R,O){O.length===0&&O.needDrain&&(O.needDrain=!1,R.emit("drain"))}function H(R,O){O.bufferProcessing=!0;var q=O.bufferedRequest;if(R._writev&&q&&q.next){var oe=O.bufferedRequestCount,ye=new Array(oe),d=O.corkedRequestsFree;d.entry=q;for(var g=0,_=!0;q;)ye[g]=q,q.isBuf||(_=!1),q=q.next,g+=1;ye.allBuffers=_,U(R,O,!0,O.length,ye,"",d.finish),O.pendingcb++,O.lastBufferedRequest=null,d.next?(O.corkedRequestsFree=d.next,d.next=null):O.corkedRequestsFree=new e(O),O.bufferedRequestCount=0}else{for(;q;){var E=q.chunk,J=q.encoding,ie=q.callback,se=O.objectMode?1:E.length;if(U(R,O,!1,se,E,J,ie),q=q.next,O.bufferedRequestCount--,O.writing)break}q===null&&(O.lastBufferedRequest=null)}O.bufferedRequest=q,O.bufferProcessing=!1}ue.prototype._write=function(R,O,q){q(new A("_write()"))},ue.prototype._writev=null,ue.prototype.end=function(R,O,q){var oe=this._writableState;return typeof R=="function"?(q=R,R=null,O=null):typeof O=="function"&&(q=O,O=null),R!=null&&this.write(R,O),oe.corked&&(oe.corked=1,this.uncork()),oe.ending||_e(this,oe,q),this},Object.defineProperty(ue.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function K(R){return R.ending&&R.length===0&&R.bufferedRequest===null&&!R.finished&&!R.writing}function ae(R,O){R._final(function(q){O.pendingcb--,q&&m(R,q),O.prefinished=!0,R.emit("prefinish"),re(R,O)})}function de(R,O){!O.prefinished&&!O.finalCalled&&(typeof R._final=="function"&&!O.destroyed?(O.pendingcb++,O.finalCalled=!0,W.dist.process.nextTick(ae,R,O)):(O.prefinished=!0,R.emit("prefinish")))}function re(R,O){var q=K(O);if(q&&(de(R,O),O.pendingcb===0&&(O.finished=!0,R.emit("finish"),O.autoDestroy))){var oe=R._readableState;(!oe||oe.autoDestroy&&oe.endEmitted)&&R.destroy()}return q}function _e(R,O,q){O.ending=!0,re(R,O),q&&(O.finished?W.dist.process.nextTick(q):R.once("finish",q)),O.ended=!0,R.writable=!1}function be(R,O,q){var oe=R.entry;for(R.entry=null;oe;){var ye=oe.callback;O.pendingcb--,ye(q),oe=oe.next}O.corkedRequestsFree.next=R}return Object.defineProperty(ue.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(O){this._writableState&&(this._writableState.destroyed=O)}}),ue.prototype.destroy=l.destroy,ue.prototype._undestroy=l.undestroy,ue.prototype._destroy=function(R,O){O(R)},Al}var Tl,Wg;function Oo(){if(Wg)return Tl;Wg=1;var e=Object.keys||function(p){var b=[];for(var w in p)b.push(w);return b};Tl=f;var t=Jb(),r=zb();W.inherits_browserExports(f,t);for(var o=e(r.prototype),s=0;s<o.length;s++){var u=o[s];f.prototype[u]||(f.prototype[u]=r.prototype[u])}function f(p){if(!(this instanceof f))return new f(p);t.call(this,p),r.call(this,p),this.allowHalfOpen=!0,p&&(p.readable===!1&&(this.readable=!1),p.writable===!1&&(this.writable=!1),p.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",h)))}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function h(){this._writableState.ended||W.dist.process.nextTick(l,this)}function l(p){p.end()}return Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(b){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=b,this._writableState.destroyed=b)}}),Tl}var qg=Vi.codes.ERR_STREAM_PREMATURE_CLOSE;function K1(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];e.apply(this,o)}}}function J1(){}function Y1(e){return e.setHeader&&typeof e.abort=="function"}function Kb(e,t,r){if(typeof t=="function")return Kb(e,null,t);t||(t={}),r=K1(r||J1);var o=t.readable||t.readable!==!1&&e.readable,s=t.writable||t.writable!==!1&&e.writable,u=function(){e.writable||h()},f=e._writableState&&e._writableState.finished,h=function(){s=!1,f=!0,o||r.call(e)},l=e._readableState&&e._readableState.endEmitted,p=function(){o=!1,l=!0,s||r.call(e)},b=function(x){r.call(e,x)},w=function(){var x;if(o&&!l)return(!e._readableState||!e._readableState.ended)&&(x=new qg),r.call(e,x);if(s&&!f)return(!e._writableState||!e._writableState.ended)&&(x=new qg),r.call(e,x)},I=function(){e.req.on("finish",h)};return Y1(e)?(e.on("complete",h),e.on("abort",w),e.req?I():e.on("request",I)):s&&!e._writableState&&(e.on("end",u),e.on("close",u)),e.on("end",p),e.on("finish",h),t.error!==!1&&e.on("error",b),e.on("close",w),function(){e.removeListener("complete",h),e.removeListener("abort",w),e.removeListener("request",I),e.req&&e.req.removeListener("finish",h),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",h),e.removeListener("end",p),e.removeListener("error",b),e.removeListener("close",w)}}var qc=Kb,Il,Gg;function X1(){if(Gg)return Il;Gg=1;var e;function t(S,m,j){return m=r(m),m in S?Object.defineProperty(S,m,{value:j,enumerable:!0,configurable:!0,writable:!0}):S[m]=j,S}function r(S){var m=o(S,"string");return typeof m=="symbol"?m:String(m)}function o(S,m){if(typeof S!="object"||S===null)return S;var j=S[Symbol.toPrimitive];if(j!==void 0){var Q=j.call(S,m);if(typeof Q!="object")return Q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(S)}var s=qc,u=Symbol("lastResolve"),f=Symbol("lastReject"),h=Symbol("error"),l=Symbol("ended"),p=Symbol("lastPromise"),b=Symbol("handlePromise"),w=Symbol("stream");function I(S,m){return{value:S,done:m}}function A(S){var m=S[u];if(m!==null){var j=S[w].read();j!==null&&(S[p]=null,S[u]=null,S[f]=null,m(I(j,!1)))}}function x(S){W.dist.process.nextTick(A,S)}function v(S,m){return function(j,Q){S.then(function(){if(m[l]){j(I(void 0,!0));return}m[b](j,Q)},Q)}}var C=Object.getPrototypeOf(function(){}),B=Object.setPrototypeOf((e={get stream(){return this[w]},next:function(){var m=this,j=this[h];if(j!==null)return Promise.reject(j);if(this[l])return Promise.resolve(I(void 0,!0));if(this[w].destroyed)return new Promise(function(te,Se){W.dist.process.nextTick(function(){m[h]?Se(m[h]):te(I(void 0,!0))})});var Q=this[p],ce;if(Q)ce=new Promise(v(Q,this));else{var ue=this[w].read();if(ue!==null)return Promise.resolve(I(ue,!1));ce=new Promise(this[b])}return this[p]=ce,ce}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var m=this;return new Promise(function(j,Q){m[w].destroy(null,function(ce){if(ce){Q(ce);return}j(I(void 0,!0))})})}),e),C),P=function(m){var j,Q=Object.create(B,(j={},t(j,w,{value:m,writable:!0}),t(j,u,{value:null,writable:!0}),t(j,f,{value:null,writable:!0}),t(j,h,{value:null,writable:!0}),t(j,l,{value:m._readableState.endEmitted,writable:!0}),t(j,b,{value:function(ue,te){var Se=Q[w].read();Se?(Q[p]=null,Q[u]=null,Q[f]=null,ue(I(Se,!1))):(Q[u]=ue,Q[f]=te)},writable:!0}),j));return Q[p]=null,s(m,function(ce){if(ce&&ce.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ue=Q[f];ue!==null&&(Q[p]=null,Q[u]=null,Q[f]=null,ue(ce)),Q[h]=ce;return}var te=Q[u];te!==null&&(Q[p]=null,Q[u]=null,Q[f]=null,te(I(void 0,!0))),Q[l]=!0}),m.on("readable",x.bind(null,Q)),Q};return Il=P,Il}var Ol,Vg;function Z1(){return Vg||(Vg=1,Ol=function(){throw new Error("Readable.from is not available in the browser")}),Ol}var Cl,zg;function Jb(){if(zg)return Cl;zg=1,Cl=te;var e;te.ReadableState=ue,W.eventsExports.EventEmitter;var t=function(g,_){return g.listeners(_).length},r=Wb,o=W.bufferPolyfill.Buffer,s=(typeof W.commonjsGlobal<"u"?W.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function u(d){return o.from(d)}function f(d){return o.isBuffer(d)||d instanceof s}var h=W.require$$3,l;h&&h.debuglog?l=h.debuglog("stream"):l=function(){};var p=D1(),b=qb,w=Vb,I=w.getHighWaterMark,A=Vi.codes,x=A.ERR_INVALID_ARG_TYPE,v=A.ERR_STREAM_PUSH_AFTER_EOF,C=A.ERR_METHOD_NOT_IMPLEMENTED,B=A.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,P,S,m;W.inherits_browserExports(te,r);var j=b.errorOrDestroy,Q=["error","close","destroy","pause","resume"];function ce(d,g,_){if(typeof d.prependListener=="function")return d.prependListener(g,_);!d._events||!d._events[g]?d.on(g,_):Array.isArray(d._events[g])?d._events[g].unshift(_):d._events[g]=[_,d._events[g]]}function ue(d,g,_){e=e||Oo(),d=d||{},typeof _!="boolean"&&(_=g instanceof e),this.objectMode=!!d.objectMode,_&&(this.objectMode=this.objectMode||!!d.readableObjectMode),this.highWaterMark=I(this,d,"readableHighWaterMark",_),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.paused=!0,this.emitClose=d.emitClose!==!1,this.autoDestroy=!!d.autoDestroy,this.destroyed=!1,this.defaultEncoding=d.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,d.encoding&&(P||(P=W.requireString_decoder().StringDecoder),this.decoder=new P(d.encoding),this.encoding=d.encoding)}function te(d){if(e=e||Oo(),!(this instanceof te))return new te(d);var g=this instanceof e;this._readableState=new ue(d,this,g),this.readable=!0,d&&(typeof d.read=="function"&&(this._read=d.read),typeof d.destroy=="function"&&(this._destroy=d.destroy)),r.call(this)}Object.defineProperty(te.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(g){this._readableState&&(this._readableState.destroyed=g)}}),te.prototype.destroy=b.destroy,te.prototype._undestroy=b.undestroy,te.prototype._destroy=function(d,g){g(d)},te.prototype.push=function(d,g){var _=this._readableState,E;return _.objectMode?E=!0:typeof d=="string"&&(g=g||_.defaultEncoding,g!==_.encoding&&(d=o.from(d,g),g=""),E=!0),Se(this,d,g,!1,E)},te.prototype.unshift=function(d){return Se(this,d,null,!0,!1)};function Se(d,g,_,E,J){l("readableAddChunk",g);var ie=d._readableState;if(g===null)ie.reading=!1,Y(d,ie);else{var se;if(J||(se=F(ie,g)),se)j(d,se);else if(ie.objectMode||g&&g.length>0)if(typeof g!="string"&&!ie.objectMode&&Object.getPrototypeOf(g)!==o.prototype&&(g=u(g)),E)ie.endEmitted?j(d,new B):me(d,ie,g,!0);else if(ie.ended)j(d,new v);else{if(ie.destroyed)return!1;ie.reading=!1,ie.decoder&&!_?(g=ie.decoder.write(g),ie.objectMode||g.length!==0?me(d,ie,g,!1):H(d,ie)):me(d,ie,g,!1)}else E||(ie.reading=!1,H(d,ie))}return!ie.ended&&(ie.length<ie.highWaterMark||ie.length===0)}function me(d,g,_,E){g.flowing&&g.length===0&&!g.sync?(g.awaitDrain=0,d.emit("data",_)):(g.length+=g.objectMode?1:_.length,E?g.buffer.unshift(_):g.buffer.push(_),g.needReadable&&V(d)),H(d,g)}function F(d,g){var _;return!f(g)&&typeof g!="string"&&g!==void 0&&!d.objectMode&&(_=new x("chunk",["string","Buffer","Uint8Array"],g)),_}te.prototype.isPaused=function(){return this._readableState.flowing===!1},te.prototype.setEncoding=function(d){P||(P=W.requireString_decoder().StringDecoder);var g=new P(d);this._readableState.decoder=g,this._readableState.encoding=this._readableState.decoder.encoding;for(var _=this._readableState.buffer.head,E="";_!==null;)E+=g.write(_.data),_=_.next;return this._readableState.buffer.clear(),E!==""&&this._readableState.buffer.push(E),this._readableState.length=E.length,this};var U=1073741824;function $(d){return d>=U?d=U:(d--,d|=d>>>1,d|=d>>>2,d|=d>>>4,d|=d>>>8,d|=d>>>16,d++),d}function G(d,g){return d<=0||g.length===0&&g.ended?0:g.objectMode?1:d!==d?g.flowing&&g.length?g.buffer.head.data.length:g.length:(d>g.highWaterMark&&(g.highWaterMark=$(d)),d<=g.length?d:g.ended?g.length:(g.needReadable=!0,0))}te.prototype.read=function(d){l("read",d),d=parseInt(d,10);var g=this._readableState,_=d;if(d!==0&&(g.emittedReadable=!1),d===0&&g.needReadable&&((g.highWaterMark!==0?g.length>=g.highWaterMark:g.length>0)||g.ended))return l("read: emitReadable",g.length,g.ended),g.length===0&&g.ended?q(this):V(this),null;if(d=G(d,g),d===0&&g.ended)return g.length===0&&q(this),null;var E=g.needReadable;l("need readable",E),(g.length===0||g.length-d<g.highWaterMark)&&(E=!0,l("length less than watermark",E)),g.ended||g.reading?(E=!1,l("reading or ended",E)):E&&(l("do read"),g.reading=!0,g.sync=!0,g.length===0&&(g.needReadable=!0),this._read(g.highWaterMark),g.sync=!1,g.reading||(d=G(_,g)));var J;return d>0?J=O(d,g):J=null,J===null?(g.needReadable=g.length<=g.highWaterMark,d=0):(g.length-=d,g.awaitDrain=0),g.length===0&&(g.ended||(g.needReadable=!0),_!==d&&g.ended&&q(this)),J!==null&&this.emit("data",J),J};function Y(d,g){if(l("onEofChunk"),!g.ended){if(g.decoder){var _=g.decoder.end();_&&_.length&&(g.buffer.push(_),g.length+=g.objectMode?1:_.length)}g.ended=!0,g.sync?V(d):(g.needReadable=!1,g.emittedReadable||(g.emittedReadable=!0,ne(d)))}}function V(d){var g=d._readableState;l("emitReadable",g.needReadable,g.emittedReadable),g.needReadable=!1,g.emittedReadable||(l("emitReadable",g.flowing),g.emittedReadable=!0,W.dist.process.nextTick(ne,d))}function ne(d){var g=d._readableState;l("emitReadable_",g.destroyed,g.length,g.ended),!g.destroyed&&(g.length||g.ended)&&(d.emit("readable"),g.emittedReadable=!1),g.needReadable=!g.flowing&&!g.ended&&g.length<=g.highWaterMark,R(d)}function H(d,g){g.readingMore||(g.readingMore=!0,W.dist.process.nextTick(K,d,g))}function K(d,g){for(;!g.reading&&!g.ended&&(g.length<g.highWaterMark||g.flowing&&g.length===0);){var _=g.length;if(l("maybeReadMore read 0"),d.read(0),_===g.length)break}g.readingMore=!1}te.prototype._read=function(d){j(this,new C("_read()"))},te.prototype.pipe=function(d,g){var _=this,E=this._readableState;switch(E.pipesCount){case 0:E.pipes=d;break;case 1:E.pipes=[E.pipes,d];break;default:E.pipes.push(d);break}E.pipesCount+=1,l("pipe count=%d opts=%j",E.pipesCount,g);var J=(!g||g.end!==!1)&&d!==W.dist.process.stdout&&d!==W.dist.process.stderr,ie=J?Ie:_t;E.endEmitted?W.dist.process.nextTick(ie):_.once("end",ie),d.on("unpipe",se);function se(Ye,Ve){l("onunpipe"),Ye===_&&Ve&&Ve.hasUnpiped===!1&&(Ve.hasUnpiped=!0,Ue())}function Ie(){l("onend"),d.end()}var Be=ae(_);d.on("drain",Be);var Ce=!1;function Ue(){l("cleanup"),d.removeListener("close",bt),d.removeListener("finish",et),d.removeListener("drain",Be),d.removeListener("error",He),d.removeListener("unpipe",se),_.removeListener("end",Ie),_.removeListener("end",_t),_.removeListener("data",Re),Ce=!0,E.awaitDrain&&(!d._writableState||d._writableState.needDrain)&&Be()}_.on("data",Re);function Re(Ye){l("ondata");var Ve=d.write(Ye);l("dest.write",Ve),Ve===!1&&((E.pipesCount===1&&E.pipes===d||E.pipesCount>1&&ye(E.pipes,d)!==-1)&&!Ce&&(l("false write response, pause",E.awaitDrain),E.awaitDrain++),_.pause())}function He(Ye){l("onerror",Ye),_t(),d.removeListener("error",He),t(d,"error")===0&&j(d,Ye)}ce(d,"error",He);function bt(){d.removeListener("finish",et),_t()}d.once("close",bt);function et(){l("onfinish"),d.removeListener("close",bt),_t()}d.once("finish",et);function _t(){l("unpipe"),_.unpipe(d)}return d.emit("pipe",_),E.flowing||(l("pipe resume"),_.resume()),d};function ae(d){return function(){var _=d._readableState;l("pipeOnDrain",_.awaitDrain),_.awaitDrain&&_.awaitDrain--,_.awaitDrain===0&&t(d,"data")&&(_.flowing=!0,R(d))}}te.prototype.unpipe=function(d){var g=this._readableState,_={hasUnpiped:!1};if(g.pipesCount===0)return this;if(g.pipesCount===1)return d&&d!==g.pipes?this:(d||(d=g.pipes),g.pipes=null,g.pipesCount=0,g.flowing=!1,d&&d.emit("unpipe",this,_),this);if(!d){var E=g.pipes,J=g.pipesCount;g.pipes=null,g.pipesCount=0,g.flowing=!1;for(var ie=0;ie<J;ie++)E[ie].emit("unpipe",this,{hasUnpiped:!1});return this}var se=ye(g.pipes,d);return se===-1?this:(g.pipes.splice(se,1),g.pipesCount-=1,g.pipesCount===1&&(g.pipes=g.pipes[0]),d.emit("unpipe",this,_),this)},te.prototype.on=function(d,g){var _=r.prototype.on.call(this,d,g),E=this._readableState;return d==="data"?(E.readableListening=this.listenerCount("readable")>0,E.flowing!==!1&&this.resume()):d==="readable"&&!E.endEmitted&&!E.readableListening&&(E.readableListening=E.needReadable=!0,E.flowing=!1,E.emittedReadable=!1,l("on readable",E.length,E.reading),E.length?V(this):E.reading||W.dist.process.nextTick(re,this)),_},te.prototype.addListener=te.prototype.on,te.prototype.removeListener=function(d,g){var _=r.prototype.removeListener.call(this,d,g);return d==="readable"&&W.dist.process.nextTick(de,this),_},te.prototype.removeAllListeners=function(d){var g=r.prototype.removeAllListeners.apply(this,arguments);return(d==="readable"||d===void 0)&&W.dist.process.nextTick(de,this),g};function de(d){var g=d._readableState;g.readableListening=d.listenerCount("readable")>0,g.resumeScheduled&&!g.paused?g.flowing=!0:d.listenerCount("data")>0&&d.resume()}function re(d){l("readable nexttick read 0"),d.read(0)}te.prototype.resume=function(){var d=this._readableState;return d.flowing||(l("resume"),d.flowing=!d.readableListening,_e(this,d)),d.paused=!1,this};function _e(d,g){g.resumeScheduled||(g.resumeScheduled=!0,W.dist.process.nextTick(be,d,g))}function be(d,g){l("resume",g.reading),g.reading||d.read(0),g.resumeScheduled=!1,d.emit("resume"),R(d),g.flowing&&!g.reading&&d.read(0)}te.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function R(d){var g=d._readableState;for(l("flow",g.flowing);g.flowing&&d.read()!==null;);}te.prototype.wrap=function(d){var g=this,_=this._readableState,E=!1;d.on("end",function(){if(l("wrapped end"),_.decoder&&!_.ended){var se=_.decoder.end();se&&se.length&&g.push(se)}g.push(null)}),d.on("data",function(se){if(l("wrapped data"),_.decoder&&(se=_.decoder.write(se)),!(_.objectMode&&se==null)&&!(!_.objectMode&&(!se||!se.length))){var Ie=g.push(se);Ie||(E=!0,d.pause())}});for(var J in d)this[J]===void 0&&typeof d[J]=="function"&&(this[J]=function(Ie){return function(){return d[Ie].apply(d,arguments)}}(J));for(var ie=0;ie<Q.length;ie++)d.on(Q[ie],this.emit.bind(this,Q[ie]));return this._read=function(se){l("wrapped _read",se),E&&(E=!1,d.resume())},this},typeof Symbol=="function"&&(te.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=X1()),S(this)}),Object.defineProperty(te.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(te.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(te.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(g){this._readableState&&(this._readableState.flowing=g)}}),te._fromList=O,Object.defineProperty(te.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function O(d,g){if(g.length===0)return null;var _;return g.objectMode?_=g.buffer.shift():!d||d>=g.length?(g.decoder?_=g.buffer.join(""):g.buffer.length===1?_=g.buffer.first():_=g.buffer.concat(g.length),g.buffer.clear()):_=g.buffer.consume(d,g.decoder),_}function q(d){var g=d._readableState;l("endReadable",g.endEmitted),g.endEmitted||(g.ended=!0,W.dist.process.nextTick(oe,g,d))}function oe(d,g){if(l("endReadableNT",d.endEmitted,d.length),!d.endEmitted&&d.length===0&&(d.endEmitted=!0,g.readable=!1,g.emit("end"),d.autoDestroy)){var _=g._writableState;(!_||_.autoDestroy&&_.finished)&&g.destroy()}}typeof Symbol=="function"&&(te.from=function(d,g){return m===void 0&&(m=Z1()),m(te,d,g)});function ye(d,g){for(var _=0,E=d.length;_<E;_++)if(d[_]===g)return _;return-1}return Cl}var Yb=Jn,Ru=Vi.codes,Q1=Ru.ERR_METHOD_NOT_IMPLEMENTED,eA=Ru.ERR_MULTIPLE_CALLBACK,tA=Ru.ERR_TRANSFORM_ALREADY_TRANSFORMING,rA=Ru.ERR_TRANSFORM_WITH_LENGTH_0,Au=Oo();W.inherits_browserExports(Jn,Au);function nA(e,t){var r=this._transformState;r.transforming=!1;var o=r.writecb;if(o===null)return this.emit("error",new eA);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),o(e);var s=this._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}function Jn(e){if(!(this instanceof Jn))return new Jn(e);Au.call(this,e),this._transformState={afterTransform:nA.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",iA)}function iA(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){Kg(e,t,r)}):Kg(this,null,null)}Jn.prototype.push=function(e,t){return this._transformState.needTransform=!1,Au.prototype.push.call(this,e,t)};Jn.prototype._transform=function(e,t,r){r(new Q1("_transform()"))};Jn.prototype._write=function(e,t,r){var o=this._transformState;if(o.writecb=r,o.writechunk=e,o.writeencoding=t,!o.transforming){var s=this._readableState;(o.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}};Jn.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};Jn.prototype._destroy=function(e,t){Au.prototype._destroy.call(this,e,function(r){t(r)})};function Kg(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new rA;if(e._transformState.transforming)throw new tA;return e.push(null)}var oA=Ts,Xb=Yb;W.inherits_browserExports(Ts,Xb);function Ts(e){if(!(this instanceof Ts))return new Ts(e);Xb.call(this,e)}Ts.prototype._transform=function(e,t,r){r(null,e)};var Ll;function sA(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var Zb=Vi.codes,aA=Zb.ERR_MISSING_ARGS,uA=Zb.ERR_STREAM_DESTROYED;function Jg(e){if(e)throw e}function fA(e){return e.setHeader&&typeof e.abort=="function"}function lA(e,t,r,o){o=sA(o);var s=!1;e.on("close",function(){s=!0}),Ll===void 0&&(Ll=qc),Ll(e,{readable:t,writable:r},function(f){if(f)return o(f);s=!0,o()});var u=!1;return function(f){if(!s&&!u){if(u=!0,fA(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();o(f||new uA("pipe"))}}}function Yg(e){e()}function cA(e,t){return e.pipe(t)}function dA(e){return!e.length||typeof e[e.length-1]!="function"?Jg:e.pop()}function hA(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o=dA(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new aA("streams");var s,u=t.map(function(f,h){var l=h<t.length-1,p=h>0;return lA(f,l,p,function(b){s||(s=b),b&&u.forEach(Yg),!l&&(u.forEach(Yg),o(s))})});return t.reduce(cA)}var gA=hA;(function(e,t){t=e.exports=Jb(),t.Stream=t,t.Readable=t,t.Writable=zb(),t.Duplex=Oo(),t.Transform=Yb,t.PassThrough=oA,t.finished=qc,t.pipeline=gA})(pc,pc.exports);var Qb=pc.exports;const{Transform:vN}=Qb,{Transform:SN}=Qb;var e_={};const Xg=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];e_.p1600=function(e){for(let t=0;t<24;++t){const r=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],f=e[4]^e[14]^e[24]^e[34]^e[44],h=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],p=e[7]^e[17]^e[27]^e[37]^e[47],b=e[8]^e[18]^e[28]^e[38]^e[48],w=e[9]^e[19]^e[29]^e[39]^e[49];let I=b^(s<<1|u>>>31),A=w^(u<<1|s>>>31);const x=e[0]^I,v=e[1]^A,C=e[10]^I,B=e[11]^A,P=e[20]^I,S=e[21]^A,m=e[30]^I,j=e[31]^A,Q=e[40]^I,ce=e[41]^A;I=r^(f<<1|h>>>31),A=o^(h<<1|f>>>31);const ue=e[2]^I,te=e[3]^A,Se=e[12]^I,me=e[13]^A,F=e[22]^I,U=e[23]^A,$=e[32]^I,G=e[33]^A,Y=e[42]^I,V=e[43]^A;I=s^(l<<1|p>>>31),A=u^(p<<1|l>>>31);const ne=e[4]^I,H=e[5]^A,K=e[14]^I,ae=e[15]^A,de=e[24]^I,re=e[25]^A,_e=e[34]^I,be=e[35]^A,R=e[44]^I,O=e[45]^A;I=f^(b<<1|w>>>31),A=h^(w<<1|b>>>31);const q=e[6]^I,oe=e[7]^A,ye=e[16]^I,d=e[17]^A,g=e[26]^I,_=e[27]^A,E=e[36]^I,J=e[37]^A,ie=e[46]^I,se=e[47]^A;I=l^(r<<1|o>>>31),A=p^(o<<1|r>>>31);const Ie=e[8]^I,Be=e[9]^A,Ce=e[18]^I,Ue=e[19]^A,Re=e[28]^I,He=e[29]^A,bt=e[38]^I,et=e[39]^A,_t=e[48]^I,Ye=e[49]^A,Ve=x,Dt=v,Lt=B<<4|C>>>28,at=C<<4|B>>>28,Bt=P<<3|S>>>29,fr=S<<3|P>>>29,er=j<<9|m>>>23,kt=m<<9|j>>>23,lr=Q<<18|ce>>>14,zr=ce<<18|Q>>>14,Kr=ue<<1|te>>>31,sn=te<<1|ue>>>31,an=me<<12|Se>>>20,tr=Se<<12|me>>>20,Or=F<<10|U>>>22,rr=U<<10|F>>>22,Ln=G<<13|$>>>19,Jr=$<<13|G>>>19,un=Y<<2|V>>>30,N=V<<2|Y>>>30,D=H<<30|ne>>>2,Ee=ne<<30|H>>>2,ve=K<<6|ae>>>26,Te=ae<<6|K>>>26,yt=re<<11|de>>>21,St=de<<11|re>>>21,fn=_e<<15|be>>>17,Pt=be<<15|_e>>>17,ln=O<<29|R>>>3,Pn=R<<29|O>>>3,cn=q<<28|oe>>>4,dn=oe<<28|q>>>4,Yr=d<<23|ye>>>9,Gt=ye<<23|d>>>9,Cr=g<<25|_>>>7,yr=_<<25|g>>>7,nr=E<<21|J>>>11,Ft=J<<21|E>>>11,Ti=se<<24|ie>>>8,Ii=ie<<24|se>>>8,Bn=Ie<<27|Be>>>5,hn=Be<<27|Ie>>>5,gn=Ce<<20|Ue>>>12,Lr=Ue<<20|Ce>>>12,Oi=He<<7|Re>>>25,pn=Re<<7|He>>>25,ti=bt<<8|et>>>24,ri=et<<8|bt>>>24,ni=_t<<14|Ye>>>18,ii=Ye<<14|_t>>>18;e[0]=Ve^~an&yt,e[1]=Dt^~tr&St,e[10]=cn^~gn&Bt,e[11]=dn^~Lr&fr,e[20]=Kr^~ve&Cr,e[21]=sn^~Te&yr,e[30]=Bn^~Lt&Or,e[31]=hn^~at&rr,e[40]=D^~Yr&Oi,e[41]=Ee^~Gt&pn,e[2]=an^~yt&nr,e[3]=tr^~St&Ft,e[12]=gn^~Bt&Ln,e[13]=Lr^~fr&Jr,e[22]=ve^~Cr&ti,e[23]=Te^~yr&ri,e[32]=Lt^~Or&fn,e[33]=at^~rr&Pt,e[42]=Yr^~Oi&er,e[43]=Gt^~pn&kt,e[4]=yt^~nr&ni,e[5]=St^~Ft&ii,e[14]=Bt^~Ln&ln,e[15]=fr^~Jr&Pn,e[24]=Cr^~ti&lr,e[25]=yr^~ri&zr,e[34]=Or^~fn&Ti,e[35]=rr^~Pt&Ii,e[44]=Oi^~er&un,e[45]=pn^~kt&N,e[6]=nr^~ni&Ve,e[7]=Ft^~ii&Dt,e[16]=Ln^~ln&cn,e[17]=Jr^~Pn&dn,e[26]=ti^~lr&Kr,e[27]=ri^~zr&sn,e[36]=fn^~Ti&Bn,e[37]=Pt^~Ii&hn,e[46]=er^~un&D,e[47]=kt^~N&Ee,e[8]=ni^~Ve&an,e[9]=ii^~Dt&tr,e[18]=ln^~cn&gn,e[19]=Pn^~dn&Lr,e[28]=lr^~Kr&ve,e[29]=zr^~sn&Te,e[38]=Ti^~Bn&Lt,e[39]=Ii^~hn&at,e[48]=un^~D&Yr,e[49]=N^~Ee&Gt,e[0]^=Xg[t*2],e[1]^=Xg[t*2+1]}};const du=e_;function $s(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}$s.prototype.initialize=function(e,t){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1};$s.prototype.absorb=function(e){for(let t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(du.p1600(this.state),this.count=0)};$s.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<8*(this.count%4),e&128&&this.count===this.blockSize-1&&du.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),du.p1600(this.state),this.count=0,this.squeezing=!0};$s.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const t=W.dist.Buffer.alloc(e);for(let r=0;r<e;++r)t[r]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(du.p1600(this.state),this.count=0);return t};$s.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing};var pA=bA;function bA(e){e=e||{};var t=e.max||Number.MAX_SAFE_INTEGER,r=typeof e.start<"u"?e.start:Math.floor(Math.random()*t);return function(){return r=r%t,r++}}const _A=W.getDefaultExportFromCjs(pA);var _c={exports:{}},Pl,Zg;function yA(){if(Zg)return Pl;Zg=1;var e=1e3,t=e*60,r=t*60,o=r*24,s=o*7,u=o*365.25;Pl=function(b,w){w=w||{};var I=typeof b;if(I==="string"&&b.length>0)return f(b);if(I==="number"&&isFinite(b))return w.long?l(b):h(b);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(b))};function f(b){if(b=String(b),!(b.length>100)){var w=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(b);if(w){var I=parseFloat(w[1]),A=(w[2]||"ms").toLowerCase();switch(A){case"years":case"year":case"yrs":case"yr":case"y":return I*u;case"weeks":case"week":case"w":return I*s;case"days":case"day":case"d":return I*o;case"hours":case"hour":case"hrs":case"hr":case"h":return I*r;case"minutes":case"minute":case"mins":case"min":case"m":return I*t;case"seconds":case"second":case"secs":case"sec":case"s":return I*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return I;default:return}}}}function h(b){var w=Math.abs(b);return w>=o?Math.round(b/o)+"d":w>=r?Math.round(b/r)+"h":w>=t?Math.round(b/t)+"m":w>=e?Math.round(b/e)+"s":b+"ms"}function l(b){var w=Math.abs(b);return w>=o?p(b,w,o,"day"):w>=r?p(b,w,r,"hour"):w>=t?p(b,w,t,"minute"):w>=e?p(b,w,e,"second"):b+" ms"}function p(b,w,I,A){var x=w>=I*1.5;return Math.round(b/I)+" "+A+(x?"s":"")}return Pl}function wA(e){r.debug=r,r.default=r,r.coerce=l,r.disable=f,r.enable=s,r.enabled=h,r.humanize=yA(),r.destroy=p,Object.keys(e).forEach(b=>{r[b]=e[b]}),r.names=[],r.skips=[],r.formatters={};function t(b){let w=0;for(let I=0;I<b.length;I++)w=(w<<5)-w+b.charCodeAt(I),w|=0;return r.colors[Math.abs(w)%r.colors.length]}r.selectColor=t;function r(b){let w,I=null,A,x;function v(...C){if(!v.enabled)return;const B=v,P=Number(new Date),S=P-(w||P);B.diff=S,B.prev=w,B.curr=P,w=P,C[0]=r.coerce(C[0]),typeof C[0]!="string"&&C.unshift("%O");let m=0;C[0]=C[0].replace(/%([a-zA-Z%])/g,(Q,ce)=>{if(Q==="%%")return"%";m++;const ue=r.formatters[ce];if(typeof ue=="function"){const te=C[m];Q=ue.call(B,te),C.splice(m,1),m--}return Q}),r.formatArgs.call(B,C),(B.log||r.log).apply(B,C)}return v.namespace=b,v.useColors=r.useColors(),v.color=r.selectColor(b),v.extend=o,v.destroy=r.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>I!==null?I:(A!==r.namespaces&&(A=r.namespaces,x=r.enabled(b)),x),set:C=>{I=C}}),typeof r.init=="function"&&r.init(v),v}function o(b,w){const I=r(this.namespace+(typeof w>"u"?":":w)+b);return I.log=this.log,I}function s(b){r.save(b),r.namespaces=b,r.names=[],r.skips=[];const w=(typeof b=="string"?b:"").trim().replace(" ",",").split(",").filter(Boolean);for(const I of w)I[0]==="-"?r.skips.push(I.slice(1)):r.names.push(I)}function u(b,w){let I=0,A=0,x=-1,v=0;for(;I<b.length;)if(A<w.length&&(w[A]===b[I]||w[A]==="*"))w[A]==="*"?(x=A,v=I,A++):(I++,A++);else if(x!==-1)A=x+1,v++,I=v;else return!1;for(;A<w.length&&w[A]==="*";)A++;return A===w.length}function f(){const b=[...r.names,...r.skips.map(w=>"-"+w)].join(",");return r.enable(""),b}function h(b){for(const w of r.skips)if(u(b,w))return!1;for(const w of r.names)if(u(b,w))return!0;return!1}function l(b){return b instanceof Error?b.stack||b.message:b}function p(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}var mA=wA;(function(e,t){t.formatArgs=o,t.save=s,t.load=u,t.useColors=r,t.storage=f(),t.destroy=(()=>{let l=!1;return()=>{l||(l=!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`."))}})(),t.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"];function r(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let l;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(l=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(l[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function o(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const p="color: "+this.color;l.splice(1,0,p,"color: inherit");let b=0,w=0;l[0].replace(/%[a-zA-Z%]/g,I=>{I!=="%%"&&(b++,I==="%c"&&(w=b))}),l.splice(w,0,p)}t.log=console.debug||console.log||(()=>{});function s(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function u(){let l;try{l=t.storage.getItem("debug")}catch{}return!l&&typeof W.dist.process<"u"&&"env"in W.dist.process&&(l=W.dist.process.env.DEBUG),l}function f(){try{return localStorage}catch{}}e.exports=mA(t);const{formatters:h}=e.exports;h.j=function(l){try{return JSON.stringify(l)}catch(p){return"[UnexpectedJSONParseError]: "+p.message}}})(_c,_c.exports);var EA=_c.exports,nn={},Ei={},Gc=Is;Is.default=Is;Is.stable=n_;Is.stableStringify=n_;var hu="[...]",t_="[Circular]",Wi=[],Fi=[];function r_(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Is(e,t,r,o){typeof o>"u"&&(o=r_()),yc(e,"",0,[],void 0,0,o);var s;try{Fi.length===0?s=JSON.stringify(e,t,r):s=JSON.stringify(e,i_(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Wi.length!==0;){var u=Wi.pop();u.length===4?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return s}function Ro(e,t,r,o){var s=Object.getOwnPropertyDescriptor(o,r);s.get!==void 0?s.configurable?(Object.defineProperty(o,r,{value:e}),Wi.push([o,r,t,s])):Fi.push([t,r,e]):(o[r]=e,Wi.push([o,r,t]))}function yc(e,t,r,o,s,u,f){u+=1;var h;if(typeof e=="object"&&e!==null){for(h=0;h<o.length;h++)if(o[h]===e){Ro(t_,e,t,s);return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){Ro(hu,e,t,s);return}if(typeof f.edgesLimit<"u"&&r+1>f.edgesLimit){Ro(hu,e,t,s);return}if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)yc(e[h],h,h,o,e,u,f);else{var l=Object.keys(e);for(h=0;h<l.length;h++){var p=l[h];yc(e[p],p,h,o,e,u,f)}}o.pop()}}function vA(e,t){return e<t?-1:e>t?1:0}function n_(e,t,r,o){typeof o>"u"&&(o=r_());var s=wc(e,"",0,[],void 0,0,o)||e,u;try{Fi.length===0?u=JSON.stringify(s,t,r):u=JSON.stringify(s,i_(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Wi.length!==0;){var f=Wi.pop();f.length===4?Object.defineProperty(f[0],f[1],f[3]):f[0][f[1]]=f[2]}}return u}function wc(e,t,r,o,s,u,f){u+=1;var h;if(typeof e=="object"&&e!==null){for(h=0;h<o.length;h++)if(o[h]===e){Ro(t_,e,t,s);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){Ro(hu,e,t,s);return}if(typeof f.edgesLimit<"u"&&r+1>f.edgesLimit){Ro(hu,e,t,s);return}if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)wc(e[h],h,h,o,e,u,f);else{var l={},p=Object.keys(e).sort(vA);for(h=0;h<p.length;h++){var b=p[h];wc(e[b],b,h,o,e,u,f),l[b]=e[b]}if(typeof s<"u")Wi.push([s,t,e]),s[t]=l;else return l}o.pop()}}function i_(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(Fi.length>0)for(var o=0;o<Fi.length;o++){var s=Fi[o];if(s[1]===t&&s[0]===r){r=s[2],Fi.splice(o,1);break}}return e.call(this,t,r)}}const SA=W.getDefaultExportFromCjs(Gc);Object.defineProperty(Ei,"__esModule",{value:!0});Ei.EthereumProviderError=Ei.EthereumRpcError=void 0;const RA=Gc;class o_ extends Error{constructor(t,r,o){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=t,o!==void 0&&(this.data=o)}serialize(){const t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return RA.default(this.serialize(),IA,2)}}Ei.EthereumRpcError=o_;let AA=class extends o_{constructor(t,r,o){if(!TA(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,o)}};Ei.EthereumProviderError=AA;function TA(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function IA(e,t){if(t!=="[Circular]")return t}var Vc={},vi={};Object.defineProperty(vi,"__esModule",{value:!0});vi.errorValues=vi.errorCodes=void 0;vi.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}};vi.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."}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=vi,r=Ei,o=t.errorCodes.rpc.internal,s="Unspecified error message. This is a bug, please report it.",u={code:o,message:f(o)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function f(I,A=s){if(Number.isInteger(I)){const x=I.toString();if(w(t.errorValues,x))return t.errorValues[x].message;if(p(I))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return A}e.getMessageFromCode=f;function h(I){if(!Number.isInteger(I))return!1;const A=I.toString();return!!(t.errorValues[A]||p(I))}e.isValidCode=h;function l(I,{fallbackError:A=u,shouldIncludeStack:x=!1}={}){var v,C;if(!A||!Number.isInteger(A.code)||typeof A.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(I instanceof r.EthereumRpcError)return I.serialize();const B={};if(I&&typeof I=="object"&&!Array.isArray(I)&&w(I,"code")&&h(I.code)){const S=I;B.code=S.code,S.message&&typeof S.message=="string"?(B.message=S.message,w(S,"data")&&(B.data=S.data)):(B.message=f(B.code),B.data={originalError:b(I)})}else{B.code=A.code;const S=(v=I)===null||v===void 0?void 0:v.message;B.message=S&&typeof S=="string"?S:A.message,B.data={originalError:b(I)}}const P=(C=I)===null||C===void 0?void 0:C.stack;return x&&I&&P&&typeof P=="string"&&(B.stack=P),B}e.serializeError=l;function p(I){return I>=-32099&&I<=-32e3}function b(I){return I&&typeof I=="object"&&!Array.isArray(I)?Object.assign({},I):I}function w(I,A){return Object.prototype.hasOwnProperty.call(I,A)}})(Vc);var Tu={};Object.defineProperty(Tu,"__esModule",{value:!0});Tu.ethErrors=void 0;const zc=Ei,s_=Vc,Yt=vi;Tu.ethErrors={rpc:{parse:e=>jr(Yt.errorCodes.rpc.parse,e),invalidRequest:e=>jr(Yt.errorCodes.rpc.invalidRequest,e),invalidParams:e=>jr(Yt.errorCodes.rpc.invalidParams,e),methodNotFound:e=>jr(Yt.errorCodes.rpc.methodNotFound,e),internal:e=>jr(Yt.errorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||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 jr(t,e)},invalidInput:e=>jr(Yt.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>jr(Yt.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>jr(Yt.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>jr(Yt.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>jr(Yt.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>jr(Yt.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>hs(Yt.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>hs(Yt.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>hs(Yt.errorCodes.provider.unsupportedMethod,e),disconnected:e=>hs(Yt.errorCodes.provider.disconnected,e),chainDisconnected:e=>hs(Yt.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:o}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new zc.EthereumProviderError(t,r,o)}}};function jr(e,t){const[r,o]=a_(t);return new zc.EthereumRpcError(e,r||s_.getMessageFromCode(e),o)}function hs(e,t){const[r,o]=a_(t);return new zc.EthereumProviderError(e,r||s_.getMessageFromCode(e),o)}function a_(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const t=Ei;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const r=Vc;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const o=Tu;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const s=vi;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})})(nn);function Ne(e,t,r){return(t=x1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var OA={exports:{}},Bl={exports:{}};let CA=class extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);let r="";for(let o=0;o<t.length;o++)r+=` ${t[o].stack}
|
|
2
2
|
`;super(r),this.name="AggregateError",this.errors=t}};var vt={AggregateError:CA,ArrayIsArray(e){return Array.isArray(e)},ArrayPrototypeIncludes(e,t){return e.includes(t)},ArrayPrototypeIndexOf(e,t){return e.indexOf(t)},ArrayPrototypeJoin(e,t){return e.join(t)},ArrayPrototypeMap(e,t){return e.map(t)},ArrayPrototypePop(e,t){return e.pop(t)},ArrayPrototypePush(e,t){return e.push(t)},ArrayPrototypeSlice(e,t,r){return e.slice(t,r)},Error,FunctionPrototypeCall(e,t,...r){return e.call(t,...r)},FunctionPrototypeSymbolHasInstance(e,t){return Function.prototype[Symbol.hasInstance].call(e,t)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(e,t){return Object.defineProperties(e,t)},ObjectDefineProperty(e,t,r){return Object.defineProperty(e,t,r)},ObjectGetOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)},ObjectKeys(e){return Object.keys(e)},ObjectSetPrototypeOf(e,t){return Object.setPrototypeOf(e,t)},Promise,PromisePrototypeCatch(e,t){return e.catch(t)},PromisePrototypeThen(e,t,r){return e.then(t,r)},PromiseReject(e){return Promise.reject(e)},PromiseResolve(e){return Promise.resolve(e)},ReflectApply:Reflect.apply,RegExpPrototypeTest(e,t){return e.test(t)},SafeSet:Set,String,StringPrototypeSlice(e,t,r){return e.slice(t,r)},StringPrototypeToLowerCase(e){return e.toLowerCase()},StringPrototypeToUpperCase(e){return e.toUpperCase()},StringPrototypeTrim(e){return e.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(e,t,r){return e.set(t,r)},Boolean,Uint8Array},u_={exports:{}},f_={format(e,...t){return e.replace(/%([sdifj])/g,function(...[r,o]){const s=t.shift();return o==="f"?s.toFixed(6):o==="j"?JSON.stringify(s):o==="s"&&typeof s=="object"?`${s.constructor!==Object?s.constructor.name:""} {}`.trim():s.toString()})},inspect(e){switch(typeof e){case"string":if(e.includes("'"))if(e.includes('"')){if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}else return`"${e}"`;return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}}};const{format:LA,inspect:gu}=f_,{AggregateError:PA}=vt,BA=globalThis.AggregateError||PA,NA=Symbol("kIsNodeError"),$A=["string","function","number","object","Function","Object","boolean","bigint","symbol"],MA=/^([A-Z][a-z0-9]*)+$/,xA="__node_internal_",Iu={};function Hi(e,t){if(!e)throw new Iu.ERR_INTERNAL_ASSERTION(t)}function Qg(e){let t="",r=e.length;const o=e[0]==="-"?1:0;for(;r>=o+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function DA(e,t,r){if(typeof t=="function")return Hi(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const o=(t.match(/%[dfijoOs]/g)||[]).length;return Hi(o===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${o}).`),r.length===0?t:LA(t,...r)}function qt(e,t,r){r||(r=Error);class o extends r{constructor(...u){super(DA(e,t,u))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(o.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),o.prototype.code=e,o.prototype[NA]=!0,Iu[e]=o}function ep(e){const t=xA+e.name;return Object.defineProperty(e,"name",{value:t}),e}function jA(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new BA([t,e],t.message);return r.code=t.code,r}return e||t}let UA=class extends Error{constructor(t="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new Iu.ERR_INVALID_ARG_TYPE("options","Object",r);super(t,r),this.code="ABORT_ERR",this.name="AbortError"}};qt("ERR_ASSERTION","%s",Error);qt("ERR_INVALID_ARG_TYPE",(e,t,r)=>{Hi(typeof e=="string","'name' must be a string"),Array.isArray(t)||(t=[t]);let o="The ";e.endsWith(" argument")?o+=`${e} `:o+=`"${e}" ${e.includes(".")?"property":"argument"} `,o+="must be ";const s=[],u=[],f=[];for(const l of t)Hi(typeof l=="string","All expected entries have to be of type string"),$A.includes(l)?s.push(l.toLowerCase()):MA.test(l)?u.push(l):(Hi(l!=="object",'The value "object" should be written as "Object"'),f.push(l));if(u.length>0){const l=s.indexOf("object");l!==-1&&(s.splice(s,l,1),u.push("Object"))}if(s.length>0){switch(s.length){case 1:o+=`of type ${s[0]}`;break;case 2:o+=`one of type ${s[0]} or ${s[1]}`;break;default:{const l=s.pop();o+=`one of type ${s.join(", ")}, or ${l}`}}(u.length>0||f.length>0)&&(o+=" or ")}if(u.length>0){switch(u.length){case 1:o+=`an instance of ${u[0]}`;break;case 2:o+=`an instance of ${u[0]} or ${u[1]}`;break;default:{const l=u.pop();o+=`an instance of ${u.join(", ")}, or ${l}`}}f.length>0&&(o+=" or ")}switch(f.length){case 0:break;case 1:f[0].toLowerCase()!==f[0]&&(o+="an "),o+=`${f[0]}`;break;case 2:o+=`one of ${f[0]} or ${f[1]}`;break;default:{const l=f.pop();o+=`one of ${f.join(", ")}, or ${l}`}}if(r==null)o+=`. Received ${r}`;else if(typeof r=="function"&&r.name)o+=`. Received function ${r.name}`;else if(typeof r=="object"){var h;if((h=r.constructor)!==null&&h!==void 0&&h.name)o+=`. Received an instance of ${r.constructor.name}`;else{const l=gu(r,{depth:-1});o+=`. Received ${l}`}}else{let l=gu(r,{colors:!1});l.length>25&&(l=`${l.slice(0,25)}...`),o+=`. Received type ${typeof r} (${l})`}return o},TypeError);qt("ERR_INVALID_ARG_VALUE",(e,t,r="is invalid")=>{let o=gu(t);return o.length>128&&(o=o.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${o}`},TypeError);qt("ERR_INVALID_RETURN_VALUE",(e,t,r)=>{var o;const s=r!=null&&(o=r.constructor)!==null&&o!==void 0&&o.name?`instance of ${r.constructor.name}`:`type ${typeof r}`;return`Expected ${e} to be returned from the "${t}" function but got ${s}.`},TypeError);qt("ERR_MISSING_ARGS",(...e)=>{Hi(e.length>0,"At least one arg needs to be specified");let t;const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map(o=>`"${o}"`).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const o=e.pop();t+=`The ${e.join(", ")}, and ${o} arguments`}break}return`${t} must be specified`},TypeError);qt("ERR_OUT_OF_RANGE",(e,t,r)=>{Hi(t,'Missing "range" argument');let o;if(Number.isInteger(r)&&Math.abs(r)>2**32)o=Qg(String(r));else if(typeof r=="bigint"){o=String(r);const s=BigInt(2)**BigInt(32);(r>s||r<-s)&&(o=Qg(o)),o+="n"}else o=gu(r);return`The value of "${e}" is out of range. It must be ${t}. Received ${o}`},RangeError);qt("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);qt("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);qt("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);qt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);qt("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);qt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);qt("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);qt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);qt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);qt("ERR_STREAM_WRITE_AFTER_END","write after end",Error);qt("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);var ur={AbortError:UA,aggregateTwoErrors:ep(jA),hideStackFrames:ep,codes:Iu},gs={exports:{}},tp;function Os(){if(tp)return gs.exports;tp=1;const{AbortController:e,AbortSignal:t}=typeof self<"u"?self:typeof window<"u"?window:void 0;return gs.exports=e,gs.exports.AbortSignal=t,gs.exports.default=e,gs.exports}(function(e){const t=W.bufferPolyfill,{format:r,inspect:o}=f_,{codes:{ERR_INVALID_ARG_TYPE:s}}=ur,{kResistStopPropagation:u,AggregateError:f,SymbolDispose:h}=vt,l=globalThis.AbortSignal||Os().AbortSignal,p=globalThis.AbortController||Os().AbortController,b=Object.getPrototypeOf(async function(){}).constructor,w=globalThis.Blob||t.Blob,I=typeof w<"u"?function(C){return C instanceof w}:function(C){return!1},A=(v,C)=>{if(v!==void 0&&(v===null||typeof v!="object"||!("aborted"in v)))throw new s(C,"AbortSignal",v)},x=(v,C)=>{if(typeof v!="function")throw new s(C,"Function",v)};e.exports={AggregateError:f,kEmptyObject:Object.freeze({}),once(v){let C=!1;return function(...B){C||(C=!0,v.apply(this,B))}},createDeferredPromise:function(){let v,C;return{promise:new Promise((P,S)=>{v=P,C=S}),resolve:v,reject:C}},promisify(v){return new Promise((C,B)=>{v((P,...S)=>P?B(P):C(...S))})},debuglog(){return function(){}},format:r,inspect:o,types:{isAsyncFunction(v){return v instanceof b},isArrayBufferView(v){return ArrayBuffer.isView(v)}},isBlob:I,deprecate(v,C){return v},addAbortListener:W.eventsExports.addAbortListener||function(C,B){if(C===void 0)throw new s("signal","AbortSignal",C);A(C,"signal"),x(B,"listener");let P;return C.aborted?queueMicrotask(()=>B()):(C.addEventListener("abort",B,{__proto__:null,once:!0,[u]:!0}),P=()=>{C.removeEventListener("abort",B)}),{__proto__:null,[h](){var S;(S=P)===null||S===void 0||S()}}},AbortSignalAny:l.any||function(C){if(C.length===1)return C[0];const B=new p,P=()=>B.abort();return C.forEach(S=>{A(S,"signals"),S.addEventListener("abort",P,{once:!0})}),B.signal.addEventListener("abort",()=>{C.forEach(S=>S.removeEventListener("abort",P))},{once:!0}),B.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")})(u_);var br=u_.exports,Kc={};const{ArrayIsArray:l_,ArrayPrototypeIncludes:kA,ArrayPrototypeJoin:FA,ArrayPrototypeMap:HA,NumberIsInteger:Jc,NumberIsNaN:IN,NumberMAX_SAFE_INTEGER:WA,NumberMIN_SAFE_INTEGER:qA,NumberParseInt:ON,ObjectPrototypeHasOwnProperty:GA,RegExpPrototypeExec:CN,String:VA,StringPrototypeToUpperCase:LN,StringPrototypeTrim:PN}=vt,{hideStackFrames:qr,codes:{ERR_SOCKET_BAD_PORT:BN,ERR_INVALID_ARG_TYPE:Gr,ERR_INVALID_ARG_VALUE:c_,ERR_OUT_OF_RANGE:Co,ERR_UNKNOWN_SIGNAL:NN}}=ur,{normalizeEncoding:$N}=br,{isAsyncFunction:zA,isArrayBufferView:KA}=br.types,JA=qr((e,t,r=qA,o=WA)=>{if(typeof e!="number")throw new Gr(t,"number",e);if(!Jc(e))throw new Co(t,"an integer",e);if(e<r||e>o)throw new Co(t,`>= ${r} && <= ${o}`,e)});qr((e,t,r=-2147483648,o=2147483647)=>{if(typeof e!="number")throw new Gr(t,"number",e);if(!Jc(e))throw new Co(t,"an integer",e);if(e<r||e>o)throw new Co(t,`>= ${r} && <= ${o}`,e)});qr((e,t,r=!1)=>{if(typeof e!="number")throw new Gr(t,"number",e);if(!Jc(e))throw new Co(t,"an integer",e);const o=r?1:0,s=4294967295;if(e<o||e>s)throw new Co(t,`>= ${o} && <= ${s}`,e)});qr((e,t,r)=>{if(!kA(r,e)){const s="must be one of: "+FA(HA(r,u=>typeof u=="string"?`'${u}'`:VA(u)),", ");throw new c_(t,e,s)}});function YA(e,t){if(typeof e!="boolean")throw new Gr(t,"boolean",e)}function Nl(e,t,r){return e==null||!GA(e,t)?r:e[t]}const XA=qr((e,t,r=null)=>{const o=Nl(r,"allowArray",!1),s=Nl(r,"allowFunction",!1);if(!Nl(r,"nullable",!1)&&e===null||!o&&l_(e)||typeof e!="object"&&(!s||typeof e!="function"))throw new Gr(t,"Object",e)});qr((e,t)=>{if(e!=null&&typeof e!="object"&&typeof e!="function")throw new Gr(t,"a dictionary",e)});qr((e,t,r=0)=>{if(!l_(e))throw new Gr(t,"Array",e);if(e.length<r){const o=`must be longer than ${r}`;throw new c_(t,e,o)}});qr((e,t="buffer")=>{if(!KA(e))throw new Gr(t,["Buffer","TypedArray","DataView"],e)});const ZA=qr((e,t)=>{if(e!==void 0&&(e===null||typeof e!="object"||!("aborted"in e)))throw new Gr(t,"AbortSignal",e)}),QA=qr((e,t)=>{if(typeof e!="function")throw new Gr(t,"Function",e)});qr((e,t)=>{if(typeof e!="function"||zA(e))throw new Gr(t,"Function",e)});qr((e,t)=>{if(e!==void 0)throw new Gr(t,"undefined",e)});var Ms={validateBoolean:YA,validateFunction:QA,validateInteger:JA,validateObject:XA,validateAbortSignal:ZA},Yc={exports:{}};const{SymbolAsyncIterator:rp,SymbolIterator:np,SymbolFor:zi}=vt,d_=zi("nodejs.stream.destroyed"),eT=zi("nodejs.stream.errored"),ip=zi("nodejs.stream.readable"),op=zi("nodejs.stream.writable"),tT=zi("nodejs.stream.disturbed"),rT=zi("nodejs.webstream.isClosedPromise"),nT=zi("nodejs.webstream.controllerErrorFunction");function Xc(e,t=!1){var r;return!!(e&&typeof e.pipe=="function"&&typeof e.on=="function"&&(!t||typeof e.pause=="function"&&typeof e.resume=="function")&&(!e._writableState||((r=e._readableState)===null||r===void 0?void 0:r.readable)!==!1)&&(!e._writableState||e._readableState))}function Ou(e){var t;return!!(e&&typeof e.write=="function"&&typeof e.on=="function"&&(!e._readableState||((t=e._writableState)===null||t===void 0?void 0:t.writable)!==!1))}function iT(e){return!!(e&&typeof e.pipe=="function"&&e._readableState&&typeof e.on=="function"&&typeof e.write=="function")}function Cn(e){return e&&(e._readableState||e._writableState||typeof e.write=="function"&&typeof e.on=="function"||typeof e.pipe=="function"&&typeof e.on=="function")}function h_(e){return!!(e&&!Cn(e)&&typeof e.pipeThrough=="function"&&typeof e.getReader=="function"&&typeof e.cancel=="function")}function g_(e){return!!(e&&!Cn(e)&&typeof e.getWriter=="function"&&typeof e.abort=="function")}function p_(e){return!!(e&&!Cn(e)&&typeof e.readable=="object"&&typeof e.writable=="object")}function oT(e){return h_(e)||g_(e)||p_(e)}function sT(e,t){return e==null?!1:t===!0?typeof e[rp]=="function":t===!1?typeof e[np]=="function":typeof e[rp]=="function"||typeof e[np]=="function"}function Cu(e){if(!Cn(e))return null;const t=e._writableState,r=e._readableState,o=t||r;return!!(e.destroyed||e[d_]||o!=null&&o.destroyed)}function aT(e){if(!Ou(e))return null;if(e.writableEnded===!0)return!0;const t=e._writableState;return t!=null&&t.errored?!1:typeof(t==null?void 0:t.ended)!="boolean"?null:t.ended}function uT(e,t){if(!Ou(e))return null;if(e.writableFinished===!0)return!0;const r=e._writableState;return r!=null&&r.errored?!1:typeof(r==null?void 0:r.finished)!="boolean"?null:!!(r.finished||t===!1&&r.ended===!0&&r.length===0)}function b_(e,t){if(!Xc(e))return null;const r=e._readableState;return r!=null&&r.errored?!1:typeof(r==null?void 0:r.endEmitted)!="boolean"?null:!!(r.endEmitted||t===!1&&r.ended===!0&&r.length===0)}function __(e){return e&&e[ip]!=null?e[ip]:typeof(e==null?void 0:e.readable)!="boolean"?null:Cu(e)?!1:Xc(e)&&e.readable&&!b_(e)}function y_(e){return e&&e[op]!=null?e[op]:typeof(e==null?void 0:e.writable)!="boolean"?null:Cu(e)?!1:Ou(e)&&e.writable&&!aT(e)}function fT(e,t){return Cn(e)?Cu(e)?!0:!((t==null?void 0:t.readable)!==!1&&__(e)||(t==null?void 0:t.writable)!==!1&&y_(e)):null}function lT(e){var t,r;return Cn(e)?e.writableErrored?e.writableErrored:(t=(r=e._writableState)===null||r===void 0?void 0:r.errored)!==null&&t!==void 0?t:null:null}function cT(e){var t,r;return Cn(e)?e.readableErrored?e.readableErrored:(t=(r=e._readableState)===null||r===void 0?void 0:r.errored)!==null&&t!==void 0?t:null:null}function dT(e){if(!Cn(e))return null;if(typeof e.closed=="boolean")return e.closed;const t=e._writableState,r=e._readableState;return typeof(t==null?void 0:t.closed)=="boolean"||typeof(r==null?void 0:r.closed)=="boolean"?(t==null?void 0:t.closed)||(r==null?void 0:r.closed):typeof e._closed=="boolean"&&w_(e)?e._closed:null}function w_(e){return typeof e._closed=="boolean"&&typeof e._defaultKeepAlive=="boolean"&&typeof e._removedConnection=="boolean"&&typeof e._removedContLen=="boolean"}function hT(e){return typeof e._sent100=="boolean"&&w_(e)}function gT(e){var t;return typeof e._consuming=="boolean"&&typeof e._dumped=="boolean"&&((t=e.req)===null||t===void 0?void 0:t.upgradeOrConnect)===void 0}function pT(e){if(!Cn(e))return null;const t=e._writableState,r=e._readableState,o=t||r;return!o&&hT(e)||!!(o&&o.autoDestroy&&o.emitClose&&o.closed===!1)}function bT(e){var t;return!!(e&&((t=e[tT])!==null&&t!==void 0?t:e.readableDidRead||e.readableAborted))}function _T(e){var t,r,o,s,u,f,h,l,p,b;return!!(e&&((t=(r=(o=(s=(u=(f=e[eT])!==null&&f!==void 0?f:e.readableErrored)!==null&&u!==void 0?u:e.writableErrored)!==null&&s!==void 0?s:(h=e._readableState)===null||h===void 0?void 0:h.errorEmitted)!==null&&o!==void 0?o:(l=e._writableState)===null||l===void 0?void 0:l.errorEmitted)!==null&&r!==void 0?r:(p=e._readableState)===null||p===void 0?void 0:p.errored)!==null&&t!==void 0?t:!((b=e._writableState)===null||b===void 0)&&b.errored))}var ei={isDestroyed:Cu,kIsDestroyed:d_,isDisturbed:bT,isErrored:_T,isReadable:__,kIsClosedPromise:rT,kControllerErrorFunction:nT,isClosed:dT,isDuplexNodeStream:iT,isFinished:fT,isIterable:sT,isReadableNodeStream:Xc,isReadableStream:h_,isReadableFinished:b_,isReadableErrored:cT,isNodeStream:Cn,isWebStream:oT,isWritable:y_,isWritableNodeStream:Ou,isWritableStream:g_,isWritableFinished:uT,isWritableErrored:lT,isServerRequest:gT,willEmitClose:pT,isTransformStream:p_};const _i=W.browserExports,{AbortError:m_,codes:yT}=ur,{ERR_INVALID_ARG_TYPE:wT,ERR_STREAM_PREMATURE_CLOSE:sp}=yT,{kEmptyObject:mc,once:Ec}=br,{validateAbortSignal:mT,validateFunction:ET,validateObject:vT,validateBoolean:ST}=Ms,{Promise:RT,PromisePrototypeThen:AT,SymbolDispose:E_}=vt,{isClosed:TT,isReadable:ap,isReadableNodeStream:$l,isReadableStream:IT,isReadableFinished:up,isReadableErrored:fp,isWritable:lp,isWritableNodeStream:cp,isWritableStream:OT,isWritableFinished:dp,isWritableErrored:hp,isNodeStream:CT,willEmitClose:LT,kIsClosedPromise:PT}=ei;let Ao;function BT(e){return e.setHeader&&typeof e.abort=="function"}const vc=()=>{};function v_(e,t,r){var o,s;if(arguments.length===2?(r=t,t=mc):t==null?t=mc:vT(t,"options"),ET(r,"callback"),mT(t.signal,"options.signal"),r=Ec(r),IT(e)||OT(e))return NT(e,t,r);if(!CT(e))throw new wT("stream",["ReadableStream","WritableStream","Stream"],e);const u=(o=t.readable)!==null&&o!==void 0?o:$l(e),f=(s=t.writable)!==null&&s!==void 0?s:cp(e),h=e._writableState,l=e._readableState,p=()=>{e.writable||I()};let b=LT(e)&&$l(e)===u&&cp(e)===f,w=dp(e,!1);const I=()=>{w=!0,e.destroyed&&(b=!1),!(b&&(!e.readable||u))&&(!u||A)&&r.call(e)};let A=up(e,!1);const x=()=>{A=!0,e.destroyed&&(b=!1),!(b&&(!e.writable||f))&&(!f||w)&&r.call(e)},v=j=>{r.call(e,j)};let C=TT(e);const B=()=>{C=!0;const j=hp(e)||fp(e);if(j&&typeof j!="boolean")return r.call(e,j);if(u&&!A&&$l(e,!0)&&!up(e,!1))return r.call(e,new sp);if(f&&!w&&!dp(e,!1))return r.call(e,new sp);r.call(e)},P=()=>{C=!0;const j=hp(e)||fp(e);if(j&&typeof j!="boolean")return r.call(e,j);r.call(e)},S=()=>{e.req.on("finish",I)};BT(e)?(e.on("complete",I),b||e.on("abort",B),e.req?S():e.on("request",S)):f&&!h&&(e.on("end",p),e.on("close",p)),!b&&typeof e.aborted=="boolean"&&e.on("aborted",B),e.on("end",x),e.on("finish",I),t.error!==!1&&e.on("error",v),e.on("close",B),C?_i.nextTick(B):h!=null&&h.errorEmitted||l!=null&&l.errorEmitted?b||_i.nextTick(P):(!u&&(!b||ap(e))&&(w||lp(e)===!1)||!f&&(!b||lp(e))&&(A||ap(e)===!1)||l&&e.req&&e.aborted)&&_i.nextTick(P);const m=()=>{r=vc,e.removeListener("aborted",B),e.removeListener("complete",I),e.removeListener("abort",B),e.removeListener("request",S),e.req&&e.req.removeListener("finish",I),e.removeListener("end",p),e.removeListener("close",p),e.removeListener("finish",I),e.removeListener("end",x),e.removeListener("error",v),e.removeListener("close",B)};if(t.signal&&!C){const j=()=>{const Q=r;m(),Q.call(e,new m_(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)_i.nextTick(j);else{Ao=Ao||br.addAbortListener;const Q=Ao(t.signal,j),ce=r;r=Ec((...ue)=>{Q[E_](),ce.apply(e,ue)})}}return m}function NT(e,t,r){let o=!1,s=vc;if(t.signal)if(s=()=>{o=!0,r.call(e,new m_(void 0,{cause:t.signal.reason}))},t.signal.aborted)_i.nextTick(s);else{Ao=Ao||br.addAbortListener;const f=Ao(t.signal,s),h=r;r=Ec((...l)=>{f[E_](),h.apply(e,l)})}const u=(...f)=>{o||_i.nextTick(()=>r.apply(e,f))};return AT(e[PT].promise,u,u),vc}function $T(e,t){var r;let o=!1;return t===null&&(t=mc),(r=t)!==null&&r!==void 0&&r.cleanup&&(ST(t.cleanup,"cleanup"),o=t.cleanup),new RT((s,u)=>{const f=v_(e,t,h=>{o&&f(),h?u(h):s()})})}Yc.exports=v_;Yc.exports.finished=$T;var Ri=Yc.exports;const Tn=W.browserExports,{aggregateTwoErrors:MT,codes:{ERR_MULTIPLE_CALLBACK:xT},AbortError:DT}=ur,{Symbol:S_}=vt,{kIsDestroyed:jT,isDestroyed:UT,isFinished:kT,isServerRequest:FT}=ei,R_=S_("kDestroy"),Sc=S_("kConstruct");function A_(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function HT(e,t){const r=this._readableState,o=this._writableState,s=o||r;return o!=null&&o.destroyed||r!=null&&r.destroyed?(typeof t=="function"&&t(),this):(A_(e,o,r),o&&(o.destroyed=!0),r&&(r.destroyed=!0),s.constructed?gp(this,e,t):this.once(R_,function(u){gp(this,MT(u,e),t)}),this)}function gp(e,t,r){let o=!1;function s(u){if(o)return;o=!0;const f=e._readableState,h=e._writableState;A_(u,h,f),h&&(h.closed=!0),f&&(f.closed=!0),typeof r=="function"&&r(u),u?Tn.nextTick(WT,e,u):Tn.nextTick(T_,e)}try{e._destroy(t||null,s)}catch(u){s(u)}}function WT(e,t){Rc(e,t),T_(e)}function T_(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(r!=null&&r.emitClose||t!=null&&t.emitClose)&&e.emit("close")}function Rc(e,t){const r=e._readableState,o=e._writableState;o!=null&&o.errorEmitted||r!=null&&r.errorEmitted||(o&&(o.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function qT(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=e.readable===!1,e.endEmitted=e.readable===!1),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=t.writable===!1,t.ending=t.writable===!1,t.finished=t.writable===!1)}function Ac(e,t,r){const o=e._readableState,s=e._writableState;if(s!=null&&s.destroyed||o!=null&&o.destroyed)return this;o!=null&&o.autoDestroy||s!=null&&s.autoDestroy?e.destroy(t):t&&(t.stack,s&&!s.errored&&(s.errored=t),o&&!o.errored&&(o.errored=t),r?Tn.nextTick(Rc,e,t):Rc(e,t))}function GT(e,t){if(typeof e._construct!="function")return;const r=e._readableState,o=e._writableState;r&&(r.constructed=!1),o&&(o.constructed=!1),e.once(Sc,t),!(e.listenerCount(Sc)>1)&&Tn.nextTick(VT,e)}function VT(e){let t=!1;function r(o){if(t){Ac(e,o??new xT);return}t=!0;const s=e._readableState,u=e._writableState,f=u||s;s&&(s.constructed=!0),u&&(u.constructed=!0),f.destroyed?e.emit(R_,o):o?Ac(e,o,!0):Tn.nextTick(zT,e)}try{e._construct(o=>{Tn.nextTick(r,o)})}catch(o){Tn.nextTick(r,o)}}function zT(e){e.emit(Sc)}function pp(e){return(e==null?void 0:e.setHeader)&&typeof e.abort=="function"}function I_(e){e.emit("close")}function KT(e,t){e.emit("error",t),Tn.nextTick(I_,e)}function JT(e,t){!e||UT(e)||(!t&&!kT(e)&&(t=new DT),FT(e)?(e.socket=null,e.destroy(t)):pp(e)?e.abort():pp(e.req)?e.req.abort():typeof e.destroy=="function"?e.destroy(t):typeof e.close=="function"?e.close():t?Tn.nextTick(KT,e,t):Tn.nextTick(I_,e),e.destroyed||(e[jT]=!0))}var Do={construct:GT,destroyer:JT,destroy:HT,undestroy:qT,errorOrDestroy:Ac};const{ArrayIsArray:YT,ObjectSetPrototypeOf:O_}=vt,{EventEmitter:Lu}=W.eventsExports;function Pu(e){Lu.call(this,e)}O_(Pu.prototype,Lu.prototype);O_(Pu,Lu);Pu.prototype.pipe=function(e,t){const r=this;function o(b){e.writable&&e.write(b)===!1&&r.pause&&r.pause()}r.on("data",o);function s(){r.readable&&r.resume&&r.resume()}e.on("drain",s),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",f),r.on("close",h));let u=!1;function f(){u||(u=!0,e.end())}function h(){u||(u=!0,typeof e.destroy=="function"&&e.destroy())}function l(b){p(),Lu.listenerCount(this,"error")===0&&this.emit("error",b)}Tc(r,"error",l),Tc(e,"error",l);function p(){r.removeListener("data",o),e.removeListener("drain",s),r.removeListener("end",f),r.removeListener("close",h),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",p),r.removeListener("close",p),e.removeListener("close",p)}return r.on("end",p),r.on("close",p),e.on("close",p),e.emit("pipe",r),e};function Tc(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):YT(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}var Zc={Stream:Pu,prependListener:Tc},C_={exports:{}};(function(e){const{SymbolDispose:t}=vt,{AbortError:r,codes:o}=ur,{isNodeStream:s,isWebStream:u,kControllerErrorFunction:f}=ei,h=Ri,{ERR_INVALID_ARG_TYPE:l}=o;let p;const b=(w,I)=>{if(typeof w!="object"||!("aborted"in w))throw new l(I,"AbortSignal",w)};e.exports.addAbortSignal=function(I,A){if(b(I,"signal"),!s(A)&&!u(A))throw new l("stream",["ReadableStream","WritableStream","Stream"],A);return e.exports.addAbortSignalNoValidate(I,A)},e.exports.addAbortSignalNoValidate=function(w,I){if(typeof w!="object"||!("aborted"in w))return I;const A=s(I)?()=>{I.destroy(new r(void 0,{cause:w.reason}))}:()=>{I[f](new r(void 0,{cause:w.reason}))};if(w.aborted)A();else{p=p||br.addAbortListener;const x=p(w,A);h(I,x[t])}return I}})(C_);var Bu=C_.exports;const{StringPrototypeSlice:bp,SymbolIterator:XT,TypedArrayPrototypeSet:Ja,Uint8Array:ZT}=vt,{Buffer:Ml}=W.bufferPolyfill,{inspect:QT}=br;var eI=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){const r={data:t,next:null};this.length>0?this.tail.next=r:this.head=r,this.tail=r,++this.length}unshift(t){const r={data:t,next:this.head};this.length===0&&(this.tail=r),this.head=r,++this.length}shift(){if(this.length===0)return;const t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}clear(){this.head=this.tail=null,this.length=0}join(t){if(this.length===0)return"";let r=this.head,o=""+r.data;for(;(r=r.next)!==null;)o+=t+r.data;return o}concat(t){if(this.length===0)return Ml.alloc(0);const r=Ml.allocUnsafe(t>>>0);let o=this.head,s=0;for(;o;)Ja(r,o.data,s),s+=o.data.length,o=o.next;return r}consume(t,r){const o=this.head.data;if(t<o.length){const s=o.slice(0,t);return this.head.data=o.slice(t),s}return t===o.length?this.shift():r?this._getString(t):this._getBuffer(t)}first(){return this.head.data}*[XT](){for(let t=this.head;t;t=t.next)yield t.data}_getString(t){let r="",o=this.head,s=0;do{const u=o.data;if(t>u.length)r+=u,t-=u.length;else{t===u.length?(r+=u,++s,o.next?this.head=o.next:this.head=this.tail=null):(r+=bp(u,0,t),this.head=o,o.data=bp(u,t));break}++s}while((o=o.next)!==null);return this.length-=s,r}_getBuffer(t){const r=Ml.allocUnsafe(t),o=t;let s=this.head,u=0;do{const f=s.data;if(t>f.length)Ja(r,f,o-t),t-=f.length;else{t===f.length?(Ja(r,f,o-t),++u,s.next?this.head=s.next:this.head=this.tail=null):(Ja(r,new ZT(f.buffer,f.byteOffset,t),o-t),this.head=s,s.data=f.slice(t));break}++u}while((s=s.next)!==null);return this.length-=u,r}[Symbol.for("nodejs.util.inspect.custom")](t,r){return QT(this,{...r,depth:0,customInspect:!1})}};const{MathFloor:tI,NumberIsInteger:rI}=vt,{validateInteger:nI}=Ms,{ERR_INVALID_ARG_VALUE:iI}=ur.codes;let L_=16*1024,P_=16;function oI(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function B_(e){return e?P_:L_}function sI(e,t){nI(t,"value",0),e?P_=t:L_=t}function aI(e,t,r,o){const s=oI(t,o,r);if(s!=null){if(!rI(s)||s<0){const u=o?`options.${r}`:"options.highWaterMark";throw new iI(u,s)}return tI(s)}return B_(e.objectMode)}var Nu={getHighWaterMark:aI,getDefaultHighWaterMark:B_,setDefaultHighWaterMark:sI};const _p=W.browserExports,{PromisePrototypeThen:uI,SymbolAsyncIterator:yp,SymbolIterator:wp}=vt,{Buffer:fI}=W.bufferPolyfill,{ERR_INVALID_ARG_TYPE:lI,ERR_STREAM_NULL_VALUES:cI}=ur.codes;function dI(e,t,r){let o;if(typeof t=="string"||t instanceof fI)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});let s;if(t&&t[yp])s=!0,o=t[yp]();else if(t&&t[wp])s=!1,o=t[wp]();else throw new lI("iterable",["Iterable"],t);const u=new e({objectMode:!0,highWaterMark:1,...r});let f=!1;u._read=function(){f||(f=!0,l())},u._destroy=function(p,b){uI(h(p),()=>_p.nextTick(b,p),w=>_p.nextTick(b,w||p))};async function h(p){const b=p!=null,w=typeof o.throw=="function";if(b&&w){const{value:I,done:A}=await o.throw(p);if(await I,A)return}if(typeof o.return=="function"){const{value:I}=await o.return();await I}}async function l(){for(;;){try{const{value:p,done:b}=s?await o.next():o.next();if(b)u.push(null);else{const w=p&&typeof p.then=="function"?await p:p;if(w===null)throw f=!1,new cI;if(u.push(w))continue;f=!1}}catch(p){u.destroy(p)}break}}return u}var N_=dI,xl,mp;function $u(){if(mp)return xl;mp=1;const e=W.browserExports,{ArrayPrototypeIndexOf:t,NumberIsInteger:r,NumberIsNaN:o,NumberParseInt:s,ObjectDefineProperties:u,ObjectKeys:f,ObjectSetPrototypeOf:h,Promise:l,SafeSet:p,SymbolAsyncDispose:b,SymbolAsyncIterator:w,Symbol:I}=vt;xl=Re,Re.ReadableState=Ue;const{EventEmitter:A}=W.eventsExports,{Stream:x,prependListener:v}=Zc,{Buffer:C}=W.bufferPolyfill,{addAbortSignal:B}=Bu,P=Ri;let S=br.debuglog("stream",N=>{S=N});const m=eI,j=Do,{getHighWaterMark:Q,getDefaultHighWaterMark:ce}=Nu,{aggregateTwoErrors:ue,codes:{ERR_INVALID_ARG_TYPE:te,ERR_METHOD_NOT_IMPLEMENTED:Se,ERR_OUT_OF_RANGE:me,ERR_STREAM_PUSH_AFTER_EOF:F,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:U},AbortError:$}=ur,{validateObject:G}=Ms,Y=I("kPaused"),{StringDecoder:V}=W.requireString_decoder(),ne=N_;h(Re.prototype,x.prototype),h(Re,x);const H=()=>{},{errorOrDestroy:K}=j,ae=1,de=2,re=4,_e=8,be=16,R=32,O=64,q=128,oe=256,ye=512,d=1024,g=2048,_=4096,E=8192,J=16384,ie=32768,se=65536,Ie=1<<17,Be=1<<18;function Ce(N){return{enumerable:!1,get(){return(this.state&N)!==0},set(D){D?this.state|=N:this.state&=~N}}}u(Ue.prototype,{objectMode:Ce(ae),ended:Ce(de),endEmitted:Ce(re),reading:Ce(_e),constructed:Ce(be),sync:Ce(R),needReadable:Ce(O),emittedReadable:Ce(q),readableListening:Ce(oe),resumeScheduled:Ce(ye),errorEmitted:Ce(d),emitClose:Ce(g),autoDestroy:Ce(_),destroyed:Ce(E),closed:Ce(J),closeEmitted:Ce(ie),multiAwaitDrain:Ce(se),readingMore:Ce(Ie),dataEmitted:Ce(Be)});function Ue(N,D,Ee){typeof Ee!="boolean"&&(Ee=D instanceof Yn()),this.state=g|_|be|R,N&&N.objectMode&&(this.state|=ae),Ee&&N&&N.readableObjectMode&&(this.state|=ae),this.highWaterMark=N?Q(this,N,"readableHighWaterMark",Ee):ce(!1),this.buffer=new m,this.length=0,this.pipes=[],this.flowing=null,this[Y]=null,N&&N.emitClose===!1&&(this.state&=-2049),N&&N.autoDestroy===!1&&(this.state&=-4097),this.errored=null,this.defaultEncoding=N&&N.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,N&&N.encoding&&(this.decoder=new V(N.encoding),this.encoding=N.encoding)}function Re(N){if(!(this instanceof Re))return new Re(N);const D=this instanceof Yn();this._readableState=new Ue(N,this,D),N&&(typeof N.read=="function"&&(this._read=N.read),typeof N.destroy=="function"&&(this._destroy=N.destroy),typeof N.construct=="function"&&(this._construct=N.construct),N.signal&&!D&&B(N.signal,this)),x.call(this,N),j.construct(this,()=>{this._readableState.needReadable&&at(this,this._readableState)})}Re.prototype.destroy=j.destroy,Re.prototype._undestroy=j.undestroy,Re.prototype._destroy=function(N,D){D(N)},Re.prototype[A.captureRejectionSymbol]=function(N){this.destroy(N)},Re.prototype[b]=function(){let N;return this.destroyed||(N=this.readableEnded?null:new $,this.destroy(N)),new l((D,Ee)=>P(this,ve=>ve&&ve!==N?Ee(ve):D(null)))},Re.prototype.push=function(N,D){return He(this,N,D,!1)},Re.prototype.unshift=function(N,D){return He(this,N,D,!0)};function He(N,D,Ee,ve){S("readableAddChunk",D);const Te=N._readableState;let yt;if(Te.state&ae||(typeof D=="string"?(Ee=Ee||Te.defaultEncoding,Te.encoding!==Ee&&(ve&&Te.encoding?D=C.from(D,Ee).toString(Te.encoding):(D=C.from(D,Ee),Ee=""))):D instanceof C?Ee="":x._isUint8Array(D)?(D=x._uint8ArrayToBuffer(D),Ee=""):D!=null&&(yt=new te("chunk",["string","Buffer","Uint8Array"],D))),yt)K(N,yt);else if(D===null)Te.state&=-9,Ve(N,Te);else if(Te.state&ae||D&&D.length>0)if(ve)if(Te.state&re)K(N,new U);else{if(Te.destroyed||Te.errored)return!1;bt(N,Te,D,!0)}else if(Te.ended)K(N,new F);else{if(Te.destroyed||Te.errored)return!1;Te.state&=-9,Te.decoder&&!Ee?(D=Te.decoder.write(D),Te.objectMode||D.length!==0?bt(N,Te,D,!1):at(N,Te)):bt(N,Te,D,!1)}else ve||(Te.state&=-9,at(N,Te));return!Te.ended&&(Te.length<Te.highWaterMark||Te.length===0)}function bt(N,D,Ee,ve){D.flowing&&D.length===0&&!D.sync&&N.listenerCount("data")>0?(D.state&se?D.awaitDrainWriters.clear():D.awaitDrainWriters=null,D.dataEmitted=!0,N.emit("data",Ee)):(D.length+=D.objectMode?1:Ee.length,ve?D.buffer.unshift(Ee):D.buffer.push(Ee),D.state&O&&Dt(N)),at(N,D)}Re.prototype.isPaused=function(){const N=this._readableState;return N[Y]===!0||N.flowing===!1},Re.prototype.setEncoding=function(N){const D=new V(N);this._readableState.decoder=D,this._readableState.encoding=this._readableState.decoder.encoding;const Ee=this._readableState.buffer;let ve="";for(const Te of Ee)ve+=D.write(Te);return Ee.clear(),ve!==""&&Ee.push(ve),this._readableState.length=ve.length,this};const et=1073741824;function _t(N){if(N>et)throw new me("size","<= 1GiB",N);return N--,N|=N>>>1,N|=N>>>2,N|=N>>>4,N|=N>>>8,N|=N>>>16,N++,N}function Ye(N,D){return N<=0||D.length===0&&D.ended?0:D.state&ae?1:o(N)?D.flowing&&D.length?D.buffer.first().length:D.length:N<=D.length?N:D.ended?D.length:0}Re.prototype.read=function(N){S("read",N),N===void 0?N=NaN:r(N)||(N=s(N,10));const D=this._readableState,Ee=N;if(N>D.highWaterMark&&(D.highWaterMark=_t(N)),N!==0&&(D.state&=-129),N===0&&D.needReadable&&((D.highWaterMark!==0?D.length>=D.highWaterMark:D.length>0)||D.ended))return S("read: emitReadable",D.length,D.ended),D.length===0&&D.ended?Or(this):Dt(this),null;if(N=Ye(N,D),N===0&&D.ended)return D.length===0&&Or(this),null;let ve=(D.state&O)!==0;if(S("need readable",ve),(D.length===0||D.length-N<D.highWaterMark)&&(ve=!0,S("length less than watermark",ve)),D.ended||D.reading||D.destroyed||D.errored||!D.constructed)ve=!1,S("reading, ended or constructing",ve);else if(ve){S("do read"),D.state|=_e|R,D.length===0&&(D.state|=O);try{this._read(D.highWaterMark)}catch(yt){K(this,yt)}D.state&=-33,D.reading||(N=Ye(Ee,D))}let Te;return N>0?Te=tr(N,D):Te=null,Te===null?(D.needReadable=D.length<=D.highWaterMark,N=0):(D.length-=N,D.multiAwaitDrain?D.awaitDrainWriters.clear():D.awaitDrainWriters=null),D.length===0&&(D.ended||(D.needReadable=!0),Ee!==N&&D.ended&&Or(this)),Te!==null&&!D.errorEmitted&&!D.closeEmitted&&(D.dataEmitted=!0,this.emit("data",Te)),Te};function Ve(N,D){if(S("onEofChunk"),!D.ended){if(D.decoder){const Ee=D.decoder.end();Ee&&Ee.length&&(D.buffer.push(Ee),D.length+=D.objectMode?1:Ee.length)}D.ended=!0,D.sync?Dt(N):(D.needReadable=!1,D.emittedReadable=!0,Lt(N))}}function Dt(N){const D=N._readableState;S("emitReadable",D.needReadable,D.emittedReadable),D.needReadable=!1,D.emittedReadable||(S("emitReadable",D.flowing),D.emittedReadable=!0,e.nextTick(Lt,N))}function Lt(N){const D=N._readableState;S("emitReadable_",D.destroyed,D.length,D.ended),!D.destroyed&&!D.errored&&(D.length||D.ended)&&(N.emit("readable"),D.emittedReadable=!1),D.needReadable=!D.flowing&&!D.ended&&D.length<=D.highWaterMark,Kr(N)}function at(N,D){!D.readingMore&&D.constructed&&(D.readingMore=!0,e.nextTick(Bt,N,D))}function Bt(N,D){for(;!D.reading&&!D.ended&&(D.length<D.highWaterMark||D.flowing&&D.length===0);){const Ee=D.length;if(S("maybeReadMore read 0"),N.read(0),Ee===D.length)break}D.readingMore=!1}Re.prototype._read=function(N){throw new Se("_read()")},Re.prototype.pipe=function(N,D){const Ee=this,ve=this._readableState;ve.pipes.length===1&&(ve.multiAwaitDrain||(ve.multiAwaitDrain=!0,ve.awaitDrainWriters=new p(ve.awaitDrainWriters?[ve.awaitDrainWriters]:[]))),ve.pipes.push(N),S("pipe count=%d opts=%j",ve.pipes.length,D);const yt=(!D||D.end!==!1)&&N!==e.stdout&&N!==e.stderr?fn:yr;ve.endEmitted?e.nextTick(yt):Ee.once("end",yt),N.on("unpipe",St);function St(nr,Ft){S("onunpipe"),nr===Ee&&Ft&&Ft.hasUnpiped===!1&&(Ft.hasUnpiped=!0,Pn())}function fn(){S("onend"),N.end()}let Pt,ln=!1;function Pn(){S("cleanup"),N.removeListener("close",Gt),N.removeListener("finish",Cr),Pt&&N.removeListener("drain",Pt),N.removeListener("error",Yr),N.removeListener("unpipe",St),Ee.removeListener("end",fn),Ee.removeListener("end",yr),Ee.removeListener("data",dn),ln=!0,Pt&&ve.awaitDrainWriters&&(!N._writableState||N._writableState.needDrain)&&Pt()}function cn(){ln||(ve.pipes.length===1&&ve.pipes[0]===N?(S("false write response, pause",0),ve.awaitDrainWriters=N,ve.multiAwaitDrain=!1):ve.pipes.length>1&&ve.pipes.includes(N)&&(S("false write response, pause",ve.awaitDrainWriters.size),ve.awaitDrainWriters.add(N)),Ee.pause()),Pt||(Pt=fr(Ee,N),N.on("drain",Pt))}Ee.on("data",dn);function dn(nr){S("ondata");const Ft=N.write(nr);S("dest.write",Ft),Ft===!1&&cn()}function Yr(nr){if(S("onerror",nr),yr(),N.removeListener("error",Yr),N.listenerCount("error")===0){const Ft=N._writableState||N._readableState;Ft&&!Ft.errorEmitted?K(N,nr):N.emit("error",nr)}}v(N,"error",Yr);function Gt(){N.removeListener("finish",Cr),yr()}N.once("close",Gt);function Cr(){S("onfinish"),N.removeListener("close",Gt),yr()}N.once("finish",Cr);function yr(){S("unpipe"),Ee.unpipe(N)}return N.emit("pipe",Ee),N.writableNeedDrain===!0?cn():ve.flowing||(S("pipe resume"),Ee.resume()),N};function fr(N,D){return function(){const ve=N._readableState;ve.awaitDrainWriters===D?(S("pipeOnDrain",1),ve.awaitDrainWriters=null):ve.multiAwaitDrain&&(S("pipeOnDrain",ve.awaitDrainWriters.size),ve.awaitDrainWriters.delete(D)),(!ve.awaitDrainWriters||ve.awaitDrainWriters.size===0)&&N.listenerCount("data")&&N.resume()}}Re.prototype.unpipe=function(N){const D=this._readableState,Ee={hasUnpiped:!1};if(D.pipes.length===0)return this;if(!N){const Te=D.pipes;D.pipes=[],this.pause();for(let yt=0;yt<Te.length;yt++)Te[yt].emit("unpipe",this,{hasUnpiped:!1});return this}const ve=t(D.pipes,N);return ve===-1?this:(D.pipes.splice(ve,1),D.pipes.length===0&&this.pause(),N.emit("unpipe",this,Ee),this)},Re.prototype.on=function(N,D){const Ee=x.prototype.on.call(this,N,D),ve=this._readableState;return N==="data"?(ve.readableListening=this.listenerCount("readable")>0,ve.flowing!==!1&&this.resume()):N==="readable"&&!ve.endEmitted&&!ve.readableListening&&(ve.readableListening=ve.needReadable=!0,ve.flowing=!1,ve.emittedReadable=!1,S("on readable",ve.length,ve.reading),ve.length?Dt(this):ve.reading||e.nextTick(kt,this)),Ee},Re.prototype.addListener=Re.prototype.on,Re.prototype.removeListener=function(N,D){const Ee=x.prototype.removeListener.call(this,N,D);return N==="readable"&&e.nextTick(er,this),Ee},Re.prototype.off=Re.prototype.removeListener,Re.prototype.removeAllListeners=function(N){const D=x.prototype.removeAllListeners.apply(this,arguments);return(N==="readable"||N===void 0)&&e.nextTick(er,this),D};function er(N){const D=N._readableState;D.readableListening=N.listenerCount("readable")>0,D.resumeScheduled&&D[Y]===!1?D.flowing=!0:N.listenerCount("data")>0?N.resume():D.readableListening||(D.flowing=null)}function kt(N){S("readable nexttick read 0"),N.read(0)}Re.prototype.resume=function(){const N=this._readableState;return N.flowing||(S("resume"),N.flowing=!N.readableListening,lr(this,N)),N[Y]=!1,this};function lr(N,D){D.resumeScheduled||(D.resumeScheduled=!0,e.nextTick(zr,N,D))}function zr(N,D){S("resume",D.reading),D.reading||N.read(0),D.resumeScheduled=!1,N.emit("resume"),Kr(N),D.flowing&&!D.reading&&N.read(0)}Re.prototype.pause=function(){return S("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(S("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[Y]=!0,this};function Kr(N){const D=N._readableState;for(S("flow",D.flowing);D.flowing&&N.read()!==null;);}Re.prototype.wrap=function(N){let D=!1;N.on("data",ve=>{!this.push(ve)&&N.pause&&(D=!0,N.pause())}),N.on("end",()=>{this.push(null)}),N.on("error",ve=>{K(this,ve)}),N.on("close",()=>{this.destroy()}),N.on("destroy",()=>{this.destroy()}),this._read=()=>{D&&N.resume&&(D=!1,N.resume())};const Ee=f(N);for(let ve=1;ve<Ee.length;ve++){const Te=Ee[ve];this[Te]===void 0&&typeof N[Te]=="function"&&(this[Te]=N[Te].bind(N))}return this},Re.prototype[w]=function(){return sn(this)},Re.prototype.iterator=function(N){return N!==void 0&&G(N,"options"),sn(this,N)};function sn(N,D){typeof N.read!="function"&&(N=Re.wrap(N,{objectMode:!0}));const Ee=an(N,D);return Ee.stream=N,Ee}async function*an(N,D){let Ee=H;function ve(St){this===N?(Ee(),Ee=H):Ee=St}N.on("readable",ve);let Te;const yt=P(N,{writable:!1},St=>{Te=St?ue(Te,St):null,Ee(),Ee=H});try{for(;;){const St=N.destroyed?null:N.read();if(St!==null)yield St;else{if(Te)throw Te;if(Te===null)return;await new l(ve)}}}catch(St){throw Te=ue(Te,St),Te}finally{(Te||(D==null?void 0:D.destroyOnReturn)!==!1)&&(Te===void 0||N._readableState.autoDestroy)?j.destroyer(N,null):(N.off("readable",ve),yt())}}u(Re.prototype,{readable:{__proto__:null,get(){const N=this._readableState;return!!N&&N.readable!==!1&&!N.destroyed&&!N.errorEmitted&&!N.endEmitted},set(N){this._readableState&&(this._readableState.readable=!!N)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(N){this._readableState&&(this._readableState.flowing=N)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(N){this._readableState&&(this._readableState.destroyed=N)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),u(Ue.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[Y]!==!1},set(N){this[Y]=!!N}}}),Re._fromList=tr;function tr(N,D){if(D.length===0)return null;let Ee;return D.objectMode?Ee=D.buffer.shift():!N||N>=D.length?(D.decoder?Ee=D.buffer.join(""):D.buffer.length===1?Ee=D.buffer.first():Ee=D.buffer.concat(D.length),D.buffer.clear()):Ee=D.buffer.consume(N,D.decoder),Ee}function Or(N){const D=N._readableState;S("endReadable",D.endEmitted),D.endEmitted||(D.ended=!0,e.nextTick(rr,D,N))}function rr(N,D){if(S("endReadableNT",N.endEmitted,N.length),!N.errored&&!N.closeEmitted&&!N.endEmitted&&N.length===0){if(N.endEmitted=!0,D.emit("end"),D.writable&&D.allowHalfOpen===!1)e.nextTick(Ln,D);else if(N.autoDestroy){const Ee=D._writableState;(!Ee||Ee.autoDestroy&&(Ee.finished||Ee.writable===!1))&&D.destroy()}}}function Ln(N){N.writable&&!N.writableEnded&&!N.destroyed&&N.end()}Re.from=function(N,D){return ne(Re,N,D)};let Jr;function un(){return Jr===void 0&&(Jr={}),Jr}return Re.fromWeb=function(N,D){return un().newStreamReadableFromReadableStream(N,D)},Re.toWeb=function(N,D){return un().newReadableStreamFromStreamReadable(N,D)},Re.wrap=function(N,D){var Ee,ve;return new Re({objectMode:(Ee=(ve=N.readableObjectMode)!==null&&ve!==void 0?ve:N.objectMode)!==null&&Ee!==void 0?Ee:!0,...D,destroy(Te,yt){j.destroyer(N,Te),yt(Te)}}).wrap(N)},xl}var Dl,Ep;function Qc(){if(Ep)return Dl;Ep=1;const e=W.browserExports,{ArrayPrototypeSlice:t,Error:r,FunctionPrototypeSymbolHasInstance:o,ObjectDefineProperty:s,ObjectDefineProperties:u,ObjectSetPrototypeOf:f,StringPrototypeToLowerCase:h,Symbol:l,SymbolHasInstance:p}=vt;Dl=G,G.WritableState=U;const{EventEmitter:b}=W.eventsExports,w=Zc.Stream,{Buffer:I}=W.bufferPolyfill,A=Do,{addAbortSignal:x}=Bu,{getHighWaterMark:v,getDefaultHighWaterMark:C}=Nu,{ERR_INVALID_ARG_TYPE:B,ERR_METHOD_NOT_IMPLEMENTED:P,ERR_MULTIPLE_CALLBACK:S,ERR_STREAM_CANNOT_PIPE:m,ERR_STREAM_DESTROYED:j,ERR_STREAM_ALREADY_FINISHED:Q,ERR_STREAM_NULL_VALUES:ce,ERR_STREAM_WRITE_AFTER_END:ue,ERR_UNKNOWN_ENCODING:te}=ur.codes,{errorOrDestroy:Se}=A;f(G.prototype,w.prototype),f(G,w);function me(){}const F=l("kOnFinished");function U(_,E,J){typeof J!="boolean"&&(J=E instanceof Yn()),this.objectMode=!!(_&&_.objectMode),J&&(this.objectMode=this.objectMode||!!(_&&_.writableObjectMode)),this.highWaterMark=_?v(this,_,"writableHighWaterMark",J):C(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const ie=!!(_&&_.decodeStrings===!1);this.decodeStrings=!ie,this.defaultEncoding=_&&_.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=K.bind(void 0,E),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,$(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!_||_.emitClose!==!1,this.autoDestroy=!_||_.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[F]=[]}function $(_){_.buffered=[],_.bufferedIndex=0,_.allBuffers=!0,_.allNoop=!0}U.prototype.getBuffer=function(){return t(this.buffered,this.bufferedIndex)},s(U.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function G(_){const E=this instanceof Yn();if(!E&&!o(G,this))return new G(_);this._writableState=new U(_,this,E),_&&(typeof _.write=="function"&&(this._write=_.write),typeof _.writev=="function"&&(this._writev=_.writev),typeof _.destroy=="function"&&(this._destroy=_.destroy),typeof _.final=="function"&&(this._final=_.final),typeof _.construct=="function"&&(this._construct=_.construct),_.signal&&x(_.signal,this)),w.call(this,_),A.construct(this,()=>{const J=this._writableState;J.writing||_e(this,J),q(this,J)})}s(G,p,{__proto__:null,value:function(_){return o(this,_)?!0:this!==G?!1:_&&_._writableState instanceof U}}),G.prototype.pipe=function(){Se(this,new m)};function Y(_,E,J,ie){const se=_._writableState;if(typeof J=="function")ie=J,J=se.defaultEncoding;else{if(!J)J=se.defaultEncoding;else if(J!=="buffer"&&!I.isEncoding(J))throw new te(J);typeof ie!="function"&&(ie=me)}if(E===null)throw new ce;if(!se.objectMode)if(typeof E=="string")se.decodeStrings!==!1&&(E=I.from(E,J),J="buffer");else if(E instanceof I)J="buffer";else if(w._isUint8Array(E))E=w._uint8ArrayToBuffer(E),J="buffer";else throw new B("chunk",["string","Buffer","Uint8Array"],E);let Ie;return se.ending?Ie=new ue:se.destroyed&&(Ie=new j("write")),Ie?(e.nextTick(ie,Ie),Se(_,Ie,!0),Ie):(se.pendingcb++,V(_,se,E,J,ie))}G.prototype.write=function(_,E,J){return Y(this,_,E,J)===!0},G.prototype.cork=function(){this._writableState.corked++},G.prototype.uncork=function(){const _=this._writableState;_.corked&&(_.corked--,_.writing||_e(this,_))},G.prototype.setDefaultEncoding=function(E){if(typeof E=="string"&&(E=h(E)),!I.isEncoding(E))throw new te(E);return this._writableState.defaultEncoding=E,this};function V(_,E,J,ie,se){const Ie=E.objectMode?1:J.length;E.length+=Ie;const Be=E.length<E.highWaterMark;return Be||(E.needDrain=!0),E.writing||E.corked||E.errored||!E.constructed?(E.buffered.push({chunk:J,encoding:ie,callback:se}),E.allBuffers&&ie!=="buffer"&&(E.allBuffers=!1),E.allNoop&&se!==me&&(E.allNoop=!1)):(E.writelen=Ie,E.writecb=se,E.writing=!0,E.sync=!0,_._write(J,ie,E.onwrite),E.sync=!1),Be&&!E.errored&&!E.destroyed}function ne(_,E,J,ie,se,Ie,Be){E.writelen=ie,E.writecb=Be,E.writing=!0,E.sync=!0,E.destroyed?E.onwrite(new j("write")):J?_._writev(se,E.onwrite):_._write(se,Ie,E.onwrite),E.sync=!1}function H(_,E,J,ie){--E.pendingcb,ie(J),re(E),Se(_,J)}function K(_,E){const J=_._writableState,ie=J.sync,se=J.writecb;if(typeof se!="function"){Se(_,new S);return}J.writing=!1,J.writecb=null,J.length-=J.writelen,J.writelen=0,E?(E.stack,J.errored||(J.errored=E),_._readableState&&!_._readableState.errored&&(_._readableState.errored=E),ie?e.nextTick(H,_,J,E,se):H(_,J,E,se)):(J.buffered.length>J.bufferedIndex&&_e(_,J),ie?J.afterWriteTickInfo!==null&&J.afterWriteTickInfo.cb===se?J.afterWriteTickInfo.count++:(J.afterWriteTickInfo={count:1,cb:se,stream:_,state:J},e.nextTick(ae,J.afterWriteTickInfo)):de(_,J,1,se))}function ae({stream:_,state:E,count:J,cb:ie}){return E.afterWriteTickInfo=null,de(_,E,J,ie)}function de(_,E,J,ie){for(!E.ending&&!_.destroyed&&E.length===0&&E.needDrain&&(E.needDrain=!1,_.emit("drain"));J-- >0;)E.pendingcb--,ie();E.destroyed&&re(E),q(_,E)}function re(_){if(_.writing)return;for(let se=_.bufferedIndex;se<_.buffered.length;++se){var E;const{chunk:Ie,callback:Be}=_.buffered[se],Ce=_.objectMode?1:Ie.length;_.length-=Ce,Be((E=_.errored)!==null&&E!==void 0?E:new j("write"))}const J=_[F].splice(0);for(let se=0;se<J.length;se++){var ie;J[se]((ie=_.errored)!==null&&ie!==void 0?ie:new j("end"))}$(_)}function _e(_,E){if(E.corked||E.bufferProcessing||E.destroyed||!E.constructed)return;const{buffered:J,bufferedIndex:ie,objectMode:se}=E,Ie=J.length-ie;if(!Ie)return;let Be=ie;if(E.bufferProcessing=!0,Ie>1&&_._writev){E.pendingcb-=Ie-1;const Ce=E.allNoop?me:Re=>{for(let He=Be;He<J.length;++He)J[He].callback(Re)},Ue=E.allNoop&&Be===0?J:t(J,Be);Ue.allBuffers=E.allBuffers,ne(_,E,!0,E.length,Ue,"",Ce),$(E)}else{do{const{chunk:Ce,encoding:Ue,callback:Re}=J[Be];J[Be++]=null;const He=se?1:Ce.length;ne(_,E,!1,He,Ce,Ue,Re)}while(Be<J.length&&!E.writing);Be===J.length?$(E):Be>256?(J.splice(0,Be),E.bufferedIndex=0):E.bufferedIndex=Be}E.bufferProcessing=!1}G.prototype._write=function(_,E,J){if(this._writev)this._writev([{chunk:_,encoding:E}],J);else throw new P("_write()")},G.prototype._writev=null,G.prototype.end=function(_,E,J){const ie=this._writableState;typeof _=="function"?(J=_,_=null,E=null):typeof E=="function"&&(J=E,E=null);let se;if(_!=null){const Ie=Y(this,_,E);Ie instanceof r&&(se=Ie)}return ie.corked&&(ie.corked=1,this.uncork()),se||(!ie.errored&&!ie.ending?(ie.ending=!0,q(this,ie,!0),ie.ended=!0):ie.finished?se=new Q("end"):ie.destroyed&&(se=new j("end"))),typeof J=="function"&&(se||ie.finished?e.nextTick(J,se):ie[F].push(J)),this};function be(_){return _.ending&&!_.destroyed&&_.constructed&&_.length===0&&!_.errored&&_.buffered.length===0&&!_.finished&&!_.writing&&!_.errorEmitted&&!_.closeEmitted}function R(_,E){let J=!1;function ie(se){if(J){Se(_,se??S());return}if(J=!0,E.pendingcb--,se){const Ie=E[F].splice(0);for(let Be=0;Be<Ie.length;Be++)Ie[Be](se);Se(_,se,E.sync)}else be(E)&&(E.prefinished=!0,_.emit("prefinish"),E.pendingcb++,e.nextTick(oe,_,E))}E.sync=!0,E.pendingcb++;try{_._final(ie)}catch(se){ie(se)}E.sync=!1}function O(_,E){!E.prefinished&&!E.finalCalled&&(typeof _._final=="function"&&!E.destroyed?(E.finalCalled=!0,R(_,E)):(E.prefinished=!0,_.emit("prefinish")))}function q(_,E,J){be(E)&&(O(_,E),E.pendingcb===0&&(J?(E.pendingcb++,e.nextTick((ie,se)=>{be(se)?oe(ie,se):se.pendingcb--},_,E)):be(E)&&(E.pendingcb++,oe(_,E))))}function oe(_,E){E.pendingcb--,E.finished=!0;const J=E[F].splice(0);for(let ie=0;ie<J.length;ie++)J[ie]();if(_.emit("finish"),E.autoDestroy){const ie=_._readableState;(!ie||ie.autoDestroy&&(ie.endEmitted||ie.readable===!1))&&_.destroy()}}u(G.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(_){this._writableState&&(this._writableState.destroyed=_)}},writable:{__proto__:null,get(){const _=this._writableState;return!!_&&_.writable!==!1&&!_.destroyed&&!_.errored&&!_.ending&&!_.ended},set(_){this._writableState&&(this._writableState.writable=!!_)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){const _=this._writableState;return _?!_.destroyed&&!_.ending&&_.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});const ye=A.destroy;G.prototype.destroy=function(_,E){const J=this._writableState;return!J.destroyed&&(J.bufferedIndex<J.buffered.length||J[F].length)&&e.nextTick(re,J),ye.call(this,_,E),this},G.prototype._undestroy=A.undestroy,G.prototype._destroy=function(_,E){E(_)},G.prototype[b.captureRejectionSymbol]=function(_){this.destroy(_)};let d;function g(){return d===void 0&&(d={}),d}return G.fromWeb=function(_,E){return g().newStreamWritableFromWritableStream(_,E)},G.toWeb=function(_){return g().newWritableStreamFromStreamWritable(_)},Dl}var jl,vp;function hI(){if(vp)return jl;vp=1;const e=W.browserExports,t=W.bufferPolyfill,{isReadable:r,isWritable:o,isIterable:s,isNodeStream:u,isReadableNodeStream:f,isWritableNodeStream:h,isDuplexNodeStream:l,isReadableStream:p,isWritableStream:b}=ei,w=Ri,{AbortError:I,codes:{ERR_INVALID_ARG_TYPE:A,ERR_INVALID_RETURN_VALUE:x}}=ur,{destroyer:v}=Do,C=Yn(),B=$u(),P=Qc(),{createDeferredPromise:S}=br,m=N_,j=globalThis.Blob||t.Blob,Q=typeof j<"u"?function(U){return U instanceof j}:function(U){return!1},ce=globalThis.AbortController||Os().AbortController,{FunctionPrototypeCall:ue}=vt;class te extends C{constructor(U){super(U),(U==null?void 0:U.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(U==null?void 0:U.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}jl=function F(U,$){if(l(U))return U;if(f(U))return me({readable:U});if(h(U))return me({writable:U});if(u(U))return me({writable:!1,readable:!1});if(p(U))return me({readable:B.fromWeb(U)});if(b(U))return me({writable:P.fromWeb(U)});if(typeof U=="function"){const{value:Y,write:V,final:ne,destroy:H}=Se(U);if(s(Y))return m(te,Y,{objectMode:!0,write:V,final:ne,destroy:H});const K=Y==null?void 0:Y.then;if(typeof K=="function"){let ae;const de=ue(K,Y,re=>{if(re!=null)throw new x("nully","body",re)},re=>{v(ae,re)});return ae=new te({objectMode:!0,readable:!1,write:V,final(re){ne(async()=>{try{await de,e.nextTick(re,null)}catch(_e){e.nextTick(re,_e)}})},destroy:H})}throw new x("Iterable, AsyncIterable or AsyncFunction",$,Y)}if(Q(U))return F(U.arrayBuffer());if(s(U))return m(te,U,{objectMode:!0,writable:!1});if(p(U==null?void 0:U.readable)&&b(U==null?void 0:U.writable))return te.fromWeb(U);if(typeof(U==null?void 0:U.writable)=="object"||typeof(U==null?void 0:U.readable)=="object"){const Y=U!=null&&U.readable?f(U==null?void 0:U.readable)?U==null?void 0:U.readable:F(U.readable):void 0,V=U!=null&&U.writable?h(U==null?void 0:U.writable)?U==null?void 0:U.writable:F(U.writable):void 0;return me({readable:Y,writable:V})}const G=U==null?void 0:U.then;if(typeof G=="function"){let Y;return ue(G,U,V=>{V!=null&&Y.push(V),Y.push(null)},V=>{v(Y,V)}),Y=new te({objectMode:!0,writable:!1,read(){}})}throw new A($,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],U)};function Se(F){let{promise:U,resolve:$}=S();const G=new ce,Y=G.signal;return{value:F(async function*(){for(;;){const ne=U;U=null;const{chunk:H,done:K,cb:ae}=await ne;if(e.nextTick(ae),K)return;if(Y.aborted)throw new I(void 0,{cause:Y.reason});({promise:U,resolve:$}=S()),yield H}}(),{signal:Y}),write(ne,H,K){const ae=$;$=null,ae({chunk:ne,done:!1,cb:K})},final(ne){const H=$;$=null,H({done:!0,cb:ne})},destroy(ne,H){G.abort(),H(ne)}}}function me(F){const U=F.readable&&typeof F.readable.read!="function"?B.wrap(F.readable):F.readable,$=F.writable;let G=!!r(U),Y=!!o($),V,ne,H,K,ae;function de(re){const _e=K;K=null,_e?_e(re):re&&ae.destroy(re)}return ae=new te({readableObjectMode:!!(U!=null&&U.readableObjectMode),writableObjectMode:!!($!=null&&$.writableObjectMode),readable:G,writable:Y}),Y&&(w($,re=>{Y=!1,re&&v(U,re),de(re)}),ae._write=function(re,_e,be){$.write(re,_e)?be():V=be},ae._final=function(re){$.end(),ne=re},$.on("drain",function(){if(V){const re=V;V=null,re()}}),$.on("finish",function(){if(ne){const re=ne;ne=null,re()}})),G&&(w(U,re=>{G=!1,re&&v(U,re),de(re)}),U.on("readable",function(){if(H){const re=H;H=null,re()}}),U.on("end",function(){ae.push(null)}),ae._read=function(){for(;;){const re=U.read();if(re===null){H=ae._read;return}if(!ae.push(re))return}}),ae._destroy=function(re,_e){!re&&K!==null&&(re=new I),H=null,V=null,ne=null,K===null?_e(re):(K=_e,v($,re),v(U,re))},ae}return jl}var Ul,Sp;function Yn(){if(Sp)return Ul;Sp=1;const{ObjectDefineProperties:e,ObjectGetOwnPropertyDescriptor:t,ObjectKeys:r,ObjectSetPrototypeOf:o}=vt;Ul=f;const s=$u(),u=Qc();o(f.prototype,s.prototype),o(f,s);{const b=r(u.prototype);for(let w=0;w<b.length;w++){const I=b[w];f.prototype[I]||(f.prototype[I]=u.prototype[I])}}function f(b){if(!(this instanceof f))return new f(b);s.call(this,b),u.call(this,b),b?(this.allowHalfOpen=b.allowHalfOpen!==!1,b.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),b.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}e(f.prototype,{writable:{__proto__:null,...t(u.prototype,"writable")},writableHighWaterMark:{__proto__:null,...t(u.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...t(u.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...t(u.prototype,"writableBuffer")},writableLength:{__proto__:null,...t(u.prototype,"writableLength")},writableFinished:{__proto__:null,...t(u.prototype,"writableFinished")},writableCorked:{__proto__:null,...t(u.prototype,"writableCorked")},writableEnded:{__proto__:null,...t(u.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...t(u.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(b){this._readableState&&this._writableState&&(this._readableState.destroyed=b,this._writableState.destroyed=b)}}});let h;function l(){return h===void 0&&(h={}),h}f.fromWeb=function(b,w){return l().newStreamDuplexFromReadableWritablePair(b,w)},f.toWeb=function(b){return l().newReadableWritablePairFromDuplex(b)};let p;return f.from=function(b){return p||(p=hI()),p(b,"body")},Ul}const{ObjectSetPrototypeOf:$_,Symbol:gI}=vt;var M_=Xn;const{ERR_METHOD_NOT_IMPLEMENTED:pI}=ur.codes,ed=Yn(),{getHighWaterMark:bI}=Nu;$_(Xn.prototype,ed.prototype);$_(Xn,ed);const vs=gI("kCallback");function Xn(e){if(!(this instanceof Xn))return new Xn(e);const t=e?bI(this,e,"readableHighWaterMark",!0):null;t===0&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),ed.call(this,e),this._readableState.sync=!1,this[vs]=null,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",_I)}function Ic(e){typeof this._flush=="function"&&!this.destroyed?this._flush((t,r)=>{if(t){e?e(t):this.destroy(t);return}r!=null&&this.push(r),this.push(null),e&&e()}):(this.push(null),e&&e())}function _I(){this._final!==Ic&&Ic.call(this)}Xn.prototype._final=Ic;Xn.prototype._transform=function(e,t,r){throw new pI("_transform()")};Xn.prototype._write=function(e,t,r){const o=this._readableState,s=this._writableState,u=o.length;this._transform(e,t,(f,h)=>{if(f){r(f);return}h!=null&&this.push(h),s.ended||u===o.length||o.length<o.highWaterMark?r():this[vs]=r})};Xn.prototype._read=function(){if(this[vs]){const e=this[vs];this[vs]=null,e()}};const{ObjectSetPrototypeOf:x_}=vt;var D_=Lo;const td=M_;x_(Lo.prototype,td.prototype);x_(Lo,td);function Lo(e){if(!(this instanceof Lo))return new Lo(e);td.call(this,e)}Lo.prototype._transform=function(e,t,r){r(null,e)};const Es=W.browserExports,{ArrayIsArray:yI,Promise:wI,SymbolAsyncIterator:mI,SymbolDispose:EI}=vt,pu=Ri,{once:vI}=br,SI=Do,Rp=Yn(),{aggregateTwoErrors:RI,codes:{ERR_INVALID_ARG_TYPE:Oc,ERR_INVALID_RETURN_VALUE:kl,ERR_MISSING_ARGS:AI,ERR_STREAM_DESTROYED:TI,ERR_STREAM_PREMATURE_CLOSE:II},AbortError:OI}=ur,{validateFunction:CI,validateAbortSignal:LI}=Ms,{isIterable:ki,isReadable:Fl,isReadableNodeStream:uu,isNodeStream:Ap,isTransformStream:vo,isWebStream:PI,isReadableStream:Hl,isReadableFinished:BI}=ei,NI=globalThis.AbortController||Os().AbortController;let Wl,ql,Gl;function Tp(e,t,r){let o=!1;e.on("close",()=>{o=!0});const s=pu(e,{readable:t,writable:r},u=>{o=!u});return{destroy:u=>{o||(o=!0,SI.destroyer(e,u||new TI("pipe")))},cleanup:s}}function $I(e){return CI(e[e.length-1],"streams[stream.length - 1]"),e.pop()}function Vl(e){if(ki(e))return e;if(uu(e))return MI(e);throw new Oc("val",["Readable","Iterable","AsyncIterable"],e)}async function*MI(e){ql||(ql=$u()),yield*ql.prototype[mI].call(e)}async function Ya(e,t,r,{end:o}){let s,u=null;const f=p=>{if(p&&(s=p),u){const b=u;u=null,b()}},h=()=>new wI((p,b)=>{s?b(s):u=()=>{s?b(s):p()}});t.on("drain",f);const l=pu(t,{readable:!1},f);try{t.writableNeedDrain&&await h();for await(const p of e)t.write(p)||await h();o&&(t.end(),await h()),r()}catch(p){r(s!==p?RI(s,p):p)}finally{l(),t.off("drain",f)}}async function zl(e,t,r,{end:o}){vo(t)&&(t=t.writable);const s=t.getWriter();try{for await(const u of e)await s.ready,s.write(u).catch(()=>{});await s.ready,o&&await s.close(),r()}catch(u){try{await s.abort(u),r(u)}catch(f){r(f)}}}function xI(...e){return j_(e,vI($I(e)))}function j_(e,t,r){if(e.length===1&&yI(e[0])&&(e=e[0]),e.length<2)throw new AI("streams");const o=new NI,s=o.signal,u=r==null?void 0:r.signal,f=[];LI(u,"options.signal");function h(){x(new OI)}Gl=Gl||br.addAbortListener;let l;u&&(l=Gl(u,h));let p,b;const w=[];let I=0;function A(P){x(P,--I===0)}function x(P,S){var m;if(P&&(!p||p.code==="ERR_STREAM_PREMATURE_CLOSE")&&(p=P),!(!p&&!S)){for(;w.length;)w.shift()(p);(m=l)===null||m===void 0||m[EI](),o.abort(),S&&(p||f.forEach(j=>j()),Es.nextTick(t,p,b))}}let v;for(let P=0;P<e.length;P++){const S=e[P],m=P<e.length-1,j=P>0,Q=m||(r==null?void 0:r.end)!==!1,ce=P===e.length-1;if(Ap(S)){let ue=function(te){te&&te.name!=="AbortError"&&te.code!=="ERR_STREAM_PREMATURE_CLOSE"&&A(te)};if(Q){const{destroy:te,cleanup:Se}=Tp(S,m,j);w.push(te),Fl(S)&&ce&&f.push(Se)}S.on("error",ue),Fl(S)&&ce&&f.push(()=>{S.removeListener("error",ue)})}if(P===0)if(typeof S=="function"){if(v=S({signal:s}),!ki(v))throw new kl("Iterable, AsyncIterable or Stream","source",v)}else ki(S)||uu(S)||vo(S)?v=S:v=Rp.from(S);else if(typeof S=="function"){if(vo(v)){var C;v=Vl((C=v)===null||C===void 0?void 0:C.readable)}else v=Vl(v);if(v=S(v,{signal:s}),m){if(!ki(v,!0))throw new kl("AsyncIterable",`transform[${P-1}]`,v)}else{var B;Wl||(Wl=D_);const ue=new Wl({objectMode:!0}),te=(B=v)===null||B===void 0?void 0:B.then;if(typeof te=="function")I++,te.call(v,F=>{b=F,F!=null&&ue.write(F),Q&&ue.end(),Es.nextTick(A)},F=>{ue.destroy(F),Es.nextTick(A,F)});else if(ki(v,!0))I++,Ya(v,ue,A,{end:Q});else if(Hl(v)||vo(v)){const F=v.readable||v;I++,Ya(F,ue,A,{end:Q})}else throw new kl("AsyncIterable or Promise","destination",v);v=ue;const{destroy:Se,cleanup:me}=Tp(v,!1,!0);w.push(Se),ce&&f.push(me)}}else if(Ap(S)){if(uu(v)){I+=2;const ue=DI(v,S,A,{end:Q});Fl(S)&&ce&&f.push(ue)}else if(vo(v)||Hl(v)){const ue=v.readable||v;I++,Ya(ue,S,A,{end:Q})}else if(ki(v))I++,Ya(v,S,A,{end:Q});else throw new Oc("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],v);v=S}else if(PI(S)){if(uu(v))I++,zl(Vl(v),S,A,{end:Q});else if(Hl(v)||ki(v))I++,zl(v,S,A,{end:Q});else if(vo(v))I++,zl(v.readable,S,A,{end:Q});else throw new Oc("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],v);v=S}else v=Rp.from(S)}return(s!=null&&s.aborted||u!=null&&u.aborted)&&Es.nextTick(h),v}function DI(e,t,r,{end:o}){let s=!1;if(t.on("close",()=>{s||r(new II)}),e.pipe(t,{end:!1}),o){let u=function(){s=!0,t.end()};BI(e)?Es.nextTick(u):e.once("end",u)}else r();return pu(e,{readable:!0,writable:!1},u=>{const f=e._readableState;u&&u.code==="ERR_STREAM_PREMATURE_CLOSE"&&f&&f.ended&&!f.errored&&!f.errorEmitted?e.once("end",r).once("error",r):r(u)}),pu(t,{readable:!1,writable:!0},r)}var rd={pipelineImpl:j_,pipeline:xI};const{pipeline:jI}=rd,Xa=Yn(),{destroyer:UI}=Do,{isNodeStream:Za,isReadable:Ip,isWritable:Op,isWebStream:Kl,isTransformStream:Ui,isWritableStream:Cp,isReadableStream:Lp}=ei,{AbortError:kI,codes:{ERR_INVALID_ARG_VALUE:Pp,ERR_MISSING_ARGS:FI}}=ur,HI=Ri;var U_=function(...t){if(t.length===0)throw new FI("streams");if(t.length===1)return Xa.from(t[0]);const r=[...t];if(typeof t[0]=="function"&&(t[0]=Xa.from(t[0])),typeof t[t.length-1]=="function"){const A=t.length-1;t[A]=Xa.from(t[A])}for(let A=0;A<t.length;++A)if(!(!Za(t[A])&&!Kl(t[A]))){if(A<t.length-1&&!(Ip(t[A])||Lp(t[A])||Ui(t[A])))throw new Pp(`streams[${A}]`,r[A],"must be readable");if(A>0&&!(Op(t[A])||Cp(t[A])||Ui(t[A])))throw new Pp(`streams[${A}]`,r[A],"must be writable")}let o,s,u,f,h;function l(A){const x=f;f=null,x?x(A):A?h.destroy(A):!I&&!w&&h.destroy()}const p=t[0],b=jI(t,l),w=!!(Op(p)||Cp(p)||Ui(p)),I=!!(Ip(b)||Lp(b)||Ui(b));if(h=new Xa({writableObjectMode:!!(p!=null&&p.writableObjectMode),readableObjectMode:!!(b!=null&&b.readableObjectMode),writable:w,readable:I}),w){if(Za(p))h._write=function(x,v,C){p.write(x,v)?C():o=C},h._final=function(x){p.end(),s=x},p.on("drain",function(){if(o){const x=o;o=null,x()}});else if(Kl(p)){const v=(Ui(p)?p.writable:p).getWriter();h._write=async function(C,B,P){try{await v.ready,v.write(C).catch(()=>{}),P()}catch(S){P(S)}},h._final=async function(C){try{await v.ready,v.close().catch(()=>{}),s=C}catch(B){C(B)}}}const A=Ui(b)?b.readable:b;HI(A,()=>{if(s){const x=s;s=null,x()}})}if(I){if(Za(b))b.on("readable",function(){if(u){const A=u;u=null,A()}}),b.on("end",function(){h.push(null)}),h._read=function(){for(;;){const A=b.read();if(A===null){u=h._read;return}if(!h.push(A))return}};else if(Kl(b)){const x=(Ui(b)?b.readable:b).getReader();h._read=async function(){for(;;)try{const{value:v,done:C}=await x.read();if(!h.push(v))return;if(C){h.push(null);return}}catch{return}}}}return h._destroy=function(A,x){!A&&f!==null&&(A=new kI),u=null,o=null,s=null,f===null?x(A):(f=x,Za(b)&&UI(b,A))},h};const WI=globalThis.AbortController||Os().AbortController,{codes:{ERR_INVALID_ARG_VALUE:qI,ERR_INVALID_ARG_TYPE:xs,ERR_MISSING_ARGS:GI,ERR_OUT_OF_RANGE:VI},AbortError:On}=ur,{validateAbortSignal:Ki,validateInteger:Bp,validateObject:Ji}=Ms,zI=vt.Symbol("kWeak"),KI=vt.Symbol("kResistStopPropagation"),{finished:JI}=Ri,YI=U_,{addAbortSignalNoValidate:XI}=Bu,{isWritable:ZI,isNodeStream:QI}=ei,{deprecate:eO}=br,{ArrayPrototypePush:tO,Boolean:rO,MathFloor:Np,Number:nO,NumberIsNaN:iO,Promise:$p,PromiseReject:Mp,PromiseResolve:oO,PromisePrototypeThen:xp,Symbol:k_}=vt,bu=k_("kEmpty"),Dp=k_("kEof");function sO(e,t){if(t!=null&&Ji(t,"options"),(t==null?void 0:t.signal)!=null&&Ki(t.signal,"options.signal"),QI(e)&&!ZI(e))throw new qI("stream",e,"must be writable");const r=YI(this,e);return t!=null&&t.signal&&XI(t.signal,r),r}function Mu(e,t){if(typeof e!="function")throw new xs("fn",["Function","AsyncFunction"],e);t!=null&&Ji(t,"options"),(t==null?void 0:t.signal)!=null&&Ki(t.signal,"options.signal");let r=1;(t==null?void 0:t.concurrency)!=null&&(r=Np(t.concurrency));let o=r-1;return(t==null?void 0:t.highWaterMark)!=null&&(o=Np(t.highWaterMark)),Bp(r,"options.concurrency",1),Bp(o,"options.highWaterMark",0),o+=r,(async function*(){const u=br.AbortSignalAny([t==null?void 0:t.signal].filter(rO)),f=this,h=[],l={signal:u};let p,b,w=!1,I=0;function A(){w=!0,x()}function x(){I-=1,v()}function v(){b&&!w&&I<r&&h.length<o&&(b(),b=null)}async function C(){try{for await(let B of f){if(w)return;if(u.aborted)throw new On;try{if(B=e(B,l),B===bu)continue;B=oO(B)}catch(P){B=Mp(P)}I+=1,xp(B,x,A),h.push(B),p&&(p(),p=null),!w&&(h.length>=o||I>=r)&&await new $p(P=>{b=P})}h.push(Dp)}catch(B){const P=Mp(B);xp(P,x,A),h.push(P)}finally{w=!0,p&&(p(),p=null)}}C();try{for(;;){for(;h.length>0;){const B=await h[0];if(B===Dp)return;if(u.aborted)throw new On;B!==bu&&(yield B),h.shift(),v()}await new $p(B=>{p=B})}}finally{w=!0,b&&(b(),b=null)}}).call(this)}function aO(e=void 0){return e!=null&&Ji(e,"options"),(e==null?void 0:e.signal)!=null&&Ki(e.signal,"options.signal"),(async function*(){let r=0;for await(const s of this){var o;if(e!=null&&(o=e.signal)!==null&&o!==void 0&&o.aborted)throw new On({cause:e.signal.reason});yield[r++,s]}}).call(this)}async function F_(e,t=void 0){for await(const r of nd.call(this,e,t))return!0;return!1}async function uO(e,t=void 0){if(typeof e!="function")throw new xs("fn",["Function","AsyncFunction"],e);return!await F_.call(this,async(...r)=>!await e(...r),t)}async function fO(e,t){for await(const r of nd.call(this,e,t))return r}async function lO(e,t){if(typeof e!="function")throw new xs("fn",["Function","AsyncFunction"],e);async function r(o,s){return await e(o,s),bu}for await(const o of Mu.call(this,r,t));}function nd(e,t){if(typeof e!="function")throw new xs("fn",["Function","AsyncFunction"],e);async function r(o,s){return await e(o,s)?o:bu}return Mu.call(this,r,t)}class cO extends GI{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function dO(e,t,r){var o;if(typeof e!="function")throw new xs("reducer",["Function","AsyncFunction"],e);r!=null&&Ji(r,"options"),(r==null?void 0:r.signal)!=null&&Ki(r.signal,"options.signal");let s=arguments.length>1;if(r!=null&&(o=r.signal)!==null&&o!==void 0&&o.aborted){const p=new On(void 0,{cause:r.signal.reason});throw this.once("error",()=>{}),await JI(this.destroy(p)),p}const u=new WI,f=u.signal;if(r!=null&&r.signal){const p={once:!0,[zI]:this,[KI]:!0};r.signal.addEventListener("abort",()=>u.abort(),p)}let h=!1;try{for await(const p of this){var l;if(h=!0,r!=null&&(l=r.signal)!==null&&l!==void 0&&l.aborted)throw new On;s?t=await e(t,p,{signal:f}):(t=p,s=!0)}if(!h&&!s)throw new cO}finally{u.abort()}return t}async function hO(e){e!=null&&Ji(e,"options"),(e==null?void 0:e.signal)!=null&&Ki(e.signal,"options.signal");const t=[];for await(const o of this){var r;if(e!=null&&(r=e.signal)!==null&&r!==void 0&&r.aborted)throw new On(void 0,{cause:e.signal.reason});tO(t,o)}return t}function gO(e,t){const r=Mu.call(this,e,t);return(async function*(){for await(const s of r)yield*s}).call(this)}function H_(e){if(e=nO(e),iO(e))return 0;if(e<0)throw new VI("number",">= 0",e);return e}function pO(e,t=void 0){return t!=null&&Ji(t,"options"),(t==null?void 0:t.signal)!=null&&Ki(t.signal,"options.signal"),e=H_(e),(async function*(){var o;if(t!=null&&(o=t.signal)!==null&&o!==void 0&&o.aborted)throw new On;for await(const u of this){var s;if(t!=null&&(s=t.signal)!==null&&s!==void 0&&s.aborted)throw new On;e--<=0&&(yield u)}}).call(this)}function bO(e,t=void 0){return t!=null&&Ji(t,"options"),(t==null?void 0:t.signal)!=null&&Ki(t.signal,"options.signal"),e=H_(e),(async function*(){var o;if(t!=null&&(o=t.signal)!==null&&o!==void 0&&o.aborted)throw new On;for await(const u of this){var s;if(t!=null&&(s=t.signal)!==null&&s!==void 0&&s.aborted)throw new On;if(e-- >0&&(yield u),e<=0)return}}).call(this)}Kc.streamReturningOperators={asIndexedPairs:eO(aO,"readable.asIndexedPairs will be removed in a future version."),drop:pO,filter:nd,flatMap:gO,map:Mu,take:bO,compose:sO};Kc.promiseReturningOperators={every:uO,forEach:lO,reduce:dO,toArray:hO,some:F_,find:fO};var Jl,jp;function W_(){if(jp)return Jl;jp=1;const{ArrayPrototypePop:e,Promise:t}=vt,{isIterable:r,isNodeStream:o,isWebStream:s}=ei,{pipelineImpl:u}=rd,{finished:f}=Ri;q_();function h(...l){return new t((p,b)=>{let w,I;const A=l[l.length-1];if(A&&typeof A=="object"&&!o(A)&&!r(A)&&!s(A)){const x=e(l);w=x.signal,I=x.end}u(l,(x,v)=>{x?b(x):p(v)},{signal:w,end:I})})}return Jl={finished:f,pipeline:h},Jl}var Up;function q_(){if(Up)return Bl.exports;Up=1;const{Buffer:e}=W.bufferPolyfill,{ObjectDefineProperty:t,ObjectKeys:r,ReflectApply:o}=vt,{promisify:{custom:s}}=br,{streamReturningOperators:u,promiseReturningOperators:f}=Kc,{codes:{ERR_ILLEGAL_CONSTRUCTOR:h}}=ur,l=U_,{setDefaultHighWaterMark:p,getDefaultHighWaterMark:b}=Nu,{pipeline:w}=rd,{destroyer:I}=Do,A=Ri,x=W_(),v=ei,C=Bl.exports=Zc.Stream;C.isDestroyed=v.isDestroyed,C.isDisturbed=v.isDisturbed,C.isErrored=v.isErrored,C.isReadable=v.isReadable,C.isWritable=v.isWritable,C.Readable=$u();for(const P of r(u)){let m=function(...j){if(new.target)throw h();return C.Readable.from(o(S,this,j))};const S=u[P];t(m,"name",{__proto__:null,value:S.name}),t(m,"length",{__proto__:null,value:S.length}),t(C.Readable.prototype,P,{__proto__:null,value:m,enumerable:!1,configurable:!0,writable:!0})}for(const P of r(f)){let m=function(...j){if(new.target)throw h();return o(S,this,j)};const S=f[P];t(m,"name",{__proto__:null,value:S.name}),t(m,"length",{__proto__:null,value:S.length}),t(C.Readable.prototype,P,{__proto__:null,value:m,enumerable:!1,configurable:!0,writable:!0})}C.Writable=Qc(),C.Duplex=Yn(),C.Transform=M_,C.PassThrough=D_,C.pipeline=w;const{addAbortSignal:B}=Bu;return C.addAbortSignal=B,C.finished=A,C.destroy=I,C.compose=l,C.setDefaultHighWaterMark=p,C.getDefaultHighWaterMark=b,t(C,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return x}}),t(w,s,{__proto__:null,enumerable:!0,get(){return x.pipeline}}),t(A,s,{__proto__:null,enumerable:!0,get(){return x.finished}}),C.Stream=C,C._isUint8Array=function(S){return S instanceof Uint8Array},C._uint8ArrayToBuffer=function(S){return e.from(S.buffer,S.byteOffset,S.byteLength)},Bl.exports}(function(e){const t=q_(),r=W_(),o=t.Readable.destroy;e.exports=t.Readable,e.exports._uint8ArrayToBuffer=t._uint8ArrayToBuffer,e.exports._isUint8Array=t._isUint8Array,e.exports.isDisturbed=t.isDisturbed,e.exports.isErrored=t.isErrored,e.exports.isReadable=t.isReadable,e.exports.Readable=t.Readable,e.exports.Writable=t.Writable,e.exports.Duplex=t.Duplex,e.exports.Transform=t.Transform,e.exports.PassThrough=t.PassThrough,e.exports.addAbortSignal=t.addAbortSignal,e.exports.finished=t.finished,e.exports.destroy=t.destroy,e.exports.destroy=o,e.exports.pipeline=t.pipeline,e.exports.compose=t.compose,Object.defineProperty(t,"promises",{configurable:!0,enumerable:!0,get(){return r}}),e.exports.Stream=t.Stream,e.exports.default=e.exports})(OA);var _O={},qi={},id={},Wt={};class G_ extends TypeError{constructor(t,r){let o;const{message:s,explanation:u,...f}=t,{path:h}=t,l=h.length===0?s:`At path: ${h.join(".")} -- ${s}`;super(u??l),u!=null&&(this.cause=l),Object.assign(this,f),this.name=this.constructor.name,this.failures=()=>o??(o=[t,...r()])}}function yO(e){return Hr(e)&&typeof e[Symbol.iterator]=="function"}function Hr(e){return typeof e=="object"&&e!=null}function kp(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function xt(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function wO(e){const{done:t,value:r}=e.next();return t?void 0:r}function mO(e,t,r,o){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:s,branch:u}=t,{type:f}=r,{refinement:h,message:l=`Expected a value of type \`${f}\`${h?` with refinement \`${h}\``:""}, but received: \`${xt(o)}\``}=e;return{value:o,type:f,refinement:h,key:s[s.length-1],path:s,branch:u,...e,message:l}}function*Cc(e,t,r,o){yO(e)||(e=[e]);for(const s of e){const u=mO(s,t,r,o);u&&(yield u)}}function*od(e,t,r={}){const{path:o=[],branch:s=[e],coerce:u=!1,mask:f=!1}=r,h={path:o,branch:s};if(u&&(e=t.coercer(e,h),f&&t.type!=="type"&&Hr(t.schema)&&Hr(e)&&!Array.isArray(e)))for(const p in e)t.schema[p]===void 0&&delete e[p];let l="valid";for(const p of t.validator(e,h))p.explanation=r.message,l="not_valid",yield[p,void 0];for(let[p,b,w]of t.entries(e,h)){const I=od(b,w,{path:p===void 0?o:[...o,p],branch:p===void 0?s:[...s,b],coerce:u,mask:f,message:r.message});for(const A of I)A[0]?(l=A[0].refinement!=null?"not_refined":"not_valid",yield[A[0],void 0]):u&&(b=A[1],p===void 0?e=b:e instanceof Map?e.set(p,b):e instanceof Set?e.add(b):Hr(e)&&(b!==void 0||p in e)&&(e[p]=b))}if(l!=="not_valid")for(const p of t.refiner(e,h))p.explanation=r.message,l="not_refined",yield[p,void 0];l==="valid"&&(yield[void 0,e])}class Ct{constructor(t){const{type:r,schema:o,validator:s,refiner:u,coercer:f=l=>l,entries:h=function*(){}}=t;this.type=r,this.schema=o,this.entries=h,this.coercer=f,s?this.validator=(l,p)=>{const b=s(l,p);return Cc(b,p,this,l)}:this.validator=()=>[],u?this.refiner=(l,p)=>{const b=u(l,p);return Cc(b,p,this,l)}:this.refiner=()=>[]}assert(t,r){return V_(t,this,r)}create(t,r){return z_(t,this,r)}is(t){return sd(t,this)}mask(t,r){return K_(t,this,r)}validate(t,r={}){return jo(t,this,r)}}function V_(e,t,r){const o=jo(e,t,{message:r});if(o[0])throw o[0]}function z_(e,t,r){const o=jo(e,t,{coerce:!0,message:r});if(o[0])throw o[0];return o[1]}function K_(e,t,r){const o=jo(e,t,{coerce:!0,mask:!0,message:r});if(o[0])throw o[0];return o[1]}function sd(e,t){return!jo(e,t)[0]}function jo(e,t,r={}){const o=od(e,t,r),s=wO(o);return s[0]?[new G_(s[0],function*(){for(const f of o)f[0]&&(yield f[0])}),void 0]:[void 0,s[1]]}function EO(...e){const t=e[0].type==="type",r=e.map(s=>s.schema),o=Object.assign({},...r);return t?js(o):Ds(o)}function _r(e,t){return new Ct({type:e,schema:null,validator:t})}function vO(e,t){return new Ct({...e,refiner:(r,o)=>r===void 0||e.refiner(r,o),validator(r,o){return r===void 0?!0:(t(r,o),e.validator(r,o))}})}function SO(e){return new Ct({type:"dynamic",schema:null,*entries(t,r){yield*e(t,r).entries(t,r)},validator(t,r){return e(t,r).validator(t,r)},coercer(t,r){return e(t,r).coercer(t,r)},refiner(t,r){return e(t,r).refiner(t,r)}})}function RO(e){let t;return new Ct({type:"lazy",schema:null,*entries(r,o){t??(t=e()),yield*t.entries(r,o)},validator(r,o){return t??(t=e()),t.validator(r,o)},coercer(r,o){return t??(t=e()),t.coercer(r,o)},refiner(r,o){return t??(t=e()),t.refiner(r,o)}})}function AO(e,t){const{schema:r}=e,o={...r};for(const s of t)delete o[s];switch(e.type){case"type":return js(o);default:return Ds(o)}}function TO(e){const t=e instanceof Ct,r=t?{...e.schema}:{...e};for(const o in r)r[o]=J_(r[o]);return t&&e.type==="type"?js(r):Ds(r)}function IO(e,t){const{schema:r}=e,o={};for(const s of t)o[s]=r[s];switch(e.type){case"type":return js(o);default:return Ds(o)}}function OO(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),_r(e,t)}function CO(){return _r("any",()=>!0)}function LO(e){return new Ct({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,o]of t.entries())yield[r,o,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${xt(t)}`}})}function PO(){return _r("bigint",e=>typeof e=="bigint")}function BO(){return _r("boolean",e=>typeof e=="boolean")}function NO(){return _r("date",e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${xt(e)}`)}function $O(e){const t={},r=e.map(o=>xt(o)).join();for(const o of e)t[o]=o;return new Ct({type:"enums",schema:t,validator(o){return e.includes(o)||`Expected one of \`${r}\`, but received: ${xt(o)}`}})}function MO(){return _r("func",e=>typeof e=="function"||`Expected a function, but received: ${xt(e)}`)}function xO(e){return _r("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${xt(t)}`)}function DO(){return _r("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${xt(e)}`)}function jO(e){return new Ct({type:"intersection",schema:null,*entries(t,r){for(const o of e)yield*o.entries(t,r)},*validator(t,r){for(const o of e)yield*o.validator(t,r)},*refiner(t,r){for(const o of e)yield*o.refiner(t,r)}})}function UO(e){const t=xt(e),r=typeof e;return new Ct({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(o){return o===e||`Expected the literal \`${t}\`, but received: ${xt(o)}`}})}function kO(e,t){return new Ct({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[o,s]of r.entries())yield[o,o,e],yield[o,s,t]},coercer(r){return r instanceof Map?new Map(r):r},validator(r){return r instanceof Map||`Expected a \`Map\` object, but received: ${xt(r)}`}})}function ad(){return _r("never",()=>!1)}function FO(e){return new Ct({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function HO(){return _r("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${xt(e)}`)}function Ds(e){const t=e?Object.keys(e):[],r=ad();return new Ct({type:"object",schema:e||null,*entries(o){if(e&&Hr(o)){const s=new Set(Object.keys(o));for(const u of t)s.delete(u),yield[u,o[u],e[u]];for(const u of s)yield[u,o[u],r]}},validator(o){return Hr(o)||`Expected an object, but received: ${xt(o)}`},coercer(o){return Hr(o)?{...o}:o}})}function J_(e){return new Ct({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function WO(e,t){return new Ct({type:"record",schema:null,*entries(r){if(Hr(r))for(const o in r){const s=r[o];yield[o,o,e],yield[o,s,t]}},validator(r){return Hr(r)||`Expected an object, but received: ${xt(r)}`}})}function qO(){return _r("regexp",e=>e instanceof RegExp)}function GO(e){return new Ct({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer(t){return t instanceof Set?new Set(t):t},validator(t){return t instanceof Set||`Expected a \`Set\` object, but received: ${xt(t)}`}})}function Y_(){return _r("string",e=>typeof e=="string"||`Expected a string, but received: ${xt(e)}`)}function VO(e){const t=ad();return new Ct({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const o=Math.max(e.length,r.length);for(let s=0;s<o;s++)yield[s,r[s],e[s]||t]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${xt(r)}`}})}function js(e){const t=Object.keys(e);return new Ct({type:"type",schema:e,*entries(r){if(Hr(r))for(const o of t)yield[o,r[o],e[o]]},validator(r){return Hr(r)||`Expected an object, but received: ${xt(r)}`},coercer(r){return Hr(r)?{...r}:r}})}function zO(e){const t=e.map(r=>r.type).join(" | ");return new Ct({type:"union",schema:null,coercer(r){for(const o of e){const[s,u]=o.validate(r,{coerce:!0});if(!s)return u}return r},validator(r,o){const s=[];for(const u of e){const[...f]=od(r,u,o),[h]=f;if(h[0])for(const[l]of f)l&&s.push(l);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${xt(r)}`,...s]}})}function X_(){return _r("unknown",()=>!0)}function ud(e,t,r){return new Ct({...e,coercer:(o,s)=>sd(o,t)?e.coercer(r(o,s),s):e.coercer(o,s)})}function KO(e,t,r={}){return ud(e,X_(),o=>{const s=typeof t=="function"?t():t;if(o===void 0)return s;if(!r.strict&&kp(o)&&kp(s)){const u={...o};let f=!1;for(const h in s)u[h]===void 0&&(u[h]=s[h],f=!0);if(f)return u}return o})}function JO(e){return ud(e,Y_(),t=>t.trim())}function YO(e){return Yi(e,"empty",t=>{const r=Z_(t);return r===0||`Expected an empty ${e.type} but received one with a size of \`${r}\``})}function Z_(e){return e instanceof Map||e instanceof Set?e.size:e.length}function XO(e,t,r={}){const{exclusive:o}=r;return Yi(e,"max",s=>o?s<t:s<=t||`Expected a ${e.type} less than ${o?"":"or equal to "}${t} but received \`${s}\``)}function ZO(e,t,r={}){const{exclusive:o}=r;return Yi(e,"min",s=>o?s>t:s>=t||`Expected a ${e.type} greater than ${o?"":"or equal to "}${t} but received \`${s}\``)}function QO(e){return Yi(e,"nonempty",t=>Z_(t)>0||`Expected a nonempty ${e.type} but received an empty one`)}function e2(e,t){return Yi(e,"pattern",r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`)}function t2(e,t,r=t){const o=`Expected a ${e.type}`,s=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return Yi(e,"size",u=>{if(typeof u=="number"||u instanceof Date)return t<=u&&u<=r||`${o} ${s} but received \`${u}\``;if(u instanceof Map||u instanceof Set){const{size:f}=u;return t<=f&&f<=r||`${o} with a size ${s} but received one with a size of \`${f}\``}else{const{length:f}=u;return t<=f&&f<=r||`${o} with a length ${s} but received one with a length of \`${f}\``}})}function Yi(e,t,r){return new Ct({...e,*refiner(o,s){yield*e.refiner(o,s);const u=r(o,s),f=Cc(u,s,e,o);for(const h of f)yield{...h,refinement:t}}})}const r2=Object.freeze(Object.defineProperty({__proto__:null,Struct:Ct,StructError:G_,any:CO,array:LO,assert:V_,assign:EO,bigint:PO,boolean:BO,coerce:ud,create:z_,date:NO,defaulted:KO,define:_r,deprecated:vO,dynamic:SO,empty:YO,enums:$O,func:MO,instance:xO,integer:DO,intersection:jO,is:sd,lazy:RO,literal:UO,map:kO,mask:K_,max:XO,min:ZO,never:ad,nonempty:QO,nullable:FO,number:HO,object:Ds,omit:AO,optional:J_,partial:TO,pattern:e2,pick:IO,record:WO,refine:Yi,regexp:qO,set:GO,size:t2,string:Y_,struct:OO,trimmed:JO,tuple:VO,type:js,union:zO,unknown:X_,validate:jo},Symbol.toStringTag,{value:"Module"})),Xi=W.getAugmentedNamespace(r2);Object.defineProperty(Wt,"__esModule",{value:!0});Wt.assertExhaustive=Wt.assertStruct=Wt.assert=Wt.AssertionError=void 0;const n2=Xi;function i2(e){return typeof e=="object"&&e!==null&&"message"in e}function o2(e){var t,r;return typeof((r=(t=e==null?void 0:e.prototype)===null||t===void 0?void 0:t.constructor)===null||r===void 0?void 0:r.name)=="string"}function s2(e){const t=i2(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}function Q_(e,t){return o2(e)?new e({message:t}):e({message:t})}class fd extends Error{constructor(t){super(t.message),this.code="ERR_ASSERTION"}}Wt.AssertionError=fd;function a2(e,t="Assertion failed.",r=fd){if(!e)throw t instanceof Error?t:Q_(r,t)}Wt.assert=a2;function u2(e,t,r="Assertion failed",o=fd){try{(0,n2.assert)(e,t)}catch(s){throw Q_(o,`${r}: ${s2(s)}.`)}}Wt.assertStruct=u2;function f2(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}Wt.assertExhaustive=f2;var Us={};Object.defineProperty(Us,"__esModule",{value:!0});Us.base64=void 0;const l2=Xi,c2=Wt,d2=(e,t={})=>{var r,o;const s=(r=t.paddingRequired)!==null&&r!==void 0?r:!1,u=(o=t.characterSet)!==null&&o!==void 0?o:"base64";let f;u==="base64"?f=String.raw`[A-Za-z0-9+\/]`:((0,c2.assert)(u==="base64url"),f=String.raw`[-_A-Za-z0-9]`);let h;return s?h=new RegExp(`^(?:${f}{4})*(?:${f}{3}=|${f}{2}==)?$`,"u"):h=new RegExp(`^(?:${f}{4})*(?:${f}{2,3}|${f}{3}=|${f}{2}==)?$`,"u"),(0,l2.pattern)(e,h)};Us.base64=d2;var Ze={},ks={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.remove0x=e.add0x=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.StrictHexStruct=e.HexStruct=void 0;const t=Xi,r=Wt;e.HexStruct=(0,t.pattern)((0,t.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-f]+$/iu);function o(p){return(0,t.is)(p,e.HexStruct)}e.isHexString=o;function s(p){return(0,t.is)(p,e.StrictHexStruct)}e.isStrictHexString=s;function u(p){(0,r.assert)(o(p),"Value must be a hexadecimal string.")}e.assertIsHexString=u;function f(p){(0,r.assert)(s(p),'Value must be a hexadecimal string, starting with "0x".')}e.assertIsStrictHexString=f;function h(p){return p.startsWith("0x")?p:p.startsWith("0X")?`0x${p.substring(2)}`:`0x${p}`}e.add0x=h;function l(p){return p.startsWith("0x")||p.startsWith("0X")?p.substring(2):p}e.remove0x=l})(ks);Object.defineProperty(Ze,"__esModule",{value:!0});Ze.createDataView=Ze.concatBytes=Ze.valueToBytes=Ze.stringToBytes=Ze.numberToBytes=Ze.signedBigIntToBytes=Ze.bigIntToBytes=Ze.hexToBytes=Ze.bytesToString=Ze.bytesToNumber=Ze.bytesToSignedBigInt=Ze.bytesToBigInt=Ze.bytesToHex=Ze.assertIsBytes=Ze.isBytes=void 0;const Ir=Wt,Lc=ks,Fp=48,Hp=58,Wp=87;function h2(){const e=[];return()=>{if(e.length===0)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}const g2=h2();function ld(e){return e instanceof Uint8Array}Ze.isBytes=ld;function Uo(e){(0,Ir.assert)(ld(e),"Value must be a Uint8Array.")}Ze.assertIsBytes=Uo;function ey(e){if(Uo(e),e.length===0)return"0x";const t=g2(),r=new Array(e.length);for(let o=0;o<e.length;o++)r[o]=t[e[o]];return(0,Lc.add0x)(r.join(""))}Ze.bytesToHex=ey;function ty(e){Uo(e);const t=ey(e);return BigInt(t)}Ze.bytesToBigInt=ty;function p2(e){Uo(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(e.length*8,t)}Ze.bytesToSignedBigInt=p2;function b2(e){Uo(e);const t=ty(e);return(0,Ir.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)}Ze.bytesToNumber=b2;function _2(e){return Uo(e),new TextDecoder().decode(e)}Ze.bytesToString=_2;function xu(e){var t;if(((t=e==null?void 0:e.toLowerCase)===null||t===void 0?void 0:t.call(e))==="0x")return new Uint8Array;(0,Lc.assertIsHexString)(e);const r=(0,Lc.remove0x)(e).toLowerCase(),o=r.length%2===0?r:`0${r}`,s=new Uint8Array(o.length/2);for(let u=0;u<s.length;u++){const f=o.charCodeAt(u*2),h=o.charCodeAt(u*2+1),l=f-(f<Hp?Fp:Wp),p=h-(h<Hp?Fp:Wp);s[u]=l*16+p}return s}Ze.hexToBytes=xu;function ry(e){(0,Ir.assert)(typeof e=="bigint","Value must be a bigint."),(0,Ir.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");const t=e.toString(16);return xu(t)}Ze.bigIntToBytes=ry;function y2(e,t){(0,Ir.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(t*8+-1))}function w2(e,t){(0,Ir.assert)(typeof e=="bigint","Value must be a bigint."),(0,Ir.assert)(typeof t=="number","Byte length must be a number."),(0,Ir.assert)(t>0,"Byte length must be greater than 0."),(0,Ir.assert)(y2(e,t),"Byte length is too small to represent the given value.");let r=e;const o=new Uint8Array(t);for(let s=0;s<o.length;s++)o[s]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return o.reverse()}Ze.signedBigIntToBytes=w2;function ny(e){(0,Ir.assert)(typeof e=="number","Value must be a number."),(0,Ir.assert)(e>=0,"Value must be a non-negative number."),(0,Ir.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");const t=e.toString(16);return xu(t)}Ze.numberToBytes=ny;function iy(e){return(0,Ir.assert)(typeof e=="string","Value must be a string."),new TextEncoder().encode(e)}Ze.stringToBytes=iy;function oy(e){if(typeof e=="bigint")return ry(e);if(typeof e=="number")return ny(e);if(typeof e=="string")return e.startsWith("0x")?xu(e):iy(e);if(ld(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}Ze.valueToBytes=oy;function m2(e){const t=new Array(e.length);let r=0;for(let s=0;s<e.length;s++){const u=oy(e[s]);t[s]=u,r+=u.length}const o=new Uint8Array(r);for(let s=0,u=0;s<t.length;s++)o.set(t[s],u),u+=t[s].length;return o}Ze.concatBytes=m2;function E2(e){if(typeof W.dist.Buffer<"u"&&e instanceof W.dist.Buffer){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}Ze.createDataView=E2;var Du={};Object.defineProperty(Du,"__esModule",{value:!0});Du.ChecksumStruct=void 0;const qp=Xi,v2=Us;Du.ChecksumStruct=(0,qp.size)((0,v2.base64)((0,qp.string)(),{paddingRequired:!0}),44,44);var vn={};Object.defineProperty(vn,"__esModule",{value:!0});vn.createHex=vn.createBytes=vn.createBigInt=vn.createNumber=void 0;const Et=Xi,S2=Wt,sy=Ze,ju=ks,ay=(0,Et.union)([(0,Et.number)(),(0,Et.bigint)(),(0,Et.string)(),ju.StrictHexStruct]),R2=(0,Et.coerce)((0,Et.number)(),ay,Number),A2=(0,Et.coerce)((0,Et.bigint)(),ay,BigInt);(0,Et.union)([ju.StrictHexStruct,(0,Et.instance)(Uint8Array)]);const T2=(0,Et.coerce)((0,Et.instance)(Uint8Array),(0,Et.union)([ju.StrictHexStruct]),sy.hexToBytes),I2=(0,Et.coerce)(ju.StrictHexStruct,(0,Et.instance)(Uint8Array),sy.bytesToHex);function O2(e){try{const t=(0,Et.create)(e,R2);return(0,S2.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){throw t instanceof Et.StructError?new Error(`Expected a number-like value, got "${e}".`):t}}vn.createNumber=O2;function C2(e){try{return(0,Et.create)(e,A2)}catch(t){throw t instanceof Et.StructError?new Error(`Expected a number-like value, got "${String(t.value)}".`):t}}vn.createBigInt=C2;function L2(e){if(typeof e=="string"&&e.toLowerCase()==="0x")return new Uint8Array;try{return(0,Et.create)(e,T2)}catch(t){throw t instanceof Et.StructError?new Error(`Expected a bytes-like value, got "${String(t.value)}".`):t}}vn.createBytes=L2;function P2(e){if(e instanceof Uint8Array&&e.length===0||typeof e=="string"&&e.toLowerCase()==="0x")return"0x";try{return(0,Et.create)(e,I2)}catch(t){throw t instanceof Et.StructError?new Error(`Expected a bytes-like value, got "${String(t.value)}".`):t}}vn.createHex=P2;var Po={},uy=W.commonjsGlobal&&W.commonjsGlobal.__classPrivateFieldSet||function(e,t,r,o,s){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?s.call(e,r):s?s.value=r:t.set(e,r),r},ar=W.commonjsGlobal&&W.commonjsGlobal.__classPrivateFieldGet||function(e,t,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(e):o?o.value:t.get(e)},tn,wn;Object.defineProperty(Po,"__esModule",{value:!0});Po.FrozenSet=Po.FrozenMap=void 0;class cd{constructor(t){tn.set(this,void 0),uy(this,tn,new Map(t),"f"),Object.freeze(this)}get size(){return ar(this,tn,"f").size}[(tn=new WeakMap,Symbol.iterator)](){return ar(this,tn,"f")[Symbol.iterator]()}entries(){return ar(this,tn,"f").entries()}forEach(t,r){return ar(this,tn,"f").forEach((o,s,u)=>t.call(r,o,s,this))}get(t){return ar(this,tn,"f").get(t)}has(t){return ar(this,tn,"f").has(t)}keys(){return ar(this,tn,"f").keys()}values(){return ar(this,tn,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([t,r])=>`${String(t)} => ${String(r)}`).join(", ")} `:""}}`}}Po.FrozenMap=cd;class dd{constructor(t){wn.set(this,void 0),uy(this,wn,new Set(t),"f"),Object.freeze(this)}get size(){return ar(this,wn,"f").size}[(wn=new WeakMap,Symbol.iterator)](){return ar(this,wn,"f")[Symbol.iterator]()}entries(){return ar(this,wn,"f").entries()}forEach(t,r){return ar(this,wn,"f").forEach((o,s,u)=>t.call(r,o,s,this))}has(t){return ar(this,wn,"f").has(t)}keys(){return ar(this,wn,"f").keys()}values(){return ar(this,wn,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(t=>String(t)).join(", ")} `:""}}`}}Po.FrozenSet=dd;Object.freeze(cd);Object.freeze(cd.prototype);Object.freeze(dd);Object.freeze(dd.prototype);var fy={};Object.defineProperty(fy,"__esModule",{value:!0});var ly={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=void 0;const t=Xi,r=Wt,o=()=>(0,t.define)("finite number",j=>(0,t.is)(j,(0,t.number)())&&Number.isFinite(j));e.UnsafeJsonStruct=(0,t.union)([(0,t.literal)(null),(0,t.boolean)(),o(),(0,t.string)(),(0,t.array)((0,t.lazy)(()=>e.UnsafeJsonStruct)),(0,t.record)((0,t.string)(),(0,t.lazy)(()=>e.UnsafeJsonStruct))]),e.JsonStruct=(0,t.define)("Json",(j,Q)=>{function ce(ue,te){const me=[...te.validator(ue,Q)];return me.length>0?me:!0}try{const ue=ce(j,e.UnsafeJsonStruct);return ue!==!0?ue:ce(JSON.parse(JSON.stringify(j)),e.UnsafeJsonStruct)}catch(ue){return ue instanceof RangeError?"Circular reference detected":!1}});function s(j){return(0,t.is)(j,e.JsonStruct)}e.isValidJson=s;function u(j){(0,r.assertStruct)(j,e.JsonStruct,"Invalid JSON value");const Q=JSON.stringify(j);return new TextEncoder().encode(Q).byteLength}e.getJsonSize=u,e.jsonrpc2="2.0",e.JsonRpcVersionStruct=(0,t.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,t.nullable)((0,t.union)([(0,t.number)(),(0,t.string)()])),e.JsonRpcErrorStruct=(0,t.object)({code:(0,t.integer)(),message:(0,t.string)(),data:(0,t.optional)(e.JsonStruct),stack:(0,t.optional)((0,t.string)())}),e.JsonRpcParamsStruct=(0,t.optional)((0,t.union)([(0,t.record)((0,t.string)(),e.JsonStruct),(0,t.array)(e.JsonStruct)])),e.JsonRpcRequestStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,t.string)(),params:e.JsonRpcParamsStruct}),e.JsonRpcNotificationStruct=(0,t.omit)(e.JsonRpcRequestStruct,["id"]);function f(j){return(0,t.is)(j,e.JsonRpcNotificationStruct)}e.isJsonRpcNotification=f;function h(j,Q){(0,r.assertStruct)(j,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",Q)}e.assertIsJsonRpcNotification=h;function l(j){return(0,t.is)(j,e.JsonRpcRequestStruct)}e.isJsonRpcRequest=l;function p(j,Q){(0,r.assertStruct)(j,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",Q)}e.assertIsJsonRpcRequest=p,e.PendingJsonRpcResponseStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:(0,t.optional)((0,t.unknown)()),error:(0,t.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,t.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]);function b(j){return(0,t.is)(j,e.PendingJsonRpcResponseStruct)}e.isPendingJsonRpcResponse=b;function w(j,Q){(0,r.assertStruct)(j,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",Q)}e.assertIsPendingJsonRpcResponse=w;function I(j){return(0,t.is)(j,e.JsonRpcResponseStruct)}e.isJsonRpcResponse=I;function A(j,Q){(0,r.assertStruct)(j,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",Q)}e.assertIsJsonRpcResponse=A;function x(j){return(0,t.is)(j,e.JsonRpcSuccessStruct)}e.isJsonRpcSuccess=x;function v(j,Q){(0,r.assertStruct)(j,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",Q)}e.assertIsJsonRpcSuccess=v;function C(j){return(0,t.is)(j,e.JsonRpcFailureStruct)}e.isJsonRpcFailure=C;function B(j,Q){(0,r.assertStruct)(j,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",Q)}e.assertIsJsonRpcFailure=B;function P(j){return(0,t.is)(j,e.JsonRpcErrorStruct)}e.isJsonRpcError=P;function S(j,Q){(0,r.assertStruct)(j,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",Q)}e.assertIsJsonRpcError=S;function m(j){const{permitEmptyString:Q,permitFractions:ce,permitNull:ue}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},j);return Se=>!!(typeof Se=="number"&&(ce||Number.isInteger(Se))||typeof Se=="string"&&(Q||Se.length>0)||ue&&Se===null)}e.getJsonRpcIdValidator=m})(ly);var cy={};Object.defineProperty(cy,"__esModule",{value:!0});var Bo={},B2=W.commonjsGlobal&&W.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Bo,"__esModule",{value:!0});Bo.createModuleLogger=Bo.createProjectLogger=void 0;const N2=B2(EA),$2=(0,N2.default)("metamask");function M2(e){return $2.extend(e)}Bo.createProjectLogger=M2;function x2(e,t){return e.extend(t)}Bo.createModuleLogger=x2;var dy={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0;function t(p){return Array.isArray(p)&&p.length>0}e.isNonEmptyArray=t;function r(p){return p==null}e.isNullOrUndefined=r;function o(p){return!!p&&typeof p=="object"&&!Array.isArray(p)}e.isObject=o;const s=(p,b)=>Object.hasOwnProperty.call(p,b);e.hasProperty=s,function(p){p[p.Null=4]="Null",p[p.Comma=1]="Comma",p[p.Wrapper=1]="Wrapper",p[p.True=4]="True",p[p.False=5]="False",p[p.Quote=1]="Quote",p[p.Colon=1]="Colon",p[p.Date=24]="Date"}(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function u(p){if(typeof p!="object"||p===null)return!1;try{let b=p;for(;Object.getPrototypeOf(b)!==null;)b=Object.getPrototypeOf(b);return Object.getPrototypeOf(p)===b}catch{return!1}}e.isPlainObject=u;function f(p){return p.charCodeAt(0)<=127}e.isASCII=f;function h(p){var b;return p.split("").reduce((I,A)=>f(A)?I+1:I+2,0)+((b=p.match(e.ESCAPE_CHARACTERS_REGEXP))!==null&&b!==void 0?b:[]).length}e.calculateStringSize=h;function l(p){return p.toString().length}e.calculateNumberSize=l})(dy);var Sn={};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.hexToBigInt=Sn.hexToNumber=Sn.bigIntToHex=Sn.numberToHex=void 0;const To=Wt,Cs=ks,D2=e=>((0,To.assert)(typeof e=="number","Value must be a number."),(0,To.assert)(e>=0,"Value must be a non-negative number."),(0,To.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,Cs.add0x)(e.toString(16)));Sn.numberToHex=D2;const j2=e=>((0,To.assert)(typeof e=="bigint","Value must be a bigint."),(0,To.assert)(e>=0,"Value must be a non-negative bigint."),(0,Cs.add0x)(e.toString(16)));Sn.bigIntToHex=j2;const U2=e=>{(0,Cs.assertIsHexString)(e);const t=parseInt(e,16);return(0,To.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};Sn.hexToNumber=U2;const k2=e=>((0,Cs.assertIsHexString)(e),BigInt((0,Cs.add0x)(e)));Sn.hexToBigInt=k2;var hy={};Object.defineProperty(hy,"__esModule",{value:!0});var gy={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,function(u){u[u.Millisecond=1]="Millisecond",u[u.Second=1e3]="Second",u[u.Minute=6e4]="Minute",u[u.Hour=36e5]="Hour",u[u.Day=864e5]="Day",u[u.Week=6048e5]="Week",u[u.Year=31536e6]="Year"}(e.Duration||(e.Duration={}));const t=u=>Number.isInteger(u)&&u>=0,r=(u,f)=>{if(!t(u))throw new Error(`"${f}" must be a non-negative integer. Received: "${u}".`)};function o(u,f){return r(u,"count"),u*f}e.inMilliseconds=o;function s(u){return r(u,"timestamp"),Date.now()-u}e.timeSince=s})(gy);var py={};Object.defineProperty(py,"__esModule",{value:!0});var by={},Pc={exports:{}};const F2="2.0.0",_y=256,H2=Number.MAX_SAFE_INTEGER||9007199254740991,W2=16,q2=_y-6,G2=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var Uu={MAX_LENGTH:_y,MAX_SAFE_COMPONENT_LENGTH:W2,MAX_SAFE_BUILD_LENGTH:q2,MAX_SAFE_INTEGER:H2,RELEASE_TYPES:G2,SEMVER_SPEC_VERSION:F2,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const V2=typeof W.dist.process=="object"&&W.dist.process.env&&W.dist.process.env.NODE_DEBUG&&/\bsemver\b/i.test(W.dist.process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var ku=V2;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:s}=Uu,u=ku;t=e.exports={};const f=t.re=[],h=t.safeRe=[],l=t.src=[],p=t.safeSrc=[],b=t.t={};let w=0;const I="[a-zA-Z0-9-]",A=[["\\s",1],["\\d",s],[I,o]],x=C=>{for(const[B,P]of A)C=C.split(`${B}*`).join(`${B}{0,${P}}`).split(`${B}+`).join(`${B}{1,${P}}`);return C},v=(C,B,P)=>{const S=x(B),m=w++;u(C,m,B),b[C]=m,l[m]=B,p[m]=S,f[m]=new RegExp(B,P?"g":void 0),h[m]=new RegExp(S,P?"g":void 0)};v("NUMERICIDENTIFIER","0|[1-9]\\d*"),v("NUMERICIDENTIFIERLOOSE","\\d+"),v("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${I}*`),v("MAINVERSION",`(${l[b.NUMERICIDENTIFIER]})\\.(${l[b.NUMERICIDENTIFIER]})\\.(${l[b.NUMERICIDENTIFIER]})`),v("MAINVERSIONLOOSE",`(${l[b.NUMERICIDENTIFIERLOOSE]})\\.(${l[b.NUMERICIDENTIFIERLOOSE]})\\.(${l[b.NUMERICIDENTIFIERLOOSE]})`),v("PRERELEASEIDENTIFIER",`(?:${l[b.NUMERICIDENTIFIER]}|${l[b.NONNUMERICIDENTIFIER]})`),v("PRERELEASEIDENTIFIERLOOSE",`(?:${l[b.NUMERICIDENTIFIERLOOSE]}|${l[b.NONNUMERICIDENTIFIER]})`),v("PRERELEASE",`(?:-(${l[b.PRERELEASEIDENTIFIER]}(?:\\.${l[b.PRERELEASEIDENTIFIER]})*))`),v("PRERELEASELOOSE",`(?:-?(${l[b.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[b.PRERELEASEIDENTIFIERLOOSE]})*))`),v("BUILDIDENTIFIER",`${I}+`),v("BUILD",`(?:\\+(${l[b.BUILDIDENTIFIER]}(?:\\.${l[b.BUILDIDENTIFIER]})*))`),v("FULLPLAIN",`v?${l[b.MAINVERSION]}${l[b.PRERELEASE]}?${l[b.BUILD]}?`),v("FULL",`^${l[b.FULLPLAIN]}$`),v("LOOSEPLAIN",`[v=\\s]*${l[b.MAINVERSIONLOOSE]}${l[b.PRERELEASELOOSE]}?${l[b.BUILD]}?`),v("LOOSE",`^${l[b.LOOSEPLAIN]}$`),v("GTLT","((?:<|>)?=?)"),v("XRANGEIDENTIFIERLOOSE",`${l[b.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),v("XRANGEIDENTIFIER",`${l[b.NUMERICIDENTIFIER]}|x|X|\\*`),v("XRANGEPLAIN",`[v=\\s]*(${l[b.XRANGEIDENTIFIER]})(?:\\.(${l[b.XRANGEIDENTIFIER]})(?:\\.(${l[b.XRANGEIDENTIFIER]})(?:${l[b.PRERELEASE]})?${l[b.BUILD]}?)?)?`),v("XRANGEPLAINLOOSE",`[v=\\s]*(${l[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[b.XRANGEIDENTIFIERLOOSE]})(?:${l[b.PRERELEASELOOSE]})?${l[b.BUILD]}?)?)?`),v("XRANGE",`^${l[b.GTLT]}\\s*${l[b.XRANGEPLAIN]}$`),v("XRANGELOOSE",`^${l[b.GTLT]}\\s*${l[b.XRANGEPLAINLOOSE]}$`),v("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),v("COERCE",`${l[b.COERCEPLAIN]}(?:$|[^\\d])`),v("COERCEFULL",l[b.COERCEPLAIN]+`(?:${l[b.PRERELEASE]})?(?:${l[b.BUILD]})?(?:$|[^\\d])`),v("COERCERTL",l[b.COERCE],!0),v("COERCERTLFULL",l[b.COERCEFULL],!0),v("LONETILDE","(?:~>?)"),v("TILDETRIM",`(\\s*)${l[b.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",v("TILDE",`^${l[b.LONETILDE]}${l[b.XRANGEPLAIN]}$`),v("TILDELOOSE",`^${l[b.LONETILDE]}${l[b.XRANGEPLAINLOOSE]}$`),v("LONECARET","(?:\\^)"),v("CARETTRIM",`(\\s*)${l[b.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",v("CARET",`^${l[b.LONECARET]}${l[b.XRANGEPLAIN]}$`),v("CARETLOOSE",`^${l[b.LONECARET]}${l[b.XRANGEPLAINLOOSE]}$`),v("COMPARATORLOOSE",`^${l[b.GTLT]}\\s*(${l[b.LOOSEPLAIN]})$|^$`),v("COMPARATOR",`^${l[b.GTLT]}\\s*(${l[b.FULLPLAIN]})$|^$`),v("COMPARATORTRIM",`(\\s*)${l[b.GTLT]}\\s*(${l[b.LOOSEPLAIN]}|${l[b.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",v("HYPHENRANGE",`^\\s*(${l[b.XRANGEPLAIN]})\\s+-\\s+(${l[b.XRANGEPLAIN]})\\s*$`),v("HYPHENRANGELOOSE",`^\\s*(${l[b.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[b.XRANGEPLAINLOOSE]})\\s*$`),v("STAR","(<|>)?=?\\s*\\*"),v("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),v("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Pc,Pc.exports);var Fs=Pc.exports;const z2=Object.freeze({loose:!0}),K2=Object.freeze({}),J2=e=>e?typeof e!="object"?z2:e:K2;var hd=J2;const Gp=/^[0-9]+$/,yy=(e,t)=>{const r=Gp.test(e),o=Gp.test(t);return r&&o&&(e=+e,t=+t),e===t?0:r&&!o?-1:o&&!r?1:e<t?-1:1},Y2=(e,t)=>yy(t,e);var wy={compareIdentifiers:yy,rcompareIdentifiers:Y2};const Qa=ku,{MAX_LENGTH:Vp,MAX_SAFE_INTEGER:eu}=Uu,{safeRe:zp,safeSrc:Kp,t:tu}=Fs,X2=hd,{compareIdentifiers:wo}=wy;let Z2=class mn{constructor(t,r){if(r=X2(r),t instanceof mn){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Vp)throw new TypeError(`version is longer than ${Vp} characters`);Qa("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const o=t.trim().match(r.loose?zp[tu.LOOSE]:zp[tu.FULL]);if(!o)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>eu||this.major<0)throw new TypeError("Invalid major version");if(this.minor>eu||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>eu||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){const u=+s;if(u>=0&&u<eu)return u}return s}):this.prerelease=[],this.build=o[5]?o[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(t){if(Qa("SemVer.compare",this.version,this.options,t),!(t instanceof mn)){if(typeof t=="string"&&t===this.version)return 0;t=new mn(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof mn||(t=new mn(t,this.options)),wo(this.major,t.major)||wo(this.minor,t.minor)||wo(this.patch,t.patch)}comparePre(t){if(t instanceof mn||(t=new mn(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{const o=this.prerelease[r],s=t.prerelease[r];if(Qa("prerelease compare",r,o,s),o===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(o===void 0)return-1;if(o===s)continue;return wo(o,s)}while(++r)}compareBuild(t){t instanceof mn||(t=new mn(t,this.options));let r=0;do{const o=this.build[r],s=t.build[r];if(Qa("build compare",r,o,s),o===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(o===void 0)return-1;if(o===s)continue;return wo(o,s)}while(++r)}inc(t,r,o){if(t.startsWith("pre")){if(!r&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(r){const s=new RegExp(`^${this.options.loose?Kp[tu.PRERELEASELOOSE]:Kp[tu.PRERELEASE]}$`),u=`-${r}`.match(s);if(!u||u[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,o);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,o);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,o),this.inc("pre",r,o);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,o),this.inc("pre",r,o);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const s=Number(o)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let u=this.prerelease.length;for(;--u>=0;)typeof this.prerelease[u]=="number"&&(this.prerelease[u]++,u=-2);if(u===-1){if(r===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let u=[r,s];o===!1&&(u=[r]),wo(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=u):this.prerelease=u}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var Hs=Z2;const Jp=Hs,Q2=(e,t,r=!1)=>{if(e instanceof Jp)return e;try{return new Jp(e,t)}catch(o){if(!r)return null;throw o}};var eC=Q2;const tC=eC,rC=(e,t)=>{const r=tC(e,t);return r?r.version:null};var nC=rC;const Yp=Hs,iC=(e,t,r)=>new Yp(e,r).compare(new Yp(t,r));var ko=iC;const oC=ko,sC=(e,t,r)=>oC(e,t,r)>0;var gd=sC;const aC=ko,uC=(e,t,r)=>aC(e,t,r)<0;var my=uC;const fC=ko,lC=(e,t,r)=>fC(e,t,r)===0;var cC=lC;const dC=ko,hC=(e,t,r)=>dC(e,t,r)!==0;var gC=hC;const pC=ko,bC=(e,t,r)=>pC(e,t,r)>=0;var Ey=bC;const _C=ko,yC=(e,t,r)=>_C(e,t,r)<=0;var vy=yC;const wC=cC,mC=gC,EC=gd,vC=Ey,SC=my,RC=vy,AC=(e,t,r,o)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return wC(e,r,o);case"!=":return mC(e,r,o);case">":return EC(e,r,o);case">=":return vC(e,r,o);case"<":return SC(e,r,o);case"<=":return RC(e,r,o);default:throw new TypeError(`Invalid operator: ${t}`)}};var TC=AC;const{safeRe:xN,t:DN}=Fs;class IC{constructor(){this.max=1e3,this.map=new Map}get(t){const r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}delete(t){return this.map.delete(t)}set(t,r){if(!this.delete(t)&&r!==void 0){if(this.map.size>=this.max){const s=this.map.keys().next().value;this.delete(s)}this.map.set(t,r)}return this}}var OC=IC,Yl,Xp;function on(){if(Xp)return Yl;Xp=1;const e=/\s+/g;class t{constructor(G,Y){if(Y=s(Y),G instanceof t)return G.loose===!!Y.loose&&G.includePrerelease===!!Y.includePrerelease?G:new t(G.raw,Y);if(G instanceof u)return this.raw=G.value,this.set=[[G]],this.formatted=void 0,this;if(this.options=Y,this.loose=!!Y.loose,this.includePrerelease=!!Y.includePrerelease,this.raw=G.trim().replace(e," "),this.set=this.raw.split("||").map(V=>this.parseRange(V.trim())).filter(V=>V.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const V=this.set[0];if(this.set=this.set.filter(ne=>!v(ne[0])),this.set.length===0)this.set=[V];else if(this.set.length>1){for(const ne of this.set)if(ne.length===1&&C(ne[0])){this.set=[ne];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let G=0;G<this.set.length;G++){G>0&&(this.formatted+="||");const Y=this.set[G];for(let V=0;V<Y.length;V++)V>0&&(this.formatted+=" "),this.formatted+=Y[V].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(G){const V=((this.options.includePrerelease&&A)|(this.options.loose&&x))+":"+G,ne=o.get(V);if(ne)return ne;const H=this.options.loose,K=H?l[p.HYPHENRANGELOOSE]:l[p.HYPHENRANGE];G=G.replace(K,F(this.options.includePrerelease)),f("hyphen replace",G),G=G.replace(l[p.COMPARATORTRIM],b),f("comparator trim",G),G=G.replace(l[p.TILDETRIM],w),f("tilde trim",G),G=G.replace(l[p.CARETTRIM],I),f("caret trim",G);let ae=G.split(" ").map(be=>P(be,this.options)).join(" ").split(/\s+/).map(be=>me(be,this.options));H&&(ae=ae.filter(be=>(f("loose invalid filter",be,this.options),!!be.match(l[p.COMPARATORLOOSE])))),f("range list",ae);const de=new Map,re=ae.map(be=>new u(be,this.options));for(const be of re){if(v(be))return[be];de.set(be.value,be)}de.size>1&&de.has("")&&de.delete("");const _e=[...de.values()];return o.set(V,_e),_e}intersects(G,Y){if(!(G instanceof t))throw new TypeError("a Range is required");return this.set.some(V=>B(V,Y)&&G.set.some(ne=>B(ne,Y)&&V.every(H=>ne.every(K=>H.intersects(K,Y)))))}test(G){if(!G)return!1;if(typeof G=="string")try{G=new h(G,this.options)}catch{return!1}for(let Y=0;Y<this.set.length;Y++)if(U(this.set[Y],G,this.options))return!0;return!1}}Yl=t;const r=OC,o=new r,s=hd,u=Fu(),f=ku,h=Hs,{safeRe:l,t:p,comparatorTrimReplace:b,tildeTrimReplace:w,caretTrimReplace:I}=Fs,{FLAG_INCLUDE_PRERELEASE:A,FLAG_LOOSE:x}=Uu,v=$=>$.value==="<0.0.0-0",C=$=>$.value==="",B=($,G)=>{let Y=!0;const V=$.slice();let ne=V.pop();for(;Y&&V.length;)Y=V.every(H=>ne.intersects(H,G)),ne=V.pop();return Y},P=($,G)=>(f("comp",$,G),$=Q($,G),f("caret",$),$=m($,G),f("tildes",$),$=ue($,G),f("xrange",$),$=Se($,G),f("stars",$),$),S=$=>!$||$.toLowerCase()==="x"||$==="*",m=($,G)=>$.trim().split(/\s+/).map(Y=>j(Y,G)).join(" "),j=($,G)=>{const Y=G.loose?l[p.TILDELOOSE]:l[p.TILDE];return $.replace(Y,(V,ne,H,K,ae)=>{f("tilde",$,V,ne,H,K,ae);let de;return S(ne)?de="":S(H)?de=`>=${ne}.0.0 <${+ne+1}.0.0-0`:S(K)?de=`>=${ne}.${H}.0 <${ne}.${+H+1}.0-0`:ae?(f("replaceTilde pr",ae),de=`>=${ne}.${H}.${K}-${ae} <${ne}.${+H+1}.0-0`):de=`>=${ne}.${H}.${K} <${ne}.${+H+1}.0-0`,f("tilde return",de),de})},Q=($,G)=>$.trim().split(/\s+/).map(Y=>ce(Y,G)).join(" "),ce=($,G)=>{f("caret",$,G);const Y=G.loose?l[p.CARETLOOSE]:l[p.CARET],V=G.includePrerelease?"-0":"";return $.replace(Y,(ne,H,K,ae,de)=>{f("caret",$,ne,H,K,ae,de);let re;return S(H)?re="":S(K)?re=`>=${H}.0.0${V} <${+H+1}.0.0-0`:S(ae)?H==="0"?re=`>=${H}.${K}.0${V} <${H}.${+K+1}.0-0`:re=`>=${H}.${K}.0${V} <${+H+1}.0.0-0`:de?(f("replaceCaret pr",de),H==="0"?K==="0"?re=`>=${H}.${K}.${ae}-${de} <${H}.${K}.${+ae+1}-0`:re=`>=${H}.${K}.${ae}-${de} <${H}.${+K+1}.0-0`:re=`>=${H}.${K}.${ae}-${de} <${+H+1}.0.0-0`):(f("no pr"),H==="0"?K==="0"?re=`>=${H}.${K}.${ae}${V} <${H}.${K}.${+ae+1}-0`:re=`>=${H}.${K}.${ae}${V} <${H}.${+K+1}.0-0`:re=`>=${H}.${K}.${ae} <${+H+1}.0.0-0`),f("caret return",re),re})},ue=($,G)=>(f("replaceXRanges",$,G),$.split(/\s+/).map(Y=>te(Y,G)).join(" ")),te=($,G)=>{$=$.trim();const Y=G.loose?l[p.XRANGELOOSE]:l[p.XRANGE];return $.replace(Y,(V,ne,H,K,ae,de)=>{f("xRange",$,V,ne,H,K,ae,de);const re=S(H),_e=re||S(K),be=_e||S(ae),R=be;return ne==="="&&R&&(ne=""),de=G.includePrerelease?"-0":"",re?ne===">"||ne==="<"?V="<0.0.0-0":V="*":ne&&R?(_e&&(K=0),ae=0,ne===">"?(ne=">=",_e?(H=+H+1,K=0,ae=0):(K=+K+1,ae=0)):ne==="<="&&(ne="<",_e?H=+H+1:K=+K+1),ne==="<"&&(de="-0"),V=`${ne+H}.${K}.${ae}${de}`):_e?V=`>=${H}.0.0${de} <${+H+1}.0.0-0`:be&&(V=`>=${H}.${K}.0${de} <${H}.${+K+1}.0-0`),f("xRange return",V),V})},Se=($,G)=>(f("replaceStars",$,G),$.trim().replace(l[p.STAR],"")),me=($,G)=>(f("replaceGTE0",$,G),$.trim().replace(l[G.includePrerelease?p.GTE0PRE:p.GTE0],"")),F=$=>(G,Y,V,ne,H,K,ae,de,re,_e,be,R)=>(S(V)?Y="":S(ne)?Y=`>=${V}.0.0${$?"-0":""}`:S(H)?Y=`>=${V}.${ne}.0${$?"-0":""}`:K?Y=`>=${Y}`:Y=`>=${Y}${$?"-0":""}`,S(re)?de="":S(_e)?de=`<${+re+1}.0.0-0`:S(be)?de=`<${re}.${+_e+1}.0-0`:R?de=`<=${re}.${_e}.${be}-${R}`:$?de=`<${re}.${_e}.${+be+1}-0`:de=`<=${de}`,`${Y} ${de}`.trim()),U=($,G,Y)=>{for(let V=0;V<$.length;V++)if(!$[V].test(G))return!1;if(G.prerelease.length&&!Y.includePrerelease){for(let V=0;V<$.length;V++)if(f($[V].semver),$[V].semver!==u.ANY&&$[V].semver.prerelease.length>0){const ne=$[V].semver;if(ne.major===G.major&&ne.minor===G.minor&&ne.patch===G.patch)return!0}return!1}return!0};return Yl}var Xl,Zp;function Fu(){if(Zp)return Xl;Zp=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(b,w){if(w=r(w),b instanceof t){if(b.loose===!!w.loose)return b;b=b.value}b=b.trim().split(/\s+/).join(" "),f("comparator",b,w),this.options=w,this.loose=!!w.loose,this.parse(b),this.semver===e?this.value="":this.value=this.operator+this.semver.version,f("comp",this)}parse(b){const w=this.options.loose?o[s.COMPARATORLOOSE]:o[s.COMPARATOR],I=b.match(w);if(!I)throw new TypeError(`Invalid comparator: ${b}`);this.operator=I[1]!==void 0?I[1]:"",this.operator==="="&&(this.operator=""),I[2]?this.semver=new h(I[2],this.options.loose):this.semver=e}toString(){return this.value}test(b){if(f("Comparator.test",b,this.options.loose),this.semver===e||b===e)return!0;if(typeof b=="string")try{b=new h(b,this.options)}catch{return!1}return u(b,this.operator,this.semver,this.options)}intersects(b,w){if(!(b instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(b.value,w).test(this.value):b.operator===""?b.value===""?!0:new l(this.value,w).test(b.semver):(w=r(w),w.includePrerelease&&(this.value==="<0.0.0-0"||b.value==="<0.0.0-0")||!w.includePrerelease&&(this.value.startsWith("<0.0.0")||b.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&b.operator.startsWith(">")||this.operator.startsWith("<")&&b.operator.startsWith("<")||this.semver.version===b.semver.version&&this.operator.includes("=")&&b.operator.includes("=")||u(this.semver,"<",b.semver,w)&&this.operator.startsWith(">")&&b.operator.startsWith("<")||u(this.semver,">",b.semver,w)&&this.operator.startsWith("<")&&b.operator.startsWith(">")))}}Xl=t;const r=hd,{safeRe:o,t:s}=Fs,u=TC,f=ku,h=Hs,l=on();return Xl}const CC=on(),LC=(e,t,r)=>{try{t=new CC(t,r)}catch{return!1}return t.test(e)};var Sy=LC;on();on();on();on();const PC=on(),BC=(e,t)=>{try{return new PC(e,t).range||"*"}catch{return null}};var NC=BC;const $C=Hs,Ry=Fu(),{ANY:MC}=Ry,xC=on(),DC=Sy,Qp=gd,eb=my,jC=vy,UC=Ey,kC=(e,t,r,o)=>{e=new $C(e,o),t=new xC(t,o);let s,u,f,h,l;switch(r){case">":s=Qp,u=jC,f=eb,h=">",l=">=";break;case"<":s=eb,u=UC,f=Qp,h="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(DC(e,t,o))return!1;for(let p=0;p<t.set.length;++p){const b=t.set[p];let w=null,I=null;if(b.forEach(A=>{A.semver===MC&&(A=new Ry(">=0.0.0")),w=w||A,I=I||A,s(A.semver,w.semver,o)?w=A:f(A.semver,I.semver,o)&&(I=A)}),w.operator===h||w.operator===l||(!I.operator||I.operator===h)&&u(e,I.semver))return!1;if(I.operator===l&&f(e,I.semver))return!1}return!0};var FC=kC;const HC=FC,WC=(e,t,r)=>HC(e,t,">",r);var qC=WC;on();on();const pd=Fu(),{ANY:jN}=pd;new pd(">=0.0.0-0");new pd(">=0.0.0");const Zl=Fs,tb=Uu,rb=wy,GC=nC,VC=gd;Fu();on();const zC=Sy,KC=NC,JC=qC;var YC={valid:GC,gt:VC,satisfies:zC,validRange:KC,gtr:JC,re:Zl.re,src:Zl.src,tokens:Zl.t,SEMVER_SPEC_VERSION:tb.SEMVER_SPEC_VERSION,RELEASE_TYPES:tb.RELEASE_TYPES,compareIdentifiers:rb.compareIdentifiers,rcompareIdentifiers:rb.rcompareIdentifiers};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;const t=YC,r=Xi,o=Wt;e.VersionStruct=(0,r.refine)((0,r.string)(),"Version",w=>(0,t.valid)(w)===null?`Expected SemVer version, got "${w}"`:!0),e.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",w=>(0,t.validRange)(w)===null?`Expected SemVer range, got "${w}"`:!0);function s(w){return(0,r.is)(w,e.VersionStruct)}e.isValidSemVerVersion=s;function u(w){return(0,r.is)(w,e.VersionRangeStruct)}e.isValidSemVerRange=u;function f(w){(0,o.assertStruct)(w,e.VersionStruct)}e.assertIsSemVerVersion=f;function h(w){(0,o.assertStruct)(w,e.VersionRangeStruct)}e.assertIsSemVerRange=h;function l(w,I){return(0,t.gt)(w,I)}e.gtVersion=l;function p(w,I){return(0,t.gtr)(w,I)}e.gtRange=p;function b(w,I){return(0,t.satisfies)(w,I,{includePrerelease:!0})}e.satisfiesVersionRange=b})(by);(function(e){var t=W.commonjsGlobal&&W.commonjsGlobal.__createBinding||(Object.create?function(o,s,u,f){f===void 0&&(f=u);var h=Object.getOwnPropertyDescriptor(s,u);(!h||("get"in h?!s.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return s[u]}}),Object.defineProperty(o,f,h)}:function(o,s,u,f){f===void 0&&(f=u),o[f]=s[u]}),r=W.commonjsGlobal&&W.commonjsGlobal.__exportStar||function(o,s){for(var u in o)u!=="default"&&!Object.prototype.hasOwnProperty.call(s,u)&&t(s,o,u)};Object.defineProperty(e,"__esModule",{value:!0}),r(Wt,e),r(Us,e),r(Ze,e),r(Du,e),r(vn,e),r(Po,e),r(fy,e),r(ks,e),r(ly,e),r(cy,e),r(Bo,e),r(dy,e),r(Sn,e),r(hy,e),r(gy,e),r(py,e),r(by,e)})(id);var Hu={},Si={};Object.defineProperty(Si,"__esModule",{value:!0});Si.errorValues=Si.errorCodes=void 0;Si.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}};Si.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."}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeCause=e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=id,r=Si,o=r.errorCodes.rpc.internal,s="Unspecified error message. This is a bug, please report it.",u={code:o,message:f(o)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function f(A,x=s){if(h(A)){const v=A.toString();if((0,t.hasProperty)(r.errorValues,v))return r.errorValues[v].message;if(b(A))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return x}e.getMessageFromCode=f;function h(A){return Number.isInteger(A)}e.isValidCode=h;function l(A,{fallbackError:x=u,shouldIncludeStack:v=!0}={}){if(!(0,t.isJsonRpcError)(x))throw new Error("Must provide fallback error with integer number code and string message.");const C=p(A,x);return v||delete C.stack,C}e.serializeError=l;function p(A,x){if(A&&typeof A=="object"&&"serialize"in A&&typeof A.serialize=="function")return A.serialize();if((0,t.isJsonRpcError)(A))return A;const v=w(A);return{...x,data:{cause:v}}}function b(A){return A>=-32099&&A<=-32e3}function w(A){return Array.isArray(A)?A.map(x=>(0,t.isValidJson)(x)?x:(0,t.isObject)(x)?I(x):null):(0,t.isObject)(A)?I(A):(0,t.isValidJson)(A)?A:null}e.serializeCause=w;function I(A){return Object.getOwnPropertyNames(A).reduce((x,v)=>{const C=A[v];return(0,t.isValidJson)(C)&&(x[v]=C),x},{})}})(Hu);var XC=W.commonjsGlobal&&W.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qi,"__esModule",{value:!0});qi.EthereumProviderError=qi.JsonRpcError=void 0;const ZC=id,QC=XC(Gc),eL=Hu;class Ay extends Error{constructor(t,r,o){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a non-empty string.');super(r),this.code=t,o!==void 0&&(this.data=o)}serialize(){const t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data,(0,ZC.isPlainObject)(this.data)&&(t.data.cause=(0,eL.serializeCause)(this.data.cause))),this.stack&&(t.stack=this.stack),t}toString(){return(0,QC.default)(this.serialize(),nL,2)}}qi.JsonRpcError=Ay;class tL extends Ay{constructor(t,r,o){if(!rL(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,o)}}qi.EthereumProviderError=tL;function rL(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function nL(e,t){if(t!=="[Circular]")return t}var No={};Object.defineProperty(No,"__esModule",{value:!0});No.providerErrors=No.rpcErrors=void 0;const bd=qi,Xt=Si,Ty=Hu;No.rpcErrors={parse:e=>Ur(Xt.errorCodes.rpc.parse,e),invalidRequest:e=>Ur(Xt.errorCodes.rpc.invalidRequest,e),invalidParams:e=>Ur(Xt.errorCodes.rpc.invalidParams,e),methodNotFound:e=>Ur(Xt.errorCodes.rpc.methodNotFound,e),internal:e=>Ur(Xt.errorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||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 Ur(t,e)},invalidInput:e=>Ur(Xt.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>Ur(Xt.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Ur(Xt.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Ur(Xt.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Ur(Xt.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Ur(Xt.errorCodes.rpc.limitExceeded,e)};No.providerErrors={userRejectedRequest:e=>ps(Xt.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>ps(Xt.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>ps(Xt.errorCodes.provider.unsupportedMethod,e),disconnected:e=>ps(Xt.errorCodes.provider.disconnected,e),chainDisconnected:e=>ps(Xt.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:o}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new bd.EthereumProviderError(t,r,o)}};function Ur(e,t){const[r,o]=Iy(t);return new bd.JsonRpcError(e,r??(0,Ty.getMessageFromCode)(e),o)}function ps(e,t){const[r,o]=Iy(t);return new bd.EthereumProviderError(e,r??(0,Ty.getMessageFromCode)(e),o)}function Iy(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t??void 0,r]}}return[]}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.errorCodes=e.providerErrors=e.rpcErrors=e.getMessageFromCode=e.serializeError=e.serializeCause=e.EthereumProviderError=e.JsonRpcError=void 0;var t=qi;Object.defineProperty(e,"JsonRpcError",{enumerable:!0,get:function(){return t.JsonRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});var r=Hu;Object.defineProperty(e,"serializeCause",{enumerable:!0,get:function(){return r.serializeCause}}),Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});var o=No;Object.defineProperty(e,"rpcErrors",{enumerable:!0,get:function(){return o.rpcErrors}}),Object.defineProperty(e,"providerErrors",{enumerable:!0,get:function(){return o.providerErrors}});var s=Si;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})})(_O);var _d={exports:{}},iL=Oy;function Oy(e,t){if(e&&t)return Oy(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(o){r[o]=e[o]}),r;function r(){for(var o=new Array(arguments.length),s=0;s<o.length;s++)o[s]=arguments[s];var u=e.apply(this,o),f=o[o.length-1];return typeof u=="function"&&u!==f&&Object.keys(f).forEach(function(h){u[h]=f[h]}),u}}var Cy=iL;_d.exports=Cy(fu);_d.exports.strict=Cy(Ly);fu.proto=fu(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return fu(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Ly(this)},configurable:!0})});function fu(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function Ly(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}var yd=_d.exports;const oL=W.getDefaultExportFromCjs(yd);var sL=yd,aL=function(){},uL=function(e){return e.setHeader&&typeof e.abort=="function"},fL=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},Py=function(e,t,r){if(typeof t=="function")return Py(e,null,t);t||(t={}),r=sL(r||aL);var o=e._writableState,s=e._readableState,u=t.readable||t.readable!==!1&&e.readable,f=t.writable||t.writable!==!1&&e.writable,h=!1,l=function(){e.writable||p()},p=function(){f=!1,u||r.call(e)},b=function(){u=!1,f||r.call(e)},w=function(C){r.call(e,C?new Error("exited with error code: "+C):null)},I=function(C){r.call(e,C)},A=function(){W.dist.process.nextTick(x)},x=function(){if(!h){if(u&&!(s&&s.ended&&!s.destroyed))return r.call(e,new Error("premature close"));if(f&&!(o&&o.ended&&!o.destroyed))return r.call(e,new Error("premature close"))}},v=function(){e.req.on("finish",p)};return uL(e)?(e.on("complete",p),e.on("abort",A),e.req?v():e.on("request",v)):f&&!o&&(e.on("end",l),e.on("close",l)),fL(e)&&e.on("exit",w),e.on("end",b),e.on("finish",p),t.error!==!1&&e.on("error",I),e.on("close",A),function(){h=!0,e.removeListener("complete",p),e.removeListener("abort",A),e.removeListener("request",v),e.req&&e.req.removeListener("finish",p),e.removeListener("end",l),e.removeListener("close",l),e.removeListener("finish",p),e.removeListener("exit",w),e.removeListener("end",b),e.removeListener("error",I),e.removeListener("close",A)}},By=Py;const nb=W.getDefaultExportFromCjs(By);var lL=yd,cL=By,lu;try{lu=W.require$$3}catch{}var Ls=function(){},dL=/^v?\.0/.test(W.dist.process.version),Wu=function(e){return typeof e=="function"},hL=function(e){return!dL||!lu?!1:(e instanceof(lu.ReadStream||Ls)||e instanceof(lu.WriteStream||Ls))&&Wu(e.close)},gL=function(e){return e.setHeader&&Wu(e.abort)},pL=function(e,t,r,o){o=lL(o);var s=!1;e.on("close",function(){s=!0}),cL(e,{readable:t,writable:r},function(f){if(f)return o(f);s=!0,o()});var u=!1;return function(f){if(!s&&!u){if(u=!0,hL(e))return e.close(Ls);if(gL(e))return e.abort();if(Wu(e.destroy))return e.destroy();o(f||new Error("stream was destroyed"))}}},ib=function(e){e()},bL=function(e,t){return e.pipe(t)},_L=function(){var e=Array.prototype.slice.call(arguments),t=Wu(e[e.length-1]||Ls)&&e.pop()||Ls;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,o=e.map(function(s,u){var f=u<e.length-1,h=u>0;return pL(s,f,h,function(l){r||(r=l),l&&o.forEach(ib),!f&&(o.forEach(ib),t(r))})});return e.reduce(bL)},yL=_L;const ob=W.getDefaultExportFromCjs(yL);var wL={},qu={},Gu={},Ny={},$o={},mi={},Ot={};Object.defineProperty(Ot,"__esModule",{value:!0});Ot.output=Ot.exists=Ot.hash=Ot.bytes=Ot.bool=Ot.number=Ot.isBytes=void 0;function _u(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}Ot.number=_u;function $y(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}Ot.bool=$y;function My(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}Ot.isBytes=My;function wd(e,...t){if(!My(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}Ot.bytes=wd;function xy(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");_u(e.outputLen),_u(e.blockLen)}Ot.hash=xy;function Dy(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}Ot.exists=Dy;function jy(e,t){wd(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Ot.output=jy;const mL={number:_u,bool:$y,bytes:wd,hash:xy,exists:Dy,output:jy};Ot.default=mL;var Zn={},Vu={};Object.defineProperty(Vu,"__esModule",{value:!0});Vu.crypto=void 0;Vu.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.randomBytes=e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.byteSwap32=e.byteSwapIfBE=e.byteSwap=e.isLE=e.rotl=e.rotr=e.createView=e.u32=e.u8=e.isBytes=void 0;const t=Vu,r=Ot;function o(F){return F instanceof Uint8Array||F!=null&&typeof F=="object"&&F.constructor.name==="Uint8Array"}e.isBytes=o;const s=F=>new Uint8Array(F.buffer,F.byteOffset,F.byteLength);e.u8=s;const u=F=>new Uint32Array(F.buffer,F.byteOffset,Math.floor(F.byteLength/4));e.u32=u;const f=F=>new DataView(F.buffer,F.byteOffset,F.byteLength);e.createView=f;const h=(F,U)=>F<<32-U|F>>>U;e.rotr=h;const l=(F,U)=>F<<U|F>>>32-U>>>0;e.rotl=l,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;const p=F=>F<<24&4278190080|F<<8&16711680|F>>>8&65280|F>>>24&255;e.byteSwap=p,e.byteSwapIfBE=e.isLE?F=>F:F=>(0,e.byteSwap)(F);function b(F){for(let U=0;U<F.length;U++)F[U]=(0,e.byteSwap)(F[U])}e.byteSwap32=b;const w=Array.from({length:256},(F,U)=>U.toString(16).padStart(2,"0"));function I(F){(0,r.bytes)(F);let U="";for(let $=0;$<F.length;$++)U+=w[F[$]];return U}e.bytesToHex=I;const A={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function x(F){if(F>=A._0&&F<=A._9)return F-A._0;if(F>=A._A&&F<=A._F)return F-(A._A-10);if(F>=A._a&&F<=A._f)return F-(A._a-10)}function v(F){if(typeof F!="string")throw new Error("hex string expected, got "+typeof F);const U=F.length,$=U/2;if(U%2)throw new Error("padded hex string expected, got unpadded hex of length "+U);const G=new Uint8Array($);for(let Y=0,V=0;Y<$;Y++,V+=2){const ne=x(F.charCodeAt(V)),H=x(F.charCodeAt(V+1));if(ne===void 0||H===void 0){const K=F[V]+F[V+1];throw new Error('hex string expected, got non-hex character "'+K+'" at index '+V)}G[Y]=ne*16+H}return G}e.hexToBytes=v;const C=async()=>{};e.nextTick=C;async function B(F,U,$){let G=Date.now();for(let Y=0;Y<F;Y++){$(Y);const V=Date.now()-G;V>=0&&V<U||(await(0,e.nextTick)(),G+=V)}}e.asyncLoop=B;function P(F){if(typeof F!="string")throw new Error(`utf8ToBytes expected string, got ${typeof F}`);return new Uint8Array(new TextEncoder().encode(F))}e.utf8ToBytes=P;function S(F){return typeof F=="string"&&(F=P(F)),(0,r.bytes)(F),F}e.toBytes=S;function m(...F){let U=0;for(let G=0;G<F.length;G++){const Y=F[G];(0,r.bytes)(Y),U+=Y.length}const $=new Uint8Array(U);for(let G=0,Y=0;G<F.length;G++){const V=F[G];$.set(V,Y),Y+=V.length}return $}e.concatBytes=m;class j{clone(){return this._cloneInto()}}e.Hash=j;const Q={}.toString;function ce(F,U){if(U!==void 0&&Q.call(U)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(F,U)}e.checkOpts=ce;function ue(F){const U=G=>F().update(S(G)).digest(),$=F();return U.outputLen=$.outputLen,U.blockLen=$.blockLen,U.create=()=>F(),U}e.wrapConstructor=ue;function te(F){const U=(G,Y)=>F(Y).update(S(G)).digest(),$=F({});return U.outputLen=$.outputLen,U.blockLen=$.blockLen,U.create=G=>F(G),U}e.wrapConstructorWithOpts=te;function Se(F){const U=(G,Y)=>F(Y).update(S(G)).digest(),$=F({});return U.outputLen=$.outputLen,U.blockLen=$.blockLen,U.create=G=>F(G),U}e.wrapXOFConstructorWithOpts=Se;function me(F=32){if(t.crypto&&typeof t.crypto.getRandomValues=="function")return t.crypto.getRandomValues(new Uint8Array(F));throw new Error("crypto.getRandomValues must be defined")}e.randomBytes=me})(Zn);Object.defineProperty(mi,"__esModule",{value:!0});mi.HashMD=mi.Maj=mi.Chi=void 0;const Ql=Ot,bs=Zn;function EL(e,t,r,o){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,o);const s=BigInt(32),u=BigInt(4294967295),f=Number(r>>s&u),h=Number(r&u),l=o?4:0,p=o?0:4;e.setUint32(t+l,f,o),e.setUint32(t+p,h,o)}const vL=(e,t,r)=>e&t^~e&r;mi.Chi=vL;const SL=(e,t,r)=>e&t^e&r^t&r;mi.Maj=SL;class RL extends bs.Hash{constructor(t,r,o,s){super(),this.blockLen=t,this.outputLen=r,this.padOffset=o,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,bs.createView)(this.buffer)}update(t){(0,Ql.exists)(this);const{view:r,buffer:o,blockLen:s}=this;t=(0,bs.toBytes)(t);const u=t.length;for(let f=0;f<u;){const h=Math.min(s-this.pos,u-f);if(h===s){const l=(0,bs.createView)(t);for(;s<=u-f;f+=s)this.process(l,f);continue}o.set(t.subarray(f,f+h),this.pos),this.pos+=h,f+=h,this.pos===s&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,Ql.exists)(this),(0,Ql.output)(t,this),this.finished=!0;const{buffer:r,view:o,blockLen:s,isLE:u}=this;let{pos:f}=this;r[f++]=128,this.buffer.subarray(f).fill(0),this.padOffset>s-f&&(this.process(o,0),f=0);for(let w=f;w<s;w++)r[w]=0;EL(o,s-8,BigInt(this.length*8),u),this.process(o,0);const h=(0,bs.createView)(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const p=l/4,b=this.get();if(p>b.length)throw new Error("_sha2: outputLen bigger than state");for(let w=0;w<p;w++)h.setUint32(4*w,b[w],u)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const o=t.slice(0,r);return this.destroy(),o}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:o,length:s,finished:u,destroyed:f,pos:h}=this;return t.length=s,t.pos=h,t.finished=u,t.destroyed=f,s%r&&t.buffer.set(o),t}}mi.HashMD=RL;Object.defineProperty($o,"__esModule",{value:!0});$o.sha224=$o.sha256=void 0;const ec=mi,kr=Zn,AL=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),pi=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),bi=new Uint32Array(64);class Uy extends ec.HashMD{constructor(){super(64,32,8,!1),this.A=pi[0]|0,this.B=pi[1]|0,this.C=pi[2]|0,this.D=pi[3]|0,this.E=pi[4]|0,this.F=pi[5]|0,this.G=pi[6]|0,this.H=pi[7]|0}get(){const{A:t,B:r,C:o,D:s,E:u,F:f,G:h,H:l}=this;return[t,r,o,s,u,f,h,l]}set(t,r,o,s,u,f,h,l){this.A=t|0,this.B=r|0,this.C=o|0,this.D=s|0,this.E=u|0,this.F=f|0,this.G=h|0,this.H=l|0}process(t,r){for(let w=0;w<16;w++,r+=4)bi[w]=t.getUint32(r,!1);for(let w=16;w<64;w++){const I=bi[w-15],A=bi[w-2],x=(0,kr.rotr)(I,7)^(0,kr.rotr)(I,18)^I>>>3,v=(0,kr.rotr)(A,17)^(0,kr.rotr)(A,19)^A>>>10;bi[w]=v+bi[w-7]+x+bi[w-16]|0}let{A:o,B:s,C:u,D:f,E:h,F:l,G:p,H:b}=this;for(let w=0;w<64;w++){const I=(0,kr.rotr)(h,6)^(0,kr.rotr)(h,11)^(0,kr.rotr)(h,25),A=b+I+(0,ec.Chi)(h,l,p)+AL[w]+bi[w]|0,v=((0,kr.rotr)(o,2)^(0,kr.rotr)(o,13)^(0,kr.rotr)(o,22))+(0,ec.Maj)(o,s,u)|0;b=p,p=l,l=h,h=f+A|0,f=u,u=s,s=o,o=A+v|0}o=o+this.A|0,s=s+this.B|0,u=u+this.C|0,f=f+this.D|0,h=h+this.E|0,l=l+this.F|0,p=p+this.G|0,b=b+this.H|0,this.set(o,s,u,f,h,l,p,b)}roundClean(){bi.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class TL extends Uy{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}$o.sha256=(0,kr.wrapConstructor)(()=>new Uy);$o.sha224=(0,kr.wrapConstructor)(()=>new TL);var zu={},ky={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const t=Ot,r=Zn;class o extends r.Hash{constructor(f,h){super(),this.finished=!1,this.destroyed=!1,(0,t.hash)(f);const l=(0,r.toBytes)(h);if(this.iHash=f.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const p=this.blockLen,b=new Uint8Array(p);b.set(l.length>p?f.create().update(l).digest():l);for(let w=0;w<b.length;w++)b[w]^=54;this.iHash.update(b),this.oHash=f.create();for(let w=0;w<b.length;w++)b[w]^=106;this.oHash.update(b),b.fill(0)}update(f){return(0,t.exists)(this),this.iHash.update(f),this}digestInto(f){(0,t.exists)(this),(0,t.bytes)(f,this.outputLen),this.finished=!0,this.iHash.digestInto(f),this.oHash.update(f),this.oHash.digestInto(f),this.destroy()}digest(){const f=new Uint8Array(this.oHash.outputLen);return this.digestInto(f),f}_cloneInto(f){f||(f=Object.create(Object.getPrototypeOf(this),{}));const{oHash:h,iHash:l,finished:p,destroyed:b,blockLen:w,outputLen:I}=this;return f=f,f.finished=p,f.destroyed=b,f.blockLen=w,f.outputLen=I,f.oHash=h._cloneInto(f.oHash),f.iHash=l._cloneInto(f.iHash),f}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}e.HMAC=o;const s=(u,f,h)=>new o(u,f).update(h).digest();e.hmac=s,e.hmac.create=(u,f)=>new o(u,f)})(ky);var md={},Ku={},pt={},ot={};Object.defineProperty(ot,"__esModule",{value:!0});ot.bitMask=void 0;ot.isBytes=Yu;ot.abytes=Xu;ot.bytesToHex=Ed;ot.numberToHexUnpadded=Hy;ot.hexToNumber=vd;ot.hexToBytes=Zu;ot.bytesToNumberBE=CL;ot.bytesToNumberLE=LL;ot.numberToBytesBE=Wy;ot.numberToBytesLE=PL;ot.numberToVarBytesBE=BL;ot.ensureBytes=NL;ot.concatBytes=qy;ot.equalBytes=$L;ot.utf8ToBytes=ML;ot.bitLen=xL;ot.bitGet=DL;ot.bitSet=jL;ot.createHmacDrbg=kL;ot.validateObject=HL;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Fy=BigInt(0),Ju=BigInt(1),IL=BigInt(2);function Yu(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function Xu(e){if(!Yu(e))throw new Error("Uint8Array expected")}const OL=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Ed(e){Xu(e);let t="";for(let r=0;r<e.length;r++)t+=OL[e[r]];return t}function Hy(e){const t=e.toString(16);return t.length&1?`0${t}`:t}function vd(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return BigInt(e===""?"0":`0x${e}`)}const Gn={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function sb(e){if(e>=Gn._0&&e<=Gn._9)return e-Gn._0;if(e>=Gn._A&&e<=Gn._F)return e-(Gn._A-10);if(e>=Gn._a&&e<=Gn._f)return e-(Gn._a-10)}function Zu(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const o=new Uint8Array(r);for(let s=0,u=0;s<r;s++,u+=2){const f=sb(e.charCodeAt(u)),h=sb(e.charCodeAt(u+1));if(f===void 0||h===void 0){const l=e[u]+e[u+1];throw new Error('hex string expected, got non-hex character "'+l+'" at index '+u)}o[s]=f*16+h}return o}function CL(e){return vd(Ed(e))}function LL(e){return Xu(e),vd(Ed(Uint8Array.from(e).reverse()))}function Wy(e,t){return Zu(e.toString(16).padStart(t*2,"0"))}function PL(e,t){return Wy(e,t).reverse()}function BL(e){return Zu(Hy(e))}function NL(e,t,r){let o;if(typeof t=="string")try{o=Zu(t)}catch(u){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${u}`)}else if(Yu(t))o=Uint8Array.from(t);else throw new Error(`${e} must be hex string or Uint8Array`);const s=o.length;if(typeof r=="number"&&s!==r)throw new Error(`${e} expected ${r} bytes, got ${s}`);return o}function qy(...e){let t=0;for(let o=0;o<e.length;o++){const s=e[o];Xu(s),t+=s.length}const r=new Uint8Array(t);for(let o=0,s=0;o<e.length;o++){const u=e[o];r.set(u,s),s+=u.length}return r}function $L(e,t){if(e.length!==t.length)return!1;let r=0;for(let o=0;o<e.length;o++)r|=e[o]^t[o];return r===0}function ML(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function xL(e){let t;for(t=0;e>Fy;e>>=Ju,t+=1);return t}function DL(e,t){return e>>BigInt(t)&Ju}function jL(e,t,r){return e|(r?Ju:Fy)<<BigInt(t)}const UL=e=>(IL<<BigInt(e-1))-Ju;ot.bitMask=UL;const tc=e=>new Uint8Array(e),ab=e=>Uint8Array.from(e);function kL(e,t,r){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let o=tc(e),s=tc(e),u=0;const f=()=>{o.fill(1),s.fill(0),u=0},h=(...w)=>r(s,o,...w),l=(w=tc())=>{s=h(ab([0]),w),o=h(),w.length!==0&&(s=h(ab([1]),w),o=h())},p=()=>{if(u++>=1e3)throw new Error("drbg: tried 1000 values");let w=0;const I=[];for(;w<t;){o=h();const A=o.slice();I.push(A),w+=o.length}return qy(...I)};return(w,I)=>{f(),l(w);let A;for(;!(A=I(p()));)l();return f(),A}}const FL={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||Yu(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function HL(e,t,r={}){const o=(s,u,f)=>{const h=FL[u];if(typeof h!="function")throw new Error(`Invalid validator "${u}", expected function`);const l=e[s];if(!(f&&l===void 0)&&!h(l,e))throw new Error(`Invalid param ${String(s)}=${l} (${typeof l}), expected ${u}`)};for(const[s,u]of Object.entries(t))o(s,u,!1);for(const[s,u]of Object.entries(r))o(s,u,!0);return e}Object.defineProperty(pt,"__esModule",{value:!0});pt.isNegativeLE=void 0;pt.mod=Ar;pt.pow=Gy;pt.pow2=qL;pt.invert=yu;pt.tonelliShanks=Vy;pt.FpSqrt=zy;pt.validateField=zL;pt.FpPow=Ky;pt.FpInvertBatch=Jy;pt.FpDiv=KL;pt.FpIsSquare=JL;pt.nLength=Sd;pt.Field=YL;pt.FpSqrtOdd=XL;pt.FpSqrtEven=ZL;pt.hashToPrivateScalar=QL;pt.getFieldBytesLength=Rd;pt.getMinHashLength=Yy;pt.mapHashToField=eP;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Tr=ot,Ut=BigInt(0),gt=BigInt(1),wi=BigInt(2),WL=BigInt(3),Bc=BigInt(4),ub=BigInt(5),fb=BigInt(8);BigInt(9);BigInt(16);function Ar(e,t){const r=e%t;return r>=Ut?r:t+r}function Gy(e,t,r){if(r<=Ut||t<Ut)throw new Error("Expected power/modulo > 0");if(r===gt)return Ut;let o=gt;for(;t>Ut;)t>&&(o=o*e%r),e=e*e%r,t>>=gt;return o}function qL(e,t,r){let o=e;for(;t-- >Ut;)o*=o,o%=r;return o}function yu(e,t){if(e===Ut||t<=Ut)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=Ar(e,t),o=t,s=Ut,u=gt;for(;r!==Ut;){const h=o/r,l=o%r,p=s-u*h;o=r,r=l,s=u,u=p}if(o!==gt)throw new Error("invert: does not exist");return Ar(s,t)}function Vy(e){const t=(e-gt)/wi;let r,o,s;for(r=e-gt,o=0;r%wi===Ut;r/=wi,o++);for(s=wi;s<e&&Gy(s,t,e)!==e-gt;s++);if(o===1){const f=(e+gt)/Bc;return function(l,p){const b=l.pow(p,f);if(!l.eql(l.sqr(b),p))throw new Error("Cannot find square root");return b}}const u=(r+gt)/wi;return function(h,l){if(h.pow(l,t)===h.neg(h.ONE))throw new Error("Cannot find square root");let p=o,b=h.pow(h.mul(h.ONE,s),r),w=h.pow(l,u),I=h.pow(l,r);for(;!h.eql(I,h.ONE);){if(h.eql(I,h.ZERO))return h.ZERO;let A=1;for(let v=h.sqr(I);A<p&&!h.eql(v,h.ONE);A++)v=h.sqr(v);const x=h.pow(b,gt<<BigInt(p-A-1));b=h.sqr(x),w=h.mul(w,x),I=h.mul(I,b),p=A}return w}}function zy(e){if(e%Bc===WL){const t=(e+gt)/Bc;return function(o,s){const u=o.pow(s,t);if(!o.eql(o.sqr(u),s))throw new Error("Cannot find square root");return u}}if(e%fb===ub){const t=(e-ub)/fb;return function(o,s){const u=o.mul(s,wi),f=o.pow(u,t),h=o.mul(s,f),l=o.mul(o.mul(h,wi),f),p=o.mul(h,o.sub(l,o.ONE));if(!o.eql(o.sqr(p),s))throw new Error("Cannot find square root");return p}}return Vy(e)}const GL=(e,t)=>(Ar(e,t)>)===gt;pt.isNegativeLE=GL;const VL=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function zL(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=VL.reduce((o,s)=>(o[s]="function",o),t);return(0,Tr.validateObject)(e,r)}function Ky(e,t,r){if(r<Ut)throw new Error("Expected power > 0");if(r===Ut)return e.ONE;if(r===gt)return t;let o=e.ONE,s=t;for(;r>Ut;)r>&&(o=e.mul(o,s)),s=e.sqr(s),r>>=gt;return o}function Jy(e,t){const r=new Array(t.length),o=t.reduce((u,f,h)=>e.is0(f)?u:(r[h]=u,e.mul(u,f)),e.ONE),s=e.inv(o);return t.reduceRight((u,f,h)=>e.is0(f)?u:(r[h]=e.mul(u,r[h]),e.mul(u,f)),s),r}function KL(e,t,r){return e.mul(t,typeof r=="bigint"?yu(r,e.ORDER):e.inv(r))}function JL(e){const t=(e.ORDER-gt)/wi;return r=>{const o=e.pow(r,t);return e.eql(o,e.ZERO)||e.eql(o,e.ONE)}}function Sd(e,t){const r=t!==void 0?t:e.toString(2).length,o=Math.ceil(r/8);return{nBitLength:r,nByteLength:o}}function YL(e,t,r=!1,o={}){if(e<=Ut)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:s,nByteLength:u}=Sd(e,t);if(u>2048)throw new Error("Field lengths over 2048 bytes are not supported");const f=zy(e),h=Object.freeze({ORDER:e,BITS:s,BYTES:u,MASK:(0,Tr.bitMask)(s),ZERO:Ut,ONE:gt,create:l=>Ar(l,e),isValid:l=>{if(typeof l!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof l}`);return Ut<=l&&l<e},is0:l=>l===Ut,isOdd:l=>(l>)===gt,neg:l=>Ar(-l,e),eql:(l,p)=>l===p,sqr:l=>Ar(l*l,e),add:(l,p)=>Ar(l+p,e),sub:(l,p)=>Ar(l-p,e),mul:(l,p)=>Ar(l*p,e),pow:(l,p)=>Ky(h,l,p),div:(l,p)=>Ar(l*yu(p,e),e),sqrN:l=>l*l,addN:(l,p)=>l+p,subN:(l,p)=>l-p,mulN:(l,p)=>l*p,inv:l=>yu(l,e),sqrt:o.sqrt||(l=>f(h,l)),invertBatch:l=>Jy(h,l),cmov:(l,p,b)=>b?p:l,toBytes:l=>r?(0,Tr.numberToBytesLE)(l,u):(0,Tr.numberToBytesBE)(l,u),fromBytes:l=>{if(l.length!==u)throw new Error(`Fp.fromBytes: expected ${u}, got ${l.length}`);return r?(0,Tr.bytesToNumberLE)(l):(0,Tr.bytesToNumberBE)(l)}});return Object.freeze(h)}function XL(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)}function ZL(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r}function QL(e,t,r=!1){e=(0,Tr.ensureBytes)("privateHash",e);const o=e.length,s=Sd(t).nByteLength+8;if(s<24||o<s||o>1024)throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${o}`);const u=r?(0,Tr.bytesToNumberLE)(e):(0,Tr.bytesToNumberBE)(e);return Ar(u,t-gt)+gt}function Rd(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function Yy(e){const t=Rd(e);return t+Math.ceil(t/2)}function eP(e,t,r=!1){const o=e.length,s=Rd(t),u=Yy(t);if(o<16||o<u||o>1024)throw new Error(`expected ${u}-1024 bytes of input, got ${o}`);const f=r?(0,Tr.bytesToNumberBE)(e):(0,Tr.bytesToNumberLE)(e),h=Ar(f,t-gt)+gt;return r?(0,Tr.numberToBytesLE)(h,s):(0,Tr.numberToBytesBE)(h,s)}Object.defineProperty(Ku,"__esModule",{value:!0});Ku.wNAF=nP;Ku.validateBasic=iP;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const lb=pt,tP=ot,rP=BigInt(0),rc=BigInt(1);function nP(e,t){const r=(s,u)=>{const f=u.negate();return s?f:u},o=s=>{const u=Math.ceil(t/s)+1,f=2**(s-1);return{windows:u,windowSize:f}};return{constTimeNegate:r,unsafeLadder(s,u){let f=e.ZERO,h=s;for(;u>rP;)u&rc&&(f=f.add(h)),h=h.double(),u>>=rc;return f},precomputeWindow(s,u){const{windows:f,windowSize:h}=o(u),l=[];let p=s,b=p;for(let w=0;w<f;w++){b=p,l.push(b);for(let I=1;I<h;I++)b=b.add(p),l.push(b);p=b.double()}return l},wNAF(s,u,f){const{windows:h,windowSize:l}=o(s);let p=e.ZERO,b=e.BASE;const w=BigInt(2**s-1),I=2**s,A=BigInt(s);for(let x=0;x<h;x++){const v=x*l;let C=Number(f&w);f>>=A,C>l&&(C-=I,f+=rc);const B=v,P=v+Math.abs(C)-1,S=x%2!==0,m=C<0;C===0?b=b.add(r(S,u[B])):p=p.add(r(m,u[P]))}return{p,f:b}},wNAFCached(s,u,f,h){const l=s._WINDOW_SIZE||1;let p=u.get(s);return p||(p=this.precomputeWindow(s,l),l!==1&&u.set(s,h(p))),this.wNAF(l,p,f)}}}function iP(e){return(0,lb.validateField)(e.Fp),(0,tP.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,lb.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DER=void 0,e.weierstrassPoints=A,e.weierstrass=v,e.SWUFpSqrtRatio=C,e.mapToCurveSimpleSWU=B;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=Ku,r=pt,o=ot,s=ot;function u(P){const S=(0,t.validateBasic)(P);o.validateObject(S,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:m,Fp:j,a:Q}=S;if(m){if(!j.eql(Q,j.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof m!="object"||typeof m.beta!="bigint"||typeof m.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...S})}const{bytesToNumberBE:f,hexToBytes:h}=o;e.DER={Err:class extends Error{constructor(S=""){super(S)}},_parseInt(P){const{Err:S}=e.DER;if(P.length<2||P[0]!==2)throw new S("Invalid signature integer tag");const m=P[1],j=P.subarray(2,m+2);if(!m||j.length!==m)throw new S("Invalid signature integer: wrong length");if(j[0]&128)throw new S("Invalid signature integer: negative");if(j[0]===0&&!(j[1]&128))throw new S("Invalid signature integer: unnecessary leading zero");return{d:f(j),l:P.subarray(m+2)}},toSig(P){const{Err:S}=e.DER,m=typeof P=="string"?h(P):P;o.abytes(m);let j=m.length;if(j<2||m[0]!=48)throw new S("Invalid signature tag");if(m[1]!==j-2)throw new S("Invalid signature: incorrect length");const{d:Q,l:ce}=e.DER._parseInt(m.subarray(2)),{d:ue,l:te}=e.DER._parseInt(ce);if(te.length)throw new S("Invalid signature: left bytes after parsing");return{r:Q,s:ue}},hexFromSig(P){const S=me=>Number.parseInt(me[0],16)&8?"00"+me:me,m=me=>{const F=me.toString(16);return F.length&1?`0${F}`:F},j=S(m(P.s)),Q=S(m(P.r)),ce=j.length/2,ue=Q.length/2,te=m(ce),Se=m(ue);return`30${m(ue+ce+4)}02${Se}${Q}02${te}${j}`}};const l=BigInt(0),p=BigInt(1),b=BigInt(2),w=BigInt(3),I=BigInt(4);function A(P){const S=u(P),{Fp:m}=S,j=S.toBytes||((Y,V,ne)=>{const H=V.toAffine();return o.concatBytes(Uint8Array.from([4]),m.toBytes(H.x),m.toBytes(H.y))}),Q=S.fromBytes||(Y=>{const V=Y.subarray(1),ne=m.fromBytes(V.subarray(0,m.BYTES)),H=m.fromBytes(V.subarray(m.BYTES,2*m.BYTES));return{x:ne,y:H}});function ce(Y){const{a:V,b:ne}=S,H=m.sqr(Y),K=m.mul(H,Y);return m.add(m.add(K,m.mul(Y,V)),ne)}if(!m.eql(m.sqr(S.Gy),ce(S.Gx)))throw new Error("bad generator point: equation left != right");function ue(Y){return typeof Y=="bigint"&&l<Y&&Y<S.n}function te(Y){if(!ue(Y))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function Se(Y){const{allowedPrivateKeyLengths:V,nByteLength:ne,wrapPrivateKey:H,n:K}=S;if(V&&typeof Y!="bigint"){if(o.isBytes(Y)&&(Y=o.bytesToHex(Y)),typeof Y!="string"||!V.includes(Y.length))throw new Error("Invalid key");Y=Y.padStart(ne*2,"0")}let ae;try{ae=typeof Y=="bigint"?Y:o.bytesToNumberBE((0,s.ensureBytes)("private key",Y,ne))}catch{throw new Error(`private key must be ${ne} bytes, hex or bigint, not ${typeof Y}`)}return H&&(ae=r.mod(ae,K)),te(ae),ae}const me=new Map;function F(Y){if(!(Y instanceof U))throw new Error("ProjectivePoint expected")}class U{constructor(V,ne,H){if(this.px=V,this.py=ne,this.pz=H,V==null||!m.isValid(V))throw new Error("x required");if(ne==null||!m.isValid(ne))throw new Error("y required");if(H==null||!m.isValid(H))throw new Error("z required")}static fromAffine(V){const{x:ne,y:H}=V||{};if(!V||!m.isValid(ne)||!m.isValid(H))throw new Error("invalid affine point");if(V instanceof U)throw new Error("projective point not allowed");const K=ae=>m.eql(ae,m.ZERO);return K(ne)&&K(H)?U.ZERO:new U(ne,H,m.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(V){const ne=m.invertBatch(V.map(H=>H.pz));return V.map((H,K)=>H.toAffine(ne[K])).map(U.fromAffine)}static fromHex(V){const ne=U.fromAffine(Q((0,s.ensureBytes)("pointHex",V)));return ne.assertValidity(),ne}static fromPrivateKey(V){return U.BASE.multiply(Se(V))}_setWindowSize(V){this._WINDOW_SIZE=V,me.delete(this)}assertValidity(){if(this.is0()){if(S.allowInfinityPoint&&!m.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:V,y:ne}=this.toAffine();if(!m.isValid(V)||!m.isValid(ne))throw new Error("bad point: x or y not FE");const H=m.sqr(ne),K=ce(V);if(!m.eql(H,K))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:V}=this.toAffine();if(m.isOdd)return!m.isOdd(V);throw new Error("Field doesn't support isOdd")}equals(V){F(V);const{px:ne,py:H,pz:K}=this,{px:ae,py:de,pz:re}=V,_e=m.eql(m.mul(ne,re),m.mul(ae,K)),be=m.eql(m.mul(H,re),m.mul(de,K));return _e&&be}negate(){return new U(this.px,m.neg(this.py),this.pz)}double(){const{a:V,b:ne}=S,H=m.mul(ne,w),{px:K,py:ae,pz:de}=this;let re=m.ZERO,_e=m.ZERO,be=m.ZERO,R=m.mul(K,K),O=m.mul(ae,ae),q=m.mul(de,de),oe=m.mul(K,ae);return oe=m.add(oe,oe),be=m.mul(K,de),be=m.add(be,be),re=m.mul(V,be),_e=m.mul(H,q),_e=m.add(re,_e),re=m.sub(O,_e),_e=m.add(O,_e),_e=m.mul(re,_e),re=m.mul(oe,re),be=m.mul(H,be),q=m.mul(V,q),oe=m.sub(R,q),oe=m.mul(V,oe),oe=m.add(oe,be),be=m.add(R,R),R=m.add(be,R),R=m.add(R,q),R=m.mul(R,oe),_e=m.add(_e,R),q=m.mul(ae,de),q=m.add(q,q),R=m.mul(q,oe),re=m.sub(re,R),be=m.mul(q,O),be=m.add(be,be),be=m.add(be,be),new U(re,_e,be)}add(V){F(V);const{px:ne,py:H,pz:K}=this,{px:ae,py:de,pz:re}=V;let _e=m.ZERO,be=m.ZERO,R=m.ZERO;const O=S.a,q=m.mul(S.b,w);let oe=m.mul(ne,ae),ye=m.mul(H,de),d=m.mul(K,re),g=m.add(ne,H),_=m.add(ae,de);g=m.mul(g,_),_=m.add(oe,ye),g=m.sub(g,_),_=m.add(ne,K);let E=m.add(ae,re);return _=m.mul(_,E),E=m.add(oe,d),_=m.sub(_,E),E=m.add(H,K),_e=m.add(de,re),E=m.mul(E,_e),_e=m.add(ye,d),E=m.sub(E,_e),R=m.mul(O,_),_e=m.mul(q,d),R=m.add(_e,R),_e=m.sub(ye,R),R=m.add(ye,R),be=m.mul(_e,R),ye=m.add(oe,oe),ye=m.add(ye,oe),d=m.mul(O,d),_=m.mul(q,_),ye=m.add(ye,d),d=m.sub(oe,d),d=m.mul(O,d),_=m.add(_,d),oe=m.mul(ye,_),be=m.add(be,oe),oe=m.mul(E,_),_e=m.mul(g,_e),_e=m.sub(_e,oe),oe=m.mul(g,ye),R=m.mul(E,R),R=m.add(R,oe),new U(_e,be,R)}subtract(V){return this.add(V.negate())}is0(){return this.equals(U.ZERO)}wNAF(V){return G.wNAFCached(this,me,V,ne=>{const H=m.invertBatch(ne.map(K=>K.pz));return ne.map((K,ae)=>K.toAffine(H[ae])).map(U.fromAffine)})}multiplyUnsafe(V){const ne=U.ZERO;if(V===l)return ne;if(te(V),V===p)return this;const{endo:H}=S;if(!H)return G.unsafeLadder(this,V);let{k1neg:K,k1:ae,k2neg:de,k2:re}=H.splitScalar(V),_e=ne,be=ne,R=this;for(;ae>l||re>l;)ae&p&&(_e=_e.add(R)),re&p&&(be=be.add(R)),R=R.double(),ae>>=p,re>>=p;return K&&(_e=_e.negate()),de&&(be=be.negate()),be=new U(m.mul(be.px,H.beta),be.py,be.pz),_e.add(be)}multiply(V){te(V);let ne=V,H,K;const{endo:ae}=S;if(ae){const{k1neg:de,k1:re,k2neg:_e,k2:be}=ae.splitScalar(ne);let{p:R,f:O}=this.wNAF(re),{p:q,f:oe}=this.wNAF(be);R=G.constTimeNegate(de,R),q=G.constTimeNegate(_e,q),q=new U(m.mul(q.px,ae.beta),q.py,q.pz),H=R.add(q),K=O.add(oe)}else{const{p:de,f:re}=this.wNAF(ne);H=de,K=re}return U.normalizeZ([H,K])[0]}multiplyAndAddUnsafe(V,ne,H){const K=U.BASE,ae=(re,_e)=>_e===l||_e===p||!re.equals(K)?re.multiplyUnsafe(_e):re.multiply(_e),de=ae(this,ne).add(ae(V,H));return de.is0()?void 0:de}toAffine(V){const{px:ne,py:H,pz:K}=this,ae=this.is0();V==null&&(V=ae?m.ONE:m.inv(K));const de=m.mul(ne,V),re=m.mul(H,V),_e=m.mul(K,V);if(ae)return{x:m.ZERO,y:m.ZERO};if(!m.eql(_e,m.ONE))throw new Error("invZ was invalid");return{x:de,y:re}}isTorsionFree(){const{h:V,isTorsionFree:ne}=S;if(V===p)return!0;if(ne)return ne(U,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:V,clearCofactor:ne}=S;return V===p?this:ne?ne(U,this):this.multiplyUnsafe(S.h)}toRawBytes(V=!0){return this.assertValidity(),j(U,this,V)}toHex(V=!0){return o.bytesToHex(this.toRawBytes(V))}}U.BASE=new U(S.Gx,S.Gy,m.ONE),U.ZERO=new U(m.ZERO,m.ONE,m.ZERO);const $=S.nBitLength,G=(0,t.wNAF)(U,S.endo?Math.ceil($/2):$);return{CURVE:S,ProjectivePoint:U,normPrivateKeyToScalar:Se,weierstrassEquation:ce,isWithinCurveOrder:ue}}function x(P){const S=(0,t.validateBasic)(P);return o.validateObject(S,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...S})}function v(P){const S=x(P),{Fp:m,n:j}=S,Q=m.BYTES+1,ce=2*m.BYTES+1;function ue(_){return l<_&&_<m.ORDER}function te(_){return r.mod(_,j)}function Se(_){return r.invert(_,j)}const{ProjectivePoint:me,normPrivateKeyToScalar:F,weierstrassEquation:U,isWithinCurveOrder:$}=A({...S,toBytes(_,E,J){const ie=E.toAffine(),se=m.toBytes(ie.x),Ie=o.concatBytes;return J?Ie(Uint8Array.from([E.hasEvenY()?2:3]),se):Ie(Uint8Array.from([4]),se,m.toBytes(ie.y))},fromBytes(_){const E=_.length,J=_[0],ie=_.subarray(1);if(E===Q&&(J===2||J===3)){const se=o.bytesToNumberBE(ie);if(!ue(se))throw new Error("Point is not on curve");const Ie=U(se);let Be;try{Be=m.sqrt(Ie)}catch(Re){const He=Re instanceof Error?": "+Re.message:"";throw new Error("Point is not on curve"+He)}const Ce=(Be&p)===p;return(J&1)===1!==Ce&&(Be=m.neg(Be)),{x:se,y:Be}}else if(E===ce&&J===4){const se=m.fromBytes(ie.subarray(0,m.BYTES)),Ie=m.fromBytes(ie.subarray(m.BYTES,2*m.BYTES));return{x:se,y:Ie}}else throw new Error(`Point of length ${E} was invalid. Expected ${Q} compressed bytes or ${ce} uncompressed bytes`)}}),G=_=>o.bytesToHex(o.numberToBytesBE(_,S.nByteLength));function Y(_){const E=j>>p;return _>E}function V(_){return Y(_)?te(-_):_}const ne=(_,E,J)=>o.bytesToNumberBE(_.slice(E,J));class H{constructor(E,J,ie){this.r=E,this.s=J,this.recovery=ie,this.assertValidity()}static fromCompact(E){const J=S.nByteLength;return E=(0,s.ensureBytes)("compactSignature",E,J*2),new H(ne(E,0,J),ne(E,J,2*J))}static fromDER(E){const{r:J,s:ie}=e.DER.toSig((0,s.ensureBytes)("DER",E));return new H(J,ie)}assertValidity(){if(!$(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!$(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(E){return new H(this.r,this.s,E)}recoverPublicKey(E){const{r:J,s:ie,recovery:se}=this,Ie=be((0,s.ensureBytes)("msgHash",E));if(se==null||![0,1,2,3].includes(se))throw new Error("recovery id invalid");const Be=se===2||se===3?J+S.n:J;if(Be>=m.ORDER)throw new Error("recovery id 2 or 3 invalid");const Ce=se&1?"03":"02",Ue=me.fromHex(Ce+G(Be)),Re=Se(Be),He=te(-Ie*Re),bt=te(ie*Re),et=me.BASE.multiplyAndAddUnsafe(Ue,He,bt);if(!et)throw new Error("point at infinify");return et.assertValidity(),et}hasHighS(){return Y(this.s)}normalizeS(){return this.hasHighS()?new H(this.r,te(-this.s),this.recovery):this}toDERRawBytes(){return o.hexToBytes(this.toDERHex())}toDERHex(){return e.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return o.hexToBytes(this.toCompactHex())}toCompactHex(){return G(this.r)+G(this.s)}}const K={isValidPrivateKey(_){try{return F(_),!0}catch{return!1}},normPrivateKeyToScalar:F,randomPrivateKey:()=>{const _=r.getMinHashLength(S.n);return r.mapHashToField(S.randomBytes(_),S.n)},precompute(_=8,E=me.BASE){return E._setWindowSize(_),E.multiply(BigInt(3)),E}};function ae(_,E=!0){return me.fromPrivateKey(_).toRawBytes(E)}function de(_){const E=o.isBytes(_),J=typeof _=="string",ie=(E||J)&&_.length;return E?ie===Q||ie===ce:J?ie===2*Q||ie===2*ce:_ instanceof me}function re(_,E,J=!0){if(de(_))throw new Error("first arg must be private key");if(!de(E))throw new Error("second arg must be public key");return me.fromHex(E).multiply(F(_)).toRawBytes(J)}const _e=S.bits2int||function(_){const E=o.bytesToNumberBE(_),J=_.length*8-S.nBitLength;return J>0?E>>BigInt(J):E},be=S.bits2int_modN||function(_){return te(_e(_))},R=o.bitMask(S.nBitLength);function O(_){if(typeof _!="bigint")throw new Error("bigint expected");if(!(l<=_&&_<R))throw new Error(`bigint expected < 2^${S.nBitLength}`);return o.numberToBytesBE(_,S.nByteLength)}function q(_,E,J=oe){if(["recovered","canonical"].some(Ye=>Ye in J))throw new Error("sign() legacy options not supported");const{hash:ie,randomBytes:se}=S;let{lowS:Ie,prehash:Be,extraEntropy:Ce}=J;Ie==null&&(Ie=!0),_=(0,s.ensureBytes)("msgHash",_),Be&&(_=(0,s.ensureBytes)("prehashed msgHash",ie(_)));const Ue=be(_),Re=F(E),He=[O(Re),O(Ue)];if(Ce!=null&&Ce!==!1){const Ye=Ce===!0?se(m.BYTES):Ce;He.push((0,s.ensureBytes)("extraEntropy",Ye))}const bt=o.concatBytes(...He),et=Ue;function _t(Ye){const Ve=_e(Ye);if(!$(Ve))return;const Dt=Se(Ve),Lt=me.BASE.multiply(Ve).toAffine(),at=te(Lt.x);if(at===l)return;const Bt=te(Dt*te(et+at*Re));if(Bt===l)return;let fr=(Lt.x===at?0:2)|Number(Lt.y&p),er=Bt;return Ie&&Y(Bt)&&(er=V(Bt),fr^=1),new H(at,er,fr)}return{seed:bt,k2sig:_t}}const oe={lowS:S.lowS,prehash:!1},ye={lowS:S.lowS,prehash:!1};function d(_,E,J=oe){const{seed:ie,k2sig:se}=q(_,E,J),Ie=S;return o.createHmacDrbg(Ie.hash.outputLen,Ie.nByteLength,Ie.hmac)(ie,se)}me.BASE._setWindowSize(8);function g(_,E,J,ie=ye){var Lt;const se=_;if(E=(0,s.ensureBytes)("msgHash",E),J=(0,s.ensureBytes)("publicKey",J),"strict"in ie)throw new Error("options.strict was renamed to lowS");const{lowS:Ie,prehash:Be}=ie;let Ce,Ue;try{if(typeof se=="string"||o.isBytes(se))try{Ce=H.fromDER(se)}catch(at){if(!(at instanceof e.DER.Err))throw at;Ce=H.fromCompact(se)}else if(typeof se=="object"&&typeof se.r=="bigint"&&typeof se.s=="bigint"){const{r:at,s:Bt}=se;Ce=new H(at,Bt)}else throw new Error("PARSE");Ue=me.fromHex(J)}catch(at){if(at.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(Ie&&Ce.hasHighS())return!1;Be&&(E=S.hash(E));const{r:Re,s:He}=Ce,bt=be(E),et=Se(He),_t=te(bt*et),Ye=te(Re*et),Ve=(Lt=me.BASE.multiplyAndAddUnsafe(Ue,_t,Ye))==null?void 0:Lt.toAffine();return Ve?te(Ve.x)===Re:!1}return{CURVE:S,getPublicKey:ae,getSharedSecret:re,sign:d,verify:g,ProjectivePoint:me,Signature:H,utils:K}}function C(P,S){const m=P.ORDER;let j=l;for(let Y=m-p;Y%b===l;Y/=b)j+=p;const Q=j,ce=b<<Q-p-p,ue=ce*b,te=(m-p)/ue,Se=(te-p)/b,me=ue-p,F=ce,U=P.pow(S,te),$=P.pow(S,(te+p)/b);let G=(Y,V)=>{let ne=U,H=P.pow(V,me),K=P.sqr(H);K=P.mul(K,V);let ae=P.mul(Y,K);ae=P.pow(ae,Se),ae=P.mul(ae,H),H=P.mul(ae,V),K=P.mul(ae,Y);let de=P.mul(K,H);ae=P.pow(de,F);let re=P.eql(ae,P.ONE);H=P.mul(K,$),ae=P.mul(de,ne),K=P.cmov(H,K,re),de=P.cmov(ae,de,re);for(let _e=Q;_e>p;_e--){let be=_e-b;be=b<<be-p;let R=P.pow(de,be);const O=P.eql(R,P.ONE);H=P.mul(K,ne),ne=P.mul(ne,ne),R=P.mul(de,ne),K=P.cmov(H,K,O),de=P.cmov(R,de,O)}return{isValid:re,value:K}};if(P.ORDER%I===w){const Y=(P.ORDER-w)/I,V=P.sqrt(P.neg(S));G=(ne,H)=>{let K=P.sqr(H);const ae=P.mul(ne,H);K=P.mul(K,ae);let de=P.pow(K,Y);de=P.mul(de,ae);const re=P.mul(de,V),_e=P.mul(P.sqr(de),H),be=P.eql(_e,ne);let R=P.cmov(re,de,be);return{isValid:be,value:R}}}return G}function B(P,S){if(r.validateField(P),!P.isValid(S.A)||!P.isValid(S.B)||!P.isValid(S.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const m=C(P,S.Z);if(!P.isOdd)throw new Error("Fp.isOdd is not implemented!");return j=>{let Q,ce,ue,te,Se,me,F,U;Q=P.sqr(j),Q=P.mul(Q,S.Z),ce=P.sqr(Q),ce=P.add(ce,Q),ue=P.add(ce,P.ONE),ue=P.mul(ue,S.B),te=P.cmov(S.Z,P.neg(ce),!P.eql(ce,P.ZERO)),te=P.mul(te,S.A),ce=P.sqr(ue),me=P.sqr(te),Se=P.mul(me,S.A),ce=P.add(ce,Se),ce=P.mul(ce,ue),me=P.mul(me,te),Se=P.mul(me,S.B),ce=P.add(ce,Se),F=P.mul(Q,ue);const{isValid:$,value:G}=m(ce,me);U=P.mul(Q,j),U=P.mul(U,G),F=P.cmov(F,ue,$),U=P.cmov(U,G,$);const Y=P.isOdd(j)===P.isOdd(U);return U=P.cmov(P.neg(U),U,Y),F=P.div(F,te),{x:F,y:U}}}})(md);Object.defineProperty(zu,"__esModule",{value:!0});zu.getHash=Xy;zu.createCurve=aP;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const oP=ky,cb=Zn,sP=md;function Xy(e){return{hash:e,hmac:(t,...r)=>(0,oP.hmac)(e,t,(0,cb.concatBytes)(...r)),randomBytes:cb.randomBytes}}function aP(e,t){const r=o=>(0,sP.weierstrass)({...e,...Xy(o)});return Object.freeze({...r(t),create:r})}var Zi={};Object.defineProperty(Zi,"__esModule",{value:!0});Zi.expand_message_xmd=Zy;Zi.expand_message_xof=Qy;Zi.hash_to_field=Nc;Zi.isogenyMap=cP;Zi.createHasher=dP;const uP=pt,Zt=ot,fP=Zt.bytesToNumberBE;function yi(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const r=Array.from({length:t}).fill(0);for(let o=t-1;o>=0;o--)r[o]=e&255,e>>>=8;return new Uint8Array(r)}function lP(e,t){const r=new Uint8Array(e.length);for(let o=0;o<e.length;o++)r[o]=e[o]^t[o];return r}function Ad(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function Zy(e,t,r,o){(0,Zt.abytes)(e),(0,Zt.abytes)(t),Ad(r),t.length>255&&(t=o((0,Zt.concatBytes)((0,Zt.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:s,blockLen:u}=o,f=Math.ceil(r/s);if(f>255)throw new Error("Invalid xmd length");const h=(0,Zt.concatBytes)(t,yi(t.length,1)),l=yi(0,u),p=yi(r,2),b=new Array(f),w=o((0,Zt.concatBytes)(l,e,p,yi(0,1),h));b[0]=o((0,Zt.concatBytes)(w,yi(1,1),h));for(let A=1;A<=f;A++){const x=[lP(w,b[A-1]),yi(A+1,1),h];b[A]=o((0,Zt.concatBytes)(...x))}return(0,Zt.concatBytes)(...b).slice(0,r)}function Qy(e,t,r,o,s){if((0,Zt.abytes)(e),(0,Zt.abytes)(t),Ad(r),t.length>255){const u=Math.ceil(2*o/8);t=s.create({dkLen:u}).update((0,Zt.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return s.create({dkLen:r}).update(e).update(yi(r,2)).update(t).update(yi(t.length,1)).digest()}function Nc(e,t,r){(0,Zt.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:o,k:s,m:u,hash:f,expand:h,DST:l}=r;(0,Zt.abytes)(e),Ad(t);const p=typeof l=="string"?(0,Zt.utf8ToBytes)(l):l,b=o.toString(2).length,w=Math.ceil((b+s)/8),I=t*u*w;let A;if(h==="xmd")A=Zy(e,p,I,f);else if(h==="xof")A=Qy(e,p,I,s,f);else if(h==="_internal_pass")A=e;else throw new Error('expand must be "xmd" or "xof"');const x=new Array(t);for(let v=0;v<t;v++){const C=new Array(u);for(let B=0;B<u;B++){const P=w*(B+v*u),S=A.subarray(P,P+w);C[B]=(0,uP.mod)(fP(S),o)}x[v]=C}return x}function cP(e,t){const r=t.map(o=>Array.from(o).reverse());return(o,s)=>{const[u,f,h,l]=r.map(p=>p.reduce((b,w)=>e.add(e.mul(b,o),w)));return o=e.div(u,f),s=e.mul(s,e.div(h,l)),{x:o,y:s}}}function dP(e,t,r){if(typeof t!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(o,s){const u=Nc(o,2,{...r,DST:r.DST,...s}),f=e.fromAffine(t(u[0])),h=e.fromAffine(t(u[1])),l=f.add(h).clearCofactor();return l.assertValidity(),l},encodeToCurve(o,s){const u=Nc(o,1,{...r,DST:r.encodeDST,...s}),f=e.fromAffine(t(u[0])).clearCofactor();return f.assertValidity(),f},mapToCurve(o){if(!Array.isArray(o))throw new Error("mapToCurve: expected array of bigints");for(const u of o)if(typeof u!="bigint")throw new Error(`mapToCurve: expected array of bigints, got ${u} in array`);const s=e.fromAffine(t(o)).clearCofactor();return s.assertValidity(),s}}}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.encodeToCurve=e.hashToCurve=e.schnorr=e.secp256k1=void 0;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=$o,r=Zn,o=zu,s=Zi,u=pt,f=ot,h=md,l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),p=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),b=BigInt(1),w=BigInt(2),I=(H,K)=>(H+K/w)/K;function A(H){const K=l,ae=BigInt(3),de=BigInt(6),re=BigInt(11),_e=BigInt(22),be=BigInt(23),R=BigInt(44),O=BigInt(88),q=H*H*H%K,oe=q*q*H%K,ye=(0,u.pow2)(oe,ae,K)*oe%K,d=(0,u.pow2)(ye,ae,K)*oe%K,g=(0,u.pow2)(d,w,K)*q%K,_=(0,u.pow2)(g,re,K)*g%K,E=(0,u.pow2)(_,_e,K)*_%K,J=(0,u.pow2)(E,R,K)*E%K,ie=(0,u.pow2)(J,O,K)*J%K,se=(0,u.pow2)(ie,R,K)*E%K,Ie=(0,u.pow2)(se,ae,K)*oe%K,Be=(0,u.pow2)(Ie,be,K)*_%K,Ce=(0,u.pow2)(Be,de,K)*q%K,Ue=(0,u.pow2)(Ce,w,K);if(!x.eql(x.sqr(Ue),H))throw new Error("Cannot find square root");return Ue}const x=(0,u.Field)(l,void 0,void 0,{sqrt:A});e.secp256k1=(0,o.createCurve)({a:BigInt(0),b:BigInt(7),Fp:x,n:p,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:H=>{const K=p,ae=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),de=-b*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),re=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),_e=ae,be=BigInt("0x100000000000000000000000000000000"),R=I(_e*H,K),O=I(-de*H,K);let q=(0,u.mod)(H-R*ae-O*re,K),oe=(0,u.mod)(-R*de-O*_e,K);const ye=q>be,d=oe>be;if(ye&&(q=K-q),d&&(oe=K-oe),q>be||oe>be)throw new Error("splitScalar: Endomorphism failed, k="+H);return{k1neg:ye,k1:q,k2neg:d,k2:oe}}}},t.sha256);const v=BigInt(0),C=H=>typeof H=="bigint"&&v<H&&H<l,B=H=>typeof H=="bigint"&&v<H&&H<p,P={};function S(H,...K){let ae=P[H];if(ae===void 0){const de=(0,t.sha256)(Uint8Array.from(H,re=>re.charCodeAt(0)));ae=(0,f.concatBytes)(de,de),P[H]=ae}return(0,t.sha256)((0,f.concatBytes)(ae,...K))}const m=H=>H.toRawBytes(!0).slice(1),j=H=>(0,f.numberToBytesBE)(H,32),Q=H=>(0,u.mod)(H,l),ce=H=>(0,u.mod)(H,p),ue=e.secp256k1.ProjectivePoint,te=(H,K,ae)=>ue.BASE.multiplyAndAddUnsafe(H,K,ae);function Se(H){let K=e.secp256k1.utils.normPrivateKeyToScalar(H),ae=ue.fromPrivateKey(K);return{scalar:ae.hasEvenY()?K:ce(-K),bytes:m(ae)}}function me(H){if(!C(H))throw new Error("bad x: need 0 < x < p");const K=Q(H*H),ae=Q(K*H+BigInt(7));let de=A(ae);de%w!==v&&(de=Q(-de));const re=new ue(H,de,b);return re.assertValidity(),re}function F(...H){return ce((0,f.bytesToNumberBE)(S("BIP0340/challenge",...H)))}function U(H){return Se(H).bytes}function $(H,K,ae=(0,r.randomBytes)(32)){const de=(0,f.ensureBytes)("message",H),{bytes:re,scalar:_e}=Se(K),be=(0,f.ensureBytes)("auxRand",ae,32),R=j(_e^(0,f.bytesToNumberBE)(S("BIP0340/aux",be))),O=S("BIP0340/nonce",R,re,de),q=ce((0,f.bytesToNumberBE)(O));if(q===v)throw new Error("sign failed: k is zero");const{bytes:oe,scalar:ye}=Se(q),d=F(oe,re,de),g=new Uint8Array(64);if(g.set(oe,0),g.set(j(ce(ye+d*_e)),32),!G(g,de,re))throw new Error("sign: Invalid signature produced");return g}function G(H,K,ae){const de=(0,f.ensureBytes)("signature",H,64),re=(0,f.ensureBytes)("message",K),_e=(0,f.ensureBytes)("publicKey",ae,32);try{const be=me((0,f.bytesToNumberBE)(_e)),R=(0,f.bytesToNumberBE)(de.subarray(0,32));if(!C(R))return!1;const O=(0,f.bytesToNumberBE)(de.subarray(32,64));if(!B(O))return!1;const q=F(j(R),m(be),re),oe=te(be,O,ce(-q));return!(!oe||!oe.hasEvenY()||oe.toAffine().x!==R)}catch{return!1}}e.schnorr={getPublicKey:U,sign:$,verify:G,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:me,pointToBytes:m,numberToBytesBE:f.numberToBytesBE,bytesToNumberBE:f.bytesToNumberBE,taggedHash:S,mod:u.mod}};const Y=(0,s.isogenyMap)(x,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(H=>H.map(K=>BigInt(K)))),V=(0,h.mapToCurveSimpleSWU)(x,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:x.create(BigInt("-11"))}),ne=(0,s.createHasher)(e.secp256k1.ProjectivePoint,H=>{const{x:K,y:ae}=V(x.create(H[0]));return Y(K,ae)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:x.ORDER,m:1,k:128,expand:"xmd",hash:t.sha256});e.hashToCurve=ne.hashToCurve,e.encodeToCurve=ne.encodeToCurve})(Ny);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.secp256k1=void 0;var t=Ny;Object.defineProperty(e,"secp256k1",{enumerable:!0,get:function(){return t.secp256k1}})})(Gu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MAX_WITHDRAWALS_PER_PAYLOAD=e.RLP_EMPTY_STRING=e.KECCAK256_RLP=e.KECCAK256_RLP_S=e.KECCAK256_RLP_ARRAY=e.KECCAK256_RLP_ARRAY_S=e.KECCAK256_NULL=e.KECCAK256_NULL_S=e.TWO_POW256=e.SECP256K1_ORDER_DIV_2=e.SECP256K1_ORDER=e.MAX_INTEGER_BIGINT=e.MAX_INTEGER=e.MAX_UINT64=void 0;const t=W.bufferPolyfill,r=Gu;e.MAX_UINT64=BigInt("0xffffffffffffffff"),e.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),e.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),e.SECP256K1_ORDER=r.secp256k1.CURVE.n,e.SECP256K1_ORDER_DIV_2=r.secp256k1.CURVE.n/BigInt(2),e.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),e.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",e.KECCAK256_NULL=t.Buffer.from(e.KECCAK256_NULL_S,"hex"),e.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",e.KECCAK256_RLP_ARRAY=t.Buffer.from(e.KECCAK256_RLP_ARRAY_S,"hex"),e.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",e.KECCAK256_RLP=t.Buffer.from(e.KECCAK256_RLP_S,"hex"),e.RLP_EMPTY_STRING=t.Buffer.from([128]),e.MAX_WITHDRAWALS_PER_PAYLOAD=16})(qu);var Qu={};Object.defineProperty(Qu,"__esModule",{value:!0});Qu.GWEI_TO_WEI=void 0;Qu.GWEI_TO_WEI=BigInt(1e9);var Td={},Rn={};Object.defineProperty(Rn,"__esModule",{value:!0});Rn.RLP=Rn.utils=Rn.decode=Rn.encode=void 0;function Id(e){if(Array.isArray(e)){const r=[];let o=0;for(let s=0;s<e.length;s++){const u=Id(e[s]);r.push(u),o+=u.length}return Mc(hb(o,192),...r)}const t=o0(e);return t.length===1&&t[0]<128?t:Mc(hb(t.length,128),t)}Rn.encode=Id;function mo(e,t,r){if(r>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,r)}function db(e){if(e[0]===0)throw new Error("invalid RLP: extra zeros");return r0(t0(e))}function hb(e,t){if(e<56)return Uint8Array.from([e+t]);const r=xc(e),o=r.length/2,s=xc(t+55+o);return Uint8Array.from(wu(s+r))}function e0(e,t=!1){if(typeof e>"u"||e===null||e.length===0)return Uint8Array.from([]);const r=o0(e),o=$c(r);if(t)return o;if(o.remainder.length!==0)throw new Error("invalid RLP: remainder must be zero");return o.data}Rn.decode=e0;function $c(e){let t,r,o,s,u;const f=[],h=e[0];if(h<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(h<=183){if(t=h-127,h===128?o=Uint8Array.from([]):o=mo(e,1,t),t===2&&o[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:o,remainder:e.slice(t)}}else if(h<=191){if(r=h-182,e.length-1<r)throw new Error("invalid RLP: not enough bytes for string length");if(t=db(mo(e,1,r)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return o=mo(e,r,t+r),{data:o,remainder:e.slice(t+r)}}else if(h<=247){for(t=h-191,s=mo(e,1,t);s.length;)u=$c(s),f.push(u.data),s=u.remainder;return{data:f,remainder:e.slice(t)}}else{if(r=h-246,t=db(mo(e,1,r)),t<56)throw new Error("invalid RLP: encoded list too short");const l=r+t;if(l>e.length)throw new Error("invalid RLP: total length is larger than the data");for(s=mo(e,r,l);s.length;)u=$c(s),f.push(u.data),s=u.remainder;return{data:f,remainder:e.slice(l)}}}const hP=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function t0(e){let t="";for(let r=0;r<e.length;r++)t+=hP[e[r]];return t}function r0(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function wu(e){if(typeof e!="string")throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const o=r*2;t[r]=r0(e.slice(o,o+2))}return t}function Mc(...e){if(e.length===1)return e[0];const t=e.reduce((o,s)=>o+s.length,0),r=new Uint8Array(t);for(let o=0,s=0;o<e.length;o++){const u=e[o];r.set(u,s),s+=u.length}return r}function n0(e){return new TextEncoder().encode(e)}function xc(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function gP(e){return e.length%2?`0${e}`:e}function i0(e){return e.length>=2&&e[0]==="0"&&e[1]==="x"}function pP(e){return typeof e!="string"?e:i0(e)?e.slice(2):e}function o0(e){if(e instanceof Uint8Array)return e;if(typeof e=="string")return i0(e)?wu(gP(pP(e))):n0(e);if(typeof e=="number"||typeof e=="bigint")return e?wu(xc(e)):Uint8Array.from([]);if(e==null)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}Rn.utils={bytesToHex:t0,concatBytes:Mc,hexToBytes:wu,utf8ToBytes:n0};Rn.RLP={encode:Id,decode:e0};var rn={},dt={},je={};Object.defineProperty(je,"__esModule",{value:!0});je.add5L=je.add5H=je.add4H=je.add4L=je.add3H=je.add3L=je.add=je.rotlBL=je.rotlBH=je.rotlSL=je.rotlSH=je.rotr32L=je.rotr32H=je.rotrBL=je.rotrBH=je.rotrSL=je.rotrSH=je.shrSL=je.shrSH=je.toBig=je.split=je.fromBig=void 0;const ru=BigInt(2**32-1),Dc=BigInt(32);function Od(e,t=!1){return t?{h:Number(e&ru),l:Number(e>>Dc&ru)}:{h:Number(e>>Dc&ru)|0,l:Number(e&ru)|0}}je.fromBig=Od;function s0(e,t=!1){let r=new Uint32Array(e.length),o=new Uint32Array(e.length);for(let s=0;s<e.length;s++){const{h:u,l:f}=Od(e[s],t);[r[s],o[s]]=[u,f]}return[r,o]}je.split=s0;const a0=(e,t)=>BigInt(e>>>0)<<Dc|BigInt(t>>>0);je.toBig=a0;const u0=(e,t,r)=>e>>>r;je.shrSH=u0;const f0=(e,t,r)=>e<<32-r|t>>>r;je.shrSL=f0;const l0=(e,t,r)=>e>>>r|t<<32-r;je.rotrSH=l0;const c0=(e,t,r)=>e<<32-r|t>>>r;je.rotrSL=c0;const d0=(e,t,r)=>e<<64-r|t>>>r-32;je.rotrBH=d0;const h0=(e,t,r)=>e>>>r-32|t<<64-r;je.rotrBL=h0;const g0=(e,t)=>t;je.rotr32H=g0;const p0=(e,t)=>e;je.rotr32L=p0;const b0=(e,t,r)=>e<<r|t>>>32-r;je.rotlSH=b0;const _0=(e,t,r)=>t<<r|e>>>32-r;je.rotlSL=_0;const y0=(e,t,r)=>t<<r-32|e>>>64-r;je.rotlBH=y0;const w0=(e,t,r)=>e<<r-32|t>>>64-r;je.rotlBL=w0;function m0(e,t,r,o){const s=(t>>>0)+(o>>>0);return{h:e+r+(s/2**32|0)|0,l:s|0}}je.add=m0;const E0=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);je.add3L=E0;const v0=(e,t,r,o)=>t+r+o+(e/2**32|0)|0;je.add3H=v0;const S0=(e,t,r,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0);je.add4L=S0;const R0=(e,t,r,o,s)=>t+r+o+s+(e/2**32|0)|0;je.add4H=R0;const A0=(e,t,r,o,s)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0)+(s>>>0);je.add5L=A0;const T0=(e,t,r,o,s,u)=>t+r+o+s+u+(e/2**32|0)|0;je.add5H=T0;const bP={fromBig:Od,split:s0,toBig:a0,shrSH:u0,shrSL:f0,rotrSH:l0,rotrSL:c0,rotrBH:d0,rotrBL:h0,rotr32H:g0,rotr32L:p0,rotlSH:b0,rotlSL:_0,rotlBH:y0,rotlBL:w0,add:m0,add3L:E0,add3H:v0,add4L:S0,add4H:R0,add5H:T0,add5L:A0};je.default=bP;Object.defineProperty(dt,"__esModule",{value:!0});dt.shake256=dt.shake128=dt.keccak_512=dt.keccak_384=dt.keccak_256=dt.keccak_224=dt.sha3_512=dt.sha3_384=dt.sha3_256=dt.sha3_224=dt.Keccak=dt.keccakP=void 0;const Eo=Ot,Ps=je,Vn=Zn,I0=[],O0=[],C0=[],_P=BigInt(0),_s=BigInt(1),yP=BigInt(2),wP=BigInt(7),mP=BigInt(256),EP=BigInt(113);for(let e=0,t=_s,r=1,o=0;e<24;e++){[r,o]=[o,(2*r+3*o)%5],I0.push(2*(5*o+r)),O0.push((e+1)*(e+2)/2%64);let s=_P;for(let u=0;u<7;u++)t=(t<<_s^(t>>wP)*EP)%mP,t&yP&&(s^=_s<<(_s<<BigInt(u))-_s);C0.push(s)}const[vP,SP]=(0,Ps.split)(C0,!0),gb=(e,t,r)=>r>32?(0,Ps.rotlBH)(e,t,r):(0,Ps.rotlSH)(e,t,r),pb=(e,t,r)=>r>32?(0,Ps.rotlBL)(e,t,r):(0,Ps.rotlSL)(e,t,r);function L0(e,t=24){const r=new Uint32Array(10);for(let o=24-t;o<24;o++){for(let f=0;f<10;f++)r[f]=e[f]^e[f+10]^e[f+20]^e[f+30]^e[f+40];for(let f=0;f<10;f+=2){const h=(f+8)%10,l=(f+2)%10,p=r[l],b=r[l+1],w=gb(p,b,1)^r[h],I=pb(p,b,1)^r[h+1];for(let A=0;A<50;A+=10)e[f+A]^=w,e[f+A+1]^=I}let s=e[2],u=e[3];for(let f=0;f<24;f++){const h=O0[f],l=gb(s,u,h),p=pb(s,u,h),b=I0[f];s=e[b],u=e[b+1],e[b]=l,e[b+1]=p}for(let f=0;f<50;f+=10){for(let h=0;h<10;h++)r[h]=e[f+h];for(let h=0;h<10;h++)e[f+h]^=~r[(h+2)%10]&r[(h+4)%10]}e[0]^=vP[o],e[1]^=SP[o]}r.fill(0)}dt.keccakP=L0;class Ws extends Vn.Hash{constructor(t,r,o,s=!1,u=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=o,this.enableXOF=s,this.rounds=u,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,Eo.number)(o),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,Vn.u32)(this.state)}keccak(){Vn.isLE||(0,Vn.byteSwap32)(this.state32),L0(this.state32,this.rounds),Vn.isLE||(0,Vn.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,Eo.exists)(this);const{blockLen:r,state:o}=this;t=(0,Vn.toBytes)(t);const s=t.length;for(let u=0;u<s;){const f=Math.min(r-this.pos,s-u);for(let h=0;h<f;h++)o[this.pos++]^=t[u++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:r,pos:o,blockLen:s}=this;t[o]^=r,r&128&&o===s-1&&this.keccak(),t[s-1]^=128,this.keccak()}writeInto(t){(0,Eo.exists)(this,!1),(0,Eo.bytes)(t),this.finish();const r=this.state,{blockLen:o}=this;for(let s=0,u=t.length;s<u;){this.posOut>=o&&this.keccak();const f=Math.min(o-this.posOut,u-s);t.set(r.subarray(this.posOut,this.posOut+f),s),this.posOut+=f,s+=f}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,Eo.number)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,Eo.output)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:r,suffix:o,outputLen:s,rounds:u,enableXOF:f}=this;return t||(t=new Ws(r,o,s,f,u)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=u,t.suffix=o,t.outputLen=s,t.enableXOF=f,t.destroyed=this.destroyed,t}}dt.Keccak=Ws;const Ai=(e,t,r)=>(0,Vn.wrapConstructor)(()=>new Ws(t,e,r));dt.sha3_224=Ai(6,144,224/8);dt.sha3_256=Ai(6,136,256/8);dt.sha3_384=Ai(6,104,384/8);dt.sha3_512=Ai(6,72,512/8);dt.keccak_224=Ai(1,144,224/8);dt.keccak_256=Ai(1,136,256/8);dt.keccak_384=Ai(1,104,384/8);dt.keccak_512=Ai(1,72,512/8);const P0=(e,t,r)=>(0,Vn.wrapXOFConstructorWithOpts)((o={})=>new Ws(t,e,o.dkLen===void 0?r:o.dkLen,!0));dt.shake128=P0(31,168,128/8);dt.shake256=P0(31,136,256/8);var mu={exports:{}};mu.exports;(function(e,t){var r=W.commonjsGlobal&&W.commonjsGlobal.__importDefault||function(I){return I&&I.__esModule?I:{default:I}};Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0,t.bytesToUtf8=l,t.hexToBytes=p,t.equalsBytes=b,t.wrapHash=w;const o=r(Ot),s=Zn,u=o.default.bool;t.assertBool=u;const f=o.default.bytes;t.assertBytes=f;var h=Zn;Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return h.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return h.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return h.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return h.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return h.utf8ToBytes}});function l(I){if(!(I instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof I}`);return new TextDecoder().decode(I)}function p(I){const A=I.startsWith("0x")?I.substring(2):I;return(0,s.hexToBytes)(A)}function b(I,A){if(I.length!==A.length)return!1;for(let x=0;x<I.length;x++)if(I[x]!==A[x])return!1;return!0}function w(I){return A=>(o.default.bytes(A),I(A))}t.crypto=(()=>{const I=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0,A=typeof W.commonjsRequire=="function"&&W.commonjsRequire.bind(e);return{node:A&&!I?A("crypto"):void 0,web:I}})()})(mu,mu.exports);var B0=mu.exports;Object.defineProperty(rn,"__esModule",{value:!0});rn.keccak512=rn.keccak384=rn.keccak256=rn.keccak224=void 0;const Bs=dt,ef=B0;rn.keccak224=(0,ef.wrapHash)(Bs.keccak_224);rn.keccak256=(()=>{const e=(0,ef.wrapHash)(Bs.keccak_256);return e.create=Bs.keccak_256.create,e})();rn.keccak384=(0,ef.wrapHash)(Bs.keccak_384);rn.keccak512=(0,ef.wrapHash)(Bs.keccak_512);var Qi={},Fr={},ht={};Object.defineProperty(ht,"__esModule",{value:!0});ht.isHexString=ht.getKeys=ht.fromAscii=ht.fromUtf8=ht.toAscii=ht.arrayContainsArray=ht.getBinarySize=ht.padToEven=ht.stripHexPrefix=ht.isHexPrefixed=void 0;function N0(e){if(typeof e!="string")throw new Error(`[isHexPrefixed] input must be type 'string', received type ${typeof e}`);return e[0]==="0"&&e[1]==="x"}ht.isHexPrefixed=N0;const RP=e=>{if(typeof e!="string")throw new Error(`[stripHexPrefix] input must be type 'string', received ${typeof e}`);return N0(e)?e.slice(2):e};ht.stripHexPrefix=RP;function $0(e){let t=e;if(typeof t!="string")throw new Error(`[padToEven] value must be type 'string', received ${typeof t}`);return t.length%2&&(t=`0${t}`),t}ht.padToEven=$0;function AP(e){if(typeof e!="string")throw new Error(`[getBinarySize] method requires input type 'string', received ${typeof e}`);return W.dist.Buffer.byteLength(e,"utf8")}ht.getBinarySize=AP;function TP(e,t,r){if(Array.isArray(e)!==!0)throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(Array.isArray(t)!==!0)throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[r===!0?"some":"every"](o=>e.indexOf(o)>=0)}ht.arrayContainsArray=TP;function IP(e){let t="",r=0;const o=e.length;for(e.substring(0,2)==="0x"&&(r=2);r<o;r+=2){const s=parseInt(e.substr(r,2),16);t+=String.fromCharCode(s)}return t}ht.toAscii=IP;function OP(e){const t=W.dist.Buffer.from(e,"utf8");return`0x${$0(t.toString("hex")).replace(/^0+|0+$/g,"")}`}ht.fromUtf8=OP;function CP(e){let t="";for(let r=0;r<e.length;r++){const s=e.charCodeAt(r).toString(16);t+=s.length<2?`0${s}`:s}return`0x${t}`}ht.fromAscii=CP;function LP(e,t,r){if(!Array.isArray(e))throw new Error(`[getKeys] method expects input 'params' to be an array, got ${typeof e}`);if(typeof t!="string")throw new Error(`[getKeys] method expects input 'key' to be type 'string', got ${typeof e}`);const o=[];for(let s=0;s<e.length;s++){let u=e[s][t];if(r===!0&&!u)u="";else if(typeof u!="string")throw new Error(`invalid abi - expected type 'string', received ${typeof u}`);o.push(u)}return o}ht.getKeys=LP;function PP(e,t){return!(typeof e!="string"||!e.match(/^0x[0-9A-Fa-f]*$/)||typeof t<"u"&&t>0&&e.length!==2+2*t)}ht.isHexString=PP;Object.defineProperty(Fr,"__esModule",{value:!0});Fr.assertIsString=Fr.assertIsArray=Fr.assertIsBuffer=Fr.assertIsHexString=void 0;const BP=ht,NP=function(e){if(!(0,BP.isHexString)(e)){const t=`This method only supports 0x-prefixed hex strings but input was: ${e}`;throw new Error(t)}};Fr.assertIsHexString=NP;const $P=function(e){if(!W.dist.Buffer.isBuffer(e)){const t=`This method only supports Buffer but input was: ${e}`;throw new Error(t)}};Fr.assertIsBuffer=$P;const MP=function(e){if(!Array.isArray(e)){const t=`This method only supports number arrays but input was: ${e}`;throw new Error(t)}};Fr.assertIsArray=MP;const xP=function(e){if(typeof e!="string"){const t=`This method only supports strings but input was: ${e}`;throw new Error(t)}};Fr.assertIsString=xP;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.intToUnpaddedBuffer=e.bigIntToUnpaddedBuffer=e.bigIntToHex=e.bufArrToArr=e.arrToBufArr=e.validateNoLeadingZeroes=e.baToJSON=e.toUtf8=e.short=e.addHexPrefix=e.toUnsigned=e.fromSigned=e.bufferToInt=e.bigIntToBuffer=e.bufferToBigInt=e.bufferToHex=e.toBuffer=e.unpadHexString=e.unpadArray=e.unpadBuffer=e.setLengthRight=e.setLengthLeft=e.zeros=e.intToBuffer=e.intToHex=void 0;const t=Fr,r=ht,o=function($){if(!Number.isSafeInteger($)||$<0)throw new Error(`Received an invalid integer type: ${$}`);return`0x${$.toString(16)}`};e.intToHex=o;const s=function($){const G=(0,e.intToHex)($);return W.dist.Buffer.from((0,r.padToEven)(G.slice(2)),"hex")};e.intToBuffer=s;const u=function($){return W.dist.Buffer.allocUnsafe($).fill(0)};e.zeros=u;const f=function($,G,Y){const V=(0,e.zeros)(G);return Y?$.length<G?($.copy(V),V):$.slice(0,G):$.length<G?($.copy(V,G-$.length),V):$.slice(-G)},h=function($,G){return(0,t.assertIsBuffer)($),f($,G,!1)};e.setLengthLeft=h;const l=function($,G){return(0,t.assertIsBuffer)($),f($,G,!0)};e.setLengthRight=l;const p=function($){let G=$[0];for(;$.length>0&&G.toString()==="0";)$=$.slice(1),G=$[0];return $},b=function($){return(0,t.assertIsBuffer)($),p($)};e.unpadBuffer=b;const w=function($){return(0,t.assertIsArray)($),p($)};e.unpadArray=w;const I=function($){return(0,t.assertIsHexString)($),$=(0,r.stripHexPrefix)($),"0x"+p($)};e.unpadHexString=I;const A=function($){if($==null)return W.dist.Buffer.allocUnsafe(0);if(W.dist.Buffer.isBuffer($)||Array.isArray($)||$ instanceof Uint8Array)return W.dist.Buffer.from($);if(typeof $=="string"){if(!(0,r.isHexString)($))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${$}`);return W.dist.Buffer.from((0,r.padToEven)((0,r.stripHexPrefix)($)),"hex")}if(typeof $=="number")return(0,e.intToBuffer)($);if(typeof $=="bigint"){if($<BigInt(0))throw new Error(`Cannot convert negative bigint to buffer. Given: ${$}`);let G=$.toString(16);return G.length%2&&(G="0"+G),W.dist.Buffer.from(G,"hex")}if($.toArray)return W.dist.Buffer.from($.toArray());if($.toBuffer)return W.dist.Buffer.from($.toBuffer());throw new Error("invalid type")};e.toBuffer=A;const x=function($){return $=(0,e.toBuffer)($),"0x"+$.toString("hex")};e.bufferToHex=x;function v($){const G=(0,e.bufferToHex)($);return BigInt(G==="0x"?0:G)}e.bufferToBigInt=v;function C($){return(0,e.toBuffer)("0x"+$.toString(16))}e.bigIntToBuffer=C;const B=function($){const G=Number(v($));if(!Number.isSafeInteger(G))throw new Error("Number exceeds 53 bits");return G};e.bufferToInt=B;const P=function($){return BigInt.asIntN(256,v($))};e.fromSigned=P;const S=function($){return C(BigInt.asUintN(256,$))};e.toUnsigned=S;const m=function($){return typeof $!="string"||(0,r.isHexPrefixed)($)?$:"0x"+$};e.addHexPrefix=m;function j($,G=50){const Y=W.dist.Buffer.isBuffer($)?$.toString("hex"):$;return Y.length<=G?Y:Y.slice(0,G)+"…"}e.short=j;const Q=function($){const G=/^(00)+|(00)+$/g;if($=(0,r.stripHexPrefix)($),$.length%2!==0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return W.dist.Buffer.from($.replace(G,""),"hex").toString("utf8")};e.toUtf8=Q;const ce=function($){if(W.dist.Buffer.isBuffer($))return`0x${$.toString("hex")}`;if($ instanceof Array){const G=[];for(let Y=0;Y<$.length;Y++)G.push((0,e.baToJSON)($[Y]));return G}};e.baToJSON=ce;const ue=function($){for(const[G,Y]of Object.entries($))if(Y!==void 0&&Y.length>0&&Y[0]===0)throw new Error(`${G} cannot have leading zeroes, received: ${Y.toString("hex")}`)};e.validateNoLeadingZeroes=ue;function te($){return Array.isArray($)?$.map(G=>te(G)):W.dist.Buffer.from($)}e.arrToBufArr=te;function Se($){return Array.isArray($)?$.map(G=>Se(G)):Uint8Array.from($??[])}e.bufArrToArr=Se;const me=$=>"0x"+$.toString(16);e.bigIntToHex=me;function F($){return(0,e.unpadBuffer)(C($))}e.bigIntToUnpaddedBuffer=F;function U($){return(0,e.unpadBuffer)((0,e.intToBuffer)($))}e.intToUnpaddedBuffer=U})(Qi);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.accountBodyToRLP=e.accountBodyToSlim=e.accountBodyFromSlim=e.isZeroAddress=e.zeroAddress=e.importPublic=e.privateToAddress=e.privateToPublic=e.publicToAddress=e.pubToAddress=e.isValidPublic=e.isValidPrivate=e.generateAddress2=e.generateAddress=e.isValidChecksumAddress=e.toChecksumAddress=e.isValidAddress=e.Account=void 0;const t=Rn,r=rn,o=Gu,s=B0,u=Qi,f=qu,h=Fr,l=ht,p=BigInt(0);class b{constructor(U=p,$=p,G=f.KECCAK256_RLP,Y=f.KECCAK256_NULL){this.nonce=U,this.balance=$,this.storageRoot=G,this.codeHash=Y,this._validate()}static fromAccountData(U){const{nonce:$,balance:G,storageRoot:Y,codeHash:V}=U;return new b($!==void 0?(0,u.bufferToBigInt)((0,u.toBuffer)($)):void 0,G!==void 0?(0,u.bufferToBigInt)((0,u.toBuffer)(G)):void 0,Y!==void 0?(0,u.toBuffer)(Y):void 0,V!==void 0?(0,u.toBuffer)(V):void 0)}static fromRlpSerializedAccount(U){const $=(0,u.arrToBufArr)(t.RLP.decode(Uint8Array.from(U)));if(!Array.isArray($))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray($)}static fromValuesArray(U){const[$,G,Y,V]=U;return new b((0,u.bufferToBigInt)($),(0,u.bufferToBigInt)(G),Y,V)}_validate(){if(this.nonce<p)throw new Error("nonce must be greater than zero");if(this.balance<p)throw new Error("balance must be greater than zero");if(this.storageRoot.length!==32)throw new Error("storageRoot must have a length of 32");if(this.codeHash.length!==32)throw new Error("codeHash must have a length of 32")}raw(){return[(0,u.bigIntToUnpaddedBuffer)(this.nonce),(0,u.bigIntToUnpaddedBuffer)(this.balance),this.storageRoot,this.codeHash]}serialize(){return W.dist.Buffer.from(t.RLP.encode((0,u.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(f.KECCAK256_NULL)}isEmpty(){return this.balance===p&&this.nonce===p&&this.codeHash.equals(f.KECCAK256_NULL)}}e.Account=b;const w=function(F){try{(0,h.assertIsString)(F)}catch{return!1}return/^0x[0-9a-fA-F]{40}$/.test(F)};e.isValidAddress=w;const I=function(F,U){(0,h.assertIsHexString)(F);const $=(0,l.stripHexPrefix)(F).toLowerCase();let G="";U!==void 0&&(G=(0,u.bufferToBigInt)((0,u.toBuffer)(U)).toString()+"0x");const Y=W.dist.Buffer.from(G+$,"utf8"),V=(0,s.bytesToHex)((0,r.keccak256)(Y));let ne="0x";for(let H=0;H<$.length;H++)parseInt(V[H],16)>=8?ne+=$[H].toUpperCase():ne+=$[H];return ne};e.toChecksumAddress=I;const A=function(F,U){return(0,e.isValidAddress)(F)&&(0,e.toChecksumAddress)(F,U)===F};e.isValidChecksumAddress=A;const x=function(F,U){return(0,h.assertIsBuffer)(F),(0,h.assertIsBuffer)(U),(0,u.bufferToBigInt)(U)===BigInt(0)?W.dist.Buffer.from((0,r.keccak256)(t.RLP.encode((0,u.bufArrToArr)([F,null])))).slice(-20):W.dist.Buffer.from((0,r.keccak256)(t.RLP.encode((0,u.bufArrToArr)([F,U])))).slice(-20)};e.generateAddress=x;const v=function(F,U,$){if((0,h.assertIsBuffer)(F),(0,h.assertIsBuffer)(U),(0,h.assertIsBuffer)($),F.length!==20)throw new Error("Expected from to be of length 20");if(U.length!==32)throw new Error("Expected salt to be of length 32");const G=(0,r.keccak256)(W.dist.Buffer.concat([W.dist.Buffer.from("ff","hex"),F,U,(0,r.keccak256)($)]));return(0,u.toBuffer)(G).slice(-20)};e.generateAddress2=v;const C=function(F){return o.secp256k1.utils.isValidPrivateKey(F)};e.isValidPrivate=C;const B=function(F,U=!1){if((0,h.assertIsBuffer)(F),F.length===64)try{return o.secp256k1.ProjectivePoint.fromHex(W.dist.Buffer.concat([W.dist.Buffer.from([4]),F])),!0}catch{return!1}if(!U)return!1;try{return o.secp256k1.ProjectivePoint.fromHex(F),!0}catch{return!1}};e.isValidPublic=B;const P=function(F,U=!1){if((0,h.assertIsBuffer)(F),U&&F.length!==64&&(F=W.dist.Buffer.from(o.secp256k1.ProjectivePoint.fromHex(F).toRawBytes(!1).slice(1))),F.length!==64)throw new Error("Expected pubKey to be of length 64");return W.dist.Buffer.from((0,r.keccak256)(F)).slice(-20)};e.pubToAddress=P,e.publicToAddress=e.pubToAddress;const S=function(F){return(0,h.assertIsBuffer)(F),W.dist.Buffer.from(o.secp256k1.ProjectivePoint.fromPrivateKey(F).toRawBytes(!1).slice(1))};e.privateToPublic=S;const m=function(F){return(0,e.publicToAddress)((0,e.privateToPublic)(F))};e.privateToAddress=m;const j=function(F){return(0,h.assertIsBuffer)(F),F.length!==64&&(F=W.dist.Buffer.from(o.secp256k1.ProjectivePoint.fromHex(F).toRawBytes(!1).slice(1))),F};e.importPublic=j;const Q=function(){const U=(0,u.zeros)(20);return(0,u.bufferToHex)(U)};e.zeroAddress=Q;const ce=function(F){try{(0,h.assertIsString)(F)}catch{return!1}return(0,e.zeroAddress)()===F};e.isZeroAddress=ce;function ue(F){const[U,$,G,Y]=F;return[U,$,(0,u.arrToBufArr)(G).length===0?f.KECCAK256_RLP:G,(0,u.arrToBufArr)(Y).length===0?f.KECCAK256_NULL:Y]}e.accountBodyFromSlim=ue;const te=new Uint8Array(0);function Se(F){const[U,$,G,Y]=F;return[U,$,(0,u.arrToBufArr)(G).equals(f.KECCAK256_RLP)?te:G,(0,u.arrToBufArr)(Y).equals(f.KECCAK256_NULL)?te:Y]}e.accountBodyToSlim=Se;function me(F,U=!0){const $=U?ue(F):F;return(0,u.arrToBufArr)(t.RLP.encode($))}e.accountBodyToRLP=me})(Td);var qs={};Object.defineProperty(qs,"__esModule",{value:!0});qs.Address=void 0;const ys=Td,nu=Qi;class zn{constructor(t){if(t.length!==20)throw new Error("Invalid address length");this.buf=t}static zero(){return new zn((0,nu.zeros)(20))}static fromString(t){if(!(0,ys.isValidAddress)(t))throw new Error("Invalid address");return new zn((0,nu.toBuffer)(t))}static fromPublicKey(t){if(!W.dist.Buffer.isBuffer(t))throw new Error("Public key should be Buffer");const r=(0,ys.pubToAddress)(t);return new zn(r)}static fromPrivateKey(t){if(!W.dist.Buffer.isBuffer(t))throw new Error("Private key should be Buffer");const r=(0,ys.privateToAddress)(t);return new zn(r)}static generate(t,r){if(typeof r!="bigint")throw new Error("Expected nonce to be a bigint");return new zn((0,ys.generateAddress)(t.buf,(0,nu.bigIntToBuffer)(r)))}static generate2(t,r,o){if(!W.dist.Buffer.isBuffer(r))throw new Error("Expected salt to be a Buffer");if(!W.dist.Buffer.isBuffer(o))throw new Error("Expected initCode to be a Buffer");return new zn((0,ys.generateAddress2)(t.buf,r,o))}equals(t){return this.buf.equals(t.buf)}isZero(){return this.equals(zn.zero())}isPrecompileOrSystemAddress(){const t=(0,nu.bufferToBigInt)(this.buf),r=BigInt(0),o=BigInt("0xffff");return t>=r&&t<=o}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return W.dist.Buffer.from(this.buf)}}qs.Address=zn;var tf={},Cd={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toType=e.TypeOutput=void 0;const t=Qi,r=ht;var o;(function(u){u[u.Number=0]="Number",u[u.BigInt=1]="BigInt",u[u.Buffer=2]="Buffer",u[u.PrefixedHexString=3]="PrefixedHexString"})(o=e.TypeOutput||(e.TypeOutput={}));function s(u,f){if(u===null)return null;if(u===void 0)return;if(typeof u=="string"&&!(0,r.isHexString)(u))throw new Error(`A string must be provided with a 0x-prefix, given: ${u}`);if(typeof u=="number"&&!Number.isSafeInteger(u))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const h=(0,t.toBuffer)(u);switch(f){case o.Buffer:return h;case o.BigInt:return(0,t.bufferToBigInt)(h);case o.Number:{const l=(0,t.bufferToBigInt)(h);if(l>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(l)}case o.PrefixedHexString:return(0,t.bufferToHex)(h);default:throw new Error("unknown outputType")}}e.toType=s})(Cd);Object.defineProperty(tf,"__esModule",{value:!0});tf.Withdrawal=void 0;const bb=qs,nc=Qi,At=Cd;class Ss{constructor(t,r,o,s){this.index=t,this.validatorIndex=r,this.address=o,this.amount=s}static fromWithdrawalData(t){const{index:r,validatorIndex:o,address:s,amount:u}=t,f=(0,At.toType)(r,At.TypeOutput.BigInt),h=(0,At.toType)(o,At.TypeOutput.BigInt),l=new bb.Address((0,At.toType)(s,At.TypeOutput.Buffer)),p=(0,At.toType)(u,At.TypeOutput.BigInt);return new Ss(f,h,l,p)}static fromValuesArray(t){if(t.length!==4)throw Error(`Invalid withdrawalArray length expected=4 actual=${t.length}`);const[r,o,s,u]=t;return Ss.fromWithdrawalData({index:r,validatorIndex:o,address:s,amount:u})}static toBufferArray(t){const{index:r,validatorIndex:o,address:s,amount:u}=t,f=(0,At.toType)(r,At.TypeOutput.BigInt)===BigInt(0)?W.dist.Buffer.alloc(0):(0,At.toType)(r,At.TypeOutput.Buffer),h=(0,At.toType)(o,At.TypeOutput.BigInt)===BigInt(0)?W.dist.Buffer.alloc(0):(0,At.toType)(o,At.TypeOutput.Buffer);let l;s instanceof bb.Address?l=s.buf:l=(0,At.toType)(s,At.TypeOutput.Buffer);const p=(0,At.toType)(u,At.TypeOutput.BigInt)===BigInt(0)?W.dist.Buffer.alloc(0):(0,At.toType)(u,At.TypeOutput.Buffer);return[f,h,l,p]}raw(){return Ss.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,nc.bigIntToHex)(this.index),validatorIndex:(0,nc.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,nc.bigIntToHex)(this.amount)}}}tf.Withdrawal=Ss;var Qt={};Object.defineProperty(Qt,"__esModule",{value:!0});Qt.hashPersonalMessage=Qt.isValidSignature=Qt.fromRpcSig=Qt.toCompactSig=Qt.toRpcSig=Qt.ecrecover=Qt.ecsign=void 0;const DP=rn,M0=Gu,pr=Qi,ic=qu,jP=Fr;function UP(e,t,r){const o=M0.secp256k1.sign(e,t),s=o.toCompactRawBytes(),u=W.dist.Buffer.from(s.slice(0,32)),f=W.dist.Buffer.from(s.slice(32,64)),h=r===void 0?BigInt(o.recovery+27):BigInt(o.recovery+35)+BigInt(r)*BigInt(2);return{r:u,s:f,v:h}}Qt.ecsign=UP;function rf(e,t){return e===BigInt(0)||e===BigInt(1)?e:t===void 0?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function nf(e){return e===BigInt(0)||e===BigInt(1)}const kP=function(e,t,r,o,s){const u=W.dist.Buffer.concat([(0,pr.setLengthLeft)(r,32),(0,pr.setLengthLeft)(o,32)],64),f=rf(t,s);if(!nf(f))throw new Error("Invalid signature v value");const l=M0.secp256k1.Signature.fromCompact(u).addRecoveryBit(Number(f)).recoverPublicKey(e);return W.dist.Buffer.from(l.toRawBytes(!1).slice(1))};Qt.ecrecover=kP;const FP=function(e,t,r,o){const s=rf(e,o);if(!nf(s))throw new Error("Invalid signature v value");return(0,pr.bufferToHex)(W.dist.Buffer.concat([(0,pr.setLengthLeft)(t,32),(0,pr.setLengthLeft)(r,32),(0,pr.toBuffer)(e)]))};Qt.toRpcSig=FP;const HP=function(e,t,r,o){const s=rf(e,o);if(!nf(s))throw new Error("Invalid signature v value");let u=r;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&(u=W.dist.Buffer.from(r),u[0]|=128),(0,pr.bufferToHex)(W.dist.Buffer.concat([(0,pr.setLengthLeft)(t,32),(0,pr.setLengthLeft)(u,32)]))};Qt.toCompactSig=HP;const WP=function(e){const t=(0,pr.toBuffer)(e);let r,o,s;if(t.length>=65)r=t.slice(0,32),o=t.slice(32,64),s=(0,pr.bufferToBigInt)(t.slice(64));else if(t.length===64)r=t.slice(0,32),o=t.slice(32,64),s=BigInt((0,pr.bufferToInt)(t.slice(32,33))>>7),o[0]&=127;else throw new Error("Invalid signature length");return s<27&&(s=s+BigInt(27)),{v:s,r,s:o}};Qt.fromRpcSig=WP;const qP=function(e,t,r,o=!0,s){if(t.length!==32||r.length!==32||!nf(rf(e,s)))return!1;const u=(0,pr.bufferToBigInt)(t),f=(0,pr.bufferToBigInt)(r);return!(u===BigInt(0)||u>=ic.SECP256K1_ORDER||f===BigInt(0)||f>=ic.SECP256K1_ORDER||o&&f>=ic.SECP256K1_ORDER_DIV_2)};Qt.isValidSignature=qP;const GP=function(e){(0,jP.assertIsBuffer)(e);const t=W.dist.Buffer.from(`Ethereum Signed Message:
|
|
3
3
|
${e.length}`,"utf-8");return W.dist.Buffer.from((0,DP.keccak256)(W.dist.Buffer.concat([t,e])))};Qt.hashPersonalMessage=GP;var x0={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.compactBytesToNibbles=e.bytesToNibbles=e.nibblesToCompactBytes=e.nibblesToBytes=e.hasTerminator=void 0;const t=f=>f.length>0&&f[f.length-1]===16;e.hasTerminator=t;const r=(f,h)=>{for(let l=0,p=0;p<f.length;l+=1,p+=2)h[l]=f[p]<<4|f[p+1]};e.nibblesToBytes=r;const o=f=>{let h=0;(0,e.hasTerminator)(f)&&(h=1,f=f.subarray(0,f.length-1));const l=new Uint8Array(f.length/2+1);return l[0]=h<<5,(f.length&1)===1&&(l[0]|=16,l[0]|=f[0],f=f.subarray(1)),(0,e.nibblesToBytes)(f,l.subarray(1)),l};e.nibblesToCompactBytes=o;const s=f=>{const h=f.length*2+1,l=new Uint8Array(h);for(let p=0;p<f.length;p++){const b=f[p];l[p*2]=b/16,l[p*2+1]=b%16}return l[h-1]=16,l};e.bytesToNibbles=s;const u=f=>{if(f.length===0)return f;let h=(0,e.bytesToNibbles)(f);h[0]<2&&(h=h.subarray(0,h.length-1));const l=2-(h[0]&1);return h.subarray(l)};e.compactBytesToNibbles=u})(x0);var of={};Object.defineProperty(of,"__esModule",{value:!0});of.AsyncEventEmitter=void 0;const VP=W.eventsExports;async function zP(e,t,r){let o;for await(const s of t)try{s.length<2?s.call(e,r):await new Promise((u,f)=>{s.call(e,r,h=>{h?f(h):u()})})}catch(u){o=u}if(o)throw o}class KP extends VP.EventEmitter{emit(t,...r){let[o,s]=r;const u=this;let f=u._events[t]??[];return s===void 0&&typeof o=="function"&&(s=o,o=void 0),(t==="newListener"||t==="removeListener")&&(o={event:o,fn:s},s=void 0),f=Array.isArray(f)?f:[f],zP(u,f.slice(),o).then(s).catch(s),u.listenerCount(t)>0}once(t,r){const o=this;let s;if(typeof r!="function")throw new TypeError("listener must be a function");return r.length>=2?s=function(u,f){o.removeListener(t,s),r(u,f)}:s=function(u){o.removeListener(t,s),r(u,s)},o.on(t,s),o}first(t,r){let o=this._events[t]??[];if(typeof r!="function")throw new TypeError("listener must be a function");return Array.isArray(o)||(this._events[t]=o=[o]),o.unshift(r),this}before(t,r,o){return this.beforeOrAfter(t,r,o)}after(t,r,o){return this.beforeOrAfter(t,r,o,"after")}beforeOrAfter(t,r,o,s){let u=this._events[t]??[],f,h;const l=s==="after"?1:0;if(typeof o!="function")throw new TypeError("listener must be a function");if(typeof r!="function")throw new TypeError("target must be a function");for(Array.isArray(u)||(this._events[t]=u=[u]),h=u.length,f=u.length;f--;)if(u[f]===r){h=f+l;break}return u.splice(h,0,o),this}on(t,r){return super.on(t,r)}addListener(t,r){return super.addListener(t,r)}prependListener(t,r){return super.prependListener(t,r)}prependOnceListener(t,r){return super.prependOnceListener(t,r)}removeAllListeners(t){return super.removeAllListeners(t)}removeListener(t,r){return super.removeListener(t,r)}eventNames(){return super.eventNames()}listeners(t){return super.listeners(t)}listenerCount(t){return super.listenerCount(t)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(t){return super.setMaxListeners(t)}}of.AsyncEventEmitter=KP;var sf={};Object.defineProperty(sf,"__esModule",{value:!0});sf.Lock=void 0;class JP{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise(t=>this.promiseResolverQueue.push(t))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(this.permits===1&&this.promiseResolverQueue.length>0){this.permits-=1;const t=this.promiseResolverQueue.shift();t&&t(!0)}}}sf.Lock=JP;var Mo={},Gi={};Object.defineProperty(Gi,"__esModule",{value:!0});Gi.InvalidStatusCodeError=Gi.InvalidCertError=void 0;const D0=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class jc extends Error{constructor(t,r){super(t),this.fingerprint256=r}}Gi.InvalidCertError=jc;class Ld extends Error{constructor(t){super(`Request Failed. Status Code: ${t}`),this.statusCode=t}}Gi.InvalidStatusCodeError=Ld;function j0(e,t){if(!t||t==="text"||t==="json")try{let r=new TextDecoder("utf8",{fatal:!0}).decode(e);if(t==="text")return r;try{return JSON.parse(r)}catch(o){if(t==="json")throw o;return r}}catch(r){if(t==="text"||t==="json")throw r}return e}let _b={};function Uc(e,t){var I;let r={...D0,...t};const o=ds.streamHttp,s=ds.httpsBrowserifyExports,u=ds.lib,{promisify:f}=ds.util,{resolve:h}=ds.urlExports,l=!!/^https/.test(e);let p={method:r.method||"GET",headers:{"Accept-Encoding":"gzip, deflate, br"}};const b=A=>A.replace(/:| /g,"").toLowerCase();if(r.keepAlive){const A={keepAlive:!0,keepAliveMsecs:3e4,maxFreeSockets:1024,maxCachedSessions:1024},x=[l,l&&((I=r.sslPinnedCertificates)==null?void 0:I.map(v=>b(v)).sort())].join();p.agent=_b[x]||(_b[x]=new(l?s:o).Agent(A))}r.type==="json"&&(p.headers["Content-Type"]="application/json"),r.data&&(r.method||(p.method="POST"),p.body=r.type==="json"?JSON.stringify(r.data):r.data),p.headers={...p.headers,...r.headers},r.sslAllowSelfSigned&&(p.rejectUnauthorized=!1);const w=async A=>{const x=A.statusCode;if(r.redirect&&300<=x&&x<400&&A.headers.location){if(r._redirectCount==10)throw new Error("Request failed. Too much redirects.");return r._redirectCount+=1,await Uc(h(e,A.headers.location),r)}if(r.expectStatusCode&&x!==r.expectStatusCode)throw A.resume(),new Ld(x);let v=[];for await(const S of A)v.push(S);let C=W.dist.Buffer.concat(v);const B=A.headers["content-encoding"];B==="br"&&(C=await f(u.brotliDecompress)(C)),(B==="gzip"||B==="deflate")&&(C=await f(u.unzip)(C));const P=j0(C,r.type);return r.full?{headers:A.headers,status:x,body:P}:P};return new Promise((A,x)=>{var S;const v=async m=>{if(m&&m.code==="DEPTH_ZERO_SELF_SIGNED_CERT")try{await Uc(e,{...r,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(j){j&&j.fingerprint256&&(m=new jc(`Self-signed SSL certificate: ${j.fingerprint256}`,j.fingerprint256))}x(m)},C=(l?s:o).request(e,p,m=>{m.on("error",v),(async()=>{try{A(await w(m))}catch(j){x(j)}})()});C.on("error",v);const B=(S=r.sslPinnedCertificates)==null?void 0:S.map(m=>b(m)),P=m=>{var Q;const j=b(((Q=m.getPeerCertificate())==null?void 0:Q.fingerprint256)||"");if(!(!j&&m.isSessionReused())&&!B.includes(j))return C.emit("error",new jc(`Invalid SSL certificate: ${j} Expected: ${B}`,j)),C.abort()};r.sslPinnedCertificates&&C.on("socket",m=>{m.listeners("secureConnect").map(Q=>(Q.name||"").replace("bound ","")).includes("mfetchSecureConnect")||m.on("secureConnect",P.bind(null,m))}),r.keepAlive&&C.setNoDelay(!0),p.body&&C.write(p.body),C.end()})}const YP=new Set(["Accept","Accept-Language","Content-Language","Content-Type"].map(e=>e.toLowerCase())),XP=new Set(["Accept-Charset","Accept-Encoding","Access-Control-Request-Headers","Access-Control-Request-Method","Connection","Content-Length","Cookie","Cookie2","Date","DNT","Expect","Host","Keep-Alive","Origin","Referer","TE","Trailer","Transfer-Encoding","Upgrade","Via"].map(e=>e.toLowerCase()));async function ZP(e,t){let r={...D0,...t};const o=new Headers;r.type==="json"&&o.set("Content-Type","application/json");let s=new URL(e);if(s.username){const l=btoa(`${s.username}:${s.password}`);o.set("Authorization",`Basic ${l}`),s.username="",s.password=""}e=""+s;for(let l in r.headers){const p=l.toLowerCase();(YP.has(p)||r.cors&&!XP.has(p))&&o.set(l,r.headers[l])}let u={headers:o,redirect:r.redirect?"follow":"manual"};r.referrer||(u.referrerPolicy="no-referrer"),r.cors&&(u.mode="cors"),r.data&&(r.method||(u.method="POST"),u.body=r.type==="json"?JSON.stringify(r.data):r.data);const f=await fetch(e,u);if(r.expectStatusCode&&f.status!==r.expectStatusCode)throw new Ld(f.status);const h=j0(new Uint8Array(await f.arrayBuffer()),r.type);return r.full?{headers:Object.fromEntries(f.headers.entries()),status:f.status,body:h}:h}const QP=!!(typeof W.dist.process=="object"&&W.dist.process.versions&&W.dist.process.versions.node&&W.dist.process.versions.v8);function eB(e,t){return(QP?Uc:ZP)(e,t)}Gi.default=eB;Object.defineProperty(Mo,"__esModule",{value:!0});Mo.getProvider=Mo.fetchFromProvider=void 0;const tB=Gi,rB=async(e,t)=>(await(0,tB.default)(e,{headers:{"content-type":"application/json"},type:"json",data:{method:t.method,params:t.params,jsonrpc:"2.0",id:1}})).result;Mo.fetchFromProvider=rB;const nB=e=>{var t;if(typeof e=="string")return e;if(((t=e==null?void 0:e.connection)==null?void 0:t.url)!==void 0)return e.connection.url;throw new Error("Must provide valid provider URL or Web3Provider")};Mo.getProvider=nB;(function(e){var t=W.commonjsGlobal&&W.commonjsGlobal.__createBinding||(Object.create?function(s,u,f,h){h===void 0&&(h=f);var l=Object.getOwnPropertyDescriptor(u,f);(!l||("get"in l?!u.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return u[f]}}),Object.defineProperty(s,h,l)}:function(s,u,f,h){h===void 0&&(h=f),s[h]=u[f]}),r=W.commonjsGlobal&&W.commonjsGlobal.__exportStar||function(s,u){for(var f in s)f!=="default"&&!Object.prototype.hasOwnProperty.call(u,f)&&t(u,s,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.toAscii=e.stripHexPrefix=e.padToEven=e.isHexString=e.isHexPrefixed=e.getKeys=e.getBinarySize=e.fromUtf8=e.fromAscii=e.arrayContainsArray=void 0,r(qu,e),r(Qu,e),r(Td,e),r(qs,e),r(tf,e),r(Qt,e),r(Qi,e),r(Cd,e),r(x0,e),r(of,e);var o=ht;Object.defineProperty(e,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(e,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(e,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(e,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(e,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(e,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(e,"isHexString",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(e,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(e,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(e,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),r(sf,e),r(Mo,e)})(wL);var U0={exports:{}};(function(e){(function(t,r){e.exports?e.exports=r():t.log=r()})(W.commonjsGlobal,function(){var t=function(){},r="undefined",o=typeof window!==r&&typeof window.navigator!==r&&/Trident\/|MSIE /.test(window.navigator.userAgent),s=["trace","debug","info","warn","error"],u={},f=null;function h(v,C){var B=v[C];if(typeof B.bind=="function")return B.bind(v);try{return Function.prototype.bind.call(B,v)}catch{return function(){return Function.prototype.apply.apply(B,[v,arguments])}}}function l(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function p(v){return v==="debug"&&(v="log"),typeof console===r?!1:v==="trace"&&o?l:console[v]!==void 0?h(console,v):console.log!==void 0?h(console,"log"):t}function b(){for(var v=this.getLevel(),C=0;C<s.length;C++){var B=s[C];this[B]=C<v?t:this.methodFactory(B,v,this.name)}if(this.log=this.debug,typeof console===r&&v<this.levels.SILENT)return"No console available for logging"}function w(v){return function(){typeof console!==r&&(b.call(this),this[v].apply(this,arguments))}}function I(v,C,B){return p(v)||w.apply(this,arguments)}function A(v,C){var B=this,P,S,m,j="loglevel";typeof v=="string"?j+=":"+v:typeof v=="symbol"&&(j=void 0);function Q(me){var F=(s[me]||"silent").toUpperCase();if(!(typeof window===r||!j)){try{window.localStorage[j]=F;return}catch{}try{window.document.cookie=encodeURIComponent(j)+"="+F+";"}catch{}}}function ce(){var me;if(!(typeof window===r||!j)){try{me=window.localStorage[j]}catch{}if(typeof me===r)try{var F=window.document.cookie,U=encodeURIComponent(j),$=F.indexOf(U+"=");$!==-1&&(me=/^([^;]+)/.exec(F.slice($+U.length+1))[1])}catch{}return B.levels[me]===void 0&&(me=void 0),me}}function ue(){if(!(typeof window===r||!j)){try{window.localStorage.removeItem(j)}catch{}try{window.document.cookie=encodeURIComponent(j)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function te(me){var F=me;if(typeof F=="string"&&B.levels[F.toUpperCase()]!==void 0&&(F=B.levels[F.toUpperCase()]),typeof F=="number"&&F>=0&&F<=B.levels.SILENT)return F;throw new TypeError("log.setLevel() called with invalid level: "+me)}B.name=v,B.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},B.methodFactory=C||I,B.getLevel=function(){return m??S??P},B.setLevel=function(me,F){return m=te(me),F!==!1&&Q(m),b.call(B)},B.setDefaultLevel=function(me){S=te(me),ce()||B.setLevel(me,!1)},B.resetLevel=function(){m=null,ue(),b.call(B)},B.enableAll=function(me){B.setLevel(B.levels.TRACE,me)},B.disableAll=function(me){B.setLevel(B.levels.SILENT,me)},B.rebuild=function(){if(f!==B&&(P=te(f.getLevel())),b.call(B),f===B)for(var me in u)u[me].rebuild()},P=te(f?f.getLevel():"WARN");var Se=ce();Se!=null&&(m=te(Se)),b.call(B)}f=new A,f.getLogger=function(C){if(typeof C!="symbol"&&typeof C!="string"||C==="")throw new TypeError("You must supply a name when creating a logger.");var B=u[C];return B||(B=u[C]=new A(C,f.methodFactory)),B};var x=typeof window!==r?window.log:void 0;return f.noConflict=function(){return typeof window!==r&&window.log===f&&(window.log=x),f},f.getLoggers=function(){return u},f.default=f,f})})(U0);var k0=U0.exports;const Eu=W.getDefaultExportFromCjs(k0);var vu={exports:{}};vu.exports;(function(e,t){var r=200,o="__lodash_hash_undefined__",s=800,u=16,f=9007199254740991,h="[object Arguments]",l="[object Array]",p="[object AsyncFunction]",b="[object Boolean]",w="[object Date]",I="[object Error]",A="[object Function]",x="[object GeneratorFunction]",v="[object Map]",C="[object Number]",B="[object Null]",P="[object Object]",S="[object Proxy]",m="[object RegExp]",j="[object Set]",Q="[object String]",ce="[object Undefined]",ue="[object WeakMap]",te="[object ArrayBuffer]",Se="[object DataView]",me="[object Float32Array]",F="[object Float64Array]",U="[object Int8Array]",$="[object Int16Array]",G="[object Int32Array]",Y="[object Uint8Array]",V="[object Uint8ClampedArray]",ne="[object Uint16Array]",H="[object Uint32Array]",K=/[\\^$.*+?()[\]{}|]/g,ae=/^\[object .+?Constructor\]$/,de=/^(?:0|[1-9]\d*)$/,re={};re[me]=re[F]=re[U]=re[$]=re[G]=re[Y]=re[V]=re[ne]=re[H]=!0,re[h]=re[l]=re[te]=re[b]=re[Se]=re[w]=re[I]=re[A]=re[v]=re[C]=re[P]=re[m]=re[j]=re[Q]=re[ue]=!1;var _e=typeof W.commonjsGlobal=="object"&&W.commonjsGlobal&&W.commonjsGlobal.Object===Object&&W.commonjsGlobal,be=typeof self=="object"&&self&&self.Object===Object&&self,R=_e||be||Function("return this")(),O=t&&!t.nodeType&&t,q=O&&!0&&e&&!e.nodeType&&e,oe=q&&q.exports===O,ye=oe&&_e.process,d=function(){try{var M=q&&q.require&&q.require("util").types;return M||ye&&ye.binding&&ye.binding("util")}catch{}}(),g=d&&d.isTypedArray;function _(M,X,le){switch(le.length){case 0:return M.call(X);case 1:return M.call(X,le[0]);case 2:return M.call(X,le[0],le[1]);case 3:return M.call(X,le[0],le[1],le[2])}return M.apply(X,le)}function E(M,X){for(var le=-1,Le=Array(M);++le<M;)Le[le]=X(le);return Le}function J(M){return function(X){return M(X)}}function ie(M,X){return M==null?void 0:M[X]}function se(M,X){return function(le){return M(X(le))}}var Ie=Array.prototype,Be=Function.prototype,Ce=Object.prototype,Ue=R["__core-js_shared__"],Re=Be.toString,He=Ce.hasOwnProperty,bt=function(){var M=/[^.]+$/.exec(Ue&&Ue.keys&&Ue.keys.IE_PROTO||"");return M?"Symbol(src)_1."+M:""}(),et=Ce.toString,_t=Re.call(Object),Ye=RegExp("^"+Re.call(He).replace(K,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=oe?R.Buffer:void 0,Dt=R.Symbol,Lt=R.Uint8Array;Ve&&Ve.allocUnsafe;var at=se(Object.getPrototypeOf,Object),Bt=Object.create,fr=Ce.propertyIsEnumerable,er=Ie.splice,kt=Dt?Dt.toStringTag:void 0,lr=function(){try{var M=Wo(Object,"defineProperty");return M({},"",{}),M}catch{}}(),zr=Ve?Ve.isBuffer:void 0,Kr=Math.max,sn=Date.now,an=Wo(R,"Map"),tr=Wo(Object,"create"),Or=function(){function M(){}return function(X){if(!Nn(X))return{};if(Bt)return Bt(X);M.prototype=X;var le=new M;return M.prototype=void 0,le}}();function rr(M){var X=-1,le=M==null?0:M.length;for(this.clear();++X<le;){var Le=M[X];this.set(Le[0],Le[1])}}function Ln(){this.__data__=tr?tr(null):{},this.size=0}function Jr(M){var X=this.has(M)&&delete this.__data__[M];return this.size-=X?1:0,X}function un(M){var X=this.__data__;if(tr){var le=X[M];return le===o?void 0:le}return He.call(X,M)?X[M]:void 0}function N(M){var X=this.__data__;return tr?X[M]!==void 0:He.call(X,M)}function D(M,X){var le=this.__data__;return this.size+=this.has(M)?0:1,le[M]=tr&&X===void 0?o:X,this}rr.prototype.clear=Ln,rr.prototype.delete=Jr,rr.prototype.get=un,rr.prototype.has=N,rr.prototype.set=D;function Ee(M){var X=-1,le=M==null?0:M.length;for(this.clear();++X<le;){var Le=M[X];this.set(Le[0],Le[1])}}function ve(){this.__data__=[],this.size=0}function Te(M){var X=this.__data__,le=gn(X,M);if(le<0)return!1;var Le=X.length-1;return le==Le?X.pop():er.call(X,le,1),--this.size,!0}function yt(M){var X=this.__data__,le=gn(X,M);return le<0?void 0:X[le][1]}function St(M){return gn(this.__data__,M)>-1}function fn(M,X){var le=this.__data__,Le=gn(le,M);return Le<0?(++this.size,le.push([M,X])):le[Le][1]=X,this}Ee.prototype.clear=ve,Ee.prototype.delete=Te,Ee.prototype.get=yt,Ee.prototype.has=St,Ee.prototype.set=fn;function Pt(M){var X=-1,le=M==null?0:M.length;for(this.clear();++X<le;){var Le=M[X];this.set(Le[0],Le[1])}}function ln(){this.size=0,this.__data__={hash:new rr,map:new(an||Ee),string:new rr}}function Pn(M){var X=Ci(this,M).delete(M);return this.size-=X?1:0,X}function cn(M){return Ci(this,M).get(M)}function dn(M){return Ci(this,M).has(M)}function Yr(M,X){var le=Ci(this,M),Le=le.size;return le.set(M,X),this.size+=le.size==Le?0:1,this}Pt.prototype.clear=ln,Pt.prototype.delete=Pn,Pt.prototype.get=cn,Pt.prototype.has=dn,Pt.prototype.set=Yr;function Gt(M){var X=this.__data__=new Ee(M);this.size=X.size}function Cr(){this.__data__=new Ee,this.size=0}function yr(M){var X=this.__data__,le=X.delete(M);return this.size=X.size,le}function nr(M){return this.__data__.get(M)}function Ft(M){return this.__data__.has(M)}function Ti(M,X){var le=this.__data__;if(le instanceof Ee){var Le=le.__data__;if(!an||Le.length<r-1)return Le.push([M,X]),this.size=++le.size,this;le=this.__data__=new Pt(Le)}return le.set(M,X),this.size=le.size,this}Gt.prototype.clear=Cr,Gt.prototype.delete=yr,Gt.prototype.get=nr,Gt.prototype.has=Ft,Gt.prototype.set=Ti;function Ii(M,X){var le=zo(M),Le=!le&&Vo(M),Ke=!le&&!Le&&sa(M),tt=!le&&!Le&&!Ke&&ua(M),ct=le||Le||Ke||tt,De=ct?E(M.length,String):[],st=De.length;for(var Nt in M)ct&&(Nt=="length"||Ke&&(Nt=="offset"||Nt=="parent")||tt&&(Nt=="buffer"||Nt=="byteLength"||Nt=="byteOffset")||ro(Nt,st))||De.push(Nt);return De}function Bn(M,X,le){(le!==void 0&&!Li(M[X],le)||le===void 0&&!(X in M))&&Lr(M,X,le)}function hn(M,X,le){var Le=M[X];(!(He.call(M,X)&&Li(Le,le))||le===void 0&&!(X in M))&&Lr(M,X,le)}function gn(M,X){for(var le=M.length;le--;)if(Li(M[le][0],X))return le;return-1}function Lr(M,X,le){X=="__proto__"&&lr?lr(M,X,{configurable:!0,enumerable:!0,value:le,writable:!0}):M[X]=le}var Oi=to();function pn(M){return M==null?M===void 0?ce:B:kt&&kt in Object(M)?Xs(M):ea(M)}function ti(M){return $n(M)&&pn(M)==h}function ri(M){if(!Nn(M)||qo(M))return!1;var X=Jo(M)?Ye:ae;return X.test(ia(M))}function ni(M){return $n(M)&&aa(M.length)&&!!re[pn(M)]}function ii(M){if(!Nn(M))return oi(M);var X=no(M),le=[];for(var Le in M)Le=="constructor"&&(X||!He.call(M,Le))||le.push(Le);return le}function Vs(M,X,le,Le,Ke){M!==X&&Oi(X,function(tt,ct){if(Ke||(Ke=new Gt),Nn(tt))df(M,X,ct,le,Vs,Le,Ke);else{var De=Le?Le(Go(M,ct),tt,ct+"",M,X,Ke):void 0;De===void 0&&(De=tt),Bn(M,ct,De)}},fa)}function df(M,X,le,Le,Ke,tt,ct){var De=Go(M,le),st=Go(X,le),Nt=ct.get(st);if(Nt){Bn(M,le,Nt);return}var Vt=tt?tt(De,st,le+"",M,X,ct):void 0,Mn=Vt===void 0;if(Mn){var zt=zo(st),io=!zt&&sa(st),Yo=!zt&&!io&&ua(st);Vt=st,zt||io||Yo?zo(De)?Vt=De:oa(De)?Vt=Ho(De):io?(Mn=!1,Vt=zs(st)):Yo?(Mn=!1,Vt=Js(st)):Vt=[]:_f(st)||Vo(st)?(Vt=De,Vo(De)?Vt=yf(De):(!Nn(De)||Jo(De))&&(Vt=Zs(st))):Mn=!1}Mn&&(ct.set(st,Vt),Ke(Vt,st,Le,tt,ct),ct.delete(st)),Bn(M,le,Vt)}function hf(M,X){return ra(ta(M,X,nt),M+"")}var gf=lr?function(M,X){return lr(M,"toString",{configurable:!0,enumerable:!1,value:ut(X),writable:!0})}:nt;function zs(M,X){return M.slice()}function Ks(M){var X=new M.constructor(M.byteLength);return new Lt(X).set(new Lt(M)),X}function Js(M,X){var le=Ks(M.buffer);return new M.constructor(le,M.byteOffset,M.length)}function Ho(M,X){var le=-1,Le=M.length;for(X||(X=Array(Le));++le<Le;)X[le]=M[le];return X}function pf(M,X,le,Le){var Ke=!le;le||(le={});for(var tt=-1,ct=X.length;++tt<ct;){var De=X[tt],st=void 0;st===void 0&&(st=M[De]),Ke?Lr(le,De,st):hn(le,De,st)}return le}function Ys(M){return hf(function(X,le){var Le=-1,Ke=le.length,tt=Ke>1?le[Ke-1]:void 0,ct=Ke>2?le[2]:void 0;for(tt=M.length>3&&typeof tt=="function"?(Ke--,tt):void 0,ct&&bf(le[0],le[1],ct)&&(tt=Ke<3?void 0:tt,Ke=1),X=Object(X);++Le<Ke;){var De=le[Le];De&&M(X,De,Le,tt)}return X})}function to(M){return function(X,le,Le){for(var Ke=-1,tt=Object(X),ct=Le(X),De=ct.length;De--;){var st=ct[++Ke];if(le(tt[st],st,tt)===!1)break}return X}}function Ci(M,X){var le=M.__data__;return Qs(X)?le[typeof X=="string"?"string":"hash"]:le.map}function Wo(M,X){var le=ie(M,X);return ri(le)?le:void 0}function Xs(M){var X=He.call(M,kt),le=M[kt];try{M[kt]=void 0;var Le=!0}catch{}var Ke=et.call(M);return Le&&(X?M[kt]=le:delete M[kt]),Ke}function Zs(M){return typeof M.constructor=="function"&&!no(M)?Or(at(M)):{}}function ro(M,X){var le=typeof M;return X=X??f,!!X&&(le=="number"||le!="symbol"&&de.test(M))&&M>-1&&M%1==0&&M<X}function bf(M,X,le){if(!Nn(le))return!1;var Le=typeof X;return(Le=="number"?Ko(le)&&ro(X,le.length):Le=="string"&&X in le)?Li(le[X],M):!1}function Qs(M){var X=typeof M;return X=="string"||X=="number"||X=="symbol"||X=="boolean"?M!=="__proto__":M===null}function qo(M){return!!bt&&bt in M}function no(M){var X=M&&M.constructor,le=typeof X=="function"&&X.prototype||Ce;return M===le}function oi(M){var X=[];if(M!=null)for(var le in Object(M))X.push(le);return X}function ea(M){return et.call(M)}function ta(M,X,le){return X=Kr(X===void 0?M.length-1:X,0),function(){for(var Le=arguments,Ke=-1,tt=Kr(Le.length-X,0),ct=Array(tt);++Ke<tt;)ct[Ke]=Le[X+Ke];Ke=-1;for(var De=Array(X+1);++Ke<X;)De[Ke]=Le[Ke];return De[X]=le(ct),_(M,this,De)}}function Go(M,X){if(!(X==="constructor"&&typeof M[X]=="function")&&X!="__proto__")return M[X]}var ra=na(gf);function na(M){var X=0,le=0;return function(){var Le=sn(),Ke=u-(Le-le);if(le=Le,Ke>0){if(++X>=s)return arguments[0]}else X=0;return M.apply(void 0,arguments)}}function ia(M){if(M!=null){try{return Re.call(M)}catch{}try{return M+""}catch{}}return""}function Li(M,X){return M===X||M!==M&&X!==X}var Vo=ti(function(){return arguments}())?ti:function(M){return $n(M)&&He.call(M,"callee")&&!fr.call(M,"callee")},zo=Array.isArray;function Ko(M){return M!=null&&aa(M.length)&&!Jo(M)}function oa(M){return $n(M)&&Ko(M)}var sa=zr||mf;function Jo(M){if(!Nn(M))return!1;var X=pn(M);return X==A||X==x||X==p||X==S}function aa(M){return typeof M=="number"&&M>-1&&M%1==0&&M<=f}function Nn(M){var X=typeof M;return M!=null&&(X=="object"||X=="function")}function $n(M){return M!=null&&typeof M=="object"}function _f(M){if(!$n(M)||pn(M)!=P)return!1;var X=at(M);if(X===null)return!0;var le=He.call(X,"constructor")&&X.constructor;return typeof le=="function"&&le instanceof le&&Re.call(le)==_t}var ua=g?J(g):ni;function yf(M){return pf(M,fa(M))}function fa(M){return Ko(M)?Ii(M):ii(M)}var wf=Ys(function(M,X,le){Vs(M,X,le)});function ut(M){return function(){return M}}function nt(M){return M}function mf(){return!1}e.exports=wf})(vu,vu.exports);vu.exports;const iB=Eu.getLogger("http-helpers");iB.setLevel(k0.levels.INFO);var Su={exports:{}};/**
|
|
4
4
|
* @license
|