@wormhole-foundation/wormhole-connect 2.4.0-beta.2-development → 2.4.0-beta.3-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.
Files changed (109) hide show
  1. package/dist/assets/{aptos-C2a0dQjT.js → aptos-BaxuZv2A.js} +2 -2
  2. package/dist/assets/{ccip-OC0Vc4gm.js → ccip-Br2IvhSW.js} +1 -1
  3. package/dist/assets/{evm-BqmuByVY.js → evm-CEkHuuN5.js} +3 -3
  4. package/dist/assets/{evm-DVLSeRFU.js → evm-DajrgWJp.js} +2 -2
  5. package/dist/assets/{index-BeEE7MyN.js → index-B8SSPOGN.js} +1 -1
  6. package/dist/assets/{index-CODUkWzQ.js → index-BGgxsbk4.js} +1 -1
  7. package/dist/assets/{index-iO-U9jSW.js → index-BIKKjy76.js} +2 -2
  8. package/dist/assets/{index-CB3XpWtg.js → index-BWKZaYh0.js} +1 -1
  9. package/dist/assets/{index-CvqWMPrS.js → index-BxMnYxyf.js} +1 -1
  10. package/dist/assets/{index-PnI0Le4b.js → index-CIIbEJG8.js} +1 -1
  11. package/dist/assets/{index-BIdhtTCf.js → index-D1RqQWR4.js} +1 -1
  12. package/dist/assets/{index-BVlgnsQb.js → index-DVzhMXXA.js} +1 -1
  13. package/dist/assets/{index-COKaKwn8.js → index-DnDUIJZk.js} +1 -1
  14. package/dist/assets/{index-Dcsj5S2N.js → index-DwbsyLxo.js} +1 -1
  15. package/dist/assets/index-GDpnrg5w.js +1 -0
  16. package/dist/assets/{index-M4NDMEge.js → index-ICy6eYwP.js} +1 -1
  17. package/dist/assets/{index-C1Dta-NJ.js → index-Zgbd9ue1.js} +1 -1
  18. package/dist/assets/{index-BZDxvV4g.js → index-ndTMsj-g.js} +1 -1
  19. package/dist/assets/{index-CBMmMx3W.js → index-ylKZk0sO.js} +1 -1
  20. package/dist/assets/{index-C-kVvSEJ.js → index-z2SBICrL.js} +1 -1
  21. package/dist/assets/{index.es-j8vEfzbO.js → index.es-AACkekVm.js} +6 -6
  22. package/dist/assets/{solana-pOvS3swt.js → solana-Cli5bij_.js} +2 -2
  23. package/dist/assets/solana-DlYSFsGk.js +2 -0
  24. package/dist/assets/solanaEmbed.esm-P5uPPwsm.js +37 -0
  25. package/dist/assets/{sui-DZhbOaP_.js → sui-76yNbUUP.js} +2 -2
  26. package/dist/main.js +114 -114
  27. package/lib/{aptos-DnLzj1Pw.js → aptos-CSvcKEJm.js} +1 -1
  28. package/lib/{aptos-UMYBfX-e.mjs → aptos-D3RPZgif.mjs} +5 -5
  29. package/lib/{aptos-BFg97d8i.js → aptos-WpCc6eOD.js} +2 -2
  30. package/lib/{aptos-BPPKNPmY.mjs → aptos-cEXzuL5b.mjs} +2 -2
  31. package/lib/{base64-dhNbNdy2.js → base64-C73YLbqA.js} +1 -1
  32. package/lib/{base64-BxOseFtQ.mjs → base64-D3sIs-fw.mjs} +1 -1
  33. package/lib/{ccip-Cc7zIRbR.mjs → ccip-BJTawxQ_.mjs} +1 -1
  34. package/lib/{ccip-DnuA-mnD.js → ccip-CaksatNz.js} +1 -1
  35. package/lib/{chunk-IMTC3J2M-DmAiw2IO.js → chunk-IMTC3J2M-DKXvnM6O.js} +1 -1
  36. package/lib/{chunk-IMTC3J2M-C3XVaTOx.mjs → chunk-IMTC3J2M-Dsnj4Vih.mjs} +3 -3
  37. package/lib/{evm-2u0XA9Kv.mjs → evm-Bs0OjXvE.mjs} +5 -5
  38. package/lib/{evm-DBg_gIux.js → evm-DNBYBo_p.js} +1 -1
  39. package/lib/{evm-BPMdXFY7.mjs → evm-D_aPV3AL.mjs} +6 -6
  40. package/lib/{evm-jazxlq_v.js → evm-Wv2nh7z1.js} +3 -3
  41. package/lib/{index-BEqeue2k.js → index--95bwciz.js} +1 -1
  42. package/lib/{index-DYo59dOt.mjs → index-9pPnVz73.mjs} +2 -2
  43. package/lib/{index-DrYmbAqE.mjs → index-B2VBT3u7.mjs} +2 -2
  44. package/lib/{index-CvO9BKU8.js → index-BCrWCNUq.js} +1 -1
  45. package/lib/{index-B9gGuUKR.js → index-BH-EfOl1.js} +1 -1
  46. package/lib/{index-_Tjd635F.js → index-BZpnoMd1.js} +1 -1
  47. package/lib/{index-DpL4G1gV.js → index-BeGnKztN.js} +1 -1
  48. package/lib/{index-cibSzunr.mjs → index-BpKxYGa-.mjs} +2 -2
  49. package/lib/{index-C_8uENxB.js → index-BrFIzqtL.js} +1 -1
  50. package/lib/{index-CLSG0-PT.mjs → index-BtA_-iXv.mjs} +2 -2
  51. package/lib/{index-BZO8YmLX.js → index-BvdMRpl6.js} +1 -1
  52. package/lib/{index-BH5x8knT.mjs → index-Bx5QNYj7.mjs} +1 -1
  53. package/lib/{index-BZijFWem.js → index-Bzn58Yhp.js} +1 -1
  54. package/lib/{index-C7jR2tws.js → index-C5rfYL4K.js} +1 -1
  55. package/lib/{index-DSVsrZrI.js → index-C6Hp_1yF.js} +1 -1
  56. package/lib/{index-geFlOFCr.js → index-CMw2Uill.js} +1 -1
  57. package/lib/{index-CLqF0DXs.mjs → index-COqO8I1C.mjs} +1 -1
  58. package/lib/{index-ndWybTXw.mjs → index-CUMRJ8yy.mjs} +10142 -9468
  59. package/lib/{index-B71D5i2u.js → index-CUSJAO56.js} +1 -1
  60. package/lib/{index-Ce7gKFw8.js → index-Cb51fnZM.js} +1 -1
  61. package/lib/{index-BH-QrHNF.mjs → index-CcEA2K6Q.mjs} +1 -1
  62. package/lib/{index-D6PJJHPq.mjs → index-Ci0LEPmE.mjs} +2 -2
  63. package/lib/{index-gsKAo8iZ.js → index-CjgM-0OC.js} +1 -1
  64. package/lib/{index-C0mg2EaP.js → index-Cvtp4dgE.js} +120 -120
  65. package/lib/{index-DxHy5H3l.mjs → index-D0NbpzAg.mjs} +1 -1
  66. package/lib/{index-DBF3Orza.mjs → index-D19OP8Mu.mjs} +2 -2
  67. package/lib/{index-CwnW1iXz.js → index-D7f2-3wk.js} +1 -1
  68. package/lib/{index-BudY-hBZ.js → index-DCRe22Ms.js} +1 -1
  69. package/lib/{index-INXKBIVC.mjs → index-DGGMUOzp.mjs} +3 -3
  70. package/lib/{index-BhZP5awL.js → index-DIqG9W_r.js} +1 -1
  71. package/lib/{index-DqPgH3Y4.js → index-DLeUCqIq.js} +1 -1
  72. package/lib/{index-CyPQH2yv.js → index-DNBuc7tl.js} +1 -1
  73. package/lib/{index-C2ecpt8K.mjs → index-DRMwoM8a.mjs} +4 -4
  74. package/lib/{index-B6Sz2PUf.mjs → index-DRYbBPuh.mjs} +2 -2
  75. package/lib/{index-Dw6DmujE.mjs → index-DS_rORqD.mjs} +1 -1
  76. package/lib/{index-DbgMQX1m.mjs → index-DYrT7_2n.mjs} +1 -1
  77. package/lib/{index-C7SwBJ74.mjs → index-DfPjBy3w.mjs} +1 -1
  78. package/lib/{index-BbuYs0Vv.mjs → index-DqRhhSXa.mjs} +2 -2
  79. package/lib/{index-CVVdam36.mjs → index-DwhWt2Jt.mjs} +1 -1
  80. package/lib/{index-Cleh-XCA.mjs → index-KpBoUsX2.mjs} +1 -1
  81. package/lib/{index-3LktUEbt.js → index-ZK1P1tUH.js} +1 -1
  82. package/lib/{index-CrDmkPiL.mjs → index-ctEY-xjJ.mjs} +3 -3
  83. package/lib/{index-DCXyETk0.mjs → index-e3oHdOB4.mjs} +1 -1
  84. package/lib/{index-CSWNAyvZ.mjs → index-q570DLLo.mjs} +2 -2
  85. package/lib/{index-CiFOveV0.js → index-tzTI5R9c.js} +1 -1
  86. package/lib/{index-DS1ZxkfX.js → index-v-_ti7Rn.js} +1 -1
  87. package/lib/{index.es-DaqXRV0H.mjs → index.es-By1LsNow.mjs} +5 -5
  88. package/lib/{index.es-D-KoMtU-.js → index.es-Czhf3Th8.js} +2 -2
  89. package/lib/index.js +1 -1
  90. package/lib/index.mjs +1 -1
  91. package/lib/{signer-CGCrqc_x.mjs → signer-CcpDR9mm.mjs} +1 -1
  92. package/lib/{signer-Cr8jlyL3.js → signer-jV9Ixq8U.js} +1 -1
  93. package/lib/{solana-BkE0Vobm.js → solana-4YAkIi-J.js} +1 -1
  94. package/lib/{solana-YmPJnJBl.mjs → solana-Bo2aMvX4.mjs} +4 -4
  95. package/lib/solana-DA02fWu7.mjs +17 -0
  96. package/lib/solana-DVFk6Z5q.js +1 -0
  97. package/lib/{solanaEmbed.esm-QawbC8eJ.mjs → solanaEmbed.esm-4CS_00aM.mjs} +1 -1
  98. package/lib/{solanaEmbed.esm-LQoue5a0.js → solanaEmbed.esm-B-rprhcd.js} +1 -1
  99. package/lib/{sui-BwFJqgyM.mjs → sui-BGaWik82.mjs} +1 -1
  100. package/lib/{sui-DZg5qrE0.js → sui-BgD7gx67.js} +1 -1
  101. package/lib/{sui-C88m3bWr.mjs → sui-DLOfqNsy.mjs} +5 -5
  102. package/lib/{sui-CIDA-hM_.js → sui-MorjdPyy.js} +1 -1
  103. package/package.json +5 -5
  104. package/dist/assets/events-7fnqQH7x.js +0 -1
  105. package/dist/assets/index-n50xdA-U.js +0 -1
  106. package/dist/assets/solana-D-pftkkJ.js +0 -2
  107. package/dist/assets/solanaEmbed.esm-DPIgn-PE.js +0 -37
  108. package/lib/solana-Bq3a7vGW.mjs +0 -17
  109. package/lib/solana-Bw-7Gaje.js +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("./index-C0mg2EaP.js");function Rs(e){"@babel/helpers - typeof";return Rs=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},Rs(e)}function $1(e,t){if(Rs(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(Rs(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function M1(e){var t=$1(e,"string");return Rs(t)=="symbol"?t:t+""}var gc={exports:{}},Hb=H.eventsExports.EventEmitter,Sl,jg;function x1(){if(jg)return Sl;jg=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=H.bufferPolyfill,p=l.Buffer,b=H.require$$3,w=b.inspect,I=w&&w.custom||"inspect";function A(x,v,C){p.prototype.copy.call(x,v,C)}return Sl=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}(),Sl}function D1(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,H.dist.process.nextTick(pc,this,e)):H.dist.process.nextTick(pc,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?H.dist.process.nextTick(su,r):(r._writableState.errorEmitted=!0,H.dist.process.nextTick(Ug,r,u)):H.dist.process.nextTick(Ug,r,u):t?(H.dist.process.nextTick(su,r),t(u)):H.dist.process.nextTick(su,r)}),this)}function Ug(e,t){pc(e,t),su(e)}function su(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function j1(){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 pc(e,t){e.emit("error",t)}function U1(e,t){var r=e._readableState,o=e._writableState;r&&r.autoDestroy||o&&o.autoDestroy?e.destroy(t):e.emit("error",t)}var Wb={destroy:D1,undestroy:j1,errorOrDestroy:U1},Vi={};function k1(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var qb={};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){k1(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,qb[e]=s}function kg(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 F1(e,t,r){return e.substr(0,t.length)===t}function H1(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function W1(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"&&F1(t,"not ")?(o="must not be",t=t.replace(/^not /,"")):o="must be";var s;if(H1(e," argument"))s="The ".concat(e," ").concat(o," ").concat(kg(t,"type"));else{var u=W1(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(o," ").concat(kg(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=qb;var q1=Vi.codes.ERR_INVALID_OPT_VALUE;function G1(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function V1(e,t,r,o){var s=G1(t,o,r);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var u=o?r:"highWaterMark";throw new q1(u,s)}return Math.floor(s)}return e.objectMode?16:16*1024}var Gb={getHighWaterMark:V1},Rl,Fg;function Vb(){if(Fg)return Rl;Fg=1,Rl=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:H.requireBrowser()},o=Hb,s=H.bufferPolyfill.Buffer,u=(typeof H.commonjsGlobal<"u"?H.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=Wb,p=Gb,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;H.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),H.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),H.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&&W(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?(H.dist.process.nextTick(ye,oe),H.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&&W(R,q),oe?H.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 W(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,H.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?H.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)},Rl}var Al,Hg;function Oo(){if(Hg)return Al;Hg=1;var e=Object.keys||function(p){var b=[];for(var w in p)b.push(w);return b};Al=f;var t=Kb(),r=Vb();H.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||H.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)}}),Al}var Wg=Vi.codes.ERR_STREAM_PREMATURE_CLOSE;function z1(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 K1(){}function J1(e){return e.setHeader&&typeof e.abort=="function"}function zb(e,t,r){if(typeof t=="function")return zb(e,null,t);t||(t={}),r=z1(r||K1);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 Wg),r.call(e,x);if(s&&!f)return(!e._writableState||!e._writableState.ended)&&(x=new Wg),r.call(e,x)},I=function(){e.req.on("finish",h)};return J1(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 Wc=zb,Tl,qg;function Y1(){if(qg)return Tl;qg=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=Wc,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){H.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){H.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 Tl=P,Tl}var Il,Gg;function X1(){return Gg||(Gg=1,Il=function(){throw new Error("Readable.from is not available in the browser")}),Il}var Ol,Vg;function Kb(){if(Vg)return Ol;Vg=1,Ol=te;var e;te.ReadableState=ue,H.eventsExports.EventEmitter;var t=function(g,_){return g.listeners(_).length},r=Hb,o=H.bufferPolyfill.Buffer,s=(typeof H.commonjsGlobal<"u"?H.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=H.require$$3,l;h&&h.debuglog?l=h.debuglog("stream"):l=function(){};var p=x1(),b=Wb,w=Gb,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;H.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=H.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):W(d,ie)):me(d,ie,g,!1)}else E||(ie.reading=!1,W(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)),W(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=H.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,H.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 W(d,g){g.readingMore||(g.readingMore=!0,H.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!==H.dist.process.stdout&&d!==H.dist.process.stderr,ie=J?Ie:_t;E.endEmitted?H.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||H.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"&&H.dist.process.nextTick(de,this),_},te.prototype.removeAllListeners=function(d){var g=r.prototype.removeAllListeners.apply(this,arguments);return(d==="readable"||d===void 0)&&H.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,H.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=Y1()),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,H.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=X1()),m(te,d,g)});function ye(d,g){for(var _=0,E=d.length;_<E;_++)if(d[_]===g)return _;return-1}return Ol}var Jb=Jn,Su=Vi.codes,Z1=Su.ERR_METHOD_NOT_IMPLEMENTED,Q1=Su.ERR_MULTIPLE_CALLBACK,eA=Su.ERR_TRANSFORM_ALREADY_TRANSFORMING,tA=Su.ERR_TRANSFORM_WITH_LENGTH_0,Ru=Oo();H.inherits_browserExports(Jn,Ru);function rA(e,t){var r=this._transformState;r.transforming=!1;var o=r.writecb;if(o===null)return this.emit("error",new Q1);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);Ru.call(this,e),this._transformState={afterTransform:rA.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",nA)}function nA(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){zg(e,t,r)}):zg(this,null,null)}Jn.prototype.push=function(e,t){return this._transformState.needTransform=!1,Ru.prototype.push.call(this,e,t)};Jn.prototype._transform=function(e,t,r){r(new Z1("_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){Ru.prototype._destroy.call(this,e,function(r){t(r)})};function zg(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new tA;if(e._transformState.transforming)throw new eA;return e.push(null)}var iA=As,Yb=Jb;H.inherits_browserExports(As,Yb);function As(e){if(!(this instanceof As))return new As(e);Yb.call(this,e)}As.prototype._transform=function(e,t,r){r(null,e)};var Cl;function oA(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var Xb=Vi.codes,sA=Xb.ERR_MISSING_ARGS,aA=Xb.ERR_STREAM_DESTROYED;function Kg(e){if(e)throw e}function uA(e){return e.setHeader&&typeof e.abort=="function"}function fA(e,t,r,o){o=oA(o);var s=!1;e.on("close",function(){s=!0}),Cl===void 0&&(Cl=Wc),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,uA(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();o(f||new aA("pipe"))}}}function Jg(e){e()}function lA(e,t){return e.pipe(t)}function cA(e){return!e.length||typeof e[e.length-1]!="function"?Kg:e.pop()}function dA(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o=cA(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new sA("streams");var s,u=t.map(function(f,h){var l=h<t.length-1,p=h>0;return fA(f,l,p,function(b){s||(s=b),b&&u.forEach(Jg),!l&&(u.forEach(Jg),o(s))})});return t.reduce(lA)}var hA=dA;(function(e,t){t=e.exports=Kb(),t.Stream=t,t.Readable=t,t.Writable=Vb(),t.Duplex=Oo(),t.Transform=Jb,t.PassThrough=iA,t.finished=Wc,t.pipeline=hA})(gc,gc.exports);var Zb=gc.exports;const{Transform:EN}=Zb,{Transform:vN}=Zb;var Qb={};const Yg=[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];Qb.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,W=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=W<<30|ne>>>2,Ee=ne<<30|W>>>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]^=Yg[t*2],e[1]^=Yg[t*2+1]}};const cu=Qb;function Ns(){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}Ns.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};Ns.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&&(cu.p1600(this.state),this.count=0)};Ns.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<8*(this.count%4),e&128&&this.count===this.blockSize-1&&cu.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),cu.p1600(this.state),this.count=0,this.squeezing=!0};Ns.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const t=H.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&&(cu.p1600(this.state),this.count=0);return t};Ns.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 gA=pA;function pA(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 bA=H.getDefaultExportFromCjs(gA);var bc={exports:{}},Ll,Xg;function _A(){if(Xg)return Ll;Xg=1;var e=1e3,t=e*60,r=t*60,o=r*24,s=o*7,u=o*365.25;Ll=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 Ll}function yA(e){r.debug=r,r.default=r,r.coerce=l,r.disable=f,r.enable=s,r.enabled=h,r.humanize=_A(),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 wA=yA;(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 H.dist.process<"u"&&"env"in H.dist.process&&(l=H.dist.process.env.DEBUG),l}function f(){try{return localStorage}catch{}}e.exports=wA(t);const{formatters:h}=e.exports;h.j=function(l){try{return JSON.stringify(l)}catch(p){return"[UnexpectedJSONParseError]: "+p.message}}})(bc,bc.exports);var mA=bc.exports,nn={},Ei={},qc=Ts;Ts.default=Ts;Ts.stable=r_;Ts.stableStringify=r_;var du="[...]",e_="[Circular]",Wi=[],Fi=[];function t_(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Ts(e,t,r,o){typeof o>"u"&&(o=t_()),_c(e,"",0,[],void 0,0,o);var s;try{Fi.length===0?s=JSON.stringify(e,t,r):s=JSON.stringify(e,n_(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 _c(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(e_,e,t,s);return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){Ro(du,e,t,s);return}if(typeof f.edgesLimit<"u"&&r+1>f.edgesLimit){Ro(du,e,t,s);return}if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)_c(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];_c(e[p],p,h,o,e,u,f)}}o.pop()}}function EA(e,t){return e<t?-1:e>t?1:0}function r_(e,t,r,o){typeof o>"u"&&(o=t_());var s=yc(e,"",0,[],void 0,0,o)||e,u;try{Fi.length===0?u=JSON.stringify(s,t,r):u=JSON.stringify(s,n_(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 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(e_,e,t,s);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){Ro(du,e,t,s);return}if(typeof f.edgesLimit<"u"&&r+1>f.edgesLimit){Ro(du,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={},p=Object.keys(e).sort(EA);for(h=0;h<p.length;h++){var b=p[h];yc(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 n_(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 vA=H.getDefaultExportFromCjs(qc);Object.defineProperty(Ei,"__esModule",{value:!0});Ei.EthereumProviderError=Ei.EthereumRpcError=void 0;const SA=qc;class i_ 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 SA.default(this.serialize(),TA,2)}}Ei.EthereumRpcError=i_;let RA=class extends i_{constructor(t,r,o){if(!AA(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,o)}};Ei.EthereumProviderError=RA;function AA(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function TA(e,t){if(t!=="[Circular]")return t}var Gc={},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)}})(Gc);var Au={};Object.defineProperty(Au,"__esModule",{value:!0});Au.ethErrors=void 0;const Vc=Ei,o_=Gc,Yt=vi;Au.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=>ds(Yt.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>ds(Yt.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>ds(Yt.errorCodes.provider.unsupportedMethod,e),disconnected:e=>ds(Yt.errorCodes.provider.disconnected,e),chainDisconnected:e=>ds(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 Vc.EthereumProviderError(t,r,o)}}};function jr(e,t){const[r,o]=s_(t);return new Vc.EthereumRpcError(e,r||o_.getMessageFromCode(e),o)}function ds(e,t){const[r,o]=s_(t);return new Vc.EthereumProviderError(e,r||o_.getMessageFromCode(e),o)}function s_(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=Gc;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const o=Au;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=M1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var IA={exports:{}},Pl={exports:{}};let OA=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 H=require("./index-Cvtp4dgE.js");function Rs(e){"@babel/helpers - typeof";return Rs=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},Rs(e)}function $1(e,t){if(Rs(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(Rs(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function M1(e){var t=$1(e,"string");return Rs(t)=="symbol"?t:t+""}var gc={exports:{}},Hb=H.eventsExports.EventEmitter,Sl,jg;function x1(){if(jg)return Sl;jg=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=H.bufferPolyfill,p=l.Buffer,b=H.require$$3,w=b.inspect,I=w&&w.custom||"inspect";function A(x,v,C){p.prototype.copy.call(x,v,C)}return Sl=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}(),Sl}function D1(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,H.dist.process.nextTick(pc,this,e)):H.dist.process.nextTick(pc,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?H.dist.process.nextTick(su,r):(r._writableState.errorEmitted=!0,H.dist.process.nextTick(Ug,r,u)):H.dist.process.nextTick(Ug,r,u):t?(H.dist.process.nextTick(su,r),t(u)):H.dist.process.nextTick(su,r)}),this)}function Ug(e,t){pc(e,t),su(e)}function su(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function j1(){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 pc(e,t){e.emit("error",t)}function U1(e,t){var r=e._readableState,o=e._writableState;r&&r.autoDestroy||o&&o.autoDestroy?e.destroy(t):e.emit("error",t)}var Wb={destroy:D1,undestroy:j1,errorOrDestroy:U1},Vi={};function k1(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var qb={};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){k1(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,qb[e]=s}function kg(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 F1(e,t,r){return e.substr(0,t.length)===t}function H1(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function W1(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"&&F1(t,"not ")?(o="must not be",t=t.replace(/^not /,"")):o="must be";var s;if(H1(e," argument"))s="The ".concat(e," ").concat(o," ").concat(kg(t,"type"));else{var u=W1(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(o," ").concat(kg(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=qb;var q1=Vi.codes.ERR_INVALID_OPT_VALUE;function G1(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function V1(e,t,r,o){var s=G1(t,o,r);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var u=o?r:"highWaterMark";throw new q1(u,s)}return Math.floor(s)}return e.objectMode?16:16*1024}var Gb={getHighWaterMark:V1},Rl,Fg;function Vb(){if(Fg)return Rl;Fg=1,Rl=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:H.requireBrowser()},o=Hb,s=H.bufferPolyfill.Buffer,u=(typeof H.commonjsGlobal<"u"?H.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=Wb,p=Gb,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;H.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),H.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),H.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&&W(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?(H.dist.process.nextTick(ye,oe),H.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&&W(R,q),oe?H.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 W(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,H.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?H.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)},Rl}var Al,Hg;function Oo(){if(Hg)return Al;Hg=1;var e=Object.keys||function(p){var b=[];for(var w in p)b.push(w);return b};Al=f;var t=Kb(),r=Vb();H.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||H.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)}}),Al}var Wg=Vi.codes.ERR_STREAM_PREMATURE_CLOSE;function z1(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 K1(){}function J1(e){return e.setHeader&&typeof e.abort=="function"}function zb(e,t,r){if(typeof t=="function")return zb(e,null,t);t||(t={}),r=z1(r||K1);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 Wg),r.call(e,x);if(s&&!f)return(!e._writableState||!e._writableState.ended)&&(x=new Wg),r.call(e,x)},I=function(){e.req.on("finish",h)};return J1(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 Wc=zb,Tl,qg;function Y1(){if(qg)return Tl;qg=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=Wc,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){H.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){H.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 Tl=P,Tl}var Il,Gg;function X1(){return Gg||(Gg=1,Il=function(){throw new Error("Readable.from is not available in the browser")}),Il}var Ol,Vg;function Kb(){if(Vg)return Ol;Vg=1,Ol=te;var e;te.ReadableState=ue,H.eventsExports.EventEmitter;var t=function(g,_){return g.listeners(_).length},r=Hb,o=H.bufferPolyfill.Buffer,s=(typeof H.commonjsGlobal<"u"?H.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=H.require$$3,l;h&&h.debuglog?l=h.debuglog("stream"):l=function(){};var p=x1(),b=Wb,w=Gb,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;H.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=H.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):W(d,ie)):me(d,ie,g,!1)}else E||(ie.reading=!1,W(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)),W(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=H.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,H.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 W(d,g){g.readingMore||(g.readingMore=!0,H.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!==H.dist.process.stdout&&d!==H.dist.process.stderr,ie=J?Ie:_t;E.endEmitted?H.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||H.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"&&H.dist.process.nextTick(de,this),_},te.prototype.removeAllListeners=function(d){var g=r.prototype.removeAllListeners.apply(this,arguments);return(d==="readable"||d===void 0)&&H.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,H.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=Y1()),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,H.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=X1()),m(te,d,g)});function ye(d,g){for(var _=0,E=d.length;_<E;_++)if(d[_]===g)return _;return-1}return Ol}var Jb=Jn,Su=Vi.codes,Z1=Su.ERR_METHOD_NOT_IMPLEMENTED,Q1=Su.ERR_MULTIPLE_CALLBACK,eA=Su.ERR_TRANSFORM_ALREADY_TRANSFORMING,tA=Su.ERR_TRANSFORM_WITH_LENGTH_0,Ru=Oo();H.inherits_browserExports(Jn,Ru);function rA(e,t){var r=this._transformState;r.transforming=!1;var o=r.writecb;if(o===null)return this.emit("error",new Q1);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);Ru.call(this,e),this._transformState={afterTransform:rA.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",nA)}function nA(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){zg(e,t,r)}):zg(this,null,null)}Jn.prototype.push=function(e,t){return this._transformState.needTransform=!1,Ru.prototype.push.call(this,e,t)};Jn.prototype._transform=function(e,t,r){r(new Z1("_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){Ru.prototype._destroy.call(this,e,function(r){t(r)})};function zg(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new tA;if(e._transformState.transforming)throw new eA;return e.push(null)}var iA=As,Yb=Jb;H.inherits_browserExports(As,Yb);function As(e){if(!(this instanceof As))return new As(e);Yb.call(this,e)}As.prototype._transform=function(e,t,r){r(null,e)};var Cl;function oA(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var Xb=Vi.codes,sA=Xb.ERR_MISSING_ARGS,aA=Xb.ERR_STREAM_DESTROYED;function Kg(e){if(e)throw e}function uA(e){return e.setHeader&&typeof e.abort=="function"}function fA(e,t,r,o){o=oA(o);var s=!1;e.on("close",function(){s=!0}),Cl===void 0&&(Cl=Wc),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,uA(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();o(f||new aA("pipe"))}}}function Jg(e){e()}function lA(e,t){return e.pipe(t)}function cA(e){return!e.length||typeof e[e.length-1]!="function"?Kg:e.pop()}function dA(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o=cA(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new sA("streams");var s,u=t.map(function(f,h){var l=h<t.length-1,p=h>0;return fA(f,l,p,function(b){s||(s=b),b&&u.forEach(Jg),!l&&(u.forEach(Jg),o(s))})});return t.reduce(lA)}var hA=dA;(function(e,t){t=e.exports=Kb(),t.Stream=t,t.Readable=t,t.Writable=Vb(),t.Duplex=Oo(),t.Transform=Jb,t.PassThrough=iA,t.finished=Wc,t.pipeline=hA})(gc,gc.exports);var Zb=gc.exports;const{Transform:EN}=Zb,{Transform:vN}=Zb;var Qb={};const Yg=[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];Qb.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,W=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=W<<30|ne>>>2,Ee=ne<<30|W>>>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]^=Yg[t*2],e[1]^=Yg[t*2+1]}};const cu=Qb;function Ns(){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}Ns.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};Ns.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&&(cu.p1600(this.state),this.count=0)};Ns.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<8*(this.count%4),e&128&&this.count===this.blockSize-1&&cu.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),cu.p1600(this.state),this.count=0,this.squeezing=!0};Ns.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const t=H.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&&(cu.p1600(this.state),this.count=0);return t};Ns.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 gA=pA;function pA(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 bA=H.getDefaultExportFromCjs(gA);var bc={exports:{}},Ll,Xg;function _A(){if(Xg)return Ll;Xg=1;var e=1e3,t=e*60,r=t*60,o=r*24,s=o*7,u=o*365.25;Ll=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 Ll}function yA(e){r.debug=r,r.default=r,r.coerce=l,r.disable=f,r.enable=s,r.enabled=h,r.humanize=_A(),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 wA=yA;(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 H.dist.process<"u"&&"env"in H.dist.process&&(l=H.dist.process.env.DEBUG),l}function f(){try{return localStorage}catch{}}e.exports=wA(t);const{formatters:h}=e.exports;h.j=function(l){try{return JSON.stringify(l)}catch(p){return"[UnexpectedJSONParseError]: "+p.message}}})(bc,bc.exports);var mA=bc.exports,nn={},Ei={},qc=Ts;Ts.default=Ts;Ts.stable=r_;Ts.stableStringify=r_;var du="[...]",e_="[Circular]",Wi=[],Fi=[];function t_(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Ts(e,t,r,o){typeof o>"u"&&(o=t_()),_c(e,"",0,[],void 0,0,o);var s;try{Fi.length===0?s=JSON.stringify(e,t,r):s=JSON.stringify(e,n_(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 _c(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(e_,e,t,s);return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){Ro(du,e,t,s);return}if(typeof f.edgesLimit<"u"&&r+1>f.edgesLimit){Ro(du,e,t,s);return}if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)_c(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];_c(e[p],p,h,o,e,u,f)}}o.pop()}}function EA(e,t){return e<t?-1:e>t?1:0}function r_(e,t,r,o){typeof o>"u"&&(o=t_());var s=yc(e,"",0,[],void 0,0,o)||e,u;try{Fi.length===0?u=JSON.stringify(s,t,r):u=JSON.stringify(s,n_(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 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(e_,e,t,s);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){Ro(du,e,t,s);return}if(typeof f.edgesLimit<"u"&&r+1>f.edgesLimit){Ro(du,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={},p=Object.keys(e).sort(EA);for(h=0;h<p.length;h++){var b=p[h];yc(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 n_(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 vA=H.getDefaultExportFromCjs(qc);Object.defineProperty(Ei,"__esModule",{value:!0});Ei.EthereumProviderError=Ei.EthereumRpcError=void 0;const SA=qc;class i_ 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 SA.default(this.serialize(),TA,2)}}Ei.EthereumRpcError=i_;let RA=class extends i_{constructor(t,r,o){if(!AA(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,o)}};Ei.EthereumProviderError=RA;function AA(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function TA(e,t){if(t!=="[Circular]")return t}var Gc={},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)}})(Gc);var Au={};Object.defineProperty(Au,"__esModule",{value:!0});Au.ethErrors=void 0;const Vc=Ei,o_=Gc,Yt=vi;Au.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=>ds(Yt.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>ds(Yt.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>ds(Yt.errorCodes.provider.unsupportedMethod,e),disconnected:e=>ds(Yt.errorCodes.provider.disconnected,e),chainDisconnected:e=>ds(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 Vc.EthereumProviderError(t,r,o)}}};function jr(e,t){const[r,o]=s_(t);return new Vc.EthereumRpcError(e,r||o_.getMessageFromCode(e),o)}function ds(e,t){const[r,o]=s_(t);return new Vc.EthereumProviderError(e,r||o_.getMessageFromCode(e),o)}function s_(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=Gc;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const o=Au;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=M1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var IA={exports:{}},Pl={exports:{}};let OA=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:OA,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},a_={exports:{}},u_={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:CA,inspect:hu}=u_,{AggregateError:LA}=vt,PA=globalThis.AggregateError||LA,BA=Symbol("kIsNodeError"),NA=["string","function","number","object","Function","Object","boolean","bigint","symbol"],$A=/^([A-Z][a-z0-9]*)+$/,MA="__node_internal_",Tu={};function Hi(e,t){if(!e)throw new Tu.ERR_INTERNAL_ASSERTION(t)}function Zg(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 xA(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:CA(t,...r)}function qt(e,t,r){r||(r=Error);class o extends r{constructor(...u){super(xA(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[BA]=!0,Tu[e]=o}function Qg(e){const t=MA+e.name;return Object.defineProperty(e,"name",{value:t}),e}function DA(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new PA([t,e],t.message);return r.code=t.code,r}return e||t}let jA=class extends Error{constructor(t="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new Tu.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"),NA.includes(l)?s.push(l.toLowerCase()):$A.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=hu(r,{depth:-1});o+=`. Received ${l}`}}else{let l=hu(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=hu(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=Zg(String(r));else if(typeof r=="bigint"){o=String(r);const s=BigInt(2)**BigInt(32);(r>s||r<-s)&&(o=Zg(o)),o+="n"}else o=hu(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:jA,aggregateTwoErrors:Qg(DA),hideStackFrames:Qg,codes:Tu},hs={exports:{}},ep;function Is(){if(ep)return hs.exports;ep=1;const{AbortController:e,AbortSignal:t}=typeof self<"u"?self:typeof window<"u"?window:void 0;return hs.exports=e,hs.exports.AbortSignal=t,hs.exports.default=e,hs.exports}(function(e){const t=H.bufferPolyfill,{format:r,inspect:o}=u_,{codes:{ERR_INVALID_ARG_TYPE:s}}=ur,{kResistStopPropagation:u,AggregateError:f,SymbolDispose:h}=vt,l=globalThis.AbortSignal||Is().AbortSignal,p=globalThis.AbortController||Is().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:H.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")})(a_);var br=a_.exports,zc={};const{ArrayIsArray:f_,ArrayPrototypeIncludes:UA,ArrayPrototypeJoin:kA,ArrayPrototypeMap:FA,NumberIsInteger:Kc,NumberIsNaN:TN,NumberMAX_SAFE_INTEGER:HA,NumberMIN_SAFE_INTEGER:WA,NumberParseInt:IN,ObjectPrototypeHasOwnProperty:qA,RegExpPrototypeExec:ON,String:GA,StringPrototypeToUpperCase:CN,StringPrototypeTrim:LN}=vt,{hideStackFrames:qr,codes:{ERR_SOCKET_BAD_PORT:PN,ERR_INVALID_ARG_TYPE:Gr,ERR_INVALID_ARG_VALUE:l_,ERR_OUT_OF_RANGE:Co,ERR_UNKNOWN_SIGNAL:BN}}=ur,{normalizeEncoding:NN}=br,{isAsyncFunction:VA,isArrayBufferView:zA}=br.types,KA=qr((e,t,r=WA,o=HA)=>{if(typeof e!="number")throw new Gr(t,"number",e);if(!Kc(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(!Kc(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(!Kc(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(!UA(r,e)){const s="must be one of: "+kA(FA(r,u=>typeof u=="string"?`'${u}'`:GA(u)),", ");throw new l_(t,e,s)}});function JA(e,t){if(typeof e!="boolean")throw new Gr(t,"boolean",e)}function Bl(e,t,r){return e==null||!qA(e,t)?r:e[t]}const YA=qr((e,t,r=null)=>{const o=Bl(r,"allowArray",!1),s=Bl(r,"allowFunction",!1);if(!Bl(r,"nullable",!1)&&e===null||!o&&f_(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(!f_(e))throw new Gr(t,"Array",e);if(e.length<r){const o=`must be longer than ${r}`;throw new l_(t,e,o)}});qr((e,t="buffer")=>{if(!zA(e))throw new Gr(t,["Buffer","TypedArray","DataView"],e)});const XA=qr((e,t)=>{if(e!==void 0&&(e===null||typeof e!="object"||!("aborted"in e)))throw new Gr(t,"AbortSignal",e)}),ZA=qr((e,t)=>{if(typeof e!="function")throw new Gr(t,"Function",e)});qr((e,t)=>{if(typeof e!="function"||VA(e))throw new Gr(t,"Function",e)});qr((e,t)=>{if(e!==void 0)throw new Gr(t,"undefined",e)});var $s={validateBoolean:JA,validateFunction:ZA,validateInteger:KA,validateObject:YA,validateAbortSignal:XA},Jc={exports:{}};const{SymbolAsyncIterator:tp,SymbolIterator:rp,SymbolFor:zi}=vt,c_=zi("nodejs.stream.destroyed"),QA=zi("nodejs.stream.errored"),np=zi("nodejs.stream.readable"),ip=zi("nodejs.stream.writable"),eT=zi("nodejs.stream.disturbed"),tT=zi("nodejs.webstream.isClosedPromise"),rT=zi("nodejs.webstream.controllerErrorFunction");function Yc(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 Iu(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 nT(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 d_(e){return!!(e&&!Cn(e)&&typeof e.pipeThrough=="function"&&typeof e.getReader=="function"&&typeof e.cancel=="function")}function h_(e){return!!(e&&!Cn(e)&&typeof e.getWriter=="function"&&typeof e.abort=="function")}function g_(e){return!!(e&&!Cn(e)&&typeof e.readable=="object"&&typeof e.writable=="object")}function iT(e){return d_(e)||h_(e)||g_(e)}function oT(e,t){return e==null?!1:t===!0?typeof e[tp]=="function":t===!1?typeof e[rp]=="function":typeof e[tp]=="function"||typeof e[rp]=="function"}function Ou(e){if(!Cn(e))return null;const t=e._writableState,r=e._readableState,o=t||r;return!!(e.destroyed||e[c_]||o!=null&&o.destroyed)}function sT(e){if(!Iu(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 aT(e,t){if(!Iu(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 p_(e,t){if(!Yc(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 b_(e){return e&&e[np]!=null?e[np]:typeof(e==null?void 0:e.readable)!="boolean"?null:Ou(e)?!1:Yc(e)&&e.readable&&!p_(e)}function __(e){return e&&e[ip]!=null?e[ip]:typeof(e==null?void 0:e.writable)!="boolean"?null:Ou(e)?!1:Iu(e)&&e.writable&&!sT(e)}function uT(e,t){return Cn(e)?Ou(e)?!0:!((t==null?void 0:t.readable)!==!1&&b_(e)||(t==null?void 0:t.writable)!==!1&&__(e)):null}function fT(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 lT(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 cT(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"&&y_(e)?e._closed:null}function y_(e){return typeof e._closed=="boolean"&&typeof e._defaultKeepAlive=="boolean"&&typeof e._removedConnection=="boolean"&&typeof e._removedContLen=="boolean"}function dT(e){return typeof e._sent100=="boolean"&&y_(e)}function hT(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 gT(e){if(!Cn(e))return null;const t=e._writableState,r=e._readableState,o=t||r;return!o&&dT(e)||!!(o&&o.autoDestroy&&o.emitClose&&o.closed===!1)}function pT(e){var t;return!!(e&&((t=e[eT])!==null&&t!==void 0?t:e.readableDidRead||e.readableAborted))}function bT(e){var t,r,o,s,u,f,h,l,p,b;return!!(e&&((t=(r=(o=(s=(u=(f=e[QA])!==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:Ou,kIsDestroyed:c_,isDisturbed:pT,isErrored:bT,isReadable:b_,kIsClosedPromise:tT,kControllerErrorFunction:rT,isClosed:cT,isDuplexNodeStream:nT,isFinished:uT,isIterable:oT,isReadableNodeStream:Yc,isReadableStream:d_,isReadableFinished:p_,isReadableErrored:lT,isNodeStream:Cn,isWebStream:iT,isWritable:__,isWritableNodeStream:Iu,isWritableStream:h_,isWritableFinished:aT,isWritableErrored:fT,isServerRequest:hT,willEmitClose:gT,isTransformStream:g_};const _i=H.browserExports,{AbortError:w_,codes:_T}=ur,{ERR_INVALID_ARG_TYPE:yT,ERR_STREAM_PREMATURE_CLOSE:op}=_T,{kEmptyObject:wc,once:mc}=br,{validateAbortSignal:wT,validateFunction:mT,validateObject:ET,validateBoolean:vT}=$s,{Promise:ST,PromisePrototypeThen:RT,SymbolDispose:m_}=vt,{isClosed:AT,isReadable:sp,isReadableNodeStream:Nl,isReadableStream:TT,isReadableFinished:ap,isReadableErrored:up,isWritable:fp,isWritableNodeStream:lp,isWritableStream:IT,isWritableFinished:cp,isWritableErrored:dp,isNodeStream:OT,willEmitClose:CT,kIsClosedPromise:LT}=ei;let Ao;function PT(e){return e.setHeader&&typeof e.abort=="function"}const Ec=()=>{};function E_(e,t,r){var o,s;if(arguments.length===2?(r=t,t=wc):t==null?t=wc:ET(t,"options"),mT(r,"callback"),wT(t.signal,"options.signal"),r=mc(r),TT(e)||IT(e))return BT(e,t,r);if(!OT(e))throw new yT("stream",["ReadableStream","WritableStream","Stream"],e);const u=(o=t.readable)!==null&&o!==void 0?o:Nl(e),f=(s=t.writable)!==null&&s!==void 0?s:lp(e),h=e._writableState,l=e._readableState,p=()=>{e.writable||I()};let b=CT(e)&&Nl(e)===u&&lp(e)===f,w=cp(e,!1);const I=()=>{w=!0,e.destroyed&&(b=!1),!(b&&(!e.readable||u))&&(!u||A)&&r.call(e)};let A=ap(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=AT(e);const B=()=>{C=!0;const j=dp(e)||up(e);if(j&&typeof j!="boolean")return r.call(e,j);if(u&&!A&&Nl(e,!0)&&!ap(e,!1))return r.call(e,new op);if(f&&!w&&!cp(e,!1))return r.call(e,new op);r.call(e)},P=()=>{C=!0;const j=dp(e)||up(e);if(j&&typeof j!="boolean")return r.call(e,j);r.call(e)},S=()=>{e.req.on("finish",I)};PT(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||sp(e))&&(w||fp(e)===!1)||!f&&(!b||fp(e))&&(A||sp(e)===!1)||l&&e.req&&e.aborted)&&_i.nextTick(P);const m=()=>{r=Ec,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 w_(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=mc((...ue)=>{Q[m_](),ce.apply(e,ue)})}}return m}function BT(e,t,r){let o=!1,s=Ec;if(t.signal)if(s=()=>{o=!0,r.call(e,new w_(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=mc((...l)=>{f[m_](),h.apply(e,l)})}const u=(...f)=>{o||_i.nextTick(()=>r.apply(e,f))};return RT(e[LT].promise,u,u),Ec}function NT(e,t){var r;let o=!1;return t===null&&(t=wc),(r=t)!==null&&r!==void 0&&r.cleanup&&(vT(t.cleanup,"cleanup"),o=t.cleanup),new ST((s,u)=>{const f=E_(e,t,h=>{o&&f(),h?u(h):s()})})}Jc.exports=E_;Jc.exports.finished=NT;var Ri=Jc.exports;const Tn=H.browserExports,{aggregateTwoErrors:$T,codes:{ERR_MULTIPLE_CALLBACK:MT},AbortError:xT}=ur,{Symbol:v_}=vt,{kIsDestroyed:DT,isDestroyed:jT,isFinished:UT,isServerRequest:kT}=ei,S_=v_("kDestroy"),vc=v_("kConstruct");function R_(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function FT(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):(R_(e,o,r),o&&(o.destroyed=!0),r&&(r.destroyed=!0),s.constructed?hp(this,e,t):this.once(S_,function(u){hp(this,$T(u,e),t)}),this)}function hp(e,t,r){let o=!1;function s(u){if(o)return;o=!0;const f=e._readableState,h=e._writableState;R_(u,h,f),h&&(h.closed=!0),f&&(f.closed=!0),typeof r=="function"&&r(u),u?Tn.nextTick(HT,e,u):Tn.nextTick(A_,e)}try{e._destroy(t||null,s)}catch(u){s(u)}}function HT(e,t){Sc(e,t),A_(e)}function A_(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 Sc(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 WT(){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 Rc(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(Sc,e,t):Sc(e,t))}function qT(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(vc,t),!(e.listenerCount(vc)>1)&&Tn.nextTick(GT,e)}function GT(e){let t=!1;function r(o){if(t){Rc(e,o??new MT);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(S_,o):o?Rc(e,o,!0):Tn.nextTick(VT,e)}try{e._construct(o=>{Tn.nextTick(r,o)})}catch(o){Tn.nextTick(r,o)}}function VT(e){e.emit(vc)}function gp(e){return(e==null?void 0:e.setHeader)&&typeof e.abort=="function"}function T_(e){e.emit("close")}function zT(e,t){e.emit("error",t),Tn.nextTick(T_,e)}function KT(e,t){!e||jT(e)||(!t&&!UT(e)&&(t=new xT),kT(e)?(e.socket=null,e.destroy(t)):gp(e)?e.abort():gp(e.req)?e.req.abort():typeof e.destroy=="function"?e.destroy(t):typeof e.close=="function"?e.close():t?Tn.nextTick(zT,e,t):Tn.nextTick(T_,e),e.destroyed||(e[DT]=!0))}var Do={construct:qT,destroyer:KT,destroy:FT,undestroy:WT,errorOrDestroy:Rc};const{ArrayIsArray:JT,ObjectSetPrototypeOf:I_}=vt,{EventEmitter:Cu}=H.eventsExports;function Lu(e){Cu.call(this,e)}I_(Lu.prototype,Cu.prototype);I_(Lu,Cu);Lu.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(),Cu.listenerCount(this,"error")===0&&this.emit("error",b)}Ac(r,"error",l),Ac(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 Ac(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):JT(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}var Xc={Stream:Lu,prependListener:Ac},O_={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}})(O_);var Pu=O_.exports;const{StringPrototypeSlice:pp,SymbolIterator:YT,TypedArrayPrototypeSet:Ka,Uint8Array:XT}=vt,{Buffer:$l}=H.bufferPolyfill,{inspect:ZT}=br;var QT=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 $l.alloc(0);const r=$l.allocUnsafe(t>>>0);let o=this.head,s=0;for(;o;)Ka(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}*[YT](){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+=pp(u,0,t),this.head=o,o.data=pp(u,t));break}++s}while((o=o.next)!==null);return this.length-=s,r}_getBuffer(t){const r=$l.allocUnsafe(t),o=t;let s=this.head,u=0;do{const f=s.data;if(t>f.length)Ka(r,f,o-t),t-=f.length;else{t===f.length?(Ka(r,f,o-t),++u,s.next?this.head=s.next:this.head=this.tail=null):(Ka(r,new XT(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 ZT(this,{...r,depth:0,customInspect:!1})}};const{MathFloor:eI,NumberIsInteger:tI}=vt,{validateInteger:rI}=$s,{ERR_INVALID_ARG_VALUE:nI}=ur.codes;let C_=16*1024,L_=16;function iI(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function P_(e){return e?L_:C_}function oI(e,t){rI(t,"value",0),e?L_=t:C_=t}function sI(e,t,r,o){const s=iI(t,o,r);if(s!=null){if(!tI(s)||s<0){const u=o?`options.${r}`:"options.highWaterMark";throw new nI(u,s)}return eI(s)}return P_(e.objectMode)}var Bu={getHighWaterMark:sI,getDefaultHighWaterMark:P_,setDefaultHighWaterMark:oI};const bp=H.browserExports,{PromisePrototypeThen:aI,SymbolAsyncIterator:_p,SymbolIterator:yp}=vt,{Buffer:uI}=H.bufferPolyfill,{ERR_INVALID_ARG_TYPE:fI,ERR_STREAM_NULL_VALUES:lI}=ur.codes;function cI(e,t,r){let o;if(typeof t=="string"||t instanceof uI)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});let s;if(t&&t[_p])s=!0,o=t[_p]();else if(t&&t[yp])s=!1,o=t[yp]();else throw new fI("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){aI(h(p),()=>bp.nextTick(b,p),w=>bp.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 lI;if(u.push(w))continue;f=!1}}catch(p){u.destroy(p)}break}}return u}var B_=cI,Ml,wp;function Nu(){if(wp)return Ml;wp=1;const e=H.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;Ml=Re,Re.ReadableState=Ue;const{EventEmitter:A}=H.eventsExports,{Stream:x,prependListener:v}=Xc,{Buffer:C}=H.bufferPolyfill,{addAbortSignal:B}=Pu,P=Ri;let S=br.debuglog("stream",N=>{S=N});const m=QT,j=Do,{getHighWaterMark:Q,getDefaultHighWaterMark:ce}=Bu,{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}=$s,Y=I("kPaused"),{StringDecoder:V}=H.requireString_decoder(),ne=B_;h(Re.prototype,x.prototype),h(Re,x);const W=()=>{},{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=W;function ve(St){this===N?(Ee(),Ee=W):Ee=St}N.on("readable",ve);let Te;const yt=P(N,{writable:!1},St=>{Te=St?ue(Te,St):null,Ee(),Ee=W});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)},Ml}var xl,mp;function Zc(){if(mp)return xl;mp=1;const e=H.browserExports,{ArrayPrototypeSlice:t,Error:r,FunctionPrototypeSymbolHasInstance:o,ObjectDefineProperty:s,ObjectDefineProperties:u,ObjectSetPrototypeOf:f,StringPrototypeToLowerCase:h,Symbol:l,SymbolHasInstance:p}=vt;xl=G,G.WritableState=U;const{EventEmitter:b}=H.eventsExports,w=Xc.Stream,{Buffer:I}=H.bufferPolyfill,A=Do,{addAbortSignal:x}=Pu,{getHighWaterMark:v,getDefaultHighWaterMark:C}=Bu,{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 W(_,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(W,_,J,E,se):W(_,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(_)},xl}var Dl,Ep;function dI(){if(Ep)return Dl;Ep=1;const e=H.browserExports,t=H.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=Nu(),P=Zc(),{createDeferredPromise:S}=br,m=B_,j=globalThis.Blob||t.Blob,Q=typeof j<"u"?function(U){return U instanceof j}:function(U){return!1},ce=globalThis.AbortController||Is().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)}}Dl=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:W}=Se(U);if(s(Y))return m(te,Y,{objectMode:!0,write:V,final:ne,destroy:W});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:W})}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:W,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 W}}(),{signal:Y}),write(ne,W,K){const ae=$;$=null,ae({chunk:ne,done:!1,cb:K})},final(ne){const W=$;$=null,W({done:!0,cb:ne})},destroy(ne,W){G.abort(),W(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,W,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(W){const re=W;W=null,re()}}),U.on("end",function(){ae.push(null)}),ae._read=function(){for(;;){const re=U.read();if(re===null){W=ae._read;return}if(!ae.push(re))return}}),ae._destroy=function(re,_e){!re&&K!==null&&(re=new I),W=null,V=null,ne=null,K===null?_e(re):(K=_e,v($,re),v(U,re))},ae}return Dl}var jl,vp;function Yn(){if(vp)return jl;vp=1;const{ObjectDefineProperties:e,ObjectGetOwnPropertyDescriptor:t,ObjectKeys:r,ObjectSetPrototypeOf:o}=vt;jl=f;const s=Nu(),u=Zc();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=dI()),p(b,"body")},jl}const{ObjectSetPrototypeOf:N_,Symbol:hI}=vt;var $_=Xn;const{ERR_METHOD_NOT_IMPLEMENTED:gI}=ur.codes,Qc=Yn(),{getHighWaterMark:pI}=Bu;N_(Xn.prototype,Qc.prototype);N_(Xn,Qc);const Es=hI("kCallback");function Xn(e){if(!(this instanceof Xn))return new Xn(e);const t=e?pI(this,e,"readableHighWaterMark",!0):null;t===0&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),Qc.call(this,e),this._readableState.sync=!1,this[Es]=null,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",bI)}function Tc(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 bI(){this._final!==Tc&&Tc.call(this)}Xn.prototype._final=Tc;Xn.prototype._transform=function(e,t,r){throw new gI("_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[Es]=r})};Xn.prototype._read=function(){if(this[Es]){const e=this[Es];this[Es]=null,e()}};const{ObjectSetPrototypeOf:M_}=vt;var x_=Lo;const ed=$_;M_(Lo.prototype,ed.prototype);M_(Lo,ed);function Lo(e){if(!(this instanceof Lo))return new Lo(e);ed.call(this,e)}Lo.prototype._transform=function(e,t,r){r(null,e)};const ms=H.browserExports,{ArrayIsArray:_I,Promise:yI,SymbolAsyncIterator:wI,SymbolDispose:mI}=vt,gu=Ri,{once:EI}=br,vI=Do,Sp=Yn(),{aggregateTwoErrors:SI,codes:{ERR_INVALID_ARG_TYPE:Ic,ERR_INVALID_RETURN_VALUE:Ul,ERR_MISSING_ARGS:RI,ERR_STREAM_DESTROYED:AI,ERR_STREAM_PREMATURE_CLOSE:TI},AbortError:II}=ur,{validateFunction:OI,validateAbortSignal:CI}=$s,{isIterable:ki,isReadable:kl,isReadableNodeStream:au,isNodeStream:Rp,isTransformStream:vo,isWebStream:LI,isReadableStream:Fl,isReadableFinished:PI}=ei,BI=globalThis.AbortController||Is().AbortController;let Hl,Wl,ql;function Ap(e,t,r){let o=!1;e.on("close",()=>{o=!0});const s=gu(e,{readable:t,writable:r},u=>{o=!u});return{destroy:u=>{o||(o=!0,vI.destroyer(e,u||new AI("pipe")))},cleanup:s}}function NI(e){return OI(e[e.length-1],"streams[stream.length - 1]"),e.pop()}function Gl(e){if(ki(e))return e;if(au(e))return $I(e);throw new Ic("val",["Readable","Iterable","AsyncIterable"],e)}async function*$I(e){Wl||(Wl=Nu()),yield*Wl.prototype[wI].call(e)}async function Ja(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 yI((p,b)=>{s?b(s):u=()=>{s?b(s):p()}});t.on("drain",f);const l=gu(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?SI(s,p):p)}finally{l(),t.off("drain",f)}}async function Vl(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 MI(...e){return D_(e,EI(NI(e)))}function D_(e,t,r){if(e.length===1&&_I(e[0])&&(e=e[0]),e.length<2)throw new RI("streams");const o=new BI,s=o.signal,u=r==null?void 0:r.signal,f=[];CI(u,"options.signal");function h(){x(new II)}ql=ql||br.addAbortListener;let l;u&&(l=ql(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[mI](),o.abort(),S&&(p||f.forEach(j=>j()),ms.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(Rp(S)){let ue=function(te){te&&te.name!=="AbortError"&&te.code!=="ERR_STREAM_PREMATURE_CLOSE"&&A(te)};if(Q){const{destroy:te,cleanup:Se}=Ap(S,m,j);w.push(te),kl(S)&&ce&&f.push(Se)}S.on("error",ue),kl(S)&&ce&&f.push(()=>{S.removeListener("error",ue)})}if(P===0)if(typeof S=="function"){if(v=S({signal:s}),!ki(v))throw new Ul("Iterable, AsyncIterable or Stream","source",v)}else ki(S)||au(S)||vo(S)?v=S:v=Sp.from(S);else if(typeof S=="function"){if(vo(v)){var C;v=Gl((C=v)===null||C===void 0?void 0:C.readable)}else v=Gl(v);if(v=S(v,{signal:s}),m){if(!ki(v,!0))throw new Ul("AsyncIterable",`transform[${P-1}]`,v)}else{var B;Hl||(Hl=x_);const ue=new Hl({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(),ms.nextTick(A)},F=>{ue.destroy(F),ms.nextTick(A,F)});else if(ki(v,!0))I++,Ja(v,ue,A,{end:Q});else if(Fl(v)||vo(v)){const F=v.readable||v;I++,Ja(F,ue,A,{end:Q})}else throw new Ul("AsyncIterable or Promise","destination",v);v=ue;const{destroy:Se,cleanup:me}=Ap(v,!1,!0);w.push(Se),ce&&f.push(me)}}else if(Rp(S)){if(au(v)){I+=2;const ue=xI(v,S,A,{end:Q});kl(S)&&ce&&f.push(ue)}else if(vo(v)||Fl(v)){const ue=v.readable||v;I++,Ja(ue,S,A,{end:Q})}else if(ki(v))I++,Ja(v,S,A,{end:Q});else throw new Ic("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],v);v=S}else if(LI(S)){if(au(v))I++,Vl(Gl(v),S,A,{end:Q});else if(Fl(v)||ki(v))I++,Vl(v,S,A,{end:Q});else if(vo(v))I++,Vl(v.readable,S,A,{end:Q});else throw new Ic("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],v);v=S}else v=Sp.from(S)}return(s!=null&&s.aborted||u!=null&&u.aborted)&&ms.nextTick(h),v}function xI(e,t,r,{end:o}){let s=!1;if(t.on("close",()=>{s||r(new TI)}),e.pipe(t,{end:!1}),o){let u=function(){s=!0,t.end()};PI(e)?ms.nextTick(u):e.once("end",u)}else r();return gu(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)}),gu(t,{readable:!1,writable:!0},r)}var td={pipelineImpl:D_,pipeline:MI};const{pipeline:DI}=td,Ya=Yn(),{destroyer:jI}=Do,{isNodeStream:Xa,isReadable:Tp,isWritable:Ip,isWebStream:zl,isTransformStream:Ui,isWritableStream:Op,isReadableStream:Cp}=ei,{AbortError:UI,codes:{ERR_INVALID_ARG_VALUE:Lp,ERR_MISSING_ARGS:kI}}=ur,FI=Ri;var j_=function(...t){if(t.length===0)throw new kI("streams");if(t.length===1)return Ya.from(t[0]);const r=[...t];if(typeof t[0]=="function"&&(t[0]=Ya.from(t[0])),typeof t[t.length-1]=="function"){const A=t.length-1;t[A]=Ya.from(t[A])}for(let A=0;A<t.length;++A)if(!(!Xa(t[A])&&!zl(t[A]))){if(A<t.length-1&&!(Tp(t[A])||Cp(t[A])||Ui(t[A])))throw new Lp(`streams[${A}]`,r[A],"must be readable");if(A>0&&!(Ip(t[A])||Op(t[A])||Ui(t[A])))throw new Lp(`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=DI(t,l),w=!!(Ip(p)||Op(p)||Ui(p)),I=!!(Tp(b)||Cp(b)||Ui(b));if(h=new Ya({writableObjectMode:!!(p!=null&&p.writableObjectMode),readableObjectMode:!!(b!=null&&b.readableObjectMode),writable:w,readable:I}),w){if(Xa(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(zl(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;FI(A,()=>{if(s){const x=s;s=null,x()}})}if(I){if(Xa(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(zl(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 UI),u=null,o=null,s=null,f===null?x(A):(f=x,Xa(b)&&jI(b,A))},h};const HI=globalThis.AbortController||Is().AbortController,{codes:{ERR_INVALID_ARG_VALUE:WI,ERR_INVALID_ARG_TYPE:Ms,ERR_MISSING_ARGS:qI,ERR_OUT_OF_RANGE:GI},AbortError:On}=ur,{validateAbortSignal:Ki,validateInteger:Pp,validateObject:Ji}=$s,VI=vt.Symbol("kWeak"),zI=vt.Symbol("kResistStopPropagation"),{finished:KI}=Ri,JI=j_,{addAbortSignalNoValidate:YI}=Pu,{isWritable:XI,isNodeStream:ZI}=ei,{deprecate:QI}=br,{ArrayPrototypePush:eO,Boolean:tO,MathFloor:Bp,Number:rO,NumberIsNaN:nO,Promise:Np,PromiseReject:$p,PromiseResolve:iO,PromisePrototypeThen:Mp,Symbol:U_}=vt,pu=U_("kEmpty"),xp=U_("kEof");function oO(e,t){if(t!=null&&Ji(t,"options"),(t==null?void 0:t.signal)!=null&&Ki(t.signal,"options.signal"),ZI(e)&&!XI(e))throw new WI("stream",e,"must be writable");const r=JI(this,e);return t!=null&&t.signal&&YI(t.signal,r),r}function $u(e,t){if(typeof e!="function")throw new Ms("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=Bp(t.concurrency));let o=r-1;return(t==null?void 0:t.highWaterMark)!=null&&(o=Bp(t.highWaterMark)),Pp(r,"options.concurrency",1),Pp(o,"options.highWaterMark",0),o+=r,(async function*(){const u=br.AbortSignalAny([t==null?void 0:t.signal].filter(tO)),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===pu)continue;B=iO(B)}catch(P){B=$p(P)}I+=1,Mp(B,x,A),h.push(B),p&&(p(),p=null),!w&&(h.length>=o||I>=r)&&await new Np(P=>{b=P})}h.push(xp)}catch(B){const P=$p(B);Mp(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===xp)return;if(u.aborted)throw new On;B!==pu&&(yield B),h.shift(),v()}await new Np(B=>{p=B})}}finally{w=!0,b&&(b(),b=null)}}).call(this)}function sO(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 k_(e,t=void 0){for await(const r of rd.call(this,e,t))return!0;return!1}async function aO(e,t=void 0){if(typeof e!="function")throw new Ms("fn",["Function","AsyncFunction"],e);return!await k_.call(this,async(...r)=>!await e(...r),t)}async function uO(e,t){for await(const r of rd.call(this,e,t))return r}async function fO(e,t){if(typeof e!="function")throw new Ms("fn",["Function","AsyncFunction"],e);async function r(o,s){return await e(o,s),pu}for await(const o of $u.call(this,r,t));}function rd(e,t){if(typeof e!="function")throw new Ms("fn",["Function","AsyncFunction"],e);async function r(o,s){return await e(o,s)?o:pu}return $u.call(this,r,t)}class lO extends qI{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function cO(e,t,r){var o;if(typeof e!="function")throw new Ms("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 KI(this.destroy(p)),p}const u=new HI,f=u.signal;if(r!=null&&r.signal){const p={once:!0,[VI]:this,[zI]:!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 lO}finally{u.abort()}return t}async function dO(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});eO(t,o)}return t}function hO(e,t){const r=$u.call(this,e,t);return(async function*(){for await(const s of r)yield*s}).call(this)}function F_(e){if(e=rO(e),nO(e))return 0;if(e<0)throw new GI("number",">= 0",e);return e}function gO(e,t=void 0){return t!=null&&Ji(t,"options"),(t==null?void 0:t.signal)!=null&&Ki(t.signal,"options.signal"),e=F_(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 pO(e,t=void 0){return t!=null&&Ji(t,"options"),(t==null?void 0:t.signal)!=null&&Ki(t.signal,"options.signal"),e=F_(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)}zc.streamReturningOperators={asIndexedPairs:QI(sO,"readable.asIndexedPairs will be removed in a future version."),drop:gO,filter:rd,flatMap:hO,map:$u,take:pO,compose:oO};zc.promiseReturningOperators={every:aO,forEach:fO,reduce:cO,toArray:dO,some:k_,find:uO};var Kl,Dp;function H_(){if(Dp)return Kl;Dp=1;const{ArrayPrototypePop:e,Promise:t}=vt,{isIterable:r,isNodeStream:o,isWebStream:s}=ei,{pipelineImpl:u}=td,{finished:f}=Ri;W_();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 Kl={finished:f,pipeline:h},Kl}var jp;function W_(){if(jp)return Pl.exports;jp=1;const{Buffer:e}=H.bufferPolyfill,{ObjectDefineProperty:t,ObjectKeys:r,ReflectApply:o}=vt,{promisify:{custom:s}}=br,{streamReturningOperators:u,promiseReturningOperators:f}=zc,{codes:{ERR_ILLEGAL_CONSTRUCTOR:h}}=ur,l=j_,{setDefaultHighWaterMark:p,getDefaultHighWaterMark:b}=Bu,{pipeline:w}=td,{destroyer:I}=Do,A=Ri,x=H_(),v=ei,C=Pl.exports=Xc.Stream;C.isDestroyed=v.isDestroyed,C.isDisturbed=v.isDisturbed,C.isErrored=v.isErrored,C.isReadable=v.isReadable,C.isWritable=v.isWritable,C.Readable=Nu();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=Zc(),C.Duplex=Yn(),C.Transform=$_,C.PassThrough=x_,C.pipeline=w;const{addAbortSignal:B}=Pu;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)},Pl.exports}(function(e){const t=W_(),r=H_(),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})(IA);var bO={},qi={},nd={},Wt={};class q_ 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 _O(e){return Hr(e)&&typeof e[Symbol.iterator]=="function"}function Hr(e){return typeof e=="object"&&e!=null}function Up(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 yO(e){const{done:t,value:r}=e.next();return t?void 0:r}function wO(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*Oc(e,t,r,o){_O(e)||(e=[e]);for(const s of e){const u=wO(s,t,r,o);u&&(yield u)}}function*id(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=id(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 Oc(b,p,this,l)}:this.validator=()=>[],u?this.refiner=(l,p)=>{const b=u(l,p);return Oc(b,p,this,l)}:this.refiner=()=>[]}assert(t,r){return G_(t,this,r)}create(t,r){return V_(t,this,r)}is(t){return od(t,this)}mask(t,r){return z_(t,this,r)}validate(t,r={}){return jo(t,this,r)}}function G_(e,t,r){const o=jo(e,t,{message:r});if(o[0])throw o[0]}function V_(e,t,r){const o=jo(e,t,{coerce:!0,message:r});if(o[0])throw o[0];return o[1]}function z_(e,t,r){const o=jo(e,t,{coerce:!0,mask:!0,message:r});if(o[0])throw o[0];return o[1]}function od(e,t){return!jo(e,t)[0]}function jo(e,t,r={}){const o=id(e,t,r),s=yO(o);return s[0]?[new q_(s[0],function*(){for(const f of o)f[0]&&(yield f[0])}),void 0]:[void 0,s[1]]}function mO(...e){const t=e[0].type==="type",r=e.map(s=>s.schema),o=Object.assign({},...r);return t?Ds(o):xs(o)}function _r(e,t){return new Ct({type:e,schema:null,validator:t})}function EO(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 vO(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 SO(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 RO(e,t){const{schema:r}=e,o={...r};for(const s of t)delete o[s];switch(e.type){case"type":return Ds(o);default:return xs(o)}}function AO(e){const t=e instanceof Ct,r=t?{...e.schema}:{...e};for(const o in r)r[o]=K_(r[o]);return t&&e.type==="type"?Ds(r):xs(r)}function TO(e,t){const{schema:r}=e,o={};for(const s of t)o[s]=r[s];switch(e.type){case"type":return Ds(o);default:return xs(o)}}function IO(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),_r(e,t)}function OO(){return _r("any",()=>!0)}function CO(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 LO(){return _r("bigint",e=>typeof e=="bigint")}function PO(){return _r("boolean",e=>typeof e=="boolean")}function BO(){return _r("date",e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${xt(e)}`)}function NO(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 $O(){return _r("func",e=>typeof e=="function"||`Expected a function, but received: ${xt(e)}`)}function MO(e){return _r("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${xt(t)}`)}function xO(){return _r("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${xt(e)}`)}function DO(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 jO(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 UO(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 sd(){return _r("never",()=>!1)}function kO(e){return new Ct({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function FO(){return _r("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${xt(e)}`)}function xs(e){const t=e?Object.keys(e):[],r=sd();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 K_(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 HO(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 WO(){return _r("regexp",e=>e instanceof RegExp)}function qO(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 J_(){return _r("string",e=>typeof e=="string"||`Expected a string, but received: ${xt(e)}`)}function GO(e){const t=sd();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 Ds(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 VO(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]=id(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 Y_(){return _r("unknown",()=>!0)}function ad(e,t,r){return new Ct({...e,coercer:(o,s)=>od(o,t)?e.coercer(r(o,s),s):e.coercer(o,s)})}function zO(e,t,r={}){return ad(e,Y_(),o=>{const s=typeof t=="function"?t():t;if(o===void 0)return s;if(!r.strict&&Up(o)&&Up(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 KO(e){return ad(e,J_(),t=>t.trim())}function JO(e){return Yi(e,"empty",t=>{const r=X_(t);return r===0||`Expected an empty ${e.type} but received one with a size of \`${r}\``})}function X_(e){return e instanceof Map||e instanceof Set?e.size:e.length}function YO(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 XO(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 ZO(e){return Yi(e,"nonempty",t=>X_(t)>0||`Expected a nonempty ${e.type} but received an empty one`)}function QO(e,t){return Yi(e,"pattern",r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`)}function e2(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=Oc(u,s,e,o);for(const h of f)yield{...h,refinement:t}}})}const t2=Object.freeze(Object.defineProperty({__proto__:null,Struct:Ct,StructError:q_,any:OO,array:CO,assert:G_,assign:mO,bigint:LO,boolean:PO,coerce:ad,create:V_,date:BO,defaulted:zO,define:_r,deprecated:EO,dynamic:vO,empty:JO,enums:NO,func:$O,instance:MO,integer:xO,intersection:DO,is:od,lazy:SO,literal:jO,map:UO,mask:z_,max:YO,min:XO,never:sd,nonempty:ZO,nullable:kO,number:FO,object:xs,omit:RO,optional:K_,partial:AO,pattern:QO,pick:TO,record:HO,refine:Yi,regexp:WO,set:qO,size:e2,string:J_,struct:IO,trimmed:KO,tuple:GO,type:Ds,union:VO,unknown:Y_,validate:jo},Symbol.toStringTag,{value:"Module"})),Xi=H.getAugmentedNamespace(t2);Object.defineProperty(Wt,"__esModule",{value:!0});Wt.assertExhaustive=Wt.assertStruct=Wt.assert=Wt.AssertionError=void 0;const r2=Xi;function n2(e){return typeof e=="object"&&e!==null&&"message"in e}function i2(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 o2(e){const t=n2(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}function Z_(e,t){return i2(e)?new e({message:t}):e({message:t})}class ud extends Error{constructor(t){super(t.message),this.code="ERR_ASSERTION"}}Wt.AssertionError=ud;function s2(e,t="Assertion failed.",r=ud){if(!e)throw t instanceof Error?t:Z_(r,t)}Wt.assert=s2;function a2(e,t,r="Assertion failed",o=ud){try{(0,r2.assert)(e,t)}catch(s){throw Z_(o,`${r}: ${o2(s)}.`)}}Wt.assertStruct=a2;function u2(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}Wt.assertExhaustive=u2;var js={};Object.defineProperty(js,"__esModule",{value:!0});js.base64=void 0;const f2=Xi,l2=Wt,c2=(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,l2.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,f2.pattern)(e,h)};js.base64=c2;var Ze={},Us={};(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})(Us);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,Cc=Us,kp=48,Fp=58,Hp=87;function d2(){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 h2=d2();function fd(e){return e instanceof Uint8Array}Ze.isBytes=fd;function Uo(e){(0,Ir.assert)(fd(e),"Value must be a Uint8Array.")}Ze.assertIsBytes=Uo;function Q_(e){if(Uo(e),e.length===0)return"0x";const t=h2(),r=new Array(e.length);for(let o=0;o<e.length;o++)r[o]=t[e[o]];return(0,Cc.add0x)(r.join(""))}Ze.bytesToHex=Q_;function ey(e){Uo(e);const t=Q_(e);return BigInt(t)}Ze.bytesToBigInt=ey;function g2(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=g2;function p2(e){Uo(e);const t=ey(e);return(0,Ir.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)}Ze.bytesToNumber=p2;function b2(e){return Uo(e),new TextDecoder().decode(e)}Ze.bytesToString=b2;function Mu(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,Cc.assertIsHexString)(e);const r=(0,Cc.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<Fp?kp:Hp),p=h-(h<Fp?kp:Hp);s[u]=l*16+p}return s}Ze.hexToBytes=Mu;function ty(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 Mu(t)}Ze.bigIntToBytes=ty;function _2(e,t){(0,Ir.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(t*8+-1))}function y2(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)(_2(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=y2;function ry(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 Mu(t)}Ze.numberToBytes=ry;function ny(e){return(0,Ir.assert)(typeof e=="string","Value must be a string."),new TextEncoder().encode(e)}Ze.stringToBytes=ny;function iy(e){if(typeof e=="bigint")return ty(e);if(typeof e=="number")return ry(e);if(typeof e=="string")return e.startsWith("0x")?Mu(e):ny(e);if(fd(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}Ze.valueToBytes=iy;function w2(e){const t=new Array(e.length);let r=0;for(let s=0;s<e.length;s++){const u=iy(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=w2;function m2(e){if(typeof H.dist.Buffer<"u"&&e instanceof H.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=m2;var xu={};Object.defineProperty(xu,"__esModule",{value:!0});xu.ChecksumStruct=void 0;const Wp=Xi,E2=js;xu.ChecksumStruct=(0,Wp.size)((0,E2.base64)((0,Wp.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,v2=Wt,oy=Ze,Du=Us,sy=(0,Et.union)([(0,Et.number)(),(0,Et.bigint)(),(0,Et.string)(),Du.StrictHexStruct]),S2=(0,Et.coerce)((0,Et.number)(),sy,Number),R2=(0,Et.coerce)((0,Et.bigint)(),sy,BigInt);(0,Et.union)([Du.StrictHexStruct,(0,Et.instance)(Uint8Array)]);const A2=(0,Et.coerce)((0,Et.instance)(Uint8Array),(0,Et.union)([Du.StrictHexStruct]),oy.hexToBytes),T2=(0,Et.coerce)(Du.StrictHexStruct,(0,Et.instance)(Uint8Array),oy.bytesToHex);function I2(e){try{const t=(0,Et.create)(e,S2);return(0,v2.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=I2;function O2(e){try{return(0,Et.create)(e,R2)}catch(t){throw t instanceof Et.StructError?new Error(`Expected a number-like value, got "${String(t.value)}".`):t}}vn.createBigInt=O2;function C2(e){if(typeof e=="string"&&e.toLowerCase()==="0x")return new Uint8Array;try{return(0,Et.create)(e,A2)}catch(t){throw t instanceof Et.StructError?new Error(`Expected a bytes-like value, got "${String(t.value)}".`):t}}vn.createBytes=C2;function L2(e){if(e instanceof Uint8Array&&e.length===0||typeof e=="string"&&e.toLowerCase()==="0x")return"0x";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.createHex=L2;var Po={},ay=H.commonjsGlobal&&H.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=H.commonjsGlobal&&H.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 ld{constructor(t){tn.set(this,void 0),ay(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=ld;class cd{constructor(t){wn.set(this,void 0),ay(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=cd;Object.freeze(ld);Object.freeze(ld.prototype);Object.freeze(cd);Object.freeze(cd.prototype);var uy={};Object.defineProperty(uy,"__esModule",{value:!0});var fy={};(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})(fy);var ly={};Object.defineProperty(ly,"__esModule",{value:!0});var Bo={},P2=H.commonjsGlobal&&H.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Bo,"__esModule",{value:!0});Bo.createModuleLogger=Bo.createProjectLogger=void 0;const B2=P2(mA),N2=(0,B2.default)("metamask");function $2(e){return N2.extend(e)}Bo.createProjectLogger=$2;function M2(e,t){return e.extend(t)}Bo.createModuleLogger=M2;var cy={};(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})(cy);var Sn={};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.hexToBigInt=Sn.hexToNumber=Sn.bigIntToHex=Sn.numberToHex=void 0;const To=Wt,Os=Us,x2=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,Os.add0x)(e.toString(16)));Sn.numberToHex=x2;const D2=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,Os.add0x)(e.toString(16)));Sn.bigIntToHex=D2;const j2=e=>{(0,Os.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=j2;const U2=e=>((0,Os.assertIsHexString)(e),BigInt((0,Os.add0x)(e)));Sn.hexToBigInt=U2;var dy={};Object.defineProperty(dy,"__esModule",{value:!0});var hy={};(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})(hy);var gy={};Object.defineProperty(gy,"__esModule",{value:!0});var py={},Lc={exports:{}};const k2="2.0.0",by=256,F2=Number.MAX_SAFE_INTEGER||9007199254740991,H2=16,W2=by-6,q2=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var ju={MAX_LENGTH:by,MAX_SAFE_COMPONENT_LENGTH:H2,MAX_SAFE_BUILD_LENGTH:W2,MAX_SAFE_INTEGER:F2,RELEASE_TYPES:q2,SEMVER_SPEC_VERSION:k2,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const G2=typeof H.dist.process=="object"&&H.dist.process.env&&H.dist.process.env.NODE_DEBUG&&/\bsemver\b/i.test(H.dist.process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Uu=G2;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:s}=ju,u=Uu;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*$")})(Lc,Lc.exports);var ks=Lc.exports;const V2=Object.freeze({loose:!0}),z2=Object.freeze({}),K2=e=>e?typeof e!="object"?V2:e:z2;var dd=K2;const qp=/^[0-9]+$/,_y=(e,t)=>{const r=qp.test(e),o=qp.test(t);return r&&o&&(e=+e,t=+t),e===t?0:r&&!o?-1:o&&!r?1:e<t?-1:1},J2=(e,t)=>_y(t,e);var yy={compareIdentifiers:_y,rcompareIdentifiers:J2};const Za=Uu,{MAX_LENGTH:Gp,MAX_SAFE_INTEGER:Qa}=ju,{safeRe:Vp,safeSrc:zp,t:eu}=ks,Y2=dd,{compareIdentifiers:wo}=yy;let X2=class mn{constructor(t,r){if(r=Y2(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>Gp)throw new TypeError(`version is longer than ${Gp} characters`);Za("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const o=t.trim().match(r.loose?Vp[eu.LOOSE]:Vp[eu.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>Qa||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Qa||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Qa||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<Qa)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(Za("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(Za("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(Za("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?zp[eu.PRERELEASELOOSE]:zp[eu.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 Fs=X2;const Kp=Fs,Z2=(e,t,r=!1)=>{if(e instanceof Kp)return e;try{return new Kp(e,t)}catch(o){if(!r)return null;throw o}};var Q2=Z2;const eC=Q2,tC=(e,t)=>{const r=eC(e,t);return r?r.version:null};var rC=tC;const Jp=Fs,nC=(e,t,r)=>new Jp(e,r).compare(new Jp(t,r));var ko=nC;const iC=ko,oC=(e,t,r)=>iC(e,t,r)>0;var hd=oC;const sC=ko,aC=(e,t,r)=>sC(e,t,r)<0;var wy=aC;const uC=ko,fC=(e,t,r)=>uC(e,t,r)===0;var lC=fC;const cC=ko,dC=(e,t,r)=>cC(e,t,r)!==0;var hC=dC;const gC=ko,pC=(e,t,r)=>gC(e,t,r)>=0;var my=pC;const bC=ko,_C=(e,t,r)=>bC(e,t,r)<=0;var Ey=_C;const yC=lC,wC=hC,mC=hd,EC=my,vC=wy,SC=Ey,RC=(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 yC(e,r,o);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);default:throw new TypeError(`Invalid operator: ${t}`)}};var AC=RC;const{safeRe:MN,t:xN}=ks;class TC{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 IC=TC,Jl,Yp;function on(){if(Yp)return Jl;Yp=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 W=this.options.loose,K=W?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));W&&(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(W=>ne.every(K=>W.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}}Jl=t;const r=IC,o=new r,s=dd,u=ku(),f=Uu,h=Fs,{safeRe:l,t:p,comparatorTrimReplace:b,tildeTrimReplace:w,caretTrimReplace:I}=ks,{FLAG_INCLUDE_PRERELEASE:A,FLAG_LOOSE:x}=ju,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(W=>ne.intersects(W,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,W,K,ae)=>{f("tilde",$,V,ne,W,K,ae);let de;return S(ne)?de="":S(W)?de=`>=${ne}.0.0 <${+ne+1}.0.0-0`:S(K)?de=`>=${ne}.${W}.0 <${ne}.${+W+1}.0-0`:ae?(f("replaceTilde pr",ae),de=`>=${ne}.${W}.${K}-${ae} <${ne}.${+W+1}.0-0`):de=`>=${ne}.${W}.${K} <${ne}.${+W+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,W,K,ae,de)=>{f("caret",$,ne,W,K,ae,de);let re;return S(W)?re="":S(K)?re=`>=${W}.0.0${V} <${+W+1}.0.0-0`:S(ae)?W==="0"?re=`>=${W}.${K}.0${V} <${W}.${+K+1}.0-0`:re=`>=${W}.${K}.0${V} <${+W+1}.0.0-0`:de?(f("replaceCaret pr",de),W==="0"?K==="0"?re=`>=${W}.${K}.${ae}-${de} <${W}.${K}.${+ae+1}-0`:re=`>=${W}.${K}.${ae}-${de} <${W}.${+K+1}.0-0`:re=`>=${W}.${K}.${ae}-${de} <${+W+1}.0.0-0`):(f("no pr"),W==="0"?K==="0"?re=`>=${W}.${K}.${ae}${V} <${W}.${K}.${+ae+1}-0`:re=`>=${W}.${K}.${ae}${V} <${W}.${+K+1}.0-0`:re=`>=${W}.${K}.${ae} <${+W+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,W,K,ae,de)=>{f("xRange",$,V,ne,W,K,ae,de);const re=S(W),_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?(W=+W+1,K=0,ae=0):(K=+K+1,ae=0)):ne==="<="&&(ne="<",_e?W=+W+1:K=+K+1),ne==="<"&&(de="-0"),V=`${ne+W}.${K}.${ae}${de}`):_e?V=`>=${W}.0.0${de} <${+W+1}.0.0-0`:be&&(V=`>=${W}.${K}.0${de} <${W}.${+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,W,K,ae,de,re,_e,be,R)=>(S(V)?Y="":S(ne)?Y=`>=${V}.0.0${$?"-0":""}`:S(W)?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 Jl}var Yl,Xp;function ku(){if(Xp)return Yl;Xp=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(">")))}}Yl=t;const r=dd,{safeRe:o,t:s}=ks,u=AC,f=Uu,h=Fs,l=on();return Yl}const OC=on(),CC=(e,t,r)=>{try{t=new OC(t,r)}catch{return!1}return t.test(e)};var vy=CC;on();on();on();on();const LC=on(),PC=(e,t)=>{try{return new LC(e,t).range||"*"}catch{return null}};var BC=PC;const NC=Fs,Sy=ku(),{ANY:$C}=Sy,MC=on(),xC=vy,Zp=hd,Qp=wy,DC=Ey,jC=my,UC=(e,t,r,o)=>{e=new NC(e,o),t=new MC(t,o);let s,u,f,h,l;switch(r){case">":s=Zp,u=DC,f=Qp,h=">",l=">=";break;case"<":s=Qp,u=jC,f=Zp,h="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(xC(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===$C&&(A=new Sy(">=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 kC=UC;const FC=kC,HC=(e,t,r)=>FC(e,t,">",r);var WC=HC;on();on();const gd=ku(),{ANY:DN}=gd;new gd(">=0.0.0-0");new gd(">=0.0.0");const Xl=ks,eb=ju,tb=yy,qC=rC,GC=hd;ku();on();const VC=vy,zC=BC,KC=WC;var JC={valid:qC,gt:GC,satisfies:VC,validRange:zC,gtr:KC,re:Xl.re,src:Xl.src,tokens:Xl.t,SEMVER_SPEC_VERSION:eb.SEMVER_SPEC_VERSION,RELEASE_TYPES:eb.RELEASE_TYPES,compareIdentifiers:tb.compareIdentifiers,rcompareIdentifiers:tb.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=JC,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})(py);(function(e){var t=H.commonjsGlobal&&H.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=H.commonjsGlobal&&H.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(js,e),r(Ze,e),r(xu,e),r(vn,e),r(Po,e),r(uy,e),r(Us,e),r(fy,e),r(ly,e),r(Bo,e),r(cy,e),r(Sn,e),r(dy,e),r(hy,e),r(gy,e),r(py,e)})(nd);var Fu={},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=nd,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},{})}})(Fu);var YC=H.commonjsGlobal&&H.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qi,"__esModule",{value:!0});qi.EthereumProviderError=qi.JsonRpcError=void 0;const XC=nd,ZC=YC(qc),QC=Fu;class Ry 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,XC.isPlainObject)(this.data)&&(t.data.cause=(0,QC.serializeCause)(this.data.cause))),this.stack&&(t.stack=this.stack),t}toString(){return(0,ZC.default)(this.serialize(),rL,2)}}qi.JsonRpcError=Ry;class eL extends Ry{constructor(t,r,o){if(!tL(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,o)}}qi.EthereumProviderError=eL;function tL(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function rL(e,t){if(t!=="[Circular]")return t}var No={};Object.defineProperty(No,"__esModule",{value:!0});No.providerErrors=No.rpcErrors=void 0;const pd=qi,Xt=Si,Ay=Fu;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=>gs(Xt.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>gs(Xt.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>gs(Xt.errorCodes.provider.unsupportedMethod,e),disconnected:e=>gs(Xt.errorCodes.provider.disconnected,e),chainDisconnected:e=>gs(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 pd.EthereumProviderError(t,r,o)}};function Ur(e,t){const[r,o]=Ty(t);return new pd.JsonRpcError(e,r??(0,Ay.getMessageFromCode)(e),o)}function gs(e,t){const[r,o]=Ty(t);return new pd.EthereumProviderError(e,r??(0,Ay.getMessageFromCode)(e),o)}function Ty(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=Fu;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}})})(bO);var bd={exports:{}},nL=Iy;function Iy(e,t){if(e&&t)return Iy(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 Oy=nL;bd.exports=Oy(uu);bd.exports.strict=Oy(Cy);uu.proto=uu(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return uu(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Cy(this)},configurable:!0})});function uu(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function Cy(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 _d=bd.exports;const iL=H.getDefaultExportFromCjs(_d);var oL=_d,sL=function(){},aL=function(e){return e.setHeader&&typeof e.abort=="function"},uL=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},Ly=function(e,t,r){if(typeof t=="function")return Ly(e,null,t);t||(t={}),r=oL(r||sL);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(){H.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 aL(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)),uL(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)}},Py=Ly;const rb=H.getDefaultExportFromCjs(Py);var fL=_d,lL=Py,fu;try{fu=H.require$$3}catch{}var Cs=function(){},cL=/^v?\.0/.test(H.dist.process.version),Hu=function(e){return typeof e=="function"},dL=function(e){return!cL||!fu?!1:(e instanceof(fu.ReadStream||Cs)||e instanceof(fu.WriteStream||Cs))&&Hu(e.close)},hL=function(e){return e.setHeader&&Hu(e.abort)},gL=function(e,t,r,o){o=fL(o);var s=!1;e.on("close",function(){s=!0}),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,dL(e))return e.close(Cs);if(hL(e))return e.abort();if(Hu(e.destroy))return e.destroy();o(f||new Error("stream was destroyed"))}}},nb=function(e){e()},pL=function(e,t){return e.pipe(t)},bL=function(){var e=Array.prototype.slice.call(arguments),t=Hu(e[e.length-1]||Cs)&&e.pop()||Cs;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 gL(s,f,h,function(l){r||(r=l),l&&o.forEach(nb),!f&&(o.forEach(nb),t(r))})});return e.reduce(pL)},_L=bL;const ib=H.getDefaultExportFromCjs(_L);var yL={},Wu={},qu={},By={},$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 bu(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}Ot.number=bu;function Ny(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}Ot.bool=Ny;function $y(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}Ot.isBytes=$y;function yd(e,...t){if(!$y(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=yd;function My(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");bu(e.outputLen),bu(e.blockLen)}Ot.hash=My;function xy(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=xy;function Dy(e,t){yd(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Ot.output=Dy;const wL={number:bu,bool:Ny,bytes:yd,hash:My,exists:xy,output:Dy};Ot.default=wL;var Zn={},Gu={};Object.defineProperty(Gu,"__esModule",{value:!0});Gu.crypto=void 0;Gu.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=Gu,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)),W=x(F.charCodeAt(V+1));if(ne===void 0||W===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+W}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 Zl=Ot,ps=Zn;function mL(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 EL=(e,t,r)=>e&t^~e&r;mi.Chi=EL;const vL=(e,t,r)=>e&t^e&r^t&r;mi.Maj=vL;class SL extends ps.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,ps.createView)(this.buffer)}update(t){(0,Zl.exists)(this);const{view:r,buffer:o,blockLen:s}=this;t=(0,ps.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,ps.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,Zl.exists)(this),(0,Zl.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;mL(o,s-8,BigInt(this.length*8),u),this.process(o,0);const h=(0,ps.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=SL;Object.defineProperty($o,"__esModule",{value:!0});$o.sha224=$o.sha256=void 0;const Ql=mi,kr=Zn,RL=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 jy extends Ql.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,Ql.Chi)(h,l,p)+RL[w]+bi[w]|0,v=((0,kr.rotr)(o,2)^(0,kr.rotr)(o,13)^(0,kr.rotr)(o,22))+(0,Ql.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 AL extends jy{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 jy);$o.sha224=(0,kr.wrapConstructor)(()=>new AL);var Vu={},Uy={};(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)})(Uy);var wd={},zu={},pt={},ot={};Object.defineProperty(ot,"__esModule",{value:!0});ot.bitMask=void 0;ot.isBytes=Ju;ot.abytes=Yu;ot.bytesToHex=md;ot.numberToHexUnpadded=Fy;ot.hexToNumber=Ed;ot.hexToBytes=Xu;ot.bytesToNumberBE=OL;ot.bytesToNumberLE=CL;ot.numberToBytesBE=Hy;ot.numberToBytesLE=LL;ot.numberToVarBytesBE=PL;ot.ensureBytes=BL;ot.concatBytes=Wy;ot.equalBytes=NL;ot.utf8ToBytes=$L;ot.bitLen=ML;ot.bitGet=xL;ot.bitSet=DL;ot.createHmacDrbg=UL;ot.validateObject=FL;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ky=BigInt(0),Ku=BigInt(1),TL=BigInt(2);function Ju(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function Yu(e){if(!Ju(e))throw new Error("Uint8Array expected")}const IL=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function md(e){Yu(e);let t="";for(let r=0;r<e.length;r++)t+=IL[e[r]];return t}function Fy(e){const t=e.toString(16);return t.length&1?`0${t}`:t}function Ed(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 ob(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 Xu(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=ob(e.charCodeAt(u)),h=ob(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 OL(e){return Ed(md(e))}function CL(e){return Yu(e),Ed(md(Uint8Array.from(e).reverse()))}function Hy(e,t){return Xu(e.toString(16).padStart(t*2,"0"))}function LL(e,t){return Hy(e,t).reverse()}function PL(e){return Xu(Fy(e))}function BL(e,t,r){let o;if(typeof t=="string")try{o=Xu(t)}catch(u){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${u}`)}else if(Ju(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 Wy(...e){let t=0;for(let o=0;o<e.length;o++){const s=e[o];Yu(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 NL(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 $L(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function ML(e){let t;for(t=0;e>ky;e>>=Ku,t+=1);return t}function xL(e,t){return e>>BigInt(t)&Ku}function DL(e,t,r){return e|(r?Ku:ky)<<BigInt(t)}const jL=e=>(TL<<BigInt(e-1))-Ku;ot.bitMask=jL;const ec=e=>new Uint8Array(e),sb=e=>Uint8Array.from(e);function UL(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=ec(e),s=ec(e),u=0;const f=()=>{o.fill(1),s.fill(0),u=0},h=(...w)=>r(s,o,...w),l=(w=ec())=>{s=h(sb([0]),w),o=h(),w.length!==0&&(s=h(sb([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 Wy(...I)};return(w,I)=>{f(),l(w);let A;for(;!(A=I(p()));)l();return f(),A}}const kL={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"||Ju(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 FL(e,t,r={}){const o=(s,u,f)=>{const h=kL[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=qy;pt.pow2=WL;pt.invert=_u;pt.tonelliShanks=Gy;pt.FpSqrt=Vy;pt.validateField=VL;pt.FpPow=zy;pt.FpInvertBatch=Ky;pt.FpDiv=zL;pt.FpIsSquare=KL;pt.nLength=vd;pt.Field=JL;pt.FpSqrtOdd=YL;pt.FpSqrtEven=XL;pt.hashToPrivateScalar=ZL;pt.getFieldBytesLength=Sd;pt.getMinHashLength=Jy;pt.mapHashToField=QL;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Tr=ot,Ut=BigInt(0),gt=BigInt(1),wi=BigInt(2),HL=BigInt(3),Pc=BigInt(4),ab=BigInt(5),ub=BigInt(8);BigInt(9);BigInt(16);function Ar(e,t){const r=e%t;return r>=Ut?r:t+r}function qy(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&gt&&(o=o*e%r),e=e*e%r,t>>=gt;return o}function WL(e,t,r){let o=e;for(;t-- >Ut;)o*=o,o%=r;return o}function _u(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 Gy(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&&qy(s,t,e)!==e-gt;s++);if(o===1){const f=(e+gt)/Pc;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 Vy(e){if(e%Pc===HL){const t=(e+gt)/Pc;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%ub===ab){const t=(e-ab)/ub;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 Gy(e)}const qL=(e,t)=>(Ar(e,t)&gt)===gt;pt.isNegativeLE=qL;const GL=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function VL(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=GL.reduce((o,s)=>(o[s]="function",o),t);return(0,Tr.validateObject)(e,r)}function zy(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&gt&&(o=e.mul(o,s)),s=e.sqr(s),r>>=gt;return o}function Ky(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 zL(e,t,r){return e.mul(t,typeof r=="bigint"?_u(r,e.ORDER):e.inv(r))}function KL(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 vd(e,t){const r=t!==void 0?t:e.toString(2).length,o=Math.ceil(r/8);return{nBitLength:r,nByteLength:o}}function JL(e,t,r=!1,o={}){if(e<=Ut)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:s,nByteLength:u}=vd(e,t);if(u>2048)throw new Error("Field lengths over 2048 bytes are not supported");const f=Vy(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)===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)=>zy(h,l,p),div:(l,p)=>Ar(l*_u(p,e),e),sqrN:l=>l*l,addN:(l,p)=>l+p,subN:(l,p)=>l-p,mulN:(l,p)=>l*p,inv:l=>_u(l,e),sqrt:o.sqrt||(l=>f(h,l)),invertBatch:l=>Ky(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 YL(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 XL(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 ZL(e,t,r=!1){e=(0,Tr.ensureBytes)("privateHash",e);const o=e.length,s=vd(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 Sd(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 Jy(e){const t=Sd(e);return t+Math.ceil(t/2)}function QL(e,t,r=!1){const o=e.length,s=Sd(t),u=Jy(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(zu,"__esModule",{value:!0});zu.wNAF=rP;zu.validateBasic=nP;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const fb=pt,eP=ot,tP=BigInt(0),tc=BigInt(1);function rP(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>tP;)u&tc&&(f=f.add(h)),h=h.double(),u>>=tc;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+=tc);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 nP(e){return(0,fb.validateField)(e.Fp),(0,eP.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,fb.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=zu,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 W=V.toAffine();return o.concatBytes(Uint8Array.from([4]),m.toBytes(W.x),m.toBytes(W.y))}),Q=S.fromBytes||(Y=>{const V=Y.subarray(1),ne=m.fromBytes(V.subarray(0,m.BYTES)),W=m.fromBytes(V.subarray(m.BYTES,2*m.BYTES));return{x:ne,y:W}});function ce(Y){const{a:V,b:ne}=S,W=m.sqr(Y),K=m.mul(W,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:W,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 W&&(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,W){if(this.px=V,this.py=ne,this.pz=W,V==null||!m.isValid(V))throw new Error("x required");if(ne==null||!m.isValid(ne))throw new Error("y required");if(W==null||!m.isValid(W))throw new Error("z required")}static fromAffine(V){const{x:ne,y:W}=V||{};if(!V||!m.isValid(ne)||!m.isValid(W))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(W)?U.ZERO:new U(ne,W,m.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(V){const ne=m.invertBatch(V.map(W=>W.pz));return V.map((W,K)=>W.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 W=m.sqr(ne),K=ce(V);if(!m.eql(W,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:W,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(W,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,W=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(W,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(W,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:W,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(W,de),d=m.mul(K,re),g=m.add(ne,W),_=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(W,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 W=m.invertBatch(ne.map(K=>K.pz));return ne.map((K,ae)=>K.toAffine(W[ae])).map(U.fromAffine)})}multiplyUnsafe(V){const ne=U.ZERO;if(V===l)return ne;if(te(V),V===p)return this;const{endo:W}=S;if(!W)return G.unsafeLadder(this,V);let{k1neg:K,k1:ae,k2neg:de,k2:re}=W.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,W.beta),be.py,be.pz),_e.add(be)}multiply(V){te(V);let ne=V,W,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),W=R.add(q),K=O.add(oe)}else{const{p:de,f:re}=this.wNAF(ne);W=de,K=re}return U.normalizeZ([W,K])[0]}multiplyAndAddUnsafe(V,ne,W){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,W));return de.is0()?void 0:de}toAffine(V){const{px:ne,py:W,pz:K}=this,ae=this.is0();V==null&&(V=ae?m.ONE:m.inv(K));const de=m.mul(ne,V),re=m.mul(W,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 W{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 W(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 W(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 W(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 W(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 W(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=W.fromDER(se)}catch(at){if(!(at instanceof e.DER.Err))throw at;Ce=W.fromCompact(se)}else if(typeof se=="object"&&typeof se.r=="bigint"&&typeof se.s=="bigint"){const{r:at,s:Bt}=se;Ce=new W(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:W,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,W=P.pow(V,me),K=P.sqr(W);K=P.mul(K,V);let ae=P.mul(Y,K);ae=P.pow(ae,Se),ae=P.mul(ae,W),W=P.mul(ae,V),K=P.mul(ae,Y);let de=P.mul(K,W);ae=P.pow(de,F);let re=P.eql(ae,P.ONE);W=P.mul(K,$),ae=P.mul(de,ne),K=P.cmov(W,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);W=P.mul(K,ne),ne=P.mul(ne,ne),R=P.mul(de,ne),K=P.cmov(W,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,W)=>{let K=P.sqr(W);const ae=P.mul(ne,W);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),W),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}}}})(wd);Object.defineProperty(Vu,"__esModule",{value:!0});Vu.getHash=Yy;Vu.createCurve=sP;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const iP=Uy,lb=Zn,oP=wd;function Yy(e){return{hash:e,hmac:(t,...r)=>(0,iP.hmac)(e,t,(0,lb.concatBytes)(...r)),randomBytes:lb.randomBytes}}function sP(e,t){const r=o=>(0,oP.weierstrass)({...e,...Yy(o)});return Object.freeze({...r(t),create:r})}var Zi={};Object.defineProperty(Zi,"__esModule",{value:!0});Zi.expand_message_xmd=Xy;Zi.expand_message_xof=Zy;Zi.hash_to_field=Bc;Zi.isogenyMap=lP;Zi.createHasher=cP;const aP=pt,Zt=ot,uP=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 fP(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 Rd(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function Xy(e,t,r,o){(0,Zt.abytes)(e),(0,Zt.abytes)(t),Rd(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=[fP(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 Zy(e,t,r,o,s){if((0,Zt.abytes)(e),(0,Zt.abytes)(t),Rd(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 Bc(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),Rd(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=Xy(e,p,I,f);else if(h==="xof")A=Zy(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,aP.mod)(uP(S),o)}x[v]=C}return x}function lP(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 cP(e,t,r){if(typeof t!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(o,s){const u=Bc(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=Bc(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=Vu,s=Zi,u=pt,f=ot,h=wd,l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),p=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),b=BigInt(1),w=BigInt(2),I=(W,K)=>(W+K/w)/K;function A(W){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=W*W*W%K,oe=q*q*W%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),W))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:W=>{const K=p,ae=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),de=-b*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),re=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),_e=ae,be=BigInt("0x100000000000000000000000000000000"),R=I(_e*W,K),O=I(-de*W,K);let q=(0,u.mod)(W-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="+W);return{k1neg:ye,k1:q,k2neg:d,k2:oe}}}},t.sha256);const v=BigInt(0),C=W=>typeof W=="bigint"&&v<W&&W<l,B=W=>typeof W=="bigint"&&v<W&&W<p,P={};function S(W,...K){let ae=P[W];if(ae===void 0){const de=(0,t.sha256)(Uint8Array.from(W,re=>re.charCodeAt(0)));ae=(0,f.concatBytes)(de,de),P[W]=ae}return(0,t.sha256)((0,f.concatBytes)(ae,...K))}const m=W=>W.toRawBytes(!0).slice(1),j=W=>(0,f.numberToBytesBE)(W,32),Q=W=>(0,u.mod)(W,l),ce=W=>(0,u.mod)(W,p),ue=e.secp256k1.ProjectivePoint,te=(W,K,ae)=>ue.BASE.multiplyAndAddUnsafe(W,K,ae);function Se(W){let K=e.secp256k1.utils.normPrivateKeyToScalar(W),ae=ue.fromPrivateKey(K);return{scalar:ae.hasEvenY()?K:ce(-K),bytes:m(ae)}}function me(W){if(!C(W))throw new Error("bad x: need 0 < x < p");const K=Q(W*W),ae=Q(K*W+BigInt(7));let de=A(ae);de%w!==v&&(de=Q(-de));const re=new ue(W,de,b);return re.assertValidity(),re}function F(...W){return ce((0,f.bytesToNumberBE)(S("BIP0340/challenge",...W)))}function U(W){return Se(W).bytes}function $(W,K,ae=(0,r.randomBytes)(32)){const de=(0,f.ensureBytes)("message",W),{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(W,K,ae){const de=(0,f.ensureBytes)("signature",W,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(W=>W.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,W=>{const{x:K,y:ae}=V(x.create(W[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})(By);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.secp256k1=void 0;var t=By;Object.defineProperty(e,"secp256k1",{enumerable:!0,get:function(){return t.secp256k1}})})(qu);(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=H.bufferPolyfill,r=qu;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})(Wu);var Zu={};Object.defineProperty(Zu,"__esModule",{value:!0});Zu.GWEI_TO_WEI=void 0;Zu.GWEI_TO_WEI=BigInt(1e9);var Ad={},Rn={};Object.defineProperty(Rn,"__esModule",{value:!0});Rn.RLP=Rn.utils=Rn.decode=Rn.encode=void 0;function Td(e){if(Array.isArray(e)){const r=[];let o=0;for(let s=0;s<e.length;s++){const u=Td(e[s]);r.push(u),o+=u.length}return $c(db(o,192),...r)}const t=i0(e);return t.length===1&&t[0]<128?t:$c(db(t.length,128),t)}Rn.encode=Td;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 cb(e){if(e[0]===0)throw new Error("invalid RLP: extra zeros");return t0(e0(e))}function db(e,t){if(e<56)return Uint8Array.from([e+t]);const r=Mc(e),o=r.length/2,s=Mc(t+55+o);return Uint8Array.from(yu(s+r))}function Qy(e,t=!1){if(typeof e>"u"||e===null||e.length===0)return Uint8Array.from([]);const r=i0(e),o=Nc(r);if(t)return o;if(o.remainder.length!==0)throw new Error("invalid RLP: remainder must be zero");return o.data}Rn.decode=Qy;function Nc(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=cb(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=Nc(s),f.push(u.data),s=u.remainder;return{data:f,remainder:e.slice(t)}}else{if(r=h-246,t=cb(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=Nc(s),f.push(u.data),s=u.remainder;return{data:f,remainder:e.slice(l)}}}const dP=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function e0(e){let t="";for(let r=0;r<e.length;r++)t+=dP[e[r]];return t}function t0(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function yu(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]=t0(e.slice(o,o+2))}return t}function $c(...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 r0(e){return new TextEncoder().encode(e)}function Mc(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 hP(e){return e.length%2?`0${e}`:e}function n0(e){return e.length>=2&&e[0]==="0"&&e[1]==="x"}function gP(e){return typeof e!="string"?e:n0(e)?e.slice(2):e}function i0(e){if(e instanceof Uint8Array)return e;if(typeof e=="string")return n0(e)?yu(hP(gP(e))):r0(e);if(typeof e=="number"||typeof e=="bigint")return e?yu(Mc(e)):Uint8Array.from([]);if(e==null)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}Rn.utils={bytesToHex:e0,concatBytes:$c,hexToBytes:yu,utf8ToBytes:r0};Rn.RLP={encode:Td,decode:Qy};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 tu=BigInt(2**32-1),xc=BigInt(32);function Id(e,t=!1){return t?{h:Number(e&tu),l:Number(e>>xc&tu)}:{h:Number(e>>xc&tu)|0,l:Number(e&tu)|0}}je.fromBig=Id;function o0(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}=Id(e[s],t);[r[s],o[s]]=[u,f]}return[r,o]}je.split=o0;const s0=(e,t)=>BigInt(e>>>0)<<xc|BigInt(t>>>0);je.toBig=s0;const a0=(e,t,r)=>e>>>r;je.shrSH=a0;const u0=(e,t,r)=>e<<32-r|t>>>r;je.shrSL=u0;const f0=(e,t,r)=>e>>>r|t<<32-r;je.rotrSH=f0;const l0=(e,t,r)=>e<<32-r|t>>>r;je.rotrSL=l0;const c0=(e,t,r)=>e<<64-r|t>>>r-32;je.rotrBH=c0;const d0=(e,t,r)=>e>>>r-32|t<<64-r;je.rotrBL=d0;const h0=(e,t)=>t;je.rotr32H=h0;const g0=(e,t)=>e;je.rotr32L=g0;const p0=(e,t,r)=>e<<r|t>>>32-r;je.rotlSH=p0;const b0=(e,t,r)=>t<<r|e>>>32-r;je.rotlSL=b0;const _0=(e,t,r)=>t<<r-32|e>>>64-r;je.rotlBH=_0;const y0=(e,t,r)=>e<<r-32|t>>>64-r;je.rotlBL=y0;function w0(e,t,r,o){const s=(t>>>0)+(o>>>0);return{h:e+r+(s/2**32|0)|0,l:s|0}}je.add=w0;const m0=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);je.add3L=m0;const E0=(e,t,r,o)=>t+r+o+(e/2**32|0)|0;je.add3H=E0;const v0=(e,t,r,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0);je.add4L=v0;const S0=(e,t,r,o,s)=>t+r+o+s+(e/2**32|0)|0;je.add4H=S0;const R0=(e,t,r,o,s)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0)+(s>>>0);je.add5L=R0;const A0=(e,t,r,o,s,u)=>t+r+o+s+u+(e/2**32|0)|0;je.add5H=A0;const pP={fromBig:Id,split:o0,toBig:s0,shrSH:a0,shrSL:u0,rotrSH:f0,rotrSL:l0,rotrBH:c0,rotrBL:d0,rotr32H:h0,rotr32L:g0,rotlSH:p0,rotlSL:b0,rotlBH:_0,rotlBL:y0,add:w0,add3L:m0,add3H:E0,add4L:v0,add4H:S0,add5H:A0,add5L:R0};je.default=pP;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,Ls=je,Vn=Zn,T0=[],I0=[],O0=[],bP=BigInt(0),bs=BigInt(1),_P=BigInt(2),yP=BigInt(7),wP=BigInt(256),mP=BigInt(113);for(let e=0,t=bs,r=1,o=0;e<24;e++){[r,o]=[o,(2*r+3*o)%5],T0.push(2*(5*o+r)),I0.push((e+1)*(e+2)/2%64);let s=bP;for(let u=0;u<7;u++)t=(t<<bs^(t>>yP)*mP)%wP,t&_P&&(s^=bs<<(bs<<BigInt(u))-bs);O0.push(s)}const[EP,vP]=(0,Ls.split)(O0,!0),hb=(e,t,r)=>r>32?(0,Ls.rotlBH)(e,t,r):(0,Ls.rotlSH)(e,t,r),gb=(e,t,r)=>r>32?(0,Ls.rotlBL)(e,t,r):(0,Ls.rotlSL)(e,t,r);function C0(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=hb(p,b,1)^r[h],I=gb(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=I0[f],l=hb(s,u,h),p=gb(s,u,h),b=T0[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]^=EP[o],e[1]^=vP[o]}r.fill(0)}dt.keccakP=C0;class Hs 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),C0(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 Hs(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=Hs;const Ai=(e,t,r)=>(0,Vn.wrapConstructor)(()=>new Hs(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 L0=(e,t,r)=>(0,Vn.wrapXOFConstructorWithOpts)((o={})=>new Hs(t,e,o.dkLen===void 0?r:o.dkLen,!0));dt.shake128=L0(31,168,128/8);dt.shake256=L0(31,136,256/8);var wu={exports:{}};wu.exports;(function(e,t){var r=H.commonjsGlobal&&H.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 H.commonjsRequire=="function"&&H.commonjsRequire.bind(e);return{node:A&&!I?A("crypto"):void 0,web:I}})()})(wu,wu.exports);var P0=wu.exports;Object.defineProperty(rn,"__esModule",{value:!0});rn.keccak512=rn.keccak384=rn.keccak256=rn.keccak224=void 0;const Ps=dt,Qu=P0;rn.keccak224=(0,Qu.wrapHash)(Ps.keccak_224);rn.keccak256=(()=>{const e=(0,Qu.wrapHash)(Ps.keccak_256);return e.create=Ps.keccak_256.create,e})();rn.keccak384=(0,Qu.wrapHash)(Ps.keccak_384);rn.keccak512=(0,Qu.wrapHash)(Ps.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 B0(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=B0;const SP=e=>{if(typeof e!="string")throw new Error(`[stripHexPrefix] input must be type 'string', received ${typeof e}`);return B0(e)?e.slice(2):e};ht.stripHexPrefix=SP;function N0(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=N0;function RP(e){if(typeof e!="string")throw new Error(`[getBinarySize] method requires input type 'string', received ${typeof e}`);return H.dist.Buffer.byteLength(e,"utf8")}ht.getBinarySize=RP;function AP(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=AP;function TP(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=TP;function IP(e){const t=H.dist.Buffer.from(e,"utf8");return`0x${N0(t.toString("hex")).replace(/^0+|0+$/g,"")}`}ht.fromUtf8=IP;function OP(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=OP;function CP(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=CP;function LP(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=LP;Object.defineProperty(Fr,"__esModule",{value:!0});Fr.assertIsString=Fr.assertIsArray=Fr.assertIsBuffer=Fr.assertIsHexString=void 0;const PP=ht,BP=function(e){if(!(0,PP.isHexString)(e)){const t=`This method only supports 0x-prefixed hex strings but input was: ${e}`;throw new Error(t)}};Fr.assertIsHexString=BP;const NP=function(e){if(!H.dist.Buffer.isBuffer(e)){const t=`This method only supports Buffer but input was: ${e}`;throw new Error(t)}};Fr.assertIsBuffer=NP;const $P=function(e){if(!Array.isArray(e)){const t=`This method only supports number arrays but input was: ${e}`;throw new Error(t)}};Fr.assertIsArray=$P;const MP=function(e){if(typeof e!="string"){const t=`This method only supports strings but input was: ${e}`;throw new Error(t)}};Fr.assertIsString=MP;(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 H.dist.Buffer.from((0,r.padToEven)(G.slice(2)),"hex")};e.intToBuffer=s;const u=function($){return H.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 H.dist.Buffer.allocUnsafe(0);if(H.dist.Buffer.isBuffer($)||Array.isArray($)||$ instanceof Uint8Array)return H.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 H.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),H.dist.Buffer.from(G,"hex")}if($.toArray)return H.dist.Buffer.from($.toArray());if($.toBuffer)return H.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=H.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 H.dist.Buffer.from($.replace(G,""),"hex").toString("utf8")};e.toUtf8=Q;const ce=function($){if(H.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)):H.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=qu,s=P0,u=Qi,f=Wu,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 H.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=H.dist.Buffer.from(G+$,"utf8"),V=(0,s.bytesToHex)((0,r.keccak256)(Y));let ne="0x";for(let W=0;W<$.length;W++)parseInt(V[W],16)>=8?ne+=$[W].toUpperCase():ne+=$[W];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)?H.dist.Buffer.from((0,r.keccak256)(t.RLP.encode((0,u.bufArrToArr)([F,null])))).slice(-20):H.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)(H.dist.Buffer.concat([H.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(H.dist.Buffer.concat([H.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=H.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 H.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),H.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=H.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})(Ad);var Ws={};Object.defineProperty(Ws,"__esModule",{value:!0});Ws.Address=void 0;const _s=Ad,ru=Qi;class zn{constructor(t){if(t.length!==20)throw new Error("Invalid address length");this.buf=t}static zero(){return new zn((0,ru.zeros)(20))}static fromString(t){if(!(0,_s.isValidAddress)(t))throw new Error("Invalid address");return new zn((0,ru.toBuffer)(t))}static fromPublicKey(t){if(!H.dist.Buffer.isBuffer(t))throw new Error("Public key should be Buffer");const r=(0,_s.pubToAddress)(t);return new zn(r)}static fromPrivateKey(t){if(!H.dist.Buffer.isBuffer(t))throw new Error("Private key should be Buffer");const r=(0,_s.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,_s.generateAddress)(t.buf,(0,ru.bigIntToBuffer)(r)))}static generate2(t,r,o){if(!H.dist.Buffer.isBuffer(r))throw new Error("Expected salt to be a Buffer");if(!H.dist.Buffer.isBuffer(o))throw new Error("Expected initCode to be a Buffer");return new zn((0,_s.generateAddress2)(t.buf,r,o))}equals(t){return this.buf.equals(t.buf)}isZero(){return this.equals(zn.zero())}isPrecompileOrSystemAddress(){const t=(0,ru.bufferToBigInt)(this.buf),r=BigInt(0),o=BigInt("0xffff");return t>=r&&t<=o}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return H.dist.Buffer.from(this.buf)}}Ws.Address=zn;var ef={},Od={};(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})(Od);Object.defineProperty(ef,"__esModule",{value:!0});ef.Withdrawal=void 0;const pb=Ws,rc=Qi,At=Od;class vs{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 pb.Address((0,At.toType)(s,At.TypeOutput.Buffer)),p=(0,At.toType)(u,At.TypeOutput.BigInt);return new vs(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 vs.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)?H.dist.Buffer.alloc(0):(0,At.toType)(r,At.TypeOutput.Buffer),h=(0,At.toType)(o,At.TypeOutput.BigInt)===BigInt(0)?H.dist.Buffer.alloc(0):(0,At.toType)(o,At.TypeOutput.Buffer);let l;s instanceof pb.Address?l=s.buf:l=(0,At.toType)(s,At.TypeOutput.Buffer);const p=(0,At.toType)(u,At.TypeOutput.BigInt)===BigInt(0)?H.dist.Buffer.alloc(0):(0,At.toType)(u,At.TypeOutput.Buffer);return[f,h,l,p]}raw(){return vs.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,rc.bigIntToHex)(this.index),validatorIndex:(0,rc.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,rc.bigIntToHex)(this.amount)}}}ef.Withdrawal=vs;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 xP=rn,$0=qu,pr=Qi,nc=Wu,DP=Fr;function jP(e,t,r){const o=$0.secp256k1.sign(e,t),s=o.toCompactRawBytes(),u=H.dist.Buffer.from(s.slice(0,32)),f=H.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=jP;function tf(e,t){return e===BigInt(0)||e===BigInt(1)?e:t===void 0?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function rf(e){return e===BigInt(0)||e===BigInt(1)}const UP=function(e,t,r,o,s){const u=H.dist.Buffer.concat([(0,pr.setLengthLeft)(r,32),(0,pr.setLengthLeft)(o,32)],64),f=tf(t,s);if(!rf(f))throw new Error("Invalid signature v value");const l=$0.secp256k1.Signature.fromCompact(u).addRecoveryBit(Number(f)).recoverPublicKey(e);return H.dist.Buffer.from(l.toRawBytes(!1).slice(1))};Qt.ecrecover=UP;const kP=function(e,t,r,o){const s=tf(e,o);if(!rf(s))throw new Error("Invalid signature v value");return(0,pr.bufferToHex)(H.dist.Buffer.concat([(0,pr.setLengthLeft)(t,32),(0,pr.setLengthLeft)(r,32),(0,pr.toBuffer)(e)]))};Qt.toRpcSig=kP;const FP=function(e,t,r,o){const s=tf(e,o);if(!rf(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=H.dist.Buffer.from(r),u[0]|=128),(0,pr.bufferToHex)(H.dist.Buffer.concat([(0,pr.setLengthLeft)(t,32),(0,pr.setLengthLeft)(u,32)]))};Qt.toCompactSig=FP;const HP=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=HP;const WP=function(e,t,r,o=!0,s){if(t.length!==32||r.length!==32||!rf(tf(e,s)))return!1;const u=(0,pr.bufferToBigInt)(t),f=(0,pr.bufferToBigInt)(r);return!(u===BigInt(0)||u>=nc.SECP256K1_ORDER||f===BigInt(0)||f>=nc.SECP256K1_ORDER||o&&f>=nc.SECP256K1_ORDER_DIV_2)};Qt.isValidSignature=WP;const qP=function(e){(0,DP.assertIsBuffer)(e);const t=H.dist.Buffer.from(`Ethereum Signed Message:
3
3
  ${e.length}`,"utf-8");return H.dist.Buffer.from((0,xP.keccak256)(H.dist.Buffer.concat([t,e])))};Qt.hashPersonalMessage=qP;var M0={};(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})(M0);var nf={};Object.defineProperty(nf,"__esModule",{value:!0});nf.AsyncEventEmitter=void 0;const GP=H.eventsExports;async function VP(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 zP extends GP.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],VP(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)}}nf.AsyncEventEmitter=zP;var of={};Object.defineProperty(of,"__esModule",{value:!0});of.Lock=void 0;class KP{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)}}}of.Lock=KP;var Mo={},Gi={};Object.defineProperty(Gi,"__esModule",{value:!0});Gi.InvalidStatusCodeError=Gi.InvalidCertError=void 0;const x0=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class Dc extends Error{constructor(t,r){super(t),this.fingerprint256=r}}Gi.InvalidCertError=Dc;class Cd extends Error{constructor(t){super(`Request Failed. Status Code: ${t}`),this.statusCode=t}}Gi.InvalidStatusCodeError=Cd;function D0(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 bb={};function jc(e,t){var I;let r={...x0,...t};const o=H.streamHttp,s=H.httpsBrowserifyExports,u=H.lib,{promisify:f}=H.util,{resolve:h}=H.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=bb[x]||(bb[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 jc(h(e,A.headers.location),r)}if(r.expectStatusCode&&x!==r.expectStatusCode)throw A.resume(),new Cd(x);let v=[];for await(const S of A)v.push(S);let C=H.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=D0(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 jc(e,{...r,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(j){j&&j.fingerprint256&&(m=new Dc(`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 Dc(`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 JP=new Set(["Accept","Accept-Language","Content-Language","Content-Type"].map(e=>e.toLowerCase())),YP=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 XP(e,t){let r={...x0,...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();(JP.has(p)||r.cors&&!YP.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 Cd(f.status);const h=D0(new Uint8Array(await f.arrayBuffer()),r.type);return r.full?{headers:Object.fromEntries(f.headers.entries()),status:f.status,body:h}:h}const ZP=!!(typeof H.dist.process=="object"&&H.dist.process.versions&&H.dist.process.versions.node&&H.dist.process.versions.v8);function QP(e,t){return(ZP?jc:XP)(e,t)}Gi.default=QP;Object.defineProperty(Mo,"__esModule",{value:!0});Mo.getProvider=Mo.fetchFromProvider=void 0;const eB=Gi,tB=async(e,t)=>(await(0,eB.default)(e,{headers:{"content-type":"application/json"},type:"json",data:{method:t.method,params:t.params,jsonrpc:"2.0",id:1}})).result;Mo.fetchFromProvider=tB;const rB=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=rB;(function(e){var t=H.commonjsGlobal&&H.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=H.commonjsGlobal&&H.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(Wu,e),r(Zu,e),r(Ad,e),r(Ws,e),r(ef,e),r(Qt,e),r(Qi,e),r(Od,e),r(M0,e),r(nf,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(of,e),r(Mo,e)})(yL);var j0={exports:{}};(function(e){(function(t,r){e.exports?e.exports=r():t.log=r()})(H.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})})(j0);var U0=j0.exports;const mu=H.getDefaultExportFromCjs(U0);var Eu={exports:{}};Eu.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]",W="[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[W]=!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 H.commonjsGlobal=="object"&&H.commonjsGlobal&&H.commonjsGlobal.Object===Object&&H.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&&oa(M),tt=!le&&!Le&&!Ke&&aa(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)?Ys(M):Qs(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(na(M))}function ni(M){return $n(M)&&sa(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 Gs(M,X,le,Le,Ke){M!==X&&Oi(X,function(tt,ct){if(Ke||(Ke=new Gt),Nn(tt))cf(M,X,ct,le,Gs,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)}},ua)}function cf(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&&oa(st),Yo=!zt&&!io&&aa(st);Vt=st,zt||io||Yo?zo(De)?Vt=De:ia(De)?Vt=Ho(De):io?(Mn=!1,Vt=Vs(st)):Yo?(Mn=!1,Vt=Ks(st)):Vt=[]:bf(st)||Vo(st)?(Vt=De,Vo(De)?Vt=_f(De):(!Nn(De)||Jo(De))&&(Vt=Xs(st))):Mn=!1}Mn&&(ct.set(st,Vt),Ke(Vt,st,Le,tt,ct),ct.delete(st)),Bn(M,le,Vt)}function df(M,X){return ta(ea(M,X,nt),M+"")}var hf=lr?function(M,X){return lr(M,"toString",{configurable:!0,enumerable:!1,value:ut(X),writable:!0})}:nt;function Vs(M,X){return M.slice()}function zs(M){var X=new M.constructor(M.byteLength);return new Lt(X).set(new Lt(M)),X}function Ks(M,X){var le=zs(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 gf(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 Js(M){return df(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&&pf(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 Zs(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 Ys(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 Xs(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 pf(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 Zs(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 Qs(M){return et.call(M)}function ea(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 ta=ra(hf);function ra(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 na(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&&sa(M.length)&&!Jo(M)}function ia(M){return $n(M)&&Ko(M)}var oa=zr||wf;function Jo(M){if(!Nn(M))return!1;var X=pn(M);return X==A||X==x||X==p||X==S}function sa(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 bf(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 aa=g?J(g):ni;function _f(M){return gf(M,ua(M))}function ua(M){return Ko(M)?Ii(M):ii(M)}var yf=Js(function(M,X,le){Gs(M,X,le)});function ut(M){return function(){return M}}function nt(M){return M}function wf(){return!1}e.exports=yf})(Eu,Eu.exports);Eu.exports;const nB=mu.getLogger("http-helpers");nB.setLevel(U0.levels.INFO);var vu={exports:{}};/**
4
4
  * @license