@wormhole-foundation/wormhole-connect 2.5.0-beta.0-development → 2.5.0-beta.2-development
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{aptos-t5JANz4b.js → aptos-BGyyK8mz.js} +3 -3
- package/dist/assets/{aptos-DvAOSqnD.js → aptos-Cepohe0c.js} +1 -1
- package/dist/assets/{blake2b-CzqSqyTv.js → blake2b-BwI-z5NJ.js} +1 -1
- package/dist/assets/{ccip-4EBcfi6P.js → ccip-BpjdU5zN.js} +1 -1
- package/dist/assets/{chunk-IMTC3J2M-Cms0K4gx.js → chunk-IMTC3J2M-CWE1FuDc.js} +1 -1
- package/dist/assets/events-6PekJgMN.js +1 -0
- package/dist/assets/{evm-8e-eySdo.js → evm-DS7RCBlt.js} +2 -2
- package/dist/assets/{evm-CYjbe4kH.js → evm-DvDOQf0K.js} +4 -4
- package/dist/assets/{index-M2j4uONF.js → index-5kmPKAJ_.js} +1 -1
- package/dist/assets/{index-DALVDBZq.js → index-BP8gdgNH.js} +1 -1
- package/dist/assets/{index-BgVVAYar.js → index-BXRb91Mn.js} +1 -1
- package/dist/assets/{index-SO_H3W5I.js → index-Bbr14gKC.js} +1 -1
- package/dist/assets/index-BjVbgKwL.js +1 -0
- package/dist/assets/{index-JtvUouOr.js → index-BwPu1wGj.js} +1 -1
- package/dist/assets/{index-CwGBYrGm.js → index-BxXKtU8j.js} +1 -1
- package/dist/assets/{index-BKj7Inys.js → index-BzNSt2uL.js} +1 -1
- package/dist/assets/{index-CSHmWPOV.js → index-C1f05Vbe.js} +1 -1
- package/dist/assets/{index-BcX-2q-J.js → index-C74fy0qh.js} +1 -1
- package/dist/assets/{index-Dl17aI3S.js → index-CCOom38X.js} +1 -1
- package/dist/assets/{index-C0rvraea.js → index-CHnF49kB.js} +1 -1
- package/dist/assets/{index-DmaqQuhH.js → index-CyxmcHOs.js} +1 -1
- package/dist/assets/{index-Chd_bwGM.js → index-D1MoRUWm.js} +1 -1
- package/dist/assets/{index-CqA1lXp5.js → index-D54DXHBu.js} +1 -1
- package/dist/assets/index-D8nnAO88.js +1 -0
- package/dist/assets/index-DpMc0uqY.js +1 -0
- package/dist/assets/{index-Ced_GF9G.js → index-FNyibGfB.js} +2 -2
- package/dist/assets/{index-D9U4BOHM.js → index-X7Qc-hll.js} +1 -1
- package/dist/assets/{index-CcMXeWAX.js → index-YqzS8F8M.js} +2 -2
- package/dist/assets/{index.es-Bzsluoyw.js → index.es-B2WvD5Rz.js} +6 -6
- package/dist/assets/{solana-BHeUantu.js → solana-Dj3oh4lV.js} +2 -2
- package/dist/assets/solana-DseaNtL0.js +2 -0
- package/dist/assets/solanaEmbed.esm-xl7iC7nm.js +37 -0
- package/dist/assets/sui-BdOrw1dc.js +2 -0
- package/dist/assets/{sui-CLrvrAHM.js → sui-Ck-FZzH_.js} +1 -1
- package/dist/assets/unsignedTransaction-arVvzoJx.js +1 -0
- package/dist/main.js +102 -102
- package/dist/src/AppRouter.d.ts.map +1 -1
- package/dist/src/utils/coingecko.d.ts.map +1 -1
- package/lib/{aptos-By3qLiAP.js → aptos-BHFBFxf9.js} +1 -1
- package/lib/{aptos-C3Ph4uY9.mjs → aptos-BusONhYq.mjs} +5 -5
- package/lib/{aptos-Cs46Nns5.mjs → aptos-DS0eK_De.mjs} +2 -2
- package/lib/{aptos-D7X5GMcO.js → aptos-Dqp93_ct.js} +2 -2
- package/lib/{base64-B-n8C-1n.js → base64-Cjk6rii_.js} +1 -1
- package/lib/{base64-DxqKuhqD.mjs → base64-Vgzj53Io.mjs} +1 -1
- package/lib/{ccip-BoG9ZHRV.js → ccip-BLUli_Dz.js} +1 -1
- package/lib/{ccip-DgwbitdX.mjs → ccip-FbY2UZlg.mjs} +1 -1
- package/lib/{chunk-IMTC3J2M-DfLEkM5Z.js → chunk-IMTC3J2M-6yduhw0s.js} +1 -1
- package/lib/{chunk-IMTC3J2M-w136PyXJ.mjs → chunk-IMTC3J2M-AkEA0_z6.mjs} +3 -3
- package/lib/{evm-Bta1KBsb.js → evm-BB0d_Gf4.js} +2 -2
- package/lib/{evm--NPB9x1d.mjs → evm-DAHEa0cY.mjs} +5 -5
- package/lib/{evm-BwXOj4Er.js → evm-DZww7tTt.js} +3 -3
- package/lib/{evm-OXQXmbRf.mjs → evm-gEzFFEsO.mjs} +6 -6
- package/lib/{index-C2jvFfvC.js → index-6m6Q8Vsa.js} +1 -1
- package/lib/{index-0m16n7L7.js → index-8STuBnQE.js} +1 -1
- package/lib/{index-hFtbBndd.js → index-B5i1j7Dy.js} +1 -1
- package/lib/{index-CoEGiDGu.js → index-BZh72NtL.js} +1 -1
- package/lib/{index-C86P0A0Y.mjs → index-BaMrMiTv.mjs} +1 -1
- package/lib/{index-BEHglvs0.js → index-BbxXJYWg.js} +1 -1
- package/lib/{index-ByicGRKs.mjs → index-Bcl7n3KD.mjs} +2 -2
- package/lib/{index-Bi6PAFR8.mjs → index-BeYO1LV3.mjs} +2 -2
- package/lib/{index-wsfzS6PN.js → index-Bhgci81L.js} +120 -120
- package/lib/{index-CWffCIQl.js → index-BuPKwE_4.js} +1 -1
- package/lib/{index-C5tynAhb.mjs → index-C27ZY3oS.mjs} +1 -1
- package/lib/{index-bDliG7yg.mjs → index-C6YOw6gB.mjs} +4 -4
- package/lib/{index-1WX3nZoM.mjs → index-CA09NOzo.mjs} +3 -3
- package/lib/index-CHaex8L3.mjs +75 -0
- package/lib/{index-B5z5oFY1.js → index-CSK3DRpf.js} +1 -1
- package/lib/{index-Cslbrg97.js → index-CT45reKG.js} +1 -1
- package/lib/{index-PnMJX4OC.mjs → index-CkXJo6xD.mjs} +1 -1
- package/lib/{index-FGc8swXY.mjs → index-Cs1dlfzD.mjs} +1 -1
- package/lib/{index-CKtZvS3X.mjs → index-CxTd6N-A.mjs} +2 -2
- package/lib/{index-CGbtcED2.mjs → index-D9hjnIst.mjs} +2 -2
- package/lib/{index-CksJcNrV.mjs → index-DDZaEBsC.mjs} +3 -3
- package/lib/{index-CDwpyfnd.mjs → index-DR-fv3uE.mjs} +2 -2
- package/lib/{index-BGqNMVpQ.js → index-DUC1gOTG.js} +1 -1
- package/lib/{index-Bpx_Rf1J.js → index-DUZnVNwZ.js} +1 -1
- package/lib/{index-DLiQpgMj.js → index-DXzXHly-.js} +1 -1
- package/lib/{index-MytorfyK.mjs → index-D_PIxJ0d.mjs} +2 -2
- package/lib/index-D_XBMeuk.js +1 -0
- package/lib/{index-DSejRtdA.js → index-DcYZkDfF.js} +1 -1
- package/lib/{index-cyTUScMF.js → index-DhR1_nfh.js} +1 -1
- package/lib/index-DhowVYVk.mjs +191 -0
- package/lib/{index-BLxoZ8qT.js → index-DlNp9VMO.js} +1 -1
- package/lib/{index-zMaT9P4V.mjs → index-DpeIjsSi.mjs} +1 -1
- package/lib/{index-B3smMSuW.js → index-Ds5QMWJr.js} +1 -1
- package/lib/{index-BXc3l4Br.mjs → index-Ds6Q5qfX.mjs} +2 -2
- package/lib/{index-DlW1-aGm.js → index-DtjJKYjA.js} +1 -1
- package/lib/{index-ILKgpNXM.js → index-FoZ3qnSm.js} +1 -1
- package/lib/{index-CoX_24Ky.mjs → index-GSQqQOXb.mjs} +1 -1
- package/lib/{index-m0543tB2.mjs → index-LdDD7AAy.mjs} +20959 -32801
- package/lib/index-OqOcvaDE.mjs +654 -0
- package/lib/{index-50mhIuON.mjs → index-QCqnETT_.mjs} +2 -2
- package/lib/index-j8CdhHvQ.js +1 -0
- package/lib/{index-Dt0J9sau.js → index-pWRTEePn.js} +1 -1
- package/lib/{index-DPM7TGSv.mjs → index-pg4EQbm-.mjs} +11 -2
- package/lib/index-s9pQs8eO.js +1 -0
- package/lib/{index-CANn2DFq.mjs → index-tI4rmxN8.mjs} +1 -1
- package/lib/{index-NTAse-vE.js → index-u05I0QmU.js} +1 -1
- package/lib/{index.es-DIL345_I.js → index.es-BeAVotPr.js} +2 -2
- package/lib/{index.es-Bh1QXm67.mjs → index.es-Z5ZsZIyC.mjs} +5 -5
- package/lib/index.js +1 -1
- package/lib/index.mjs +19 -19
- package/lib/{signer-CeNONJjb.mjs → signer-B0f07_6U.mjs} +1 -1
- package/lib/{signer-Br2-fgMa.js → signer-yr6Zpc2i.js} +1 -1
- package/lib/{solana-C5lAA_Eh.mjs → solana-C-LeRjT-.mjs} +4 -4
- package/lib/solana-Ci7N1M7R.js +1 -0
- package/lib/solana-DCefclYK.mjs +17 -0
- package/lib/{solana-Bwwk-8HE.js → solana-DWYDxAWP.js} +1 -1
- package/lib/{solanaEmbed.esm-_NPc8tZC.mjs → solanaEmbed.esm-CEtmCHNm.mjs} +1 -1
- package/lib/{solanaEmbed.esm-BMTrlSVI.js → solanaEmbed.esm-D5pFIuXZ.js} +1 -1
- package/lib/src/AppRouter.d.ts.map +1 -1
- package/lib/src/utils/coingecko.d.ts.map +1 -1
- package/lib/sui-756LVCZm.js +1 -0
- package/lib/{sui-zLYQBpSC.js → sui-BIUo4whG.js} +1 -1
- package/lib/sui-BuI3_sI0.mjs +585 -0
- package/lib/{sui-X62i5q3_.mjs → sui-naAV3r83.mjs} +1 -1
- package/package.json +17 -17
- package/dist/assets/index-BRtMY3at.js +0 -1
- package/dist/assets/index-BUlVFUMr.js +0 -1
- package/dist/assets/index-RBS_ALc7.js +0 -1
- package/dist/assets/solana-BEFCVrXa.js +0 -2
- package/dist/assets/solanaEmbed.esm-B7A7qKmk.js +0 -37
- package/dist/assets/sui-C1wbtvIC.js +0 -2
- package/lib/index-CNkTJOH_.js +0 -1
- package/lib/index-DN6dWOSB.js +0 -1
- package/lib/index-DUOnxuE_.mjs +0 -252
- package/lib/index-DqFY4i5u.js +0 -1
- package/lib/index-Eomc9IwB.mjs +0 -936
- package/lib/index-fkzogQYE.mjs +0 -376
- package/lib/solana-4Qcfxe9o.js +0 -1
- package/lib/solana-DM9nG3cQ.mjs +0 -17
- package/lib/sui-BvJu9wTN.mjs +0 -701
- package/lib/sui-pGBefbTJ.js +0 -1
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import{bW as Pn,S as _r,b$ as ks,i as de,H as Ye,c0 as Bn,c1 as Qb,c2 as Ls,j as Oi,c3 as Xi,bV as V1,s as zg,c4 as G1,c5 as z1,c6 as K1,c7 as J1,c8 as Y1,c9 as X1,P as Kg}from"../main.js";function Ps(e){"@babel/helpers - typeof";return Ps=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},Ps(e)}function Z1(e,t){if(Ps(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(Ps(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Q1(e){var t=Z1(e,"string");return Ps(t)=="symbol"?t:t+""}var Sc={exports:{}},e_=Pn.EventEmitter,Pl,Jg;function eA(){if(Jg)return Pl;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=g(x,"string");return typeof v=="symbol"?v:String(v)}function g(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=_r,h=l.Buffer,b=ks,w=b.inspect,I=w&&w.custom||"inspect";function A(x,v,C){h.prototype.copy.call(x,v,C)}return Pl=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 h.alloc(0);for(var B=h.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=h.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}(),Pl}function tA(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,de.process.nextTick(Rc,this,e)):de.process.nextTick(Rc,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?de.process.nextTick(hu,r):(r._writableState.errorEmitted=!0,de.process.nextTick(Yg,r,u)):de.process.nextTick(Yg,r,u):t?(de.process.nextTick(hu,r),t(u)):de.process.nextTick(hu,r)}),this)}function Yg(e,t){Rc(e,t),hu(e)}function hu(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function rA(){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 Rc(e,t){e.emit("error",t)}function nA(e,t){var r=e._readableState,o=e._writableState;r&&r.autoDestroy||o&&o.autoDestroy?e.destroy(t):e.emit("error",t)}var t_={destroy:tA,undestroy:rA,errorOrDestroy:nA},Zi={};function iA(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var r_={};function Vr(e,t,r){r||(r=Error);function o(u,f,g){return typeof t=="string"?t:t(u,f,g)}var s=function(u){iA(f,u);function f(g,l,h){return u.call(this,o(g,l,h))||this}return f}(r);s.prototype.name=r.name,s.prototype.code=e,r_[e]=s}function Xg(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 oA(e,t,r){return e.substr(0,t.length)===t}function sA(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function aA(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}Vr("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Vr("ERR_INVALID_ARG_TYPE",function(e,t,r){var o;typeof t=="string"&&oA(t,"not ")?(o="must not be",t=t.replace(/^not /,"")):o="must be";var s;if(sA(e," argument"))s="The ".concat(e," ").concat(o," ").concat(Xg(t,"type"));else{var u=aA(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(o," ").concat(Xg(t,"type"))}return s+=". Received type ".concat(typeof r),s},TypeError);Vr("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Vr("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Vr("ERR_STREAM_PREMATURE_CLOSE","Premature close");Vr("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Vr("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Vr("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Vr("ERR_STREAM_WRITE_AFTER_END","write after end");Vr("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Vr("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Vr("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Zi.codes=r_;var uA=Zi.codes.ERR_INVALID_OPT_VALUE;function fA(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function lA(e,t,r,o){var s=fA(t,o,r);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var u=o?r:"highWaterMark";throw new uA(u,s)}return Math.floor(s)}return e.objectMode?16:16*1024}var n_={getHighWaterMark:lA},Bl,Zg;function i_(){if(Zg)return Bl;Zg=1,Bl=ae;function e(R){var O=this;this.next=null,this.entry=null,this.finish=function(){be(O,R)}}var t;ae.WritableState=Z;var r={deprecate:Qb},o=e_,s=_r.Buffer,u=(typeof Ye<"u"?Ye:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function f(R){return s.from(R)}function g(R){return s.isBuffer(R)||R instanceof u}var l=t_,h=n_,b=h.getHighWaterMark,w=Zi.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;Bn(ae,o);function j(){}function Z(R,O,W){t=t||No(),R=R||{},typeof W!="boolean"&&(W=O instanceof t),this.objectMode=!!R.objectMode,W&&(this.objectMode=this.objectMode||!!R.writableObjectMode),this.highWaterMark=b(this,R,"writableHighWaterMark",W),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ie=R.decodeStrings===!1;this.decodeStrings=!ie,this.defaultEncoding=R.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ye){J(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)}Z.prototype.getBuffer=function(){for(var O=this.bufferedRequest,W=[];O;)W.push(O),O=O.next;return W},function(){try{Object.defineProperty(Z.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var le;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(le=Function.prototype[Symbol.hasInstance],Object.defineProperty(ae,Symbol.hasInstance,{value:function(O){return le.call(this,O)?!0:this!==ae?!1:O&&O._writableState instanceof Z}})):le=function(O){return O instanceof this};function ae(R){t=t||No();var O=this instanceof t;if(!O&&!le.call(ae,this))return new ae(R);this._writableState=new Z(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)}ae.prototype.pipe=function(){m(this,new v)};function ee(R,O){var W=new P;m(R,W),de.process.nextTick(O,W)}function Se(R,O,W,ie){var ye;return W===null?ye=new B:typeof W!="string"&&!O.objectMode&&(ye=new I("chunk",["string","Buffer"],W)),ye?(m(R,ye),de.process.nextTick(ie,ye),!1):!0}ae.prototype.write=function(R,O,W){var ie=this._writableState,ye=!1,d=!ie.objectMode&&g(R);return d&&!s.isBuffer(R)&&(R=f(R)),typeof O=="function"&&(W=O,O=null),d?O="buffer":O||(O=ie.defaultEncoding),typeof W!="function"&&(W=j),ie.ending?ee(this,W):(d||Se(this,ie,R,W))&&(ie.pendingcb++,ye=F(this,ie,d,R,O,W)),ye},ae.prototype.cork=function(){this._writableState.corked++},ae.prototype.uncork=function(){var R=this._writableState;R.corked&&(R.corked--,!R.writing&&!R.corked&&!R.bufferProcessing&&R.bufferedRequest&&H(this,R))},ae.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(ae.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function me(R,O,W){return!R.objectMode&&R.decodeStrings!==!1&&typeof O=="string"&&(O=s.from(O,W)),O}Object.defineProperty(ae.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function F(R,O,W,ie,ye,d){if(!W){var p=me(O,ie,ye);ie!==p&&(W=!0,ye="buffer",ie=p)}var _=O.objectMode?1:ie.length;O.length+=_;var E=O.length<O.highWaterMark;if(E||(O.needDrain=!0),O.writing||O.corked){var K=O.lastBufferedRequest;O.lastBufferedRequest={chunk:ie,encoding:ye,isBuf:W,callback:d,next:null},K?K.next=O.lastBufferedRequest:O.bufferedRequest=O.lastBufferedRequest,O.bufferedRequestCount+=1}else U(R,O,!1,_,ie,ye,d);return E}function U(R,O,W,ie,ye,d,p){O.writelen=ie,O.writecb=p,O.writing=!0,O.sync=!0,O.destroyed?O.onwrite(new C("write")):W?R._writev(ye,O.onwrite):R._write(ye,d,O.onwrite),O.sync=!1}function $(R,O,W,ie,ye){--O.pendingcb,W?(de.process.nextTick(ye,ie),de.process.nextTick(te,R,O),R._writableState.errorEmitted=!0,m(R,ie)):(ye(ie),R._writableState.errorEmitted=!0,m(R,ie),te(R,O))}function q(R){R.writing=!1,R.writecb=null,R.length-=R.writelen,R.writelen=0}function J(R,O){var W=R._writableState,ie=W.sync,ye=W.writecb;if(typeof ye!="function")throw new x;if(q(W),O)$(R,W,ie,O,ye);else{var d=z(W)||R.destroyed;!d&&!W.corked&&!W.bufferProcessing&&W.bufferedRequest&&H(R,W),ie?de.process.nextTick(V,R,W,d,ye):V(R,W,d,ye)}}function V(R,O,W,ie){W||re(R,O),O.pendingcb--,ie(),te(R,O)}function re(R,O){O.length===0&&O.needDrain&&(O.needDrain=!1,R.emit("drain"))}function H(R,O){O.bufferProcessing=!0;var W=O.bufferedRequest;if(R._writev&&W&&W.next){var ie=O.bufferedRequestCount,ye=new Array(ie),d=O.corkedRequestsFree;d.entry=W;for(var p=0,_=!0;W;)ye[p]=W,W.isBuf||(_=!1),W=W.next,p+=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(;W;){var E=W.chunk,K=W.encoding,ne=W.callback,oe=O.objectMode?1:E.length;if(U(R,O,!1,oe,E,K,ne),W=W.next,O.bufferedRequestCount--,O.writing)break}W===null&&(O.lastBufferedRequest=null)}O.bufferedRequest=W,O.bufferProcessing=!1}ae.prototype._write=function(R,O,W){W(new A("_write()"))},ae.prototype._writev=null,ae.prototype.end=function(R,O,W){var ie=this._writableState;return typeof R=="function"?(W=R,R=null,O=null):typeof O=="function"&&(W=O,O=null),R!=null&&this.write(R,O),ie.corked&&(ie.corked=1,this.uncork()),ie.ending||_e(this,ie,W),this},Object.defineProperty(ae.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function z(R){return R.ending&&R.length===0&&R.bufferedRequest===null&&!R.finished&&!R.writing}function se(R,O){R._final(function(W){O.pendingcb--,W&&m(R,W),O.prefinished=!0,R.emit("prefinish"),te(R,O)})}function ce(R,O){!O.prefinished&&!O.finalCalled&&(typeof R._final=="function"&&!O.destroyed?(O.pendingcb++,O.finalCalled=!0,de.process.nextTick(se,R,O)):(O.prefinished=!0,R.emit("prefinish")))}function te(R,O){var W=z(O);if(W&&(ce(R,O),O.pendingcb===0&&(O.finished=!0,R.emit("finish"),O.autoDestroy))){var ie=R._readableState;(!ie||ie.autoDestroy&&ie.endEmitted)&&R.destroy()}return W}function _e(R,O,W){O.ending=!0,te(R,O),W&&(O.finished?de.process.nextTick(W):R.once("finish",W)),O.ended=!0,R.writable=!1}function be(R,O,W){var ie=R.entry;for(R.entry=null;ie;){var ye=ie.callback;O.pendingcb--,ye(W),ie=ie.next}O.corkedRequestsFree.next=R}return Object.defineProperty(ae.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(O){this._writableState&&(this._writableState.destroyed=O)}}),ae.prototype.destroy=l.destroy,ae.prototype._undestroy=l.undestroy,ae.prototype._destroy=function(R,O){O(R)},Bl}var Nl,Qg;function No(){if(Qg)return Nl;Qg=1;var e=Object.keys||function(h){var b=[];for(var w in h)b.push(w);return b};Nl=f;var t=s_(),r=i_();Bn(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(h){if(!(this instanceof f))return new f(h);t.call(this,h),r.call(this,h),this.allowHalfOpen=!0,h&&(h.readable===!1&&(this.readable=!1),h.writable===!1&&(this.writable=!1),h.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",g)))}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 g(){this._writableState.ended||de.process.nextTick(l,this)}function l(h){h.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)}}),Nl}var ep=Zi.codes.ERR_STREAM_PREMATURE_CLOSE;function cA(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 dA(){}function hA(e){return e.setHeader&&typeof e.abort=="function"}function o_(e,t,r){if(typeof t=="function")return o_(e,null,t);t||(t={}),r=cA(r||dA);var o=t.readable||t.readable!==!1&&e.readable,s=t.writable||t.writable!==!1&&e.writable,u=function(){e.writable||g()},f=e._writableState&&e._writableState.finished,g=function(){s=!1,f=!0,o||r.call(e)},l=e._readableState&&e._readableState.endEmitted,h=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 ep),r.call(e,x);if(s&&!f)return(!e._writableState||!e._writableState.ended)&&(x=new ep),r.call(e,x)},I=function(){e.req.on("finish",g)};return hA(e)?(e.on("complete",g),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",h),e.on("finish",g),t.error!==!1&&e.on("error",b),e.on("close",w),function(){e.removeListener("complete",g),e.removeListener("abort",w),e.removeListener("request",I),e.req&&e.req.removeListener("finish",g),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",g),e.removeListener("end",h),e.removeListener("error",b),e.removeListener("close",w)}}var Zc=o_,$l,tp;function gA(){if(tp)return $l;tp=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 Z=j.call(S,m);if(typeof Z!="object")return Z;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(S)}var s=Zc,u=Symbol("lastResolve"),f=Symbol("lastReject"),g=Symbol("error"),l=Symbol("ended"),h=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[h]=null,S[u]=null,S[f]=null,m(I(j,!1)))}}function x(S){de.process.nextTick(A,S)}function v(S,m){return function(j,Z){S.then(function(){if(m[l]){j(I(void 0,!0));return}m[b](j,Z)},Z)}}var C=Object.getPrototypeOf(function(){}),B=Object.setPrototypeOf((e={get stream(){return this[w]},next:function(){var m=this,j=this[g];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(ee,Se){de.process.nextTick(function(){m[g]?Se(m[g]):ee(I(void 0,!0))})});var Z=this[h],le;if(Z)le=new Promise(v(Z,this));else{var ae=this[w].read();if(ae!==null)return Promise.resolve(I(ae,!1));le=new Promise(this[b])}return this[h]=le,le}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var m=this;return new Promise(function(j,Z){m[w].destroy(null,function(le){if(le){Z(le);return}j(I(void 0,!0))})})}),e),C),P=function(m){var j,Z=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,g,{value:null,writable:!0}),t(j,l,{value:m._readableState.endEmitted,writable:!0}),t(j,b,{value:function(ae,ee){var Se=Z[w].read();Se?(Z[h]=null,Z[u]=null,Z[f]=null,ae(I(Se,!1))):(Z[u]=ae,Z[f]=ee)},writable:!0}),j));return Z[h]=null,s(m,function(le){if(le&&le.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ae=Z[f];ae!==null&&(Z[h]=null,Z[u]=null,Z[f]=null,ae(le)),Z[g]=le;return}var ee=Z[u];ee!==null&&(Z[h]=null,Z[u]=null,Z[f]=null,ee(I(void 0,!0))),Z[l]=!0}),m.on("readable",x.bind(null,Z)),Z};return $l=P,$l}var Ml,rp;function pA(){return rp||(rp=1,Ml=function(){throw new Error("Readable.from is not available in the browser")}),Ml}var xl,np;function s_(){if(np)return xl;np=1,xl=ee;var e;ee.ReadableState=ae,Pn.EventEmitter;var t=function(p,_){return p.listeners(_).length},r=e_,o=_r.Buffer,s=(typeof Ye<"u"?Ye: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 g=ks,l;g&&g.debuglog?l=g.debuglog("stream"):l=function(){};var h=eA(),b=t_,w=n_,I=w.getHighWaterMark,A=Zi.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;Bn(ee,r);var j=b.errorOrDestroy,Z=["error","close","destroy","pause","resume"];function le(d,p,_){if(typeof d.prependListener=="function")return d.prependListener(p,_);!d._events||!d._events[p]?d.on(p,_):Array.isArray(d._events[p])?d._events[p].unshift(_):d._events[p]=[_,d._events[p]]}function ae(d,p,_){e=e||No(),d=d||{},typeof _!="boolean"&&(_=p instanceof e),this.objectMode=!!d.objectMode,_&&(this.objectMode=this.objectMode||!!d.readableObjectMode),this.highWaterMark=I(this,d,"readableHighWaterMark",_),this.buffer=new h,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=Ls().StringDecoder),this.decoder=new P(d.encoding),this.encoding=d.encoding)}function ee(d){if(e=e||No(),!(this instanceof ee))return new ee(d);var p=this instanceof e;this._readableState=new ae(d,this,p),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(ee.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(p){this._readableState&&(this._readableState.destroyed=p)}}),ee.prototype.destroy=b.destroy,ee.prototype._undestroy=b.undestroy,ee.prototype._destroy=function(d,p){p(d)},ee.prototype.push=function(d,p){var _=this._readableState,E;return _.objectMode?E=!0:typeof d=="string"&&(p=p||_.defaultEncoding,p!==_.encoding&&(d=o.from(d,p),p=""),E=!0),Se(this,d,p,!1,E)},ee.prototype.unshift=function(d){return Se(this,d,null,!0,!1)};function Se(d,p,_,E,K){l("readableAddChunk",p);var ne=d._readableState;if(p===null)ne.reading=!1,J(d,ne);else{var oe;if(K||(oe=F(ne,p)),oe)j(d,oe);else if(ne.objectMode||p&&p.length>0)if(typeof p!="string"&&!ne.objectMode&&Object.getPrototypeOf(p)!==o.prototype&&(p=u(p)),E)ne.endEmitted?j(d,new B):me(d,ne,p,!0);else if(ne.ended)j(d,new v);else{if(ne.destroyed)return!1;ne.reading=!1,ne.decoder&&!_?(p=ne.decoder.write(p),ne.objectMode||p.length!==0?me(d,ne,p,!1):H(d,ne)):me(d,ne,p,!1)}else E||(ne.reading=!1,H(d,ne))}return!ne.ended&&(ne.length<ne.highWaterMark||ne.length===0)}function me(d,p,_,E){p.flowing&&p.length===0&&!p.sync?(p.awaitDrain=0,d.emit("data",_)):(p.length+=p.objectMode?1:_.length,E?p.buffer.unshift(_):p.buffer.push(_),p.needReadable&&V(d)),H(d,p)}function F(d,p){var _;return!f(p)&&typeof p!="string"&&p!==void 0&&!d.objectMode&&(_=new x("chunk",["string","Buffer","Uint8Array"],p)),_}ee.prototype.isPaused=function(){return this._readableState.flowing===!1},ee.prototype.setEncoding=function(d){P||(P=Ls().StringDecoder);var p=new P(d);this._readableState.decoder=p,this._readableState.encoding=this._readableState.decoder.encoding;for(var _=this._readableState.buffer.head,E="";_!==null;)E+=p.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 q(d,p){return d<=0||p.length===0&&p.ended?0:p.objectMode?1:d!==d?p.flowing&&p.length?p.buffer.head.data.length:p.length:(d>p.highWaterMark&&(p.highWaterMark=$(d)),d<=p.length?d:p.ended?p.length:(p.needReadable=!0,0))}ee.prototype.read=function(d){l("read",d),d=parseInt(d,10);var p=this._readableState,_=d;if(d!==0&&(p.emittedReadable=!1),d===0&&p.needReadable&&((p.highWaterMark!==0?p.length>=p.highWaterMark:p.length>0)||p.ended))return l("read: emitReadable",p.length,p.ended),p.length===0&&p.ended?W(this):V(this),null;if(d=q(d,p),d===0&&p.ended)return p.length===0&&W(this),null;var E=p.needReadable;l("need readable",E),(p.length===0||p.length-d<p.highWaterMark)&&(E=!0,l("length less than watermark",E)),p.ended||p.reading?(E=!1,l("reading or ended",E)):E&&(l("do read"),p.reading=!0,p.sync=!0,p.length===0&&(p.needReadable=!0),this._read(p.highWaterMark),p.sync=!1,p.reading||(d=q(_,p)));var K;return d>0?K=O(d,p):K=null,K===null?(p.needReadable=p.length<=p.highWaterMark,d=0):(p.length-=d,p.awaitDrain=0),p.length===0&&(p.ended||(p.needReadable=!0),_!==d&&p.ended&&W(this)),K!==null&&this.emit("data",K),K};function J(d,p){if(l("onEofChunk"),!p.ended){if(p.decoder){var _=p.decoder.end();_&&_.length&&(p.buffer.push(_),p.length+=p.objectMode?1:_.length)}p.ended=!0,p.sync?V(d):(p.needReadable=!1,p.emittedReadable||(p.emittedReadable=!0,re(d)))}}function V(d){var p=d._readableState;l("emitReadable",p.needReadable,p.emittedReadable),p.needReadable=!1,p.emittedReadable||(l("emitReadable",p.flowing),p.emittedReadable=!0,de.process.nextTick(re,d))}function re(d){var p=d._readableState;l("emitReadable_",p.destroyed,p.length,p.ended),!p.destroyed&&(p.length||p.ended)&&(d.emit("readable"),p.emittedReadable=!1),p.needReadable=!p.flowing&&!p.ended&&p.length<=p.highWaterMark,R(d)}function H(d,p){p.readingMore||(p.readingMore=!0,de.process.nextTick(z,d,p))}function z(d,p){for(;!p.reading&&!p.ended&&(p.length<p.highWaterMark||p.flowing&&p.length===0);){var _=p.length;if(l("maybeReadMore read 0"),d.read(0),_===p.length)break}p.readingMore=!1}ee.prototype._read=function(d){j(this,new C("_read()"))},ee.prototype.pipe=function(d,p){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,p);var K=(!p||p.end!==!1)&&d!==de.process.stdout&&d!==de.process.stderr,ne=K?Ie:yt;E.endEmitted?de.process.nextTick(ne):_.once("end",ne),d.on("unpipe",oe);function oe(Xe,Ge){l("onunpipe"),Xe===_&&Ge&&Ge.hasUnpiped===!1&&(Ge.hasUnpiped=!0,Ue())}function Ie(){l("onend"),d.end()}var Be=se(_);d.on("drain",Be);var Ce=!1;function Ue(){l("cleanup"),d.removeListener("close",_t),d.removeListener("finish",tt),d.removeListener("drain",Be),d.removeListener("error",He),d.removeListener("unpipe",oe),_.removeListener("end",Ie),_.removeListener("end",yt),_.removeListener("data",Re),Ce=!0,E.awaitDrain&&(!d._writableState||d._writableState.needDrain)&&Be()}_.on("data",Re);function Re(Xe){l("ondata");var Ge=d.write(Xe);l("dest.write",Ge),Ge===!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(Xe){l("onerror",Xe),yt(),d.removeListener("error",He),t(d,"error")===0&&j(d,Xe)}le(d,"error",He);function _t(){d.removeListener("finish",tt),yt()}d.once("close",_t);function tt(){l("onfinish"),d.removeListener("close",_t),yt()}d.once("finish",tt);function yt(){l("unpipe"),_.unpipe(d)}return d.emit("pipe",_),E.flowing||(l("pipe resume"),_.resume()),d};function se(d){return function(){var _=d._readableState;l("pipeOnDrain",_.awaitDrain),_.awaitDrain&&_.awaitDrain--,_.awaitDrain===0&&t(d,"data")&&(_.flowing=!0,R(d))}}ee.prototype.unpipe=function(d){var p=this._readableState,_={hasUnpiped:!1};if(p.pipesCount===0)return this;if(p.pipesCount===1)return d&&d!==p.pipes?this:(d||(d=p.pipes),p.pipes=null,p.pipesCount=0,p.flowing=!1,d&&d.emit("unpipe",this,_),this);if(!d){var E=p.pipes,K=p.pipesCount;p.pipes=null,p.pipesCount=0,p.flowing=!1;for(var ne=0;ne<K;ne++)E[ne].emit("unpipe",this,{hasUnpiped:!1});return this}var oe=ye(p.pipes,d);return oe===-1?this:(p.pipes.splice(oe,1),p.pipesCount-=1,p.pipesCount===1&&(p.pipes=p.pipes[0]),d.emit("unpipe",this,_),this)},ee.prototype.on=function(d,p){var _=r.prototype.on.call(this,d,p),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||de.process.nextTick(te,this)),_},ee.prototype.addListener=ee.prototype.on,ee.prototype.removeListener=function(d,p){var _=r.prototype.removeListener.call(this,d,p);return d==="readable"&&de.process.nextTick(ce,this),_},ee.prototype.removeAllListeners=function(d){var p=r.prototype.removeAllListeners.apply(this,arguments);return(d==="readable"||d===void 0)&&de.process.nextTick(ce,this),p};function ce(d){var p=d._readableState;p.readableListening=d.listenerCount("readable")>0,p.resumeScheduled&&!p.paused?p.flowing=!0:d.listenerCount("data")>0&&d.resume()}function te(d){l("readable nexttick read 0"),d.read(0)}ee.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,p){p.resumeScheduled||(p.resumeScheduled=!0,de.process.nextTick(be,d,p))}function be(d,p){l("resume",p.reading),p.reading||d.read(0),p.resumeScheduled=!1,d.emit("resume"),R(d),p.flowing&&!p.reading&&d.read(0)}ee.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 p=d._readableState;for(l("flow",p.flowing);p.flowing&&d.read()!==null;);}ee.prototype.wrap=function(d){var p=this,_=this._readableState,E=!1;d.on("end",function(){if(l("wrapped end"),_.decoder&&!_.ended){var oe=_.decoder.end();oe&&oe.length&&p.push(oe)}p.push(null)}),d.on("data",function(oe){if(l("wrapped data"),_.decoder&&(oe=_.decoder.write(oe)),!(_.objectMode&&oe==null)&&!(!_.objectMode&&(!oe||!oe.length))){var Ie=p.push(oe);Ie||(E=!0,d.pause())}});for(var K in d)this[K]===void 0&&typeof d[K]=="function"&&(this[K]=function(Ie){return function(){return d[Ie].apply(d,arguments)}}(K));for(var ne=0;ne<Z.length;ne++)d.on(Z[ne],this.emit.bind(this,Z[ne]));return this._read=function(oe){l("wrapped _read",oe),E&&(E=!1,d.resume())},this},typeof Symbol=="function"&&(ee.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=gA()),S(this)}),Object.defineProperty(ee.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(ee.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(ee.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(p){this._readableState&&(this._readableState.flowing=p)}}),ee._fromList=O,Object.defineProperty(ee.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function O(d,p){if(p.length===0)return null;var _;return p.objectMode?_=p.buffer.shift():!d||d>=p.length?(p.decoder?_=p.buffer.join(""):p.buffer.length===1?_=p.buffer.first():_=p.buffer.concat(p.length),p.buffer.clear()):_=p.buffer.consume(d,p.decoder),_}function W(d){var p=d._readableState;l("endReadable",p.endEmitted),p.endEmitted||(p.ended=!0,de.process.nextTick(ie,p,d))}function ie(d,p){if(l("endReadableNT",d.endEmitted,d.length),!d.endEmitted&&d.length===0&&(d.endEmitted=!0,p.readable=!1,p.emit("end"),d.autoDestroy)){var _=p._writableState;(!_||_.autoDestroy&&_.finished)&&p.destroy()}}typeof Symbol=="function"&&(ee.from=function(d,p){return m===void 0&&(m=pA()),m(ee,d,p)});function ye(d,p){for(var _=0,E=d.length;_<E;_++)if(d[_]===p)return _;return-1}return xl}var a_=Qn,Lu=Zi.codes,bA=Lu.ERR_METHOD_NOT_IMPLEMENTED,_A=Lu.ERR_MULTIPLE_CALLBACK,yA=Lu.ERR_TRANSFORM_ALREADY_TRANSFORMING,wA=Lu.ERR_TRANSFORM_WITH_LENGTH_0,Pu=No();Bn(Qn,Pu);function mA(e,t){var r=this._transformState;r.transforming=!1;var o=r.writecb;if(o===null)return this.emit("error",new _A);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 Qn(e){if(!(this instanceof Qn))return new Qn(e);Pu.call(this,e),this._transformState={afterTransform:mA.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",EA)}function EA(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){ip(e,t,r)}):ip(this,null,null)}Qn.prototype.push=function(e,t){return this._transformState.needTransform=!1,Pu.prototype.push.call(this,e,t)};Qn.prototype._transform=function(e,t,r){r(new bA("_transform()"))};Qn.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)}};Qn.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};Qn.prototype._destroy=function(e,t){Pu.prototype._destroy.call(this,e,function(r){t(r)})};function ip(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new wA;if(e._transformState.transforming)throw new yA;return e.push(null)}var vA=Bs,u_=a_;Bn(Bs,u_);function Bs(e){if(!(this instanceof Bs))return new Bs(e);u_.call(this,e)}Bs.prototype._transform=function(e,t,r){r(null,e)};var Dl;function SA(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var f_=Zi.codes,RA=f_.ERR_MISSING_ARGS,AA=f_.ERR_STREAM_DESTROYED;function op(e){if(e)throw e}function TA(e){return e.setHeader&&typeof e.abort=="function"}function IA(e,t,r,o){o=SA(o);var s=!1;e.on("close",function(){s=!0}),Dl===void 0&&(Dl=Zc),Dl(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,TA(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();o(f||new AA("pipe"))}}}function sp(e){e()}function OA(e,t){return e.pipe(t)}function CA(e){return!e.length||typeof e[e.length-1]!="function"?op:e.pop()}function LA(){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 RA("streams");var s,u=t.map(function(f,g){var l=g<t.length-1,h=g>0;return IA(f,l,h,function(b){s||(s=b),b&&u.forEach(sp),!l&&(u.forEach(sp),o(s))})});return t.reduce(OA)}var PA=LA;(function(e,t){t=e.exports=s_(),t.Stream=t,t.Readable=t,t.Writable=i_(),t.Duplex=No(),t.Transform=a_,t.PassThrough=vA,t.finished=Zc,t.pipeline=PA})(Sc,Sc.exports);var l_=Sc.exports;const{Transform:kN}=l_,{Transform:FN}=l_;var c_={};const ap=[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];c_.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],g=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],h=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,Z=e[40]^I,le=e[41]^A;I=r^(f<<1|g>>>31),A=o^(g<<1|f>>>31);const ae=e[2]^I,ee=e[3]^A,Se=e[12]^I,me=e[13]^A,F=e[22]^I,U=e[23]^A,$=e[32]^I,q=e[33]^A,J=e[42]^I,V=e[43]^A;I=s^(l<<1|h>>>31),A=u^(h<<1|l>>>31);const re=e[4]^I,H=e[5]^A,z=e[14]^I,se=e[15]^A,ce=e[24]^I,te=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=g^(w<<1|b>>>31);const W=e[6]^I,ie=e[7]^A,ye=e[16]^I,d=e[17]^A,p=e[26]^I,_=e[27]^A,E=e[36]^I,K=e[37]^A,ne=e[46]^I,oe=e[47]^A;I=l^(r<<1|o>>>31),A=h^(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,_t=e[38]^I,tt=e[39]^A,yt=e[48]^I,Xe=e[49]^A,Ge=x,jt=v,Pt=B<<4|C>>>28,ut=C<<4|B>>>28,Nt=P<<3|S>>>29,lr=S<<3|P>>>29,tr=j<<9|m>>>23,Ft=m<<9|j>>>23,cr=Z<<18|le>>>14,Jr=le<<18|Z>>>14,Yr=ae<<1|ee>>>31,un=ee<<1|ae>>>31,fn=me<<12|Se>>>20,rr=Se<<12|me>>>20,Lr=F<<10|U>>>22,nr=U<<10|F>>>22,$n=q<<13|$>>>19,Xr=$<<13|q>>>19,ln=J<<2|V>>>30,N=V<<2|J>>>30,D=H<<30|re>>>2,Ee=re<<30|H>>>2,ve=z<<6|se>>>26,Te=se<<6|z>>>26,wt=te<<11|ce>>>21,Rt=ce<<11|te>>>21,cn=_e<<15|be>>>17,Bt=be<<15|_e>>>17,dn=O<<29|R>>>3,Mn=R<<29|O>>>3,hn=W<<28|ie>>>4,gn=ie<<28|W>>>4,Zr=d<<23|ye>>>9,Gt=ye<<23|d>>>9,Pr=p<<25|_>>>7,mr=_<<25|p>>>7,ir=E<<21|K>>>11,Ht=K<<21|E>>>11,Pi=oe<<24|ne>>>8,Bi=ne<<24|oe>>>8,xn=Ie<<27|Be>>>5,pn=Be<<27|Ie>>>5,bn=Ce<<20|Ue>>>12,Br=Ue<<20|Ce>>>12,Ni=He<<7|Re>>>25,_n=Re<<7|He>>>25,oi=_t<<8|tt>>>24,si=tt<<8|_t>>>24,ai=yt<<14|Xe>>>18,ui=Xe<<14|yt>>>18;e[0]=Ge^~fn&wt,e[1]=jt^~rr&Rt,e[10]=hn^~bn&Nt,e[11]=gn^~Br&lr,e[20]=Yr^~ve&Pr,e[21]=un^~Te&mr,e[30]=xn^~Pt&Lr,e[31]=pn^~ut&nr,e[40]=D^~Zr&Ni,e[41]=Ee^~Gt&_n,e[2]=fn^~wt&ir,e[3]=rr^~Rt&Ht,e[12]=bn^~Nt&$n,e[13]=Br^~lr&Xr,e[22]=ve^~Pr&oi,e[23]=Te^~mr&si,e[32]=Pt^~Lr&cn,e[33]=ut^~nr&Bt,e[42]=Zr^~Ni&tr,e[43]=Gt^~_n&Ft,e[4]=wt^~ir&ai,e[5]=Rt^~Ht&ui,e[14]=Nt^~$n&dn,e[15]=lr^~Xr&Mn,e[24]=Pr^~oi&cr,e[25]=mr^~si&Jr,e[34]=Lr^~cn&Pi,e[35]=nr^~Bt&Bi,e[44]=Ni^~tr&ln,e[45]=_n^~Ft&N,e[6]=ir^~ai&Ge,e[7]=Ht^~ui&jt,e[16]=$n^~dn&hn,e[17]=Xr^~Mn&gn,e[26]=oi^~cr&Yr,e[27]=si^~Jr&un,e[36]=cn^~Pi&xn,e[37]=Bt^~Bi&pn,e[46]=tr^~ln&D,e[47]=Ft^~N&Ee,e[8]=ai^~Ge&fn,e[9]=ui^~jt&rr,e[18]=dn^~hn&bn,e[19]=Mn^~gn&Br,e[28]=cr^~Yr&ve,e[29]=Jr^~un&Te,e[38]=Pi^~xn&Pt,e[39]=Bi^~pn&ut,e[48]=ln^~D&Zr,e[49]=N^~Ee&Gt,e[0]^=ap[t*2],e[1]^=ap[t*2+1]}};const yu=c_;function Fs(){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}Fs.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};Fs.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&&(yu.p1600(this.state),this.count=0)};Fs.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<8*(this.count%4),e&128&&this.count===this.blockSize-1&&yu.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),yu.p1600(this.state),this.count=0,this.squeezing=!0};Fs.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const t=de.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&&(yu.p1600(this.state),this.count=0);return t};Fs.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 BA=NA;function NA(e){e=e||{};var t=e.max||Number.MAX_SAFE_INTEGER,r=typeof e.start<"u"?e.start:Math.floor(Math.random()*t);return function(){return r=r%t,r++}}const $A=Oi(BA);var Ac={exports:{}},jl,up;function MA(){if(up)return jl;up=1;var e=1e3,t=e*60,r=t*60,o=r*24,s=o*7,u=o*365.25;jl=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):g(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 g(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?h(b,w,o,"day"):w>=r?h(b,w,r,"hour"):w>=t?h(b,w,t,"minute"):w>=e?h(b,w,e,"second"):b+" ms"}function h(b,w,I,A){var x=w>=I*1.5;return Math.round(b/I)+" "+A+(x?"s":"")}return jl}function xA(e){r.debug=r,r.default=r,r.coerce=l,r.disable=f,r.enable=s,r.enabled=g,r.humanize=MA(),r.destroy=h,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,(Z,le)=>{if(Z==="%%")return"%";m++;const ae=r.formatters[le];if(typeof ae=="function"){const ee=C[m];Z=ae.call(B,ee),C.splice(m,1),m--}return Z}),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 g(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 h(){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 DA=xA;(function(e,t){var r={};t.formatArgs=s,t.save=u,t.load=f,t.useColors=o,t.storage=g(),t.destroy=(()=>{let h=!1;return()=>{h||(h=!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 o(){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 h;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&&(h=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(h[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function s(h){if(h[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+h[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const b="color: "+this.color;h.splice(1,0,b,"color: inherit");let w=0,I=0;h[0].replace(/%[a-zA-Z%]/g,A=>{A!=="%%"&&(w++,A==="%c"&&(I=w))}),h.splice(I,0,b)}t.log=console.debug||console.log||(()=>{});function u(h){try{h?t.storage.setItem("debug",h):t.storage.removeItem("debug")}catch{}}function f(){let h;try{h=t.storage.getItem("debug")}catch{}return!h&&typeof de.process<"u"&&"env"in de.process&&(h=r.DEBUG),h}function g(){try{return localStorage}catch{}}e.exports=DA(t);const{formatters:l}=e.exports;l.j=function(h){try{return JSON.stringify(h)}catch(b){return"[UnexpectedJSONParseError]: "+b.message}}})(Ac,Ac.exports);var jA=Ac.exports,sn={},Ai={},Qc=Ns;Ns.default=Ns;Ns.stable=g_;Ns.stableStringify=g_;var wu="[...]",d_="[Circular]",Ki=[],Gi=[];function h_(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Ns(e,t,r,o){typeof o>"u"&&(o=h_()),Tc(e,"",0,[],void 0,0,o);var s;try{Gi.length===0?s=JSON.stringify(e,t,r):s=JSON.stringify(e,p_(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Ki.length!==0;){var u=Ki.pop();u.length===4?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return s}function Co(e,t,r,o){var s=Object.getOwnPropertyDescriptor(o,r);s.get!==void 0?s.configurable?(Object.defineProperty(o,r,{value:e}),Ki.push([o,r,t,s])):Gi.push([t,r,e]):(o[r]=e,Ki.push([o,r,t]))}function Tc(e,t,r,o,s,u,f){u+=1;var g;if(typeof e=="object"&&e!==null){for(g=0;g<o.length;g++)if(o[g]===e){Co(d_,e,t,s);return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){Co(wu,e,t,s);return}if(typeof f.edgesLimit<"u"&&r+1>f.edgesLimit){Co(wu,e,t,s);return}if(o.push(e),Array.isArray(e))for(g=0;g<e.length;g++)Tc(e[g],g,g,o,e,u,f);else{var l=Object.keys(e);for(g=0;g<l.length;g++){var h=l[g];Tc(e[h],h,g,o,e,u,f)}}o.pop()}}function UA(e,t){return e<t?-1:e>t?1:0}function g_(e,t,r,o){typeof o>"u"&&(o=h_());var s=Ic(e,"",0,[],void 0,0,o)||e,u;try{Gi.length===0?u=JSON.stringify(s,t,r):u=JSON.stringify(s,p_(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Ki.length!==0;){var f=Ki.pop();f.length===4?Object.defineProperty(f[0],f[1],f[3]):f[0][f[1]]=f[2]}}return u}function Ic(e,t,r,o,s,u,f){u+=1;var g;if(typeof e=="object"&&e!==null){for(g=0;g<o.length;g++)if(o[g]===e){Co(d_,e,t,s);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){Co(wu,e,t,s);return}if(typeof f.edgesLimit<"u"&&r+1>f.edgesLimit){Co(wu,e,t,s);return}if(o.push(e),Array.isArray(e))for(g=0;g<e.length;g++)Ic(e[g],g,g,o,e,u,f);else{var l={},h=Object.keys(e).sort(UA);for(g=0;g<h.length;g++){var b=h[g];Ic(e[b],b,g,o,e,u,f),l[b]=e[b]}if(typeof s<"u")Ki.push([s,t,e]),s[t]=l;else return l}o.pop()}}function p_(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(Gi.length>0)for(var o=0;o<Gi.length;o++){var s=Gi[o];if(s[1]===t&&s[0]===r){r=s[2],Gi.splice(o,1);break}}return e.call(this,t,r)}}const kA=Oi(Qc);Object.defineProperty(Ai,"__esModule",{value:!0});Ai.EthereumProviderError=Ai.EthereumRpcError=void 0;const FA=Qc;class b_ 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 FA.default(this.serialize(),qA,2)}}Ai.EthereumRpcError=b_;let HA=class extends b_{constructor(t,r,o){if(!WA(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,o)}};Ai.EthereumProviderError=HA;function WA(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function qA(e,t){if(t!=="[Circular]")return t}var ed={},Ti={};Object.defineProperty(Ti,"__esModule",{value:!0});Ti.errorValues=Ti.errorCodes=void 0;Ti.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}};Ti.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=Ti,r=Ai,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(h(I))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return A}e.getMessageFromCode=f;function g(I){if(!Number.isInteger(I))return!1;const A=I.toString();return!!(t.errorValues[A]||h(I))}e.isValidCode=g;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")&&g(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 h(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)}})(ed);var Bu={};Object.defineProperty(Bu,"__esModule",{value:!0});Bu.ethErrors=void 0;const td=Ai,__=ed,Xt=Ti;Bu.ethErrors={rpc:{parse:e=>kr(Xt.errorCodes.rpc.parse,e),invalidRequest:e=>kr(Xt.errorCodes.rpc.invalidRequest,e),invalidParams:e=>kr(Xt.errorCodes.rpc.invalidParams,e),methodNotFound:e=>kr(Xt.errorCodes.rpc.methodNotFound,e),internal:e=>kr(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 kr(t,e)},invalidInput:e=>kr(Xt.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>kr(Xt.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>kr(Xt.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>kr(Xt.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>kr(Xt.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>kr(Xt.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>_s(Xt.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>_s(Xt.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>_s(Xt.errorCodes.provider.unsupportedMethod,e),disconnected:e=>_s(Xt.errorCodes.provider.disconnected,e),chainDisconnected:e=>_s(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 td.EthereumProviderError(t,r,o)}}};function kr(e,t){const[r,o]=y_(t);return new td.EthereumRpcError(e,r||__.getMessageFromCode(e),o)}function _s(e,t){const[r,o]=y_(t);return new td.EthereumProviderError(e,r||__.getMessageFromCode(e),o)}function y_(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=Ai;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const r=ed;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const o=Bu;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const s=Ti;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})})(sn);function Ne(e,t,r){return(t=Q1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var VA={exports:{}},Ul={exports:{}};let GA=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
|
-
`;super(r),this.name="AggregateError",this.errors=t}};var St={AggregateError:GA,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},w_={exports:{}},m_={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:zA,inspect:mu}=m_,{AggregateError:KA}=St,JA=globalThis.AggregateError||KA,YA=Symbol("kIsNodeError"),XA=["string","function","number","object","Function","Object","boolean","bigint","symbol"],ZA=/^([A-Z][a-z0-9]*)+$/,QA="__node_internal_",Nu={};function zi(e,t){if(!e)throw new Nu.ERR_INTERNAL_ASSERTION(t)}function fp(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 eT(e,t,r){if(typeof t=="function")return zi(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 zi(o===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${o}).`),r.length===0?t:zA(t,...r)}function Vt(e,t,r){r||(r=Error);class o extends r{constructor(...u){super(eT(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[YA]=!0,Nu[e]=o}function lp(e){const t=QA+e.name;return Object.defineProperty(e,"name",{value:t}),e}function tT(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new JA([t,e],t.message);return r.code=t.code,r}return e||t}let rT=class extends Error{constructor(t="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new Nu.ERR_INVALID_ARG_TYPE("options","Object",r);super(t,r),this.code="ABORT_ERR",this.name="AbortError"}};Vt("ERR_ASSERTION","%s",Error);Vt("ERR_INVALID_ARG_TYPE",(e,t,r)=>{zi(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)zi(typeof l=="string","All expected entries have to be of type string"),XA.includes(l)?s.push(l.toLowerCase()):ZA.test(l)?u.push(l):(zi(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 g;if((g=r.constructor)!==null&&g!==void 0&&g.name)o+=`. Received an instance of ${r.constructor.name}`;else{const l=mu(r,{depth:-1});o+=`. Received ${l}`}}else{let l=mu(r,{colors:!1});l.length>25&&(l=`${l.slice(0,25)}...`),o+=`. Received type ${typeof r} (${l})`}return o},TypeError);Vt("ERR_INVALID_ARG_VALUE",(e,t,r="is invalid")=>{let o=mu(t);return o.length>128&&(o=o.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${o}`},TypeError);Vt("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);Vt("ERR_MISSING_ARGS",(...e)=>{zi(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);Vt("ERR_OUT_OF_RANGE",(e,t,r)=>{zi(t,'Missing "range" argument');let o;if(Number.isInteger(r)&&Math.abs(r)>2**32)o=fp(String(r));else if(typeof r=="bigint"){o=String(r);const s=BigInt(2)**BigInt(32);(r>s||r<-s)&&(o=fp(o)),o+="n"}else o=mu(r);return`The value of "${e}" is out of range. It must be ${t}. Received ${o}`},RangeError);Vt("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);Vt("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);Vt("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);Vt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);Vt("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);Vt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Vt("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);Vt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);Vt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);Vt("ERR_STREAM_WRITE_AFTER_END","write after end",Error);Vt("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);var fr={AbortError:rT,aggregateTwoErrors:lp(tT),hideStackFrames:lp,codes:Nu},ys={exports:{}},cp;function $s(){if(cp)return ys.exports;cp=1;const{AbortController:e,AbortSignal:t}=typeof self<"u"?self:typeof window<"u"?window:void 0;return ys.exports=e,ys.exports.AbortSignal=t,ys.exports.default=e,ys.exports}(function(e){const t=_r,{format:r,inspect:o}=m_,{codes:{ERR_INVALID_ARG_TYPE:s}}=fr,{kResistStopPropagation:u,AggregateError:f,SymbolDispose:g}=St,l=globalThis.AbortSignal||$s().AbortSignal,h=globalThis.AbortController||$s().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:Pn.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,[g](){var S;(S=P)===null||S===void 0||S()}}},AbortSignalAny:l.any||function(C){if(C.length===1)return C[0];const B=new h,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")})(w_);var yr=w_.exports,rd={};const{ArrayIsArray:E_,ArrayPrototypeIncludes:nT,ArrayPrototypeJoin:iT,ArrayPrototypeMap:oT,NumberIsInteger:nd,NumberIsNaN:VN,NumberMAX_SAFE_INTEGER:sT,NumberMIN_SAFE_INTEGER:aT,NumberParseInt:GN,ObjectPrototypeHasOwnProperty:uT,RegExpPrototypeExec:zN,String:fT,StringPrototypeToUpperCase:KN,StringPrototypeTrim:JN}=St,{hideStackFrames:Gr,codes:{ERR_SOCKET_BAD_PORT:YN,ERR_INVALID_ARG_TYPE:zr,ERR_INVALID_ARG_VALUE:v_,ERR_OUT_OF_RANGE:$o,ERR_UNKNOWN_SIGNAL:XN}}=fr,{normalizeEncoding:ZN}=yr,{isAsyncFunction:lT,isArrayBufferView:cT}=yr.types,dT=Gr((e,t,r=aT,o=sT)=>{if(typeof e!="number")throw new zr(t,"number",e);if(!nd(e))throw new $o(t,"an integer",e);if(e<r||e>o)throw new $o(t,`>= ${r} && <= ${o}`,e)});Gr((e,t,r=-2147483648,o=2147483647)=>{if(typeof e!="number")throw new zr(t,"number",e);if(!nd(e))throw new $o(t,"an integer",e);if(e<r||e>o)throw new $o(t,`>= ${r} && <= ${o}`,e)});Gr((e,t,r=!1)=>{if(typeof e!="number")throw new zr(t,"number",e);if(!nd(e))throw new $o(t,"an integer",e);const o=r?1:0,s=4294967295;if(e<o||e>s)throw new $o(t,`>= ${o} && <= ${s}`,e)});Gr((e,t,r)=>{if(!nT(r,e)){const s="must be one of: "+iT(oT(r,u=>typeof u=="string"?`'${u}'`:fT(u)),", ");throw new v_(t,e,s)}});function hT(e,t){if(typeof e!="boolean")throw new zr(t,"boolean",e)}function kl(e,t,r){return e==null||!uT(e,t)?r:e[t]}const gT=Gr((e,t,r=null)=>{const o=kl(r,"allowArray",!1),s=kl(r,"allowFunction",!1);if(!kl(r,"nullable",!1)&&e===null||!o&&E_(e)||typeof e!="object"&&(!s||typeof e!="function"))throw new zr(t,"Object",e)});Gr((e,t)=>{if(e!=null&&typeof e!="object"&&typeof e!="function")throw new zr(t,"a dictionary",e)});Gr((e,t,r=0)=>{if(!E_(e))throw new zr(t,"Array",e);if(e.length<r){const o=`must be longer than ${r}`;throw new v_(t,e,o)}});Gr((e,t="buffer")=>{if(!cT(e))throw new zr(t,["Buffer","TypedArray","DataView"],e)});const pT=Gr((e,t)=>{if(e!==void 0&&(e===null||typeof e!="object"||!("aborted"in e)))throw new zr(t,"AbortSignal",e)}),bT=Gr((e,t)=>{if(typeof e!="function")throw new zr(t,"Function",e)});Gr((e,t)=>{if(typeof e!="function"||lT(e))throw new zr(t,"Function",e)});Gr((e,t)=>{if(e!==void 0)throw new zr(t,"undefined",e)});var Hs={validateBoolean:hT,validateFunction:bT,validateInteger:dT,validateObject:gT,validateAbortSignal:pT},id={exports:{}};const{SymbolAsyncIterator:dp,SymbolIterator:hp,SymbolFor:Qi}=St,S_=Qi("nodejs.stream.destroyed"),_T=Qi("nodejs.stream.errored"),gp=Qi("nodejs.stream.readable"),pp=Qi("nodejs.stream.writable"),yT=Qi("nodejs.stream.disturbed"),wT=Qi("nodejs.webstream.isClosedPromise"),mT=Qi("nodejs.webstream.controllerErrorFunction");function od(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 $u(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 ET(e){return!!(e&&typeof e.pipe=="function"&&e._readableState&&typeof e.on=="function"&&typeof e.write=="function")}function Nn(e){return e&&(e._readableState||e._writableState||typeof e.write=="function"&&typeof e.on=="function"||typeof e.pipe=="function"&&typeof e.on=="function")}function R_(e){return!!(e&&!Nn(e)&&typeof e.pipeThrough=="function"&&typeof e.getReader=="function"&&typeof e.cancel=="function")}function A_(e){return!!(e&&!Nn(e)&&typeof e.getWriter=="function"&&typeof e.abort=="function")}function T_(e){return!!(e&&!Nn(e)&&typeof e.readable=="object"&&typeof e.writable=="object")}function vT(e){return R_(e)||A_(e)||T_(e)}function ST(e,t){return e==null?!1:t===!0?typeof e[dp]=="function":t===!1?typeof e[hp]=="function":typeof e[dp]=="function"||typeof e[hp]=="function"}function Mu(e){if(!Nn(e))return null;const t=e._writableState,r=e._readableState,o=t||r;return!!(e.destroyed||e[S_]||o!=null&&o.destroyed)}function RT(e){if(!$u(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(!$u(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 I_(e,t){if(!od(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 O_(e){return e&&e[gp]!=null?e[gp]:typeof(e==null?void 0:e.readable)!="boolean"?null:Mu(e)?!1:od(e)&&e.readable&&!I_(e)}function C_(e){return e&&e[pp]!=null?e[pp]:typeof(e==null?void 0:e.writable)!="boolean"?null:Mu(e)?!1:$u(e)&&e.writable&&!RT(e)}function TT(e,t){return Nn(e)?Mu(e)?!0:!((t==null?void 0:t.readable)!==!1&&O_(e)||(t==null?void 0:t.writable)!==!1&&C_(e)):null}function IT(e){var t,r;return Nn(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 OT(e){var t,r;return Nn(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(!Nn(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"&&L_(e)?e._closed:null}function L_(e){return typeof e._closed=="boolean"&&typeof e._defaultKeepAlive=="boolean"&&typeof e._removedConnection=="boolean"&&typeof e._removedContLen=="boolean"}function LT(e){return typeof e._sent100=="boolean"&&L_(e)}function PT(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 BT(e){if(!Nn(e))return null;const t=e._writableState,r=e._readableState,o=t||r;return!o&<(e)||!!(o&&o.autoDestroy&&o.emitClose&&o.closed===!1)}function NT(e){var t;return!!(e&&((t=e[yT])!==null&&t!==void 0?t:e.readableDidRead||e.readableAborted))}function $T(e){var t,r,o,s,u,f,g,l,h,b;return!!(e&&((t=(r=(o=(s=(u=(f=e[_T])!==null&&f!==void 0?f:e.readableErrored)!==null&&u!==void 0?u:e.writableErrored)!==null&&s!==void 0?s:(g=e._readableState)===null||g===void 0?void 0:g.errorEmitted)!==null&&o!==void 0?o:(l=e._writableState)===null||l===void 0?void 0:l.errorEmitted)!==null&&r!==void 0?r:(h=e._readableState)===null||h===void 0?void 0:h.errored)!==null&&t!==void 0?t:!((b=e._writableState)===null||b===void 0)&&b.errored))}var ii={isDestroyed:Mu,kIsDestroyed:S_,isDisturbed:NT,isErrored:$T,isReadable:O_,kIsClosedPromise:wT,kControllerErrorFunction:mT,isClosed:CT,isDuplexNodeStream:ET,isFinished:TT,isIterable:ST,isReadableNodeStream:od,isReadableStream:R_,isReadableFinished:I_,isReadableErrored:OT,isNodeStream:Nn,isWebStream:vT,isWritable:C_,isWritableNodeStream:$u,isWritableStream:A_,isWritableFinished:AT,isWritableErrored:IT,isServerRequest:PT,willEmitClose:BT,isTransformStream:T_};const Ei=Xi,{AbortError:P_,codes:MT}=fr,{ERR_INVALID_ARG_TYPE:xT,ERR_STREAM_PREMATURE_CLOSE:bp}=MT,{kEmptyObject:Oc,once:Cc}=yr,{validateAbortSignal:DT,validateFunction:jT,validateObject:UT,validateBoolean:kT}=Hs,{Promise:FT,PromisePrototypeThen:HT,SymbolDispose:B_}=St,{isClosed:WT,isReadable:_p,isReadableNodeStream:Fl,isReadableStream:qT,isReadableFinished:yp,isReadableErrored:wp,isWritable:mp,isWritableNodeStream:Ep,isWritableStream:VT,isWritableFinished:vp,isWritableErrored:Sp,isNodeStream:GT,willEmitClose:zT,kIsClosedPromise:KT}=ii;let Lo;function JT(e){return e.setHeader&&typeof e.abort=="function"}const Lc=()=>{};function N_(e,t,r){var o,s;if(arguments.length===2?(r=t,t=Oc):t==null?t=Oc:UT(t,"options"),jT(r,"callback"),DT(t.signal,"options.signal"),r=Cc(r),qT(e)||VT(e))return YT(e,t,r);if(!GT(e))throw new xT("stream",["ReadableStream","WritableStream","Stream"],e);const u=(o=t.readable)!==null&&o!==void 0?o:Fl(e),f=(s=t.writable)!==null&&s!==void 0?s:Ep(e),g=e._writableState,l=e._readableState,h=()=>{e.writable||I()};let b=zT(e)&&Fl(e)===u&&Ep(e)===f,w=vp(e,!1);const I=()=>{w=!0,e.destroyed&&(b=!1),!(b&&(!e.readable||u))&&(!u||A)&&r.call(e)};let A=yp(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=WT(e);const B=()=>{C=!0;const j=Sp(e)||wp(e);if(j&&typeof j!="boolean")return r.call(e,j);if(u&&!A&&Fl(e,!0)&&!yp(e,!1))return r.call(e,new bp);if(f&&!w&&!vp(e,!1))return r.call(e,new bp);r.call(e)},P=()=>{C=!0;const j=Sp(e)||wp(e);if(j&&typeof j!="boolean")return r.call(e,j);r.call(e)},S=()=>{e.req.on("finish",I)};JT(e)?(e.on("complete",I),b||e.on("abort",B),e.req?S():e.on("request",S)):f&&!g&&(e.on("end",h),e.on("close",h)),!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?Ei.nextTick(B):g!=null&&g.errorEmitted||l!=null&&l.errorEmitted?b||Ei.nextTick(P):(!u&&(!b||_p(e))&&(w||mp(e)===!1)||!f&&(!b||mp(e))&&(A||_p(e)===!1)||l&&e.req&&e.aborted)&&Ei.nextTick(P);const m=()=>{r=Lc,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",h),e.removeListener("close",h),e.removeListener("finish",I),e.removeListener("end",x),e.removeListener("error",v),e.removeListener("close",B)};if(t.signal&&!C){const j=()=>{const Z=r;m(),Z.call(e,new P_(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)Ei.nextTick(j);else{Lo=Lo||yr.addAbortListener;const Z=Lo(t.signal,j),le=r;r=Cc((...ae)=>{Z[B_](),le.apply(e,ae)})}}return m}function YT(e,t,r){let o=!1,s=Lc;if(t.signal)if(s=()=>{o=!0,r.call(e,new P_(void 0,{cause:t.signal.reason}))},t.signal.aborted)Ei.nextTick(s);else{Lo=Lo||yr.addAbortListener;const f=Lo(t.signal,s),g=r;r=Cc((...l)=>{f[B_](),g.apply(e,l)})}const u=(...f)=>{o||Ei.nextTick(()=>r.apply(e,f))};return HT(e[KT].promise,u,u),Lc}function XT(e,t){var r;let o=!1;return t===null&&(t=Oc),(r=t)!==null&&r!==void 0&&r.cleanup&&(kT(t.cleanup,"cleanup"),o=t.cleanup),new FT((s,u)=>{const f=N_(e,t,g=>{o&&f(),g?u(g):s()})})}id.exports=N_;id.exports.finished=XT;var Ci=id.exports;const On=Xi,{aggregateTwoErrors:ZT,codes:{ERR_MULTIPLE_CALLBACK:QT},AbortError:eI}=fr,{Symbol:$_}=St,{kIsDestroyed:tI,isDestroyed:rI,isFinished:nI,isServerRequest:iI}=ii,M_=$_("kDestroy"),Pc=$_("kConstruct");function x_(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function oI(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):(x_(e,o,r),o&&(o.destroyed=!0),r&&(r.destroyed=!0),s.constructed?Rp(this,e,t):this.once(M_,function(u){Rp(this,ZT(u,e),t)}),this)}function Rp(e,t,r){let o=!1;function s(u){if(o)return;o=!0;const f=e._readableState,g=e._writableState;x_(u,g,f),g&&(g.closed=!0),f&&(f.closed=!0),typeof r=="function"&&r(u),u?On.nextTick(sI,e,u):On.nextTick(D_,e)}try{e._destroy(t||null,s)}catch(u){s(u)}}function sI(e,t){Bc(e,t),D_(e)}function D_(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 Bc(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 aI(){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 Nc(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?On.nextTick(Bc,e,t):Bc(e,t))}function uI(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(Pc,t),!(e.listenerCount(Pc)>1)&&On.nextTick(fI,e)}function fI(e){let t=!1;function r(o){if(t){Nc(e,o??new QT);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(M_,o):o?Nc(e,o,!0):On.nextTick(lI,e)}try{e._construct(o=>{On.nextTick(r,o)})}catch(o){On.nextTick(r,o)}}function lI(e){e.emit(Pc)}function Ap(e){return(e==null?void 0:e.setHeader)&&typeof e.abort=="function"}function j_(e){e.emit("close")}function cI(e,t){e.emit("error",t),On.nextTick(j_,e)}function dI(e,t){!e||rI(e)||(!t&&!nI(e)&&(t=new eI),iI(e)?(e.socket=null,e.destroy(t)):Ap(e)?e.abort():Ap(e.req)?e.req.abort():typeof e.destroy=="function"?e.destroy(t):typeof e.close=="function"?e.close():t?On.nextTick(cI,e,t):On.nextTick(j_,e),e.destroyed||(e[tI]=!0))}var Ho={construct:uI,destroyer:dI,destroy:oI,undestroy:aI,errorOrDestroy:Nc};const{ArrayIsArray:hI,ObjectSetPrototypeOf:U_}=St,{EventEmitter:xu}=Pn;function Du(e){xu.call(this,e)}U_(Du.prototype,xu.prototype);U_(Du,xu);Du.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",g));let u=!1;function f(){u||(u=!0,e.end())}function g(){u||(u=!0,typeof e.destroy=="function"&&e.destroy())}function l(b){h(),xu.listenerCount(this,"error")===0&&this.emit("error",b)}$c(r,"error",l),$c(e,"error",l);function h(){r.removeListener("data",o),e.removeListener("drain",s),r.removeListener("end",f),r.removeListener("close",g),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",h),r.removeListener("close",h),e.removeListener("close",h)}return r.on("end",h),r.on("close",h),e.on("close",h),e.emit("pipe",r),e};function $c(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):hI(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}var sd={Stream:Du,prependListener:$c},k_={exports:{}};(function(e){const{SymbolDispose:t}=St,{AbortError:r,codes:o}=fr,{isNodeStream:s,isWebStream:u,kControllerErrorFunction:f}=ii,g=Ci,{ERR_INVALID_ARG_TYPE:l}=o;let h;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{h=h||yr.addAbortListener;const x=h(w,A);g(I,x[t])}return I}})(k_);var ju=k_.exports;const{StringPrototypeSlice:Tp,SymbolIterator:gI,TypedArrayPrototypeSet:tu,Uint8Array:pI}=St,{Buffer:Hl}=_r,{inspect:bI}=yr;var _I=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 Hl.alloc(0);const r=Hl.allocUnsafe(t>>>0);let o=this.head,s=0;for(;o;)tu(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}*[gI](){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+=Tp(u,0,t),this.head=o,o.data=Tp(u,t));break}++s}while((o=o.next)!==null);return this.length-=s,r}_getBuffer(t){const r=Hl.allocUnsafe(t),o=t;let s=this.head,u=0;do{const f=s.data;if(t>f.length)tu(r,f,o-t),t-=f.length;else{t===f.length?(tu(r,f,o-t),++u,s.next?this.head=s.next:this.head=this.tail=null):(tu(r,new pI(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 bI(this,{...r,depth:0,customInspect:!1})}};const{MathFloor:yI,NumberIsInteger:wI}=St,{validateInteger:mI}=Hs,{ERR_INVALID_ARG_VALUE:EI}=fr.codes;let F_=16*1024,H_=16;function vI(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function W_(e){return e?H_:F_}function SI(e,t){mI(t,"value",0),e?H_=t:F_=t}function RI(e,t,r,o){const s=vI(t,o,r);if(s!=null){if(!wI(s)||s<0){const u=o?`options.${r}`:"options.highWaterMark";throw new EI(u,s)}return yI(s)}return W_(e.objectMode)}var Uu={getHighWaterMark:RI,getDefaultHighWaterMark:W_,setDefaultHighWaterMark:SI};const Ip=Xi,{PromisePrototypeThen:AI,SymbolAsyncIterator:Op,SymbolIterator:Cp}=St,{Buffer:TI}=_r,{ERR_INVALID_ARG_TYPE:II,ERR_STREAM_NULL_VALUES:OI}=fr.codes;function CI(e,t,r){let o;if(typeof t=="string"||t instanceof TI)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});let s;if(t&&t[Op])s=!0,o=t[Op]();else if(t&&t[Cp])s=!1,o=t[Cp]();else throw new II("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(h,b){AI(g(h),()=>Ip.nextTick(b,h),w=>Ip.nextTick(b,w||h))};async function g(h){const b=h!=null,w=typeof o.throw=="function";if(b&&w){const{value:I,done:A}=await o.throw(h);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:h,done:b}=s?await o.next():o.next();if(b)u.push(null);else{const w=h&&typeof h.then=="function"?await h:h;if(w===null)throw f=!1,new OI;if(u.push(w))continue;f=!1}}catch(h){u.destroy(h)}break}}return u}var q_=CI,Wl,Lp;function ku(){if(Lp)return Wl;Lp=1;const e=Xi,{ArrayPrototypeIndexOf:t,NumberIsInteger:r,NumberIsNaN:o,NumberParseInt:s,ObjectDefineProperties:u,ObjectKeys:f,ObjectSetPrototypeOf:g,Promise:l,SafeSet:h,SymbolAsyncDispose:b,SymbolAsyncIterator:w,Symbol:I}=St;Wl=Re,Re.ReadableState=Ue;const{EventEmitter:A}=Pn,{Stream:x,prependListener:v}=sd,{Buffer:C}=_r,{addAbortSignal:B}=ju,P=Ci;let S=yr.debuglog("stream",N=>{S=N});const m=_I,j=Ho,{getHighWaterMark:Z,getDefaultHighWaterMark:le}=Uu,{aggregateTwoErrors:ae,codes:{ERR_INVALID_ARG_TYPE:ee,ERR_METHOD_NOT_IMPLEMENTED:Se,ERR_OUT_OF_RANGE:me,ERR_STREAM_PUSH_AFTER_EOF:F,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:U},AbortError:$}=fr,{validateObject:q}=Hs,J=I("kPaused"),{StringDecoder:V}=Ls(),re=q_;g(Re.prototype,x.prototype),g(Re,x);const H=()=>{},{errorOrDestroy:z}=j,se=1,ce=2,te=4,_e=8,be=16,R=32,O=64,W=128,ie=256,ye=512,d=1024,p=2048,_=4096,E=8192,K=16384,ne=32768,oe=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(se),ended:Ce(ce),endEmitted:Ce(te),reading:Ce(_e),constructed:Ce(be),sync:Ce(R),needReadable:Ce(O),emittedReadable:Ce(W),readableListening:Ce(ie),resumeScheduled:Ce(ye),errorEmitted:Ce(d),emitClose:Ce(p),autoDestroy:Ce(_),destroyed:Ce(E),closed:Ce(K),closeEmitted:Ce(ne),multiAwaitDrain:Ce(oe),readingMore:Ce(Ie),dataEmitted:Ce(Be)});function Ue(N,D,Ee){typeof Ee!="boolean"&&(Ee=D instanceof ei()),this.state=p|_|be|R,N&&N.objectMode&&(this.state|=se),Ee&&N&&N.readableObjectMode&&(this.state|=se),this.highWaterMark=N?Z(this,N,"readableHighWaterMark",Ee):le(!1),this.buffer=new m,this.length=0,this.pipes=[],this.flowing=null,this[J]=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 ei();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&&ut(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 wt;if(Te.state&se||(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&&(wt=new ee("chunk",["string","Buffer","Uint8Array"],D))),wt)z(N,wt);else if(D===null)Te.state&=-9,Ge(N,Te);else if(Te.state&se||D&&D.length>0)if(ve)if(Te.state&te)z(N,new U);else{if(Te.destroyed||Te.errored)return!1;_t(N,Te,D,!0)}else if(Te.ended)z(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?_t(N,Te,D,!1):ut(N,Te)):_t(N,Te,D,!1)}else ve||(Te.state&=-9,ut(N,Te));return!Te.ended&&(Te.length<Te.highWaterMark||Te.length===0)}function _t(N,D,Ee,ve){D.flowing&&D.length===0&&!D.sync&&N.listenerCount("data")>0?(D.state&oe?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&&jt(N)),ut(N,D)}Re.prototype.isPaused=function(){const N=this._readableState;return N[J]===!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 tt=1073741824;function yt(N){if(N>tt)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 Xe(N,D){return N<=0||D.length===0&&D.ended?0:D.state&se?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=yt(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?Lr(this):jt(this),null;if(N=Xe(N,D),N===0&&D.ended)return D.length===0&&Lr(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(wt){z(this,wt)}D.state&=-33,D.reading||(N=Xe(Ee,D))}let Te;return N>0?Te=rr(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&&Lr(this)),Te!==null&&!D.errorEmitted&&!D.closeEmitted&&(D.dataEmitted=!0,this.emit("data",Te)),Te};function Ge(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?jt(N):(D.needReadable=!1,D.emittedReadable=!0,Pt(N))}}function jt(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(Pt,N))}function Pt(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,Yr(N)}function ut(N,D){!D.readingMore&&D.constructed&&(D.readingMore=!0,e.nextTick(Nt,N,D))}function Nt(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 h(ve.awaitDrainWriters?[ve.awaitDrainWriters]:[]))),ve.pipes.push(N),S("pipe count=%d opts=%j",ve.pipes.length,D);const wt=(!D||D.end!==!1)&&N!==e.stdout&&N!==e.stderr?cn:mr;ve.endEmitted?e.nextTick(wt):Ee.once("end",wt),N.on("unpipe",Rt);function Rt(ir,Ht){S("onunpipe"),ir===Ee&&Ht&&Ht.hasUnpiped===!1&&(Ht.hasUnpiped=!0,Mn())}function cn(){S("onend"),N.end()}let Bt,dn=!1;function Mn(){S("cleanup"),N.removeListener("close",Gt),N.removeListener("finish",Pr),Bt&&N.removeListener("drain",Bt),N.removeListener("error",Zr),N.removeListener("unpipe",Rt),Ee.removeListener("end",cn),Ee.removeListener("end",mr),Ee.removeListener("data",gn),dn=!0,Bt&&ve.awaitDrainWriters&&(!N._writableState||N._writableState.needDrain)&&Bt()}function hn(){dn||(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()),Bt||(Bt=lr(Ee,N),N.on("drain",Bt))}Ee.on("data",gn);function gn(ir){S("ondata");const Ht=N.write(ir);S("dest.write",Ht),Ht===!1&&hn()}function Zr(ir){if(S("onerror",ir),mr(),N.removeListener("error",Zr),N.listenerCount("error")===0){const Ht=N._writableState||N._readableState;Ht&&!Ht.errorEmitted?z(N,ir):N.emit("error",ir)}}v(N,"error",Zr);function Gt(){N.removeListener("finish",Pr),mr()}N.once("close",Gt);function Pr(){S("onfinish"),N.removeListener("close",Gt),mr()}N.once("finish",Pr);function mr(){S("unpipe"),Ee.unpipe(N)}return N.emit("pipe",Ee),N.writableNeedDrain===!0?hn():ve.flowing||(S("pipe resume"),Ee.resume()),N};function lr(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 wt=0;wt<Te.length;wt++)Te[wt].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?jt(this):ve.reading||e.nextTick(Ft,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(tr,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(tr,this),D};function tr(N){const D=N._readableState;D.readableListening=N.listenerCount("readable")>0,D.resumeScheduled&&D[J]===!1?D.flowing=!0:N.listenerCount("data")>0?N.resume():D.readableListening||(D.flowing=null)}function Ft(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,cr(this,N)),N[J]=!1,this};function cr(N,D){D.resumeScheduled||(D.resumeScheduled=!0,e.nextTick(Jr,N,D))}function Jr(N,D){S("resume",D.reading),D.reading||N.read(0),D.resumeScheduled=!1,N.emit("resume"),Yr(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[J]=!0,this};function Yr(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=>{z(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 un(this)},Re.prototype.iterator=function(N){return N!==void 0&&q(N,"options"),un(this,N)};function un(N,D){typeof N.read!="function"&&(N=Re.wrap(N,{objectMode:!0}));const Ee=fn(N,D);return Ee.stream=N,Ee}async function*fn(N,D){let Ee=H;function ve(Rt){this===N?(Ee(),Ee=H):Ee=Rt}N.on("readable",ve);let Te;const wt=P(N,{writable:!1},Rt=>{Te=Rt?ae(Te,Rt):null,Ee(),Ee=H});try{for(;;){const Rt=N.destroyed?null:N.read();if(Rt!==null)yield Rt;else{if(Te)throw Te;if(Te===null)return;await new l(ve)}}}catch(Rt){throw Te=ae(Te,Rt),Te}finally{(Te||(D==null?void 0:D.destroyOnReturn)!==!1)&&(Te===void 0||N._readableState.autoDestroy)?j.destroyer(N,null):(N.off("readable",ve),wt())}}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[J]!==!1},set(N){this[J]=!!N}}}),Re._fromList=rr;function rr(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 Lr(N){const D=N._readableState;S("endReadable",D.endEmitted),D.endEmitted||(D.ended=!0,e.nextTick(nr,D,N))}function nr(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($n,D);else if(N.autoDestroy){const Ee=D._writableState;(!Ee||Ee.autoDestroy&&(Ee.finished||Ee.writable===!1))&&D.destroy()}}}function $n(N){N.writable&&!N.writableEnded&&!N.destroyed&&N.end()}Re.from=function(N,D){return re(Re,N,D)};let Xr;function ln(){return Xr===void 0&&(Xr={}),Xr}return Re.fromWeb=function(N,D){return ln().newStreamReadableFromReadableStream(N,D)},Re.toWeb=function(N,D){return ln().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,wt){j.destroyer(N,Te),wt(Te)}}).wrap(N)},Wl}var ql,Pp;function ad(){if(Pp)return ql;Pp=1;const e=Xi,{ArrayPrototypeSlice:t,Error:r,FunctionPrototypeSymbolHasInstance:o,ObjectDefineProperty:s,ObjectDefineProperties:u,ObjectSetPrototypeOf:f,StringPrototypeToLowerCase:g,Symbol:l,SymbolHasInstance:h}=St;ql=q,q.WritableState=U;const{EventEmitter:b}=Pn,w=sd.Stream,{Buffer:I}=_r,A=Ho,{addAbortSignal:x}=ju,{getHighWaterMark:v,getDefaultHighWaterMark:C}=Uu,{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:Z,ERR_STREAM_NULL_VALUES:le,ERR_STREAM_WRITE_AFTER_END:ae,ERR_UNKNOWN_ENCODING:ee}=fr.codes,{errorOrDestroy:Se}=A;f(q.prototype,w.prototype),f(q,w);function me(){}const F=l("kOnFinished");function U(_,E,K){typeof K!="boolean"&&(K=E instanceof ei()),this.objectMode=!!(_&&_.objectMode),K&&(this.objectMode=this.objectMode||!!(_&&_.writableObjectMode)),this.highWaterMark=_?v(this,_,"writableHighWaterMark",K):C(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const ne=!!(_&&_.decodeStrings===!1);this.decodeStrings=!ne,this.defaultEncoding=_&&_.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=z.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 q(_){const E=this instanceof ei();if(!E&&!o(q,this))return new q(_);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 K=this._writableState;K.writing||_e(this,K),W(this,K)})}s(q,h,{__proto__:null,value:function(_){return o(this,_)?!0:this!==q?!1:_&&_._writableState instanceof U}}),q.prototype.pipe=function(){Se(this,new m)};function J(_,E,K,ne){const oe=_._writableState;if(typeof K=="function")ne=K,K=oe.defaultEncoding;else{if(!K)K=oe.defaultEncoding;else if(K!=="buffer"&&!I.isEncoding(K))throw new ee(K);typeof ne!="function"&&(ne=me)}if(E===null)throw new le;if(!oe.objectMode)if(typeof E=="string")oe.decodeStrings!==!1&&(E=I.from(E,K),K="buffer");else if(E instanceof I)K="buffer";else if(w._isUint8Array(E))E=w._uint8ArrayToBuffer(E),K="buffer";else throw new B("chunk",["string","Buffer","Uint8Array"],E);let Ie;return oe.ending?Ie=new ae:oe.destroyed&&(Ie=new j("write")),Ie?(e.nextTick(ne,Ie),Se(_,Ie,!0),Ie):(oe.pendingcb++,V(_,oe,E,K,ne))}q.prototype.write=function(_,E,K){return J(this,_,E,K)===!0},q.prototype.cork=function(){this._writableState.corked++},q.prototype.uncork=function(){const _=this._writableState;_.corked&&(_.corked--,_.writing||_e(this,_))},q.prototype.setDefaultEncoding=function(E){if(typeof E=="string"&&(E=g(E)),!I.isEncoding(E))throw new ee(E);return this._writableState.defaultEncoding=E,this};function V(_,E,K,ne,oe){const Ie=E.objectMode?1:K.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:K,encoding:ne,callback:oe}),E.allBuffers&&ne!=="buffer"&&(E.allBuffers=!1),E.allNoop&&oe!==me&&(E.allNoop=!1)):(E.writelen=Ie,E.writecb=oe,E.writing=!0,E.sync=!0,_._write(K,ne,E.onwrite),E.sync=!1),Be&&!E.errored&&!E.destroyed}function re(_,E,K,ne,oe,Ie,Be){E.writelen=ne,E.writecb=Be,E.writing=!0,E.sync=!0,E.destroyed?E.onwrite(new j("write")):K?_._writev(oe,E.onwrite):_._write(oe,Ie,E.onwrite),E.sync=!1}function H(_,E,K,ne){--E.pendingcb,ne(K),te(E),Se(_,K)}function z(_,E){const K=_._writableState,ne=K.sync,oe=K.writecb;if(typeof oe!="function"){Se(_,new S);return}K.writing=!1,K.writecb=null,K.length-=K.writelen,K.writelen=0,E?(E.stack,K.errored||(K.errored=E),_._readableState&&!_._readableState.errored&&(_._readableState.errored=E),ne?e.nextTick(H,_,K,E,oe):H(_,K,E,oe)):(K.buffered.length>K.bufferedIndex&&_e(_,K),ne?K.afterWriteTickInfo!==null&&K.afterWriteTickInfo.cb===oe?K.afterWriteTickInfo.count++:(K.afterWriteTickInfo={count:1,cb:oe,stream:_,state:K},e.nextTick(se,K.afterWriteTickInfo)):ce(_,K,1,oe))}function se({stream:_,state:E,count:K,cb:ne}){return E.afterWriteTickInfo=null,ce(_,E,K,ne)}function ce(_,E,K,ne){for(!E.ending&&!_.destroyed&&E.length===0&&E.needDrain&&(E.needDrain=!1,_.emit("drain"));K-- >0;)E.pendingcb--,ne();E.destroyed&&te(E),W(_,E)}function te(_){if(_.writing)return;for(let oe=_.bufferedIndex;oe<_.buffered.length;++oe){var E;const{chunk:Ie,callback:Be}=_.buffered[oe],Ce=_.objectMode?1:Ie.length;_.length-=Ce,Be((E=_.errored)!==null&&E!==void 0?E:new j("write"))}const K=_[F].splice(0);for(let oe=0;oe<K.length;oe++){var ne;K[oe]((ne=_.errored)!==null&&ne!==void 0?ne:new j("end"))}$(_)}function _e(_,E){if(E.corked||E.bufferProcessing||E.destroyed||!E.constructed)return;const{buffered:K,bufferedIndex:ne,objectMode:oe}=E,Ie=K.length-ne;if(!Ie)return;let Be=ne;if(E.bufferProcessing=!0,Ie>1&&_._writev){E.pendingcb-=Ie-1;const Ce=E.allNoop?me:Re=>{for(let He=Be;He<K.length;++He)K[He].callback(Re)},Ue=E.allNoop&&Be===0?K:t(K,Be);Ue.allBuffers=E.allBuffers,re(_,E,!0,E.length,Ue,"",Ce),$(E)}else{do{const{chunk:Ce,encoding:Ue,callback:Re}=K[Be];K[Be++]=null;const He=oe?1:Ce.length;re(_,E,!1,He,Ce,Ue,Re)}while(Be<K.length&&!E.writing);Be===K.length?$(E):Be>256?(K.splice(0,Be),E.bufferedIndex=0):E.bufferedIndex=Be}E.bufferProcessing=!1}q.prototype._write=function(_,E,K){if(this._writev)this._writev([{chunk:_,encoding:E}],K);else throw new P("_write()")},q.prototype._writev=null,q.prototype.end=function(_,E,K){const ne=this._writableState;typeof _=="function"?(K=_,_=null,E=null):typeof E=="function"&&(K=E,E=null);let oe;if(_!=null){const Ie=J(this,_,E);Ie instanceof r&&(oe=Ie)}return ne.corked&&(ne.corked=1,this.uncork()),oe||(!ne.errored&&!ne.ending?(ne.ending=!0,W(this,ne,!0),ne.ended=!0):ne.finished?oe=new Z("end"):ne.destroyed&&(oe=new j("end"))),typeof K=="function"&&(oe||ne.finished?e.nextTick(K,oe):ne[F].push(K)),this};function be(_){return _.ending&&!_.destroyed&&_.constructed&&_.length===0&&!_.errored&&_.buffered.length===0&&!_.finished&&!_.writing&&!_.errorEmitted&&!_.closeEmitted}function R(_,E){let K=!1;function ne(oe){if(K){Se(_,oe??S());return}if(K=!0,E.pendingcb--,oe){const Ie=E[F].splice(0);for(let Be=0;Be<Ie.length;Be++)Ie[Be](oe);Se(_,oe,E.sync)}else be(E)&&(E.prefinished=!0,_.emit("prefinish"),E.pendingcb++,e.nextTick(ie,_,E))}E.sync=!0,E.pendingcb++;try{_._final(ne)}catch(oe){ne(oe)}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 W(_,E,K){be(E)&&(O(_,E),E.pendingcb===0&&(K?(E.pendingcb++,e.nextTick((ne,oe)=>{be(oe)?ie(ne,oe):oe.pendingcb--},_,E)):be(E)&&(E.pendingcb++,ie(_,E))))}function ie(_,E){E.pendingcb--,E.finished=!0;const K=E[F].splice(0);for(let ne=0;ne<K.length;ne++)K[ne]();if(_.emit("finish"),E.autoDestroy){const ne=_._readableState;(!ne||ne.autoDestroy&&(ne.endEmitted||ne.readable===!1))&&_.destroy()}}u(q.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;q.prototype.destroy=function(_,E){const K=this._writableState;return!K.destroyed&&(K.bufferedIndex<K.buffered.length||K[F].length)&&e.nextTick(te,K),ye.call(this,_,E),this},q.prototype._undestroy=A.undestroy,q.prototype._destroy=function(_,E){E(_)},q.prototype[b.captureRejectionSymbol]=function(_){this.destroy(_)};let d;function p(){return d===void 0&&(d={}),d}return q.fromWeb=function(_,E){return p().newStreamWritableFromWritableStream(_,E)},q.toWeb=function(_){return p().newWritableStreamFromStreamWritable(_)},ql}var Vl,Bp;function LI(){if(Bp)return Vl;Bp=1;const e=Xi,t=_r,{isReadable:r,isWritable:o,isIterable:s,isNodeStream:u,isReadableNodeStream:f,isWritableNodeStream:g,isDuplexNodeStream:l,isReadableStream:h,isWritableStream:b}=ii,w=Ci,{AbortError:I,codes:{ERR_INVALID_ARG_TYPE:A,ERR_INVALID_RETURN_VALUE:x}}=fr,{destroyer:v}=Ho,C=ei(),B=ku(),P=ad(),{createDeferredPromise:S}=yr,m=q_,j=globalThis.Blob||t.Blob,Z=typeof j<"u"?function(U){return U instanceof j}:function(U){return!1},le=globalThis.AbortController||$s().AbortController,{FunctionPrototypeCall:ae}=St;class ee 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)}}Vl=function F(U,$){if(l(U))return U;if(f(U))return me({readable:U});if(g(U))return me({writable:U});if(u(U))return me({writable:!1,readable:!1});if(h(U))return me({readable:B.fromWeb(U)});if(b(U))return me({writable:P.fromWeb(U)});if(typeof U=="function"){const{value:J,write:V,final:re,destroy:H}=Se(U);if(s(J))return m(ee,J,{objectMode:!0,write:V,final:re,destroy:H});const z=J==null?void 0:J.then;if(typeof z=="function"){let se;const ce=ae(z,J,te=>{if(te!=null)throw new x("nully","body",te)},te=>{v(se,te)});return se=new ee({objectMode:!0,readable:!1,write:V,final(te){re(async()=>{try{await ce,e.nextTick(te,null)}catch(_e){e.nextTick(te,_e)}})},destroy:H})}throw new x("Iterable, AsyncIterable or AsyncFunction",$,J)}if(Z(U))return F(U.arrayBuffer());if(s(U))return m(ee,U,{objectMode:!0,writable:!1});if(h(U==null?void 0:U.readable)&&b(U==null?void 0:U.writable))return ee.fromWeb(U);if(typeof(U==null?void 0:U.writable)=="object"||typeof(U==null?void 0:U.readable)=="object"){const J=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?g(U==null?void 0:U.writable)?U==null?void 0:U.writable:F(U.writable):void 0;return me({readable:J,writable:V})}const q=U==null?void 0:U.then;if(typeof q=="function"){let J;return ae(q,U,V=>{V!=null&&J.push(V),J.push(null)},V=>{v(J,V)}),J=new ee({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 q=new le,J=q.signal;return{value:F(async function*(){for(;;){const re=U;U=null;const{chunk:H,done:z,cb:se}=await re;if(e.nextTick(se),z)return;if(J.aborted)throw new I(void 0,{cause:J.reason});({promise:U,resolve:$}=S()),yield H}}(),{signal:J}),write(re,H,z){const se=$;$=null,se({chunk:re,done:!1,cb:z})},final(re){const H=$;$=null,H({done:!0,cb:re})},destroy(re,H){q.abort(),H(re)}}}function me(F){const U=F.readable&&typeof F.readable.read!="function"?B.wrap(F.readable):F.readable,$=F.writable;let q=!!r(U),J=!!o($),V,re,H,z,se;function ce(te){const _e=z;z=null,_e?_e(te):te&&se.destroy(te)}return se=new ee({readableObjectMode:!!(U!=null&&U.readableObjectMode),writableObjectMode:!!($!=null&&$.writableObjectMode),readable:q,writable:J}),J&&(w($,te=>{J=!1,te&&v(U,te),ce(te)}),se._write=function(te,_e,be){$.write(te,_e)?be():V=be},se._final=function(te){$.end(),re=te},$.on("drain",function(){if(V){const te=V;V=null,te()}}),$.on("finish",function(){if(re){const te=re;re=null,te()}})),q&&(w(U,te=>{q=!1,te&&v(U,te),ce(te)}),U.on("readable",function(){if(H){const te=H;H=null,te()}}),U.on("end",function(){se.push(null)}),se._read=function(){for(;;){const te=U.read();if(te===null){H=se._read;return}if(!se.push(te))return}}),se._destroy=function(te,_e){!te&&z!==null&&(te=new I),H=null,V=null,re=null,z===null?_e(te):(z=_e,v($,te),v(U,te))},se}return Vl}var Gl,Np;function ei(){if(Np)return Gl;Np=1;const{ObjectDefineProperties:e,ObjectGetOwnPropertyDescriptor:t,ObjectKeys:r,ObjectSetPrototypeOf:o}=St;Gl=f;const s=ku(),u=ad();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 g;function l(){return g===void 0&&(g={}),g}f.fromWeb=function(b,w){return l().newStreamDuplexFromReadableWritablePair(b,w)},f.toWeb=function(b){return l().newReadableWritablePairFromDuplex(b)};let h;return f.from=function(b){return h||(h=LI()),h(b,"body")},Gl}const{ObjectSetPrototypeOf:V_,Symbol:PI}=St;var G_=ti;const{ERR_METHOD_NOT_IMPLEMENTED:BI}=fr.codes,ud=ei(),{getHighWaterMark:NI}=Uu;V_(ti.prototype,ud.prototype);V_(ti,ud);const Is=PI("kCallback");function ti(e){if(!(this instanceof ti))return new ti(e);const t=e?NI(this,e,"readableHighWaterMark",!0):null;t===0&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),ud.call(this,e),this._readableState.sync=!1,this[Is]=null,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",$I)}function Mc(e){typeof this._flush=="function"&&!this.destroyed?this._flush((t,r)=>{if(t){e?e(t):this.destroy(t);return}r!=null&&this.push(r),this.push(null),e&&e()}):(this.push(null),e&&e())}function $I(){this._final!==Mc&&Mc.call(this)}ti.prototype._final=Mc;ti.prototype._transform=function(e,t,r){throw new BI("_transform()")};ti.prototype._write=function(e,t,r){const o=this._readableState,s=this._writableState,u=o.length;this._transform(e,t,(f,g)=>{if(f){r(f);return}g!=null&&this.push(g),s.ended||u===o.length||o.length<o.highWaterMark?r():this[Is]=r})};ti.prototype._read=function(){if(this[Is]){const e=this[Is];this[Is]=null,e()}};const{ObjectSetPrototypeOf:z_}=St;var K_=Mo;const fd=G_;z_(Mo.prototype,fd.prototype);z_(Mo,fd);function Mo(e){if(!(this instanceof Mo))return new Mo(e);fd.call(this,e)}Mo.prototype._transform=function(e,t,r){r(null,e)};const As=Xi,{ArrayIsArray:MI,Promise:xI,SymbolAsyncIterator:DI,SymbolDispose:jI}=St,Eu=Ci,{once:UI}=yr,kI=Ho,$p=ei(),{aggregateTwoErrors:FI,codes:{ERR_INVALID_ARG_TYPE:xc,ERR_INVALID_RETURN_VALUE:zl,ERR_MISSING_ARGS:HI,ERR_STREAM_DESTROYED:WI,ERR_STREAM_PREMATURE_CLOSE:qI},AbortError:VI}=fr,{validateFunction:GI,validateAbortSignal:zI}=Hs,{isIterable:Vi,isReadable:Kl,isReadableNodeStream:gu,isNodeStream:Mp,isTransformStream:Oo,isWebStream:KI,isReadableStream:Jl,isReadableFinished:JI}=ii,YI=globalThis.AbortController||$s().AbortController;let Yl,Xl,Zl;function xp(e,t,r){let o=!1;e.on("close",()=>{o=!0});const s=Eu(e,{readable:t,writable:r},u=>{o=!u});return{destroy:u=>{o||(o=!0,kI.destroyer(e,u||new WI("pipe")))},cleanup:s}}function XI(e){return GI(e[e.length-1],"streams[stream.length - 1]"),e.pop()}function Ql(e){if(Vi(e))return e;if(gu(e))return ZI(e);throw new xc("val",["Readable","Iterable","AsyncIterable"],e)}async function*ZI(e){Xl||(Xl=ku()),yield*Xl.prototype[DI].call(e)}async function ru(e,t,r,{end:o}){let s,u=null;const f=h=>{if(h&&(s=h),u){const b=u;u=null,b()}},g=()=>new xI((h,b)=>{s?b(s):u=()=>{s?b(s):h()}});t.on("drain",f);const l=Eu(t,{readable:!1},f);try{t.writableNeedDrain&&await g();for await(const h of e)t.write(h)||await g();o&&(t.end(),await g()),r()}catch(h){r(s!==h?FI(s,h):h)}finally{l(),t.off("drain",f)}}async function ec(e,t,r,{end:o}){Oo(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 QI(...e){return J_(e,UI(XI(e)))}function J_(e,t,r){if(e.length===1&&MI(e[0])&&(e=e[0]),e.length<2)throw new HI("streams");const o=new YI,s=o.signal,u=r==null?void 0:r.signal,f=[];zI(u,"options.signal");function g(){x(new VI)}Zl=Zl||yr.addAbortListener;let l;u&&(l=Zl(u,g));let h,b;const w=[];let I=0;function A(P){x(P,--I===0)}function x(P,S){var m;if(P&&(!h||h.code==="ERR_STREAM_PREMATURE_CLOSE")&&(h=P),!(!h&&!S)){for(;w.length;)w.shift()(h);(m=l)===null||m===void 0||m[jI](),o.abort(),S&&(h||f.forEach(j=>j()),As.nextTick(t,h,b))}}let v;for(let P=0;P<e.length;P++){const S=e[P],m=P<e.length-1,j=P>0,Z=m||(r==null?void 0:r.end)!==!1,le=P===e.length-1;if(Mp(S)){let ae=function(ee){ee&&ee.name!=="AbortError"&&ee.code!=="ERR_STREAM_PREMATURE_CLOSE"&&A(ee)};if(Z){const{destroy:ee,cleanup:Se}=xp(S,m,j);w.push(ee),Kl(S)&&le&&f.push(Se)}S.on("error",ae),Kl(S)&&le&&f.push(()=>{S.removeListener("error",ae)})}if(P===0)if(typeof S=="function"){if(v=S({signal:s}),!Vi(v))throw new zl("Iterable, AsyncIterable or Stream","source",v)}else Vi(S)||gu(S)||Oo(S)?v=S:v=$p.from(S);else if(typeof S=="function"){if(Oo(v)){var C;v=Ql((C=v)===null||C===void 0?void 0:C.readable)}else v=Ql(v);if(v=S(v,{signal:s}),m){if(!Vi(v,!0))throw new zl("AsyncIterable",`transform[${P-1}]`,v)}else{var B;Yl||(Yl=K_);const ae=new Yl({objectMode:!0}),ee=(B=v)===null||B===void 0?void 0:B.then;if(typeof ee=="function")I++,ee.call(v,F=>{b=F,F!=null&&ae.write(F),Z&&ae.end(),As.nextTick(A)},F=>{ae.destroy(F),As.nextTick(A,F)});else if(Vi(v,!0))I++,ru(v,ae,A,{end:Z});else if(Jl(v)||Oo(v)){const F=v.readable||v;I++,ru(F,ae,A,{end:Z})}else throw new zl("AsyncIterable or Promise","destination",v);v=ae;const{destroy:Se,cleanup:me}=xp(v,!1,!0);w.push(Se),le&&f.push(me)}}else if(Mp(S)){if(gu(v)){I+=2;const ae=eO(v,S,A,{end:Z});Kl(S)&&le&&f.push(ae)}else if(Oo(v)||Jl(v)){const ae=v.readable||v;I++,ru(ae,S,A,{end:Z})}else if(Vi(v))I++,ru(v,S,A,{end:Z});else throw new xc("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],v);v=S}else if(KI(S)){if(gu(v))I++,ec(Ql(v),S,A,{end:Z});else if(Jl(v)||Vi(v))I++,ec(v,S,A,{end:Z});else if(Oo(v))I++,ec(v.readable,S,A,{end:Z});else throw new xc("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],v);v=S}else v=$p.from(S)}return(s!=null&&s.aborted||u!=null&&u.aborted)&&As.nextTick(g),v}function eO(e,t,r,{end:o}){let s=!1;if(t.on("close",()=>{s||r(new qI)}),e.pipe(t,{end:!1}),o){let u=function(){s=!0,t.end()};JI(e)?As.nextTick(u):e.once("end",u)}else r();return Eu(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)}),Eu(t,{readable:!1,writable:!0},r)}var ld={pipelineImpl:J_,pipeline:QI};const{pipeline:tO}=ld,nu=ei(),{destroyer:rO}=Ho,{isNodeStream:iu,isReadable:Dp,isWritable:jp,isWebStream:tc,isTransformStream:qi,isWritableStream:Up,isReadableStream:kp}=ii,{AbortError:nO,codes:{ERR_INVALID_ARG_VALUE:Fp,ERR_MISSING_ARGS:iO}}=fr,oO=Ci;var Y_=function(...t){if(t.length===0)throw new iO("streams");if(t.length===1)return nu.from(t[0]);const r=[...t];if(typeof t[0]=="function"&&(t[0]=nu.from(t[0])),typeof t[t.length-1]=="function"){const A=t.length-1;t[A]=nu.from(t[A])}for(let A=0;A<t.length;++A)if(!(!iu(t[A])&&!tc(t[A]))){if(A<t.length-1&&!(Dp(t[A])||kp(t[A])||qi(t[A])))throw new Fp(`streams[${A}]`,r[A],"must be readable");if(A>0&&!(jp(t[A])||Up(t[A])||qi(t[A])))throw new Fp(`streams[${A}]`,r[A],"must be writable")}let o,s,u,f,g;function l(A){const x=f;f=null,x?x(A):A?g.destroy(A):!I&&!w&&g.destroy()}const h=t[0],b=tO(t,l),w=!!(jp(h)||Up(h)||qi(h)),I=!!(Dp(b)||kp(b)||qi(b));if(g=new nu({writableObjectMode:!!(h!=null&&h.writableObjectMode),readableObjectMode:!!(b!=null&&b.readableObjectMode),writable:w,readable:I}),w){if(iu(h))g._write=function(x,v,C){h.write(x,v)?C():o=C},g._final=function(x){h.end(),s=x},h.on("drain",function(){if(o){const x=o;o=null,x()}});else if(tc(h)){const v=(qi(h)?h.writable:h).getWriter();g._write=async function(C,B,P){try{await v.ready,v.write(C).catch(()=>{}),P()}catch(S){P(S)}},g._final=async function(C){try{await v.ready,v.close().catch(()=>{}),s=C}catch(B){C(B)}}}const A=qi(b)?b.readable:b;oO(A,()=>{if(s){const x=s;s=null,x()}})}if(I){if(iu(b))b.on("readable",function(){if(u){const A=u;u=null,A()}}),b.on("end",function(){g.push(null)}),g._read=function(){for(;;){const A=b.read();if(A===null){u=g._read;return}if(!g.push(A))return}};else if(tc(b)){const x=(qi(b)?b.readable:b).getReader();g._read=async function(){for(;;)try{const{value:v,done:C}=await x.read();if(!g.push(v))return;if(C){g.push(null);return}}catch{return}}}}return g._destroy=function(A,x){!A&&f!==null&&(A=new nO),u=null,o=null,s=null,f===null?x(A):(f=x,iu(b)&&rO(b,A))},g};const sO=globalThis.AbortController||$s().AbortController,{codes:{ERR_INVALID_ARG_VALUE:aO,ERR_INVALID_ARG_TYPE:Ws,ERR_MISSING_ARGS:uO,ERR_OUT_OF_RANGE:fO},AbortError:Ln}=fr,{validateAbortSignal:eo,validateInteger:Hp,validateObject:to}=Hs,lO=St.Symbol("kWeak"),cO=St.Symbol("kResistStopPropagation"),{finished:dO}=Ci,hO=Y_,{addAbortSignalNoValidate:gO}=ju,{isWritable:pO,isNodeStream:bO}=ii,{deprecate:_O}=yr,{ArrayPrototypePush:yO,Boolean:wO,MathFloor:Wp,Number:mO,NumberIsNaN:EO,Promise:qp,PromiseReject:Vp,PromiseResolve:vO,PromisePrototypeThen:Gp,Symbol:X_}=St,vu=X_("kEmpty"),zp=X_("kEof");function SO(e,t){if(t!=null&&to(t,"options"),(t==null?void 0:t.signal)!=null&&eo(t.signal,"options.signal"),bO(e)&&!pO(e))throw new aO("stream",e,"must be writable");const r=hO(this,e);return t!=null&&t.signal&&gO(t.signal,r),r}function Fu(e,t){if(typeof e!="function")throw new Ws("fn",["Function","AsyncFunction"],e);t!=null&&to(t,"options"),(t==null?void 0:t.signal)!=null&&eo(t.signal,"options.signal");let r=1;(t==null?void 0:t.concurrency)!=null&&(r=Wp(t.concurrency));let o=r-1;return(t==null?void 0:t.highWaterMark)!=null&&(o=Wp(t.highWaterMark)),Hp(r,"options.concurrency",1),Hp(o,"options.highWaterMark",0),o+=r,(async function*(){const u=yr.AbortSignalAny([t==null?void 0:t.signal].filter(wO)),f=this,g=[],l={signal:u};let h,b,w=!1,I=0;function A(){w=!0,x()}function x(){I-=1,v()}function v(){b&&!w&&I<r&&g.length<o&&(b(),b=null)}async function C(){try{for await(let B of f){if(w)return;if(u.aborted)throw new Ln;try{if(B=e(B,l),B===vu)continue;B=vO(B)}catch(P){B=Vp(P)}I+=1,Gp(B,x,A),g.push(B),h&&(h(),h=null),!w&&(g.length>=o||I>=r)&&await new qp(P=>{b=P})}g.push(zp)}catch(B){const P=Vp(B);Gp(P,x,A),g.push(P)}finally{w=!0,h&&(h(),h=null)}}C();try{for(;;){for(;g.length>0;){const B=await g[0];if(B===zp)return;if(u.aborted)throw new Ln;B!==vu&&(yield B),g.shift(),v()}await new qp(B=>{h=B})}}finally{w=!0,b&&(b(),b=null)}}).call(this)}function RO(e=void 0){return e!=null&&to(e,"options"),(e==null?void 0:e.signal)!=null&&eo(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 Ln({cause:e.signal.reason});yield[r++,s]}}).call(this)}async function Z_(e,t=void 0){for await(const r of cd.call(this,e,t))return!0;return!1}async function AO(e,t=void 0){if(typeof e!="function")throw new Ws("fn",["Function","AsyncFunction"],e);return!await Z_.call(this,async(...r)=>!await e(...r),t)}async function TO(e,t){for await(const r of cd.call(this,e,t))return r}async function IO(e,t){if(typeof e!="function")throw new Ws("fn",["Function","AsyncFunction"],e);async function r(o,s){return await e(o,s),vu}for await(const o of Fu.call(this,r,t));}function cd(e,t){if(typeof e!="function")throw new Ws("fn",["Function","AsyncFunction"],e);async function r(o,s){return await e(o,s)?o:vu}return Fu.call(this,r,t)}class OO extends uO{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 Ws("reducer",["Function","AsyncFunction"],e);r!=null&&to(r,"options"),(r==null?void 0:r.signal)!=null&&eo(r.signal,"options.signal");let s=arguments.length>1;if(r!=null&&(o=r.signal)!==null&&o!==void 0&&o.aborted){const h=new Ln(void 0,{cause:r.signal.reason});throw this.once("error",()=>{}),await dO(this.destroy(h)),h}const u=new sO,f=u.signal;if(r!=null&&r.signal){const h={once:!0,[lO]:this,[cO]:!0};r.signal.addEventListener("abort",()=>u.abort(),h)}let g=!1;try{for await(const h of this){var l;if(g=!0,r!=null&&(l=r.signal)!==null&&l!==void 0&&l.aborted)throw new Ln;s?t=await e(t,h,{signal:f}):(t=h,s=!0)}if(!g&&!s)throw new OO}finally{u.abort()}return t}async function LO(e){e!=null&&to(e,"options"),(e==null?void 0:e.signal)!=null&&eo(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 Ln(void 0,{cause:e.signal.reason});yO(t,o)}return t}function PO(e,t){const r=Fu.call(this,e,t);return(async function*(){for await(const s of r)yield*s}).call(this)}function Q_(e){if(e=mO(e),EO(e))return 0;if(e<0)throw new fO("number",">= 0",e);return e}function BO(e,t=void 0){return t!=null&&to(t,"options"),(t==null?void 0:t.signal)!=null&&eo(t.signal,"options.signal"),e=Q_(e),(async function*(){var o;if(t!=null&&(o=t.signal)!==null&&o!==void 0&&o.aborted)throw new Ln;for await(const u of this){var s;if(t!=null&&(s=t.signal)!==null&&s!==void 0&&s.aborted)throw new Ln;e--<=0&&(yield u)}}).call(this)}function NO(e,t=void 0){return t!=null&&to(t,"options"),(t==null?void 0:t.signal)!=null&&eo(t.signal,"options.signal"),e=Q_(e),(async function*(){var o;if(t!=null&&(o=t.signal)!==null&&o!==void 0&&o.aborted)throw new Ln;for await(const u of this){var s;if(t!=null&&(s=t.signal)!==null&&s!==void 0&&s.aborted)throw new Ln;if(e-- >0&&(yield u),e<=0)return}}).call(this)}rd.streamReturningOperators={asIndexedPairs:_O(RO,"readable.asIndexedPairs will be removed in a future version."),drop:BO,filter:cd,flatMap:PO,map:Fu,take:NO,compose:SO};rd.promiseReturningOperators={every:AO,forEach:IO,reduce:CO,toArray:LO,some:Z_,find:TO};var rc,Kp;function ey(){if(Kp)return rc;Kp=1;const{ArrayPrototypePop:e,Promise:t}=St,{isIterable:r,isNodeStream:o,isWebStream:s}=ii,{pipelineImpl:u}=ld,{finished:f}=Ci;ty();function g(...l){return new t((h,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):h(v)},{signal:w,end:I})})}return rc={finished:f,pipeline:g},rc}var Jp;function ty(){if(Jp)return Ul.exports;Jp=1;const{Buffer:e}=_r,{ObjectDefineProperty:t,ObjectKeys:r,ReflectApply:o}=St,{promisify:{custom:s}}=yr,{streamReturningOperators:u,promiseReturningOperators:f}=rd,{codes:{ERR_ILLEGAL_CONSTRUCTOR:g}}=fr,l=Y_,{setDefaultHighWaterMark:h,getDefaultHighWaterMark:b}=Uu,{pipeline:w}=ld,{destroyer:I}=Ho,A=Ci,x=ey(),v=ii,C=Ul.exports=sd.Stream;C.isDestroyed=v.isDestroyed,C.isDisturbed=v.isDisturbed,C.isErrored=v.isErrored,C.isReadable=v.isReadable,C.isWritable=v.isWritable,C.Readable=ku();for(const P of r(u)){let m=function(...j){if(new.target)throw g();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 g();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=ad(),C.Duplex=ei(),C.Transform=G_,C.PassThrough=K_,C.pipeline=w;const{addAbortSignal:B}=ju;return C.addAbortSignal=B,C.finished=A,C.destroy=I,C.compose=l,C.setDefaultHighWaterMark=h,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)},Ul.exports}(function(e){const t=ty(),r=ey(),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})(VA);var $O={},Ji={},dd={},qt={};class ry extends TypeError{constructor(t,r){let o;const{message:s,explanation:u,...f}=t,{path:g}=t,l=g.length===0?s:`At path: ${g.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 MO(e){return qr(e)&&typeof e[Symbol.iterator]=="function"}function qr(e){return typeof e=="object"&&e!=null}function Yp(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Dt(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function xO(e){const{done:t,value:r}=e.next();return t?void 0:r}function DO(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:g,message:l=`Expected a value of type \`${f}\`${g?` with refinement \`${g}\``:""}, but received: \`${Dt(o)}\``}=e;return{value:o,type:f,refinement:g,key:s[s.length-1],path:s,branch:u,...e,message:l}}function*Dc(e,t,r,o){MO(e)||(e=[e]);for(const s of e){const u=DO(s,t,r,o);u&&(yield u)}}function*hd(e,t,r={}){const{path:o=[],branch:s=[e],coerce:u=!1,mask:f=!1}=r,g={path:o,branch:s};if(u&&(e=t.coercer(e,g),f&&t.type!=="type"&&qr(t.schema)&&qr(e)&&!Array.isArray(e)))for(const h in e)t.schema[h]===void 0&&delete e[h];let l="valid";for(const h of t.validator(e,g))h.explanation=r.message,l="not_valid",yield[h,void 0];for(let[h,b,w]of t.entries(e,g)){const I=hd(b,w,{path:h===void 0?o:[...o,h],branch:h===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],h===void 0?e=b:e instanceof Map?e.set(h,b):e instanceof Set?e.add(b):qr(e)&&(b!==void 0||h in e)&&(e[h]=b))}if(l!=="not_valid")for(const h of t.refiner(e,g))h.explanation=r.message,l="not_refined",yield[h,void 0];l==="valid"&&(yield[void 0,e])}class Lt{constructor(t){const{type:r,schema:o,validator:s,refiner:u,coercer:f=l=>l,entries:g=function*(){}}=t;this.type=r,this.schema=o,this.entries=g,this.coercer=f,s?this.validator=(l,h)=>{const b=s(l,h);return Dc(b,h,this,l)}:this.validator=()=>[],u?this.refiner=(l,h)=>{const b=u(l,h);return Dc(b,h,this,l)}:this.refiner=()=>[]}assert(t,r){return ny(t,this,r)}create(t,r){return iy(t,this,r)}is(t){return gd(t,this)}mask(t,r){return oy(t,this,r)}validate(t,r={}){return Wo(t,this,r)}}function ny(e,t,r){const o=Wo(e,t,{message:r});if(o[0])throw o[0]}function iy(e,t,r){const o=Wo(e,t,{coerce:!0,message:r});if(o[0])throw o[0];return o[1]}function oy(e,t,r){const o=Wo(e,t,{coerce:!0,mask:!0,message:r});if(o[0])throw o[0];return o[1]}function gd(e,t){return!Wo(e,t)[0]}function Wo(e,t,r={}){const o=hd(e,t,r),s=xO(o);return s[0]?[new ry(s[0],function*(){for(const f of o)f[0]&&(yield f[0])}),void 0]:[void 0,s[1]]}function jO(...e){const t=e[0].type==="type",r=e.map(s=>s.schema),o=Object.assign({},...r);return t?Vs(o):qs(o)}function wr(e,t){return new Lt({type:e,schema:null,validator:t})}function UO(e,t){return new Lt({...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 kO(e){return new Lt({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 FO(e){let t;return new Lt({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 HO(e,t){const{schema:r}=e,o={...r};for(const s of t)delete o[s];switch(e.type){case"type":return Vs(o);default:return qs(o)}}function WO(e){const t=e instanceof Lt,r=t?{...e.schema}:{...e};for(const o in r)r[o]=sy(r[o]);return t&&e.type==="type"?Vs(r):qs(r)}function qO(e,t){const{schema:r}=e,o={};for(const s of t)o[s]=r[s];switch(e.type){case"type":return Vs(o);default:return qs(o)}}function VO(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),wr(e,t)}function GO(){return wr("any",()=>!0)}function zO(e){return new Lt({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: ${Dt(t)}`}})}function KO(){return wr("bigint",e=>typeof e=="bigint")}function JO(){return wr("boolean",e=>typeof e=="boolean")}function YO(){return wr("date",e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${Dt(e)}`)}function XO(e){const t={},r=e.map(o=>Dt(o)).join();for(const o of e)t[o]=o;return new Lt({type:"enums",schema:t,validator(o){return e.includes(o)||`Expected one of \`${r}\`, but received: ${Dt(o)}`}})}function ZO(){return wr("func",e=>typeof e=="function"||`Expected a function, but received: ${Dt(e)}`)}function QO(e){return wr("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${Dt(t)}`)}function e2(){return wr("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${Dt(e)}`)}function t2(e){return new Lt({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 r2(e){const t=Dt(e),r=typeof e;return new Lt({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(o){return o===e||`Expected the literal \`${t}\`, but received: ${Dt(o)}`}})}function n2(e,t){return new Lt({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: ${Dt(r)}`}})}function pd(){return wr("never",()=>!1)}function i2(e){return new Lt({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function o2(){return wr("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${Dt(e)}`)}function qs(e){const t=e?Object.keys(e):[],r=pd();return new Lt({type:"object",schema:e||null,*entries(o){if(e&&qr(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 qr(o)||`Expected an object, but received: ${Dt(o)}`},coercer(o){return qr(o)?{...o}:o}})}function sy(e){return new Lt({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function s2(e,t){return new Lt({type:"record",schema:null,*entries(r){if(qr(r))for(const o in r){const s=r[o];yield[o,o,e],yield[o,s,t]}},validator(r){return qr(r)||`Expected an object, but received: ${Dt(r)}`}})}function a2(){return wr("regexp",e=>e instanceof RegExp)}function u2(e){return new Lt({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: ${Dt(t)}`}})}function ay(){return wr("string",e=>typeof e=="string"||`Expected a string, but received: ${Dt(e)}`)}function f2(e){const t=pd();return new Lt({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: ${Dt(r)}`}})}function Vs(e){const t=Object.keys(e);return new Lt({type:"type",schema:e,*entries(r){if(qr(r))for(const o of t)yield[o,r[o],e[o]]},validator(r){return qr(r)||`Expected an object, but received: ${Dt(r)}`},coercer(r){return qr(r)?{...r}:r}})}function l2(e){const t=e.map(r=>r.type).join(" | ");return new Lt({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]=hd(r,u,o),[g]=f;if(g[0])for(const[l]of f)l&&s.push(l);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${Dt(r)}`,...s]}})}function uy(){return wr("unknown",()=>!0)}function bd(e,t,r){return new Lt({...e,coercer:(o,s)=>gd(o,t)?e.coercer(r(o,s),s):e.coercer(o,s)})}function c2(e,t,r={}){return bd(e,uy(),o=>{const s=typeof t=="function"?t():t;if(o===void 0)return s;if(!r.strict&&Yp(o)&&Yp(s)){const u={...o};let f=!1;for(const g in s)u[g]===void 0&&(u[g]=s[g],f=!0);if(f)return u}return o})}function d2(e){return bd(e,ay(),t=>t.trim())}function h2(e){return ro(e,"empty",t=>{const r=fy(t);return r===0||`Expected an empty ${e.type} but received one with a size of \`${r}\``})}function fy(e){return e instanceof Map||e instanceof Set?e.size:e.length}function g2(e,t,r={}){const{exclusive:o}=r;return ro(e,"max",s=>o?s<t:s<=t||`Expected a ${e.type} less than ${o?"":"or equal to "}${t} but received \`${s}\``)}function p2(e,t,r={}){const{exclusive:o}=r;return ro(e,"min",s=>o?s>t:s>=t||`Expected a ${e.type} greater than ${o?"":"or equal to "}${t} but received \`${s}\``)}function b2(e){return ro(e,"nonempty",t=>fy(t)>0||`Expected a nonempty ${e.type} but received an empty one`)}function _2(e,t){return ro(e,"pattern",r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`)}function y2(e,t,r=t){const o=`Expected a ${e.type}`,s=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return ro(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 ro(e,t,r){return new Lt({...e,*refiner(o,s){yield*e.refiner(o,s);const u=r(o,s),f=Dc(u,s,e,o);for(const g of f)yield{...g,refinement:t}}})}const w2=Object.freeze(Object.defineProperty({__proto__:null,Struct:Lt,StructError:ry,any:GO,array:zO,assert:ny,assign:jO,bigint:KO,boolean:JO,coerce:bd,create:iy,date:YO,defaulted:c2,define:wr,deprecated:UO,dynamic:kO,empty:h2,enums:XO,func:ZO,instance:QO,integer:e2,intersection:t2,is:gd,lazy:FO,literal:r2,map:n2,mask:oy,max:g2,min:p2,never:pd,nonempty:b2,nullable:i2,number:o2,object:qs,omit:HO,optional:sy,partial:WO,pattern:_2,pick:qO,record:s2,refine:ro,regexp:a2,set:u2,size:y2,string:ay,struct:VO,trimmed:d2,tuple:f2,type:Vs,union:l2,unknown:uy,validate:Wo},Symbol.toStringTag,{value:"Module"})),no=V1(w2);Object.defineProperty(qt,"__esModule",{value:!0});qt.assertExhaustive=qt.assertStruct=qt.assert=qt.AssertionError=void 0;const m2=no;function E2(e){return typeof e=="object"&&e!==null&&"message"in e}function v2(e){var t,r;return typeof((r=(t=e==null?void 0:e.prototype)===null||t===void 0?void 0:t.constructor)===null||r===void 0?void 0:r.name)=="string"}function S2(e){const t=E2(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}function ly(e,t){return v2(e)?new e({message:t}):e({message:t})}class _d extends Error{constructor(t){super(t.message),this.code="ERR_ASSERTION"}}qt.AssertionError=_d;function R2(e,t="Assertion failed.",r=_d){if(!e)throw t instanceof Error?t:ly(r,t)}qt.assert=R2;function A2(e,t,r="Assertion failed",o=_d){try{(0,m2.assert)(e,t)}catch(s){throw ly(o,`${r}: ${S2(s)}.`)}}qt.assertStruct=A2;function T2(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}qt.assertExhaustive=T2;var Gs={};Object.defineProperty(Gs,"__esModule",{value:!0});Gs.base64=void 0;const I2=no,O2=qt,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,O2.assert)(u==="base64url"),f=String.raw`[-_A-Za-z0-9]`);let g;return s?g=new RegExp(`^(?:${f}{4})*(?:${f}{3}=|${f}{2}==)?$`,"u"):g=new RegExp(`^(?:${f}{4})*(?:${f}{2,3}|${f}{3}=|${f}{2}==)?$`,"u"),(0,I2.pattern)(e,g)};Gs.base64=C2;var Qe={},zs={};(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=no,r=qt;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(h){return(0,t.is)(h,e.HexStruct)}e.isHexString=o;function s(h){return(0,t.is)(h,e.StrictHexStruct)}e.isStrictHexString=s;function u(h){(0,r.assert)(o(h),"Value must be a hexadecimal string.")}e.assertIsHexString=u;function f(h){(0,r.assert)(s(h),'Value must be a hexadecimal string, starting with "0x".')}e.assertIsStrictHexString=f;function g(h){return h.startsWith("0x")?h:h.startsWith("0X")?`0x${h.substring(2)}`:`0x${h}`}e.add0x=g;function l(h){return h.startsWith("0x")||h.startsWith("0X")?h.substring(2):h}e.remove0x=l})(zs);Object.defineProperty(Qe,"__esModule",{value:!0});Qe.createDataView=Qe.concatBytes=Qe.valueToBytes=Qe.stringToBytes=Qe.numberToBytes=Qe.signedBigIntToBytes=Qe.bigIntToBytes=Qe.hexToBytes=Qe.bytesToString=Qe.bytesToNumber=Qe.bytesToSignedBigInt=Qe.bytesToBigInt=Qe.bytesToHex=Qe.assertIsBytes=Qe.isBytes=void 0;const Cr=qt,jc=zs,Xp=48,Zp=58,Qp=87;function L2(){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 P2=L2();function yd(e){return e instanceof Uint8Array}Qe.isBytes=yd;function qo(e){(0,Cr.assert)(yd(e),"Value must be a Uint8Array.")}Qe.assertIsBytes=qo;function cy(e){if(qo(e),e.length===0)return"0x";const t=P2(),r=new Array(e.length);for(let o=0;o<e.length;o++)r[o]=t[e[o]];return(0,jc.add0x)(r.join(""))}Qe.bytesToHex=cy;function dy(e){qo(e);const t=cy(e);return BigInt(t)}Qe.bytesToBigInt=dy;function B2(e){qo(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(e.length*8,t)}Qe.bytesToSignedBigInt=B2;function N2(e){qo(e);const t=dy(e);return(0,Cr.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)}Qe.bytesToNumber=N2;function $2(e){return qo(e),new TextDecoder().decode(e)}Qe.bytesToString=$2;function Hu(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,jc.assertIsHexString)(e);const r=(0,jc.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),g=o.charCodeAt(u*2+1),l=f-(f<Zp?Xp:Qp),h=g-(g<Zp?Xp:Qp);s[u]=l*16+h}return s}Qe.hexToBytes=Hu;function hy(e){(0,Cr.assert)(typeof e=="bigint","Value must be a bigint."),(0,Cr.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");const t=e.toString(16);return Hu(t)}Qe.bigIntToBytes=hy;function M2(e,t){(0,Cr.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(t*8+-1))}function x2(e,t){(0,Cr.assert)(typeof e=="bigint","Value must be a bigint."),(0,Cr.assert)(typeof t=="number","Byte length must be a number."),(0,Cr.assert)(t>0,"Byte length must be greater than 0."),(0,Cr.assert)(M2(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()}Qe.signedBigIntToBytes=x2;function gy(e){(0,Cr.assert)(typeof e=="number","Value must be a number."),(0,Cr.assert)(e>=0,"Value must be a non-negative number."),(0,Cr.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");const t=e.toString(16);return Hu(t)}Qe.numberToBytes=gy;function py(e){return(0,Cr.assert)(typeof e=="string","Value must be a string."),new TextEncoder().encode(e)}Qe.stringToBytes=py;function by(e){if(typeof e=="bigint")return hy(e);if(typeof e=="number")return gy(e);if(typeof e=="string")return e.startsWith("0x")?Hu(e):py(e);if(yd(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}Qe.valueToBytes=by;function D2(e){const t=new Array(e.length);let r=0;for(let s=0;s<e.length;s++){const u=by(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}Qe.concatBytes=D2;function j2(e){if(typeof de.Buffer<"u"&&e instanceof de.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)}Qe.createDataView=j2;var Wu={};Object.defineProperty(Wu,"__esModule",{value:!0});Wu.ChecksumStruct=void 0;const eb=no,U2=Gs;Wu.ChecksumStruct=(0,eb.size)((0,U2.base64)((0,eb.string)(),{paddingRequired:!0}),44,44);var Rn={};Object.defineProperty(Rn,"__esModule",{value:!0});Rn.createHex=Rn.createBytes=Rn.createBigInt=Rn.createNumber=void 0;const vt=no,k2=qt,_y=Qe,qu=zs,yy=(0,vt.union)([(0,vt.number)(),(0,vt.bigint)(),(0,vt.string)(),qu.StrictHexStruct]),F2=(0,vt.coerce)((0,vt.number)(),yy,Number),H2=(0,vt.coerce)((0,vt.bigint)(),yy,BigInt);(0,vt.union)([qu.StrictHexStruct,(0,vt.instance)(Uint8Array)]);const W2=(0,vt.coerce)((0,vt.instance)(Uint8Array),(0,vt.union)([qu.StrictHexStruct]),_y.hexToBytes),q2=(0,vt.coerce)(qu.StrictHexStruct,(0,vt.instance)(Uint8Array),_y.bytesToHex);function V2(e){try{const t=(0,vt.create)(e,F2);return(0,k2.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){throw t instanceof vt.StructError?new Error(`Expected a number-like value, got "${e}".`):t}}Rn.createNumber=V2;function G2(e){try{return(0,vt.create)(e,H2)}catch(t){throw t instanceof vt.StructError?new Error(`Expected a number-like value, got "${String(t.value)}".`):t}}Rn.createBigInt=G2;function z2(e){if(typeof e=="string"&&e.toLowerCase()==="0x")return new Uint8Array;try{return(0,vt.create)(e,W2)}catch(t){throw t instanceof vt.StructError?new Error(`Expected a bytes-like value, got "${String(t.value)}".`):t}}Rn.createBytes=z2;function K2(e){if(e instanceof Uint8Array&&e.length===0||typeof e=="string"&&e.toLowerCase()==="0x")return"0x";try{return(0,vt.create)(e,q2)}catch(t){throw t instanceof vt.StructError?new Error(`Expected a bytes-like value, got "${String(t.value)}".`):t}}Rn.createHex=K2;var xo={},wy=Ye&&Ye.__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},ur=Ye&&Ye.__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)},nn,En;Object.defineProperty(xo,"__esModule",{value:!0});xo.FrozenSet=xo.FrozenMap=void 0;class wd{constructor(t){nn.set(this,void 0),wy(this,nn,new Map(t),"f"),Object.freeze(this)}get size(){return ur(this,nn,"f").size}[(nn=new WeakMap,Symbol.iterator)](){return ur(this,nn,"f")[Symbol.iterator]()}entries(){return ur(this,nn,"f").entries()}forEach(t,r){return ur(this,nn,"f").forEach((o,s,u)=>t.call(r,o,s,this))}get(t){return ur(this,nn,"f").get(t)}has(t){return ur(this,nn,"f").has(t)}keys(){return ur(this,nn,"f").keys()}values(){return ur(this,nn,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([t,r])=>`${String(t)} => ${String(r)}`).join(", ")} `:""}}`}}xo.FrozenMap=wd;class md{constructor(t){En.set(this,void 0),wy(this,En,new Set(t),"f"),Object.freeze(this)}get size(){return ur(this,En,"f").size}[(En=new WeakMap,Symbol.iterator)](){return ur(this,En,"f")[Symbol.iterator]()}entries(){return ur(this,En,"f").entries()}forEach(t,r){return ur(this,En,"f").forEach((o,s,u)=>t.call(r,o,s,this))}has(t){return ur(this,En,"f").has(t)}keys(){return ur(this,En,"f").keys()}values(){return ur(this,En,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(t=>String(t)).join(", ")} `:""}}`}}xo.FrozenSet=md;Object.freeze(wd);Object.freeze(wd.prototype);Object.freeze(md);Object.freeze(md.prototype);var my={};Object.defineProperty(my,"__esModule",{value:!0});var Ey={};(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=no,r=qt,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,Z)=>{function le(ae,ee){const me=[...ee.validator(ae,Z)];return me.length>0?me:!0}try{const ae=le(j,e.UnsafeJsonStruct);return ae!==!0?ae:le(JSON.parse(JSON.stringify(j)),e.UnsafeJsonStruct)}catch(ae){return ae 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 Z=JSON.stringify(j);return new TextEncoder().encode(Z).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 g(j,Z){(0,r.assertStruct)(j,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",Z)}e.assertIsJsonRpcNotification=g;function l(j){return(0,t.is)(j,e.JsonRpcRequestStruct)}e.isJsonRpcRequest=l;function h(j,Z){(0,r.assertStruct)(j,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",Z)}e.assertIsJsonRpcRequest=h,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,Z){(0,r.assertStruct)(j,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",Z)}e.assertIsPendingJsonRpcResponse=w;function I(j){return(0,t.is)(j,e.JsonRpcResponseStruct)}e.isJsonRpcResponse=I;function A(j,Z){(0,r.assertStruct)(j,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",Z)}e.assertIsJsonRpcResponse=A;function x(j){return(0,t.is)(j,e.JsonRpcSuccessStruct)}e.isJsonRpcSuccess=x;function v(j,Z){(0,r.assertStruct)(j,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",Z)}e.assertIsJsonRpcSuccess=v;function C(j){return(0,t.is)(j,e.JsonRpcFailureStruct)}e.isJsonRpcFailure=C;function B(j,Z){(0,r.assertStruct)(j,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",Z)}e.assertIsJsonRpcFailure=B;function P(j){return(0,t.is)(j,e.JsonRpcErrorStruct)}e.isJsonRpcError=P;function S(j,Z){(0,r.assertStruct)(j,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",Z)}e.assertIsJsonRpcError=S;function m(j){const{permitEmptyString:Z,permitFractions:le,permitNull:ae}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},j);return Se=>!!(typeof Se=="number"&&(le||Number.isInteger(Se))||typeof Se=="string"&&(Z||Se.length>0)||ae&&Se===null)}e.getJsonRpcIdValidator=m})(Ey);var vy={};Object.defineProperty(vy,"__esModule",{value:!0});var Do={},J2=Ye&&Ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Do,"__esModule",{value:!0});Do.createModuleLogger=Do.createProjectLogger=void 0;const Y2=J2(jA),X2=(0,Y2.default)("metamask");function Z2(e){return X2.extend(e)}Do.createProjectLogger=Z2;function Q2(e,t){return e.extend(t)}Do.createModuleLogger=Q2;var Sy={};(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(h){return Array.isArray(h)&&h.length>0}e.isNonEmptyArray=t;function r(h){return h==null}e.isNullOrUndefined=r;function o(h){return!!h&&typeof h=="object"&&!Array.isArray(h)}e.isObject=o;const s=(h,b)=>Object.hasOwnProperty.call(h,b);e.hasProperty=s,function(h){h[h.Null=4]="Null",h[h.Comma=1]="Comma",h[h.Wrapper=1]="Wrapper",h[h.True=4]="True",h[h.False=5]="False",h[h.Quote=1]="Quote",h[h.Colon=1]="Colon",h[h.Date=24]="Date"}(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function u(h){if(typeof h!="object"||h===null)return!1;try{let b=h;for(;Object.getPrototypeOf(b)!==null;)b=Object.getPrototypeOf(b);return Object.getPrototypeOf(h)===b}catch{return!1}}e.isPlainObject=u;function f(h){return h.charCodeAt(0)<=127}e.isASCII=f;function g(h){var b;return h.split("").reduce((I,A)=>f(A)?I+1:I+2,0)+((b=h.match(e.ESCAPE_CHARACTERS_REGEXP))!==null&&b!==void 0?b:[]).length}e.calculateStringSize=g;function l(h){return h.toString().length}e.calculateNumberSize=l})(Sy);var An={};Object.defineProperty(An,"__esModule",{value:!0});An.hexToBigInt=An.hexToNumber=An.bigIntToHex=An.numberToHex=void 0;const Po=qt,Ms=zs,eC=e=>((0,Po.assert)(typeof e=="number","Value must be a number."),(0,Po.assert)(e>=0,"Value must be a non-negative number."),(0,Po.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,Ms.add0x)(e.toString(16)));An.numberToHex=eC;const tC=e=>((0,Po.assert)(typeof e=="bigint","Value must be a bigint."),(0,Po.assert)(e>=0,"Value must be a non-negative bigint."),(0,Ms.add0x)(e.toString(16)));An.bigIntToHex=tC;const rC=e=>{(0,Ms.assertIsHexString)(e);const t=parseInt(e,16);return(0,Po.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};An.hexToNumber=rC;const nC=e=>((0,Ms.assertIsHexString)(e),BigInt((0,Ms.add0x)(e)));An.hexToBigInt=nC;var Ry={};Object.defineProperty(Ry,"__esModule",{value:!0});var Ay={};(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})(Ay);var Ty={};Object.defineProperty(Ty,"__esModule",{value:!0});var Iy={},Uc={exports:{}};const iC="2.0.0",Oy=256,oC=Number.MAX_SAFE_INTEGER||9007199254740991,sC=16,aC=Oy-6,uC=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var Vu={MAX_LENGTH:Oy,MAX_SAFE_COMPONENT_LENGTH:sC,MAX_SAFE_BUILD_LENGTH:aC,MAX_SAFE_INTEGER:oC,RELEASE_TYPES:uC,SEMVER_SPEC_VERSION:iC,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},nc={};const fC=typeof de.process=="object"&&nc&&nc.NODE_DEBUG&&/\bsemver\b/i.test(nc.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Gu=fC;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:s}=Vu,u=Gu;t=e.exports={};const f=t.re=[],g=t.safeRe=[],l=t.src=[],h=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,h[m]=S,f[m]=new RegExp(B,P?"g":void 0),g[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*$")})(Uc,Uc.exports);var Ks=Uc.exports;const lC=Object.freeze({loose:!0}),cC=Object.freeze({}),dC=e=>e?typeof e!="object"?lC:e:cC;var Ed=dC;const tb=/^[0-9]+$/,Cy=(e,t)=>{const r=tb.test(e),o=tb.test(t);return r&&o&&(e=+e,t=+t),e===t?0:r&&!o?-1:o&&!r?1:e<t?-1:1},hC=(e,t)=>Cy(t,e);var Ly={compareIdentifiers:Cy,rcompareIdentifiers:hC};const ou=Gu,{MAX_LENGTH:rb,MAX_SAFE_INTEGER:su}=Vu,{safeRe:nb,safeSrc:ib,t:au}=Ks,gC=Ed,{compareIdentifiers:Ao}=Ly;let pC=class vn{constructor(t,r){if(r=gC(r),t instanceof vn){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>rb)throw new TypeError(`version is longer than ${rb} characters`);ou("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const o=t.trim().match(r.loose?nb[au.LOOSE]:nb[au.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>su||this.major<0)throw new TypeError("Invalid major version");if(this.minor>su||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>su||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<su)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(ou("SemVer.compare",this.version,this.options,t),!(t instanceof vn)){if(typeof t=="string"&&t===this.version)return 0;t=new vn(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof vn||(t=new vn(t,this.options)),Ao(this.major,t.major)||Ao(this.minor,t.minor)||Ao(this.patch,t.patch)}comparePre(t){if(t instanceof vn||(t=new vn(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(ou("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 Ao(o,s)}while(++r)}compareBuild(t){t instanceof vn||(t=new vn(t,this.options));let r=0;do{const o=this.build[r],s=t.build[r];if(ou("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 Ao(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?ib[au.PRERELEASELOOSE]:ib[au.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]),Ao(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 Js=pC;const ob=Js,bC=(e,t,r=!1)=>{if(e instanceof ob)return e;try{return new ob(e,t)}catch(o){if(!r)return null;throw o}};var _C=bC;const yC=_C,wC=(e,t)=>{const r=yC(e,t);return r?r.version:null};var mC=wC;const sb=Js,EC=(e,t,r)=>new sb(e,r).compare(new sb(t,r));var Vo=EC;const vC=Vo,SC=(e,t,r)=>vC(e,t,r)>0;var vd=SC;const RC=Vo,AC=(e,t,r)=>RC(e,t,r)<0;var Py=AC;const TC=Vo,IC=(e,t,r)=>TC(e,t,r)===0;var OC=IC;const CC=Vo,LC=(e,t,r)=>CC(e,t,r)!==0;var PC=LC;const BC=Vo,NC=(e,t,r)=>BC(e,t,r)>=0;var By=NC;const $C=Vo,MC=(e,t,r)=>$C(e,t,r)<=0;var Ny=MC;const xC=OC,DC=PC,jC=vd,UC=By,kC=Py,FC=Ny,HC=(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 xC(e,r,o);case"!=":return DC(e,r,o);case">":return jC(e,r,o);case">=":return UC(e,r,o);case"<":return kC(e,r,o);case"<=":return FC(e,r,o);default:throw new TypeError(`Invalid operator: ${t}`)}};var WC=HC;const{safeRe:e$,t:t$}=Ks;class qC{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 VC=qC,ic,ab;function an(){if(ab)return ic;ab=1;const e=/\s+/g;class t{constructor(q,J){if(J=s(J),q instanceof t)return q.loose===!!J.loose&&q.includePrerelease===!!J.includePrerelease?q:new t(q.raw,J);if(q instanceof u)return this.raw=q.value,this.set=[[q]],this.formatted=void 0,this;if(this.options=J,this.loose=!!J.loose,this.includePrerelease=!!J.includePrerelease,this.raw=q.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(re=>!v(re[0])),this.set.length===0)this.set=[V];else if(this.set.length>1){for(const re of this.set)if(re.length===1&&C(re[0])){this.set=[re];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let q=0;q<this.set.length;q++){q>0&&(this.formatted+="||");const J=this.set[q];for(let V=0;V<J.length;V++)V>0&&(this.formatted+=" "),this.formatted+=J[V].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(q){const V=((this.options.includePrerelease&&A)|(this.options.loose&&x))+":"+q,re=o.get(V);if(re)return re;const H=this.options.loose,z=H?l[h.HYPHENRANGELOOSE]:l[h.HYPHENRANGE];q=q.replace(z,F(this.options.includePrerelease)),f("hyphen replace",q),q=q.replace(l[h.COMPARATORTRIM],b),f("comparator trim",q),q=q.replace(l[h.TILDETRIM],w),f("tilde trim",q),q=q.replace(l[h.CARETTRIM],I),f("caret trim",q);let se=q.split(" ").map(be=>P(be,this.options)).join(" ").split(/\s+/).map(be=>me(be,this.options));H&&(se=se.filter(be=>(f("loose invalid filter",be,this.options),!!be.match(l[h.COMPARATORLOOSE])))),f("range list",se);const ce=new Map,te=se.map(be=>new u(be,this.options));for(const be of te){if(v(be))return[be];ce.set(be.value,be)}ce.size>1&&ce.has("")&&ce.delete("");const _e=[...ce.values()];return o.set(V,_e),_e}intersects(q,J){if(!(q instanceof t))throw new TypeError("a Range is required");return this.set.some(V=>B(V,J)&&q.set.some(re=>B(re,J)&&V.every(H=>re.every(z=>H.intersects(z,J)))))}test(q){if(!q)return!1;if(typeof q=="string")try{q=new g(q,this.options)}catch{return!1}for(let J=0;J<this.set.length;J++)if(U(this.set[J],q,this.options))return!0;return!1}}ic=t;const r=VC,o=new r,s=Ed,u=zu(),f=Gu,g=Js,{safeRe:l,t:h,comparatorTrimReplace:b,tildeTrimReplace:w,caretTrimReplace:I}=Ks,{FLAG_INCLUDE_PRERELEASE:A,FLAG_LOOSE:x}=Vu,v=$=>$.value==="<0.0.0-0",C=$=>$.value==="",B=($,q)=>{let J=!0;const V=$.slice();let re=V.pop();for(;J&&V.length;)J=V.every(H=>re.intersects(H,q)),re=V.pop();return J},P=($,q)=>(f("comp",$,q),$=Z($,q),f("caret",$),$=m($,q),f("tildes",$),$=ae($,q),f("xrange",$),$=Se($,q),f("stars",$),$),S=$=>!$||$.toLowerCase()==="x"||$==="*",m=($,q)=>$.trim().split(/\s+/).map(J=>j(J,q)).join(" "),j=($,q)=>{const J=q.loose?l[h.TILDELOOSE]:l[h.TILDE];return $.replace(J,(V,re,H,z,se)=>{f("tilde",$,V,re,H,z,se);let ce;return S(re)?ce="":S(H)?ce=`>=${re}.0.0 <${+re+1}.0.0-0`:S(z)?ce=`>=${re}.${H}.0 <${re}.${+H+1}.0-0`:se?(f("replaceTilde pr",se),ce=`>=${re}.${H}.${z}-${se} <${re}.${+H+1}.0-0`):ce=`>=${re}.${H}.${z} <${re}.${+H+1}.0-0`,f("tilde return",ce),ce})},Z=($,q)=>$.trim().split(/\s+/).map(J=>le(J,q)).join(" "),le=($,q)=>{f("caret",$,q);const J=q.loose?l[h.CARETLOOSE]:l[h.CARET],V=q.includePrerelease?"-0":"";return $.replace(J,(re,H,z,se,ce)=>{f("caret",$,re,H,z,se,ce);let te;return S(H)?te="":S(z)?te=`>=${H}.0.0${V} <${+H+1}.0.0-0`:S(se)?H==="0"?te=`>=${H}.${z}.0${V} <${H}.${+z+1}.0-0`:te=`>=${H}.${z}.0${V} <${+H+1}.0.0-0`:ce?(f("replaceCaret pr",ce),H==="0"?z==="0"?te=`>=${H}.${z}.${se}-${ce} <${H}.${z}.${+se+1}-0`:te=`>=${H}.${z}.${se}-${ce} <${H}.${+z+1}.0-0`:te=`>=${H}.${z}.${se}-${ce} <${+H+1}.0.0-0`):(f("no pr"),H==="0"?z==="0"?te=`>=${H}.${z}.${se}${V} <${H}.${z}.${+se+1}-0`:te=`>=${H}.${z}.${se}${V} <${H}.${+z+1}.0-0`:te=`>=${H}.${z}.${se} <${+H+1}.0.0-0`),f("caret return",te),te})},ae=($,q)=>(f("replaceXRanges",$,q),$.split(/\s+/).map(J=>ee(J,q)).join(" ")),ee=($,q)=>{$=$.trim();const J=q.loose?l[h.XRANGELOOSE]:l[h.XRANGE];return $.replace(J,(V,re,H,z,se,ce)=>{f("xRange",$,V,re,H,z,se,ce);const te=S(H),_e=te||S(z),be=_e||S(se),R=be;return re==="="&&R&&(re=""),ce=q.includePrerelease?"-0":"",te?re===">"||re==="<"?V="<0.0.0-0":V="*":re&&R?(_e&&(z=0),se=0,re===">"?(re=">=",_e?(H=+H+1,z=0,se=0):(z=+z+1,se=0)):re==="<="&&(re="<",_e?H=+H+1:z=+z+1),re==="<"&&(ce="-0"),V=`${re+H}.${z}.${se}${ce}`):_e?V=`>=${H}.0.0${ce} <${+H+1}.0.0-0`:be&&(V=`>=${H}.${z}.0${ce} <${H}.${+z+1}.0-0`),f("xRange return",V),V})},Se=($,q)=>(f("replaceStars",$,q),$.trim().replace(l[h.STAR],"")),me=($,q)=>(f("replaceGTE0",$,q),$.trim().replace(l[q.includePrerelease?h.GTE0PRE:h.GTE0],"")),F=$=>(q,J,V,re,H,z,se,ce,te,_e,be,R)=>(S(V)?J="":S(re)?J=`>=${V}.0.0${$?"-0":""}`:S(H)?J=`>=${V}.${re}.0${$?"-0":""}`:z?J=`>=${J}`:J=`>=${J}${$?"-0":""}`,S(te)?ce="":S(_e)?ce=`<${+te+1}.0.0-0`:S(be)?ce=`<${te}.${+_e+1}.0-0`:R?ce=`<=${te}.${_e}.${be}-${R}`:$?ce=`<${te}.${_e}.${+be+1}-0`:ce=`<=${ce}`,`${J} ${ce}`.trim()),U=($,q,J)=>{for(let V=0;V<$.length;V++)if(!$[V].test(q))return!1;if(q.prerelease.length&&!J.includePrerelease){for(let V=0;V<$.length;V++)if(f($[V].semver),$[V].semver!==u.ANY&&$[V].semver.prerelease.length>0){const re=$[V].semver;if(re.major===q.major&&re.minor===q.minor&&re.patch===q.patch)return!0}return!1}return!0};return ic}var oc,ub;function zu(){if(ub)return oc;ub=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 g(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 g(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(">")))}}oc=t;const r=Ed,{safeRe:o,t:s}=Ks,u=WC,f=Gu,g=Js,l=an();return oc}const GC=an(),zC=(e,t,r)=>{try{t=new GC(t,r)}catch{return!1}return t.test(e)};var $y=zC;an();an();an();an();const KC=an(),JC=(e,t)=>{try{return new KC(e,t).range||"*"}catch{return null}};var YC=JC;const XC=Js,My=zu(),{ANY:ZC}=My,QC=an(),eL=$y,fb=vd,lb=Py,tL=Ny,rL=By,nL=(e,t,r,o)=>{e=new XC(e,o),t=new QC(t,o);let s,u,f,g,l;switch(r){case">":s=fb,u=tL,f=lb,g=">",l=">=";break;case"<":s=lb,u=rL,f=fb,g="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(eL(e,t,o))return!1;for(let h=0;h<t.set.length;++h){const b=t.set[h];let w=null,I=null;if(b.forEach(A=>{A.semver===ZC&&(A=new My(">=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===g||w.operator===l||(!I.operator||I.operator===g)&&u(e,I.semver))return!1;if(I.operator===l&&f(e,I.semver))return!1}return!0};var iL=nL;const oL=iL,sL=(e,t,r)=>oL(e,t,">",r);var aL=sL;an();an();const Sd=zu(),{ANY:r$}=Sd;new Sd(">=0.0.0-0");new Sd(">=0.0.0");const sc=Ks,cb=Vu,db=Ly,uL=mC,fL=vd;zu();an();const lL=$y,cL=YC,dL=aL;var hL={valid:uL,gt:fL,satisfies:lL,validRange:cL,gtr:dL,re:sc.re,src:sc.src,tokens:sc.t,SEMVER_SPEC_VERSION:cb.SEMVER_SPEC_VERSION,RELEASE_TYPES:cb.RELEASE_TYPES,compareIdentifiers:db.compareIdentifiers,rcompareIdentifiers:db.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=hL,r=no,o=qt;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 g(w){(0,o.assertStruct)(w,e.VersionRangeStruct)}e.assertIsSemVerRange=g;function l(w,I){return(0,t.gt)(w,I)}e.gtVersion=l;function h(w,I){return(0,t.gtr)(w,I)}e.gtRange=h;function b(w,I){return(0,t.satisfies)(w,I,{includePrerelease:!0})}e.satisfiesVersionRange=b})(Iy);(function(e){var t=Ye&&Ye.__createBinding||(Object.create?function(o,s,u,f){f===void 0&&(f=u);var g=Object.getOwnPropertyDescriptor(s,u);(!g||("get"in g?!s.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return s[u]}}),Object.defineProperty(o,f,g)}:function(o,s,u,f){f===void 0&&(f=u),o[f]=s[u]}),r=Ye&&Ye.__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(qt,e),r(Gs,e),r(Qe,e),r(Wu,e),r(Rn,e),r(xo,e),r(my,e),r(zs,e),r(Ey,e),r(vy,e),r(Do,e),r(Sy,e),r(An,e),r(Ry,e),r(Ay,e),r(Ty,e),r(Iy,e)})(dd);var Ku={},Ii={};Object.defineProperty(Ii,"__esModule",{value:!0});Ii.errorValues=Ii.errorCodes=void 0;Ii.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}};Ii.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=dd,r=Ii,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(g(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 g(A){return Number.isInteger(A)}e.isValidCode=g;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=h(A,x);return v||delete C.stack,C}e.serializeError=l;function h(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},{})}})(Ku);var gL=Ye&&Ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ji,"__esModule",{value:!0});Ji.EthereumProviderError=Ji.JsonRpcError=void 0;const pL=dd,bL=gL(Qc),_L=Ku;class xy 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,pL.isPlainObject)(this.data)&&(t.data.cause=(0,_L.serializeCause)(this.data.cause))),this.stack&&(t.stack=this.stack),t}toString(){return(0,bL.default)(this.serialize(),mL,2)}}Ji.JsonRpcError=xy;class yL extends xy{constructor(t,r,o){if(!wL(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,o)}}Ji.EthereumProviderError=yL;function wL(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function mL(e,t){if(t!=="[Circular]")return t}var jo={};Object.defineProperty(jo,"__esModule",{value:!0});jo.providerErrors=jo.rpcErrors=void 0;const Rd=Ji,Zt=Ii,Dy=Ku;jo.rpcErrors={parse:e=>Fr(Zt.errorCodes.rpc.parse,e),invalidRequest:e=>Fr(Zt.errorCodes.rpc.invalidRequest,e),invalidParams:e=>Fr(Zt.errorCodes.rpc.invalidParams,e),methodNotFound:e=>Fr(Zt.errorCodes.rpc.methodNotFound,e),internal:e=>Fr(Zt.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 Fr(t,e)},invalidInput:e=>Fr(Zt.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>Fr(Zt.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Fr(Zt.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Fr(Zt.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Fr(Zt.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Fr(Zt.errorCodes.rpc.limitExceeded,e)};jo.providerErrors={userRejectedRequest:e=>ws(Zt.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>ws(Zt.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>ws(Zt.errorCodes.provider.unsupportedMethod,e),disconnected:e=>ws(Zt.errorCodes.provider.disconnected,e),chainDisconnected:e=>ws(Zt.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 Rd.EthereumProviderError(t,r,o)}};function Fr(e,t){const[r,o]=jy(t);return new Rd.JsonRpcError(e,r??(0,Dy.getMessageFromCode)(e),o)}function ws(e,t){const[r,o]=jy(t);return new Rd.EthereumProviderError(e,r??(0,Dy.getMessageFromCode)(e),o)}function jy(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=Ji;Object.defineProperty(e,"JsonRpcError",{enumerable:!0,get:function(){return t.JsonRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});var r=Ku;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=jo;Object.defineProperty(e,"rpcErrors",{enumerable:!0,get:function(){return o.rpcErrors}}),Object.defineProperty(e,"providerErrors",{enumerable:!0,get:function(){return o.providerErrors}});var s=Ii;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})})($O);var Ad={exports:{}},EL=Uy;function Uy(e,t){if(e&&t)return Uy(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(g){u[g]=f[g]}),u}}var ky=EL;Ad.exports=ky(pu);Ad.exports.strict=ky(Fy);pu.proto=pu(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return pu(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Fy(this)},configurable:!0})});function pu(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function Fy(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 Td=Ad.exports;const vL=Oi(Td);var SL=Td,RL=function(){},AL=function(e){return e.setHeader&&typeof e.abort=="function"},TL=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},Hy=function(e,t,r){if(typeof t=="function")return Hy(e,null,t);t||(t={}),r=SL(r||RL);var o=e._writableState,s=e._readableState,u=t.readable||t.readable!==!1&&e.readable,f=t.writable||t.writable!==!1&&e.writable,g=!1,l=function(){e.writable||h()},h=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(){de.process.nextTick(x)},x=function(){if(!g){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",h)};return AL(e)?(e.on("complete",h),e.on("abort",A),e.req?v():e.on("request",v)):f&&!o&&(e.on("end",l),e.on("close",l)),TL(e)&&e.on("exit",w),e.on("end",b),e.on("finish",h),t.error!==!1&&e.on("error",I),e.on("close",A),function(){g=!0,e.removeListener("complete",h),e.removeListener("abort",A),e.removeListener("request",v),e.req&&e.req.removeListener("finish",h),e.removeListener("end",l),e.removeListener("close",l),e.removeListener("finish",h),e.removeListener("exit",w),e.removeListener("end",b),e.removeListener("error",I),e.removeListener("close",A)}},Wy=Hy;const hb=Oi(Wy);var IL=Td,OL=Wy,bu;try{bu=ks}catch{}var xs=function(){},CL=/^v?\.0/.test(de.process.version),Ju=function(e){return typeof e=="function"},LL=function(e){return!CL||!bu?!1:(e instanceof(bu.ReadStream||xs)||e instanceof(bu.WriteStream||xs))&&Ju(e.close)},PL=function(e){return e.setHeader&&Ju(e.abort)},BL=function(e,t,r,o){o=IL(o);var s=!1;e.on("close",function(){s=!0}),OL(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,LL(e))return e.close(xs);if(PL(e))return e.abort();if(Ju(e.destroy))return e.destroy();o(f||new Error("stream was destroyed"))}}},gb=function(e){e()},NL=function(e,t){return e.pipe(t)},$L=function(){var e=Array.prototype.slice.call(arguments),t=Ju(e[e.length-1]||xs)&&e.pop()||xs;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,g=u>0;return BL(s,f,g,function(l){r||(r=l),l&&o.forEach(gb),!f&&(o.forEach(gb),t(r))})});return e.reduce(NL)},ML=$L;const pb=Oi(ML);var xL={},Yu={},Xu={},qy={},Uo={},Ri={},Ct={};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.output=Ct.exists=Ct.hash=Ct.bytes=Ct.bool=Ct.number=Ct.isBytes=void 0;function Su(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}Ct.number=Su;function Vy(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}Ct.bool=Vy;function Gy(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}Ct.isBytes=Gy;function Id(e,...t){if(!Gy(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}`)}Ct.bytes=Id;function zy(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Su(e.outputLen),Su(e.blockLen)}Ct.hash=zy;function Ky(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")}Ct.exists=Ky;function Jy(e,t){Id(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Ct.output=Jy;const DL={number:Su,bool:Vy,bytes:Id,hash:zy,exists:Ky,output:Jy};Ct.default=DL;var ri={},Zu={};Object.defineProperty(Zu,"__esModule",{value:!0});Zu.crypto=void 0;Zu.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=Zu,r=Ct;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 g=(F,U)=>F<<32-U|F>>>U;e.rotr=g;const l=(F,U)=>F<<U|F>>>32-U>>>0;e.rotl=l,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;const h=F=>F<<24&4278190080|F<<8&16711680|F>>>8&65280|F>>>24&255;e.byteSwap=h,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 q=new Uint8Array($);for(let J=0,V=0;J<$;J++,V+=2){const re=x(F.charCodeAt(V)),H=x(F.charCodeAt(V+1));if(re===void 0||H===void 0){const z=F[V]+F[V+1];throw new Error('hex string expected, got non-hex character "'+z+'" at index '+V)}q[J]=re*16+H}return q}e.hexToBytes=v;const C=async()=>{};e.nextTick=C;async function B(F,U,$){let q=Date.now();for(let J=0;J<F;J++){$(J);const V=Date.now()-q;V>=0&&V<U||(await(0,e.nextTick)(),q+=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 q=0;q<F.length;q++){const J=F[q];(0,r.bytes)(J),U+=J.length}const $=new Uint8Array(U);for(let q=0,J=0;q<F.length;q++){const V=F[q];$.set(V,J),J+=V.length}return $}e.concatBytes=m;class j{clone(){return this._cloneInto()}}e.Hash=j;const Z={}.toString;function le(F,U){if(U!==void 0&&Z.call(U)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(F,U)}e.checkOpts=le;function ae(F){const U=q=>F().update(S(q)).digest(),$=F();return U.outputLen=$.outputLen,U.blockLen=$.blockLen,U.create=()=>F(),U}e.wrapConstructor=ae;function ee(F){const U=(q,J)=>F(J).update(S(q)).digest(),$=F({});return U.outputLen=$.outputLen,U.blockLen=$.blockLen,U.create=q=>F(q),U}e.wrapConstructorWithOpts=ee;function Se(F){const U=(q,J)=>F(J).update(S(q)).digest(),$=F({});return U.outputLen=$.outputLen,U.blockLen=$.blockLen,U.create=q=>F(q),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})(ri);Object.defineProperty(Ri,"__esModule",{value:!0});Ri.HashMD=Ri.Maj=Ri.Chi=void 0;const ac=Ct,ms=ri;function jL(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),g=Number(r&u),l=o?4:0,h=o?0:4;e.setUint32(t+l,f,o),e.setUint32(t+h,g,o)}const UL=(e,t,r)=>e&t^~e&r;Ri.Chi=UL;const kL=(e,t,r)=>e&t^e&r^t&r;Ri.Maj=kL;class FL extends ms.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,ms.createView)(this.buffer)}update(t){(0,ac.exists)(this);const{view:r,buffer:o,blockLen:s}=this;t=(0,ms.toBytes)(t);const u=t.length;for(let f=0;f<u;){const g=Math.min(s-this.pos,u-f);if(g===s){const l=(0,ms.createView)(t);for(;s<=u-f;f+=s)this.process(l,f);continue}o.set(t.subarray(f,f+g),this.pos),this.pos+=g,f+=g,this.pos===s&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,ac.exists)(this),(0,ac.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;jL(o,s-8,BigInt(this.length*8),u),this.process(o,0);const g=(0,ms.createView)(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const h=l/4,b=this.get();if(h>b.length)throw new Error("_sha2: outputLen bigger than state");for(let w=0;w<h;w++)g.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:g}=this;return t.length=s,t.pos=g,t.finished=u,t.destroyed=f,s%r&&t.buffer.set(o),t}}Ri.HashMD=FL;Object.defineProperty(Uo,"__esModule",{value:!0});Uo.sha224=Uo.sha256=void 0;const uc=Ri,Hr=ri,HL=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]),wi=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),mi=new Uint32Array(64);class Yy extends uc.HashMD{constructor(){super(64,32,8,!1),this.A=wi[0]|0,this.B=wi[1]|0,this.C=wi[2]|0,this.D=wi[3]|0,this.E=wi[4]|0,this.F=wi[5]|0,this.G=wi[6]|0,this.H=wi[7]|0}get(){const{A:t,B:r,C:o,D:s,E:u,F:f,G:g,H:l}=this;return[t,r,o,s,u,f,g,l]}set(t,r,o,s,u,f,g,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=g|0,this.H=l|0}process(t,r){for(let w=0;w<16;w++,r+=4)mi[w]=t.getUint32(r,!1);for(let w=16;w<64;w++){const I=mi[w-15],A=mi[w-2],x=(0,Hr.rotr)(I,7)^(0,Hr.rotr)(I,18)^I>>>3,v=(0,Hr.rotr)(A,17)^(0,Hr.rotr)(A,19)^A>>>10;mi[w]=v+mi[w-7]+x+mi[w-16]|0}let{A:o,B:s,C:u,D:f,E:g,F:l,G:h,H:b}=this;for(let w=0;w<64;w++){const I=(0,Hr.rotr)(g,6)^(0,Hr.rotr)(g,11)^(0,Hr.rotr)(g,25),A=b+I+(0,uc.Chi)(g,l,h)+HL[w]+mi[w]|0,v=((0,Hr.rotr)(o,2)^(0,Hr.rotr)(o,13)^(0,Hr.rotr)(o,22))+(0,uc.Maj)(o,s,u)|0;b=h,h=l,l=g,g=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,g=g+this.E|0,l=l+this.F|0,h=h+this.G|0,b=b+this.H|0,this.set(o,s,u,f,g,l,h,b)}roundClean(){mi.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class WL extends Yy{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}}Uo.sha256=(0,Hr.wrapConstructor)(()=>new Yy);Uo.sha224=(0,Hr.wrapConstructor)(()=>new WL);var Qu={},Xy={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const t=Ct,r=ri;class o extends r.Hash{constructor(f,g){super(),this.finished=!1,this.destroyed=!1,(0,t.hash)(f);const l=(0,r.toBytes)(g);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 h=this.blockLen,b=new Uint8Array(h);b.set(l.length>h?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:g,iHash:l,finished:h,destroyed:b,blockLen:w,outputLen:I}=this;return f=f,f.finished=h,f.destroyed=b,f.blockLen=w,f.outputLen=I,f.oHash=g._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,g)=>new o(u,f).update(g).digest();e.hmac=s,e.hmac.create=(u,f)=>new o(u,f)})(Xy);var Od={},ef={},bt={},st={};Object.defineProperty(st,"__esModule",{value:!0});st.bitMask=void 0;st.isBytes=rf;st.abytes=nf;st.bytesToHex=Cd;st.numberToHexUnpadded=Qy;st.hexToNumber=Ld;st.hexToBytes=of;st.bytesToNumberBE=GL;st.bytesToNumberLE=zL;st.numberToBytesBE=e0;st.numberToBytesLE=KL;st.numberToVarBytesBE=JL;st.ensureBytes=YL;st.concatBytes=t0;st.equalBytes=XL;st.utf8ToBytes=ZL;st.bitLen=QL;st.bitGet=eP;st.bitSet=tP;st.createHmacDrbg=nP;st.validateObject=oP;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Zy=BigInt(0),tf=BigInt(1),qL=BigInt(2);function rf(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function nf(e){if(!rf(e))throw new Error("Uint8Array expected")}const VL=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Cd(e){nf(e);let t="";for(let r=0;r<e.length;r++)t+=VL[e[r]];return t}function Qy(e){const t=e.toString(16);return t.length&1?`0${t}`:t}function Ld(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return BigInt(e===""?"0":`0x${e}`)}const Jn={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function bb(e){if(e>=Jn._0&&e<=Jn._9)return e-Jn._0;if(e>=Jn._A&&e<=Jn._F)return e-(Jn._A-10);if(e>=Jn._a&&e<=Jn._f)return e-(Jn._a-10)}function of(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=bb(e.charCodeAt(u)),g=bb(e.charCodeAt(u+1));if(f===void 0||g===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+g}return o}function GL(e){return Ld(Cd(e))}function zL(e){return nf(e),Ld(Cd(Uint8Array.from(e).reverse()))}function e0(e,t){return of(e.toString(16).padStart(t*2,"0"))}function KL(e,t){return e0(e,t).reverse()}function JL(e){return of(Qy(e))}function YL(e,t,r){let o;if(typeof t=="string")try{o=of(t)}catch(u){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${u}`)}else if(rf(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 t0(...e){let t=0;for(let o=0;o<e.length;o++){const s=e[o];nf(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 XL(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 ZL(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function QL(e){let t;for(t=0;e>Zy;e>>=tf,t+=1);return t}function eP(e,t){return e>>BigInt(t)&tf}function tP(e,t,r){return e|(r?tf:Zy)<<BigInt(t)}const rP=e=>(qL<<BigInt(e-1))-tf;st.bitMask=rP;const fc=e=>new Uint8Array(e),_b=e=>Uint8Array.from(e);function nP(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=fc(e),s=fc(e),u=0;const f=()=>{o.fill(1),s.fill(0),u=0},g=(...w)=>r(s,o,...w),l=(w=fc())=>{s=g(_b([0]),w),o=g(),w.length!==0&&(s=g(_b([1]),w),o=g())},h=()=>{if(u++>=1e3)throw new Error("drbg: tried 1000 values");let w=0;const I=[];for(;w<t;){o=g();const A=o.slice();I.push(A),w+=o.length}return t0(...I)};return(w,I)=>{f(),l(w);let A;for(;!(A=I(h()));)l();return f(),A}}const iP={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"||rf(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 oP(e,t,r={}){const o=(s,u,f)=>{const g=iP[u];if(typeof g!="function")throw new Error(`Invalid validator "${u}", expected function`);const l=e[s];if(!(f&&l===void 0)&&!g(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(bt,"__esModule",{value:!0});bt.isNegativeLE=void 0;bt.mod=Ir;bt.pow=r0;bt.pow2=aP;bt.invert=Ru;bt.tonelliShanks=n0;bt.FpSqrt=i0;bt.validateField=lP;bt.FpPow=o0;bt.FpInvertBatch=s0;bt.FpDiv=cP;bt.FpIsSquare=dP;bt.nLength=Pd;bt.Field=hP;bt.FpSqrtOdd=gP;bt.FpSqrtEven=pP;bt.hashToPrivateScalar=bP;bt.getFieldBytesLength=Bd;bt.getMinHashLength=a0;bt.mapHashToField=_P;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Or=st,kt=BigInt(0),pt=BigInt(1),Si=BigInt(2),sP=BigInt(3),kc=BigInt(4),yb=BigInt(5),wb=BigInt(8);BigInt(9);BigInt(16);function Ir(e,t){const r=e%t;return r>=kt?r:t+r}function r0(e,t,r){if(r<=kt||t<kt)throw new Error("Expected power/modulo > 0");if(r===pt)return kt;let o=pt;for(;t>kt;)t&pt&&(o=o*e%r),e=e*e%r,t>>=pt;return o}function aP(e,t,r){let o=e;for(;t-- >kt;)o*=o,o%=r;return o}function Ru(e,t){if(e===kt||t<=kt)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=Ir(e,t),o=t,s=kt,u=pt;for(;r!==kt;){const g=o/r,l=o%r,h=s-u*g;o=r,r=l,s=u,u=h}if(o!==pt)throw new Error("invert: does not exist");return Ir(s,t)}function n0(e){const t=(e-pt)/Si;let r,o,s;for(r=e-pt,o=0;r%Si===kt;r/=Si,o++);for(s=Si;s<e&&r0(s,t,e)!==e-pt;s++);if(o===1){const f=(e+pt)/kc;return function(l,h){const b=l.pow(h,f);if(!l.eql(l.sqr(b),h))throw new Error("Cannot find square root");return b}}const u=(r+pt)/Si;return function(g,l){if(g.pow(l,t)===g.neg(g.ONE))throw new Error("Cannot find square root");let h=o,b=g.pow(g.mul(g.ONE,s),r),w=g.pow(l,u),I=g.pow(l,r);for(;!g.eql(I,g.ONE);){if(g.eql(I,g.ZERO))return g.ZERO;let A=1;for(let v=g.sqr(I);A<h&&!g.eql(v,g.ONE);A++)v=g.sqr(v);const x=g.pow(b,pt<<BigInt(h-A-1));b=g.sqr(x),w=g.mul(w,x),I=g.mul(I,b),h=A}return w}}function i0(e){if(e%kc===sP){const t=(e+pt)/kc;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%wb===yb){const t=(e-yb)/wb;return function(o,s){const u=o.mul(s,Si),f=o.pow(u,t),g=o.mul(s,f),l=o.mul(o.mul(g,Si),f),h=o.mul(g,o.sub(l,o.ONE));if(!o.eql(o.sqr(h),s))throw new Error("Cannot find square root");return h}}return n0(e)}const uP=(e,t)=>(Ir(e,t)&pt)===pt;bt.isNegativeLE=uP;const fP=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function lP(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=fP.reduce((o,s)=>(o[s]="function",o),t);return(0,Or.validateObject)(e,r)}function o0(e,t,r){if(r<kt)throw new Error("Expected power > 0");if(r===kt)return e.ONE;if(r===pt)return t;let o=e.ONE,s=t;for(;r>kt;)r&pt&&(o=e.mul(o,s)),s=e.sqr(s),r>>=pt;return o}function s0(e,t){const r=new Array(t.length),o=t.reduce((u,f,g)=>e.is0(f)?u:(r[g]=u,e.mul(u,f)),e.ONE),s=e.inv(o);return t.reduceRight((u,f,g)=>e.is0(f)?u:(r[g]=e.mul(u,r[g]),e.mul(u,f)),s),r}function cP(e,t,r){return e.mul(t,typeof r=="bigint"?Ru(r,e.ORDER):e.inv(r))}function dP(e){const t=(e.ORDER-pt)/Si;return r=>{const o=e.pow(r,t);return e.eql(o,e.ZERO)||e.eql(o,e.ONE)}}function Pd(e,t){const r=t!==void 0?t:e.toString(2).length,o=Math.ceil(r/8);return{nBitLength:r,nByteLength:o}}function hP(e,t,r=!1,o={}){if(e<=kt)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:s,nByteLength:u}=Pd(e,t);if(u>2048)throw new Error("Field lengths over 2048 bytes are not supported");const f=i0(e),g=Object.freeze({ORDER:e,BITS:s,BYTES:u,MASK:(0,Or.bitMask)(s),ZERO:kt,ONE:pt,create:l=>Ir(l,e),isValid:l=>{if(typeof l!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof l}`);return kt<=l&&l<e},is0:l=>l===kt,isOdd:l=>(l&pt)===pt,neg:l=>Ir(-l,e),eql:(l,h)=>l===h,sqr:l=>Ir(l*l,e),add:(l,h)=>Ir(l+h,e),sub:(l,h)=>Ir(l-h,e),mul:(l,h)=>Ir(l*h,e),pow:(l,h)=>o0(g,l,h),div:(l,h)=>Ir(l*Ru(h,e),e),sqrN:l=>l*l,addN:(l,h)=>l+h,subN:(l,h)=>l-h,mulN:(l,h)=>l*h,inv:l=>Ru(l,e),sqrt:o.sqrt||(l=>f(g,l)),invertBatch:l=>s0(g,l),cmov:(l,h,b)=>b?h:l,toBytes:l=>r?(0,Or.numberToBytesLE)(l,u):(0,Or.numberToBytesBE)(l,u),fromBytes:l=>{if(l.length!==u)throw new Error(`Fp.fromBytes: expected ${u}, got ${l.length}`);return r?(0,Or.bytesToNumberLE)(l):(0,Or.bytesToNumberBE)(l)}});return Object.freeze(g)}function gP(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 pP(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 bP(e,t,r=!1){e=(0,Or.ensureBytes)("privateHash",e);const o=e.length,s=Pd(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,Or.bytesToNumberLE)(e):(0,Or.bytesToNumberBE)(e);return Ir(u,t-pt)+pt}function Bd(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 a0(e){const t=Bd(e);return t+Math.ceil(t/2)}function _P(e,t,r=!1){const o=e.length,s=Bd(t),u=a0(t);if(o<16||o<u||o>1024)throw new Error(`expected ${u}-1024 bytes of input, got ${o}`);const f=r?(0,Or.bytesToNumberBE)(e):(0,Or.bytesToNumberLE)(e),g=Ir(f,t-pt)+pt;return r?(0,Or.numberToBytesLE)(g,s):(0,Or.numberToBytesBE)(g,s)}Object.defineProperty(ef,"__esModule",{value:!0});ef.wNAF=mP;ef.validateBasic=EP;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const mb=bt,yP=st,wP=BigInt(0),lc=BigInt(1);function mP(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,g=s;for(;u>wP;)u&lc&&(f=f.add(g)),g=g.double(),u>>=lc;return f},precomputeWindow(s,u){const{windows:f,windowSize:g}=o(u),l=[];let h=s,b=h;for(let w=0;w<f;w++){b=h,l.push(b);for(let I=1;I<g;I++)b=b.add(h),l.push(b);h=b.double()}return l},wNAF(s,u,f){const{windows:g,windowSize:l}=o(s);let h=e.ZERO,b=e.BASE;const w=BigInt(2**s-1),I=2**s,A=BigInt(s);for(let x=0;x<g;x++){const v=x*l;let C=Number(f&w);f>>=A,C>l&&(C-=I,f+=lc);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])):h=h.add(r(m,u[P]))}return{p:h,f:b}},wNAFCached(s,u,f,g){const l=s._WINDOW_SIZE||1;let h=u.get(s);return h||(h=this.precomputeWindow(s,l),l!==1&&u.set(s,g(h))),this.wNAF(l,h,f)}}}function EP(e){return(0,mb.validateField)(e.Fp),(0,yP.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,mb.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=ef,r=bt,o=st,s=st;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:Z}=S;if(m){if(!j.eql(Z,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:g}=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"?g(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:Z,l:le}=e.DER._parseInt(m.subarray(2)),{d:ae,l:ee}=e.DER._parseInt(le);if(ee.length)throw new S("Invalid signature: left bytes after parsing");return{r:Z,s:ae}},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)),Z=S(m(P.r)),le=j.length/2,ae=Z.length/2,ee=m(le),Se=m(ae);return`30${m(ae+le+4)}02${Se}${Z}02${ee}${j}`}};const l=BigInt(0),h=BigInt(1),b=BigInt(2),w=BigInt(3),I=BigInt(4);function A(P){const S=u(P),{Fp:m}=S,j=S.toBytes||((J,V,re)=>{const H=V.toAffine();return o.concatBytes(Uint8Array.from([4]),m.toBytes(H.x),m.toBytes(H.y))}),Z=S.fromBytes||(J=>{const V=J.subarray(1),re=m.fromBytes(V.subarray(0,m.BYTES)),H=m.fromBytes(V.subarray(m.BYTES,2*m.BYTES));return{x:re,y:H}});function le(J){const{a:V,b:re}=S,H=m.sqr(J),z=m.mul(H,J);return m.add(m.add(z,m.mul(J,V)),re)}if(!m.eql(m.sqr(S.Gy),le(S.Gx)))throw new Error("bad generator point: equation left != right");function ae(J){return typeof J=="bigint"&&l<J&&J<S.n}function ee(J){if(!ae(J))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function Se(J){const{allowedPrivateKeyLengths:V,nByteLength:re,wrapPrivateKey:H,n:z}=S;if(V&&typeof J!="bigint"){if(o.isBytes(J)&&(J=o.bytesToHex(J)),typeof J!="string"||!V.includes(J.length))throw new Error("Invalid key");J=J.padStart(re*2,"0")}let se;try{se=typeof J=="bigint"?J:o.bytesToNumberBE((0,s.ensureBytes)("private key",J,re))}catch{throw new Error(`private key must be ${re} bytes, hex or bigint, not ${typeof J}`)}return H&&(se=r.mod(se,z)),ee(se),se}const me=new Map;function F(J){if(!(J instanceof U))throw new Error("ProjectivePoint expected")}class U{constructor(V,re,H){if(this.px=V,this.py=re,this.pz=H,V==null||!m.isValid(V))throw new Error("x required");if(re==null||!m.isValid(re))throw new Error("y required");if(H==null||!m.isValid(H))throw new Error("z required")}static fromAffine(V){const{x:re,y:H}=V||{};if(!V||!m.isValid(re)||!m.isValid(H))throw new Error("invalid affine point");if(V instanceof U)throw new Error("projective point not allowed");const z=se=>m.eql(se,m.ZERO);return z(re)&&z(H)?U.ZERO:new U(re,H,m.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(V){const re=m.invertBatch(V.map(H=>H.pz));return V.map((H,z)=>H.toAffine(re[z])).map(U.fromAffine)}static fromHex(V){const re=U.fromAffine(Z((0,s.ensureBytes)("pointHex",V)));return re.assertValidity(),re}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:re}=this.toAffine();if(!m.isValid(V)||!m.isValid(re))throw new Error("bad point: x or y not FE");const H=m.sqr(re),z=le(V);if(!m.eql(H,z))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:re,py:H,pz:z}=this,{px:se,py:ce,pz:te}=V,_e=m.eql(m.mul(re,te),m.mul(se,z)),be=m.eql(m.mul(H,te),m.mul(ce,z));return _e&&be}negate(){return new U(this.px,m.neg(this.py),this.pz)}double(){const{a:V,b:re}=S,H=m.mul(re,w),{px:z,py:se,pz:ce}=this;let te=m.ZERO,_e=m.ZERO,be=m.ZERO,R=m.mul(z,z),O=m.mul(se,se),W=m.mul(ce,ce),ie=m.mul(z,se);return ie=m.add(ie,ie),be=m.mul(z,ce),be=m.add(be,be),te=m.mul(V,be),_e=m.mul(H,W),_e=m.add(te,_e),te=m.sub(O,_e),_e=m.add(O,_e),_e=m.mul(te,_e),te=m.mul(ie,te),be=m.mul(H,be),W=m.mul(V,W),ie=m.sub(R,W),ie=m.mul(V,ie),ie=m.add(ie,be),be=m.add(R,R),R=m.add(be,R),R=m.add(R,W),R=m.mul(R,ie),_e=m.add(_e,R),W=m.mul(se,ce),W=m.add(W,W),R=m.mul(W,ie),te=m.sub(te,R),be=m.mul(W,O),be=m.add(be,be),be=m.add(be,be),new U(te,_e,be)}add(V){F(V);const{px:re,py:H,pz:z}=this,{px:se,py:ce,pz:te}=V;let _e=m.ZERO,be=m.ZERO,R=m.ZERO;const O=S.a,W=m.mul(S.b,w);let ie=m.mul(re,se),ye=m.mul(H,ce),d=m.mul(z,te),p=m.add(re,H),_=m.add(se,ce);p=m.mul(p,_),_=m.add(ie,ye),p=m.sub(p,_),_=m.add(re,z);let E=m.add(se,te);return _=m.mul(_,E),E=m.add(ie,d),_=m.sub(_,E),E=m.add(H,z),_e=m.add(ce,te),E=m.mul(E,_e),_e=m.add(ye,d),E=m.sub(E,_e),R=m.mul(O,_),_e=m.mul(W,d),R=m.add(_e,R),_e=m.sub(ye,R),R=m.add(ye,R),be=m.mul(_e,R),ye=m.add(ie,ie),ye=m.add(ye,ie),d=m.mul(O,d),_=m.mul(W,_),ye=m.add(ye,d),d=m.sub(ie,d),d=m.mul(O,d),_=m.add(_,d),ie=m.mul(ye,_),be=m.add(be,ie),ie=m.mul(E,_),_e=m.mul(p,_e),_e=m.sub(_e,ie),ie=m.mul(p,ye),R=m.mul(E,R),R=m.add(R,ie),new U(_e,be,R)}subtract(V){return this.add(V.negate())}is0(){return this.equals(U.ZERO)}wNAF(V){return q.wNAFCached(this,me,V,re=>{const H=m.invertBatch(re.map(z=>z.pz));return re.map((z,se)=>z.toAffine(H[se])).map(U.fromAffine)})}multiplyUnsafe(V){const re=U.ZERO;if(V===l)return re;if(ee(V),V===h)return this;const{endo:H}=S;if(!H)return q.unsafeLadder(this,V);let{k1neg:z,k1:se,k2neg:ce,k2:te}=H.splitScalar(V),_e=re,be=re,R=this;for(;se>l||te>l;)se&h&&(_e=_e.add(R)),te&h&&(be=be.add(R)),R=R.double(),se>>=h,te>>=h;return z&&(_e=_e.negate()),ce&&(be=be.negate()),be=new U(m.mul(be.px,H.beta),be.py,be.pz),_e.add(be)}multiply(V){ee(V);let re=V,H,z;const{endo:se}=S;if(se){const{k1neg:ce,k1:te,k2neg:_e,k2:be}=se.splitScalar(re);let{p:R,f:O}=this.wNAF(te),{p:W,f:ie}=this.wNAF(be);R=q.constTimeNegate(ce,R),W=q.constTimeNegate(_e,W),W=new U(m.mul(W.px,se.beta),W.py,W.pz),H=R.add(W),z=O.add(ie)}else{const{p:ce,f:te}=this.wNAF(re);H=ce,z=te}return U.normalizeZ([H,z])[0]}multiplyAndAddUnsafe(V,re,H){const z=U.BASE,se=(te,_e)=>_e===l||_e===h||!te.equals(z)?te.multiplyUnsafe(_e):te.multiply(_e),ce=se(this,re).add(se(V,H));return ce.is0()?void 0:ce}toAffine(V){const{px:re,py:H,pz:z}=this,se=this.is0();V==null&&(V=se?m.ONE:m.inv(z));const ce=m.mul(re,V),te=m.mul(H,V),_e=m.mul(z,V);if(se)return{x:m.ZERO,y:m.ZERO};if(!m.eql(_e,m.ONE))throw new Error("invZ was invalid");return{x:ce,y:te}}isTorsionFree(){const{h:V,isTorsionFree:re}=S;if(V===h)return!0;if(re)return re(U,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:V,clearCofactor:re}=S;return V===h?this:re?re(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,q=(0,t.wNAF)(U,S.endo?Math.ceil($/2):$);return{CURVE:S,ProjectivePoint:U,normPrivateKeyToScalar:Se,weierstrassEquation:le,isWithinCurveOrder:ae}}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,Z=m.BYTES+1,le=2*m.BYTES+1;function ae(_){return l<_&&_<m.ORDER}function ee(_){return r.mod(_,j)}function Se(_){return r.invert(_,j)}const{ProjectivePoint:me,normPrivateKeyToScalar:F,weierstrassEquation:U,isWithinCurveOrder:$}=A({...S,toBytes(_,E,K){const ne=E.toAffine(),oe=m.toBytes(ne.x),Ie=o.concatBytes;return K?Ie(Uint8Array.from([E.hasEvenY()?2:3]),oe):Ie(Uint8Array.from([4]),oe,m.toBytes(ne.y))},fromBytes(_){const E=_.length,K=_[0],ne=_.subarray(1);if(E===Z&&(K===2||K===3)){const oe=o.bytesToNumberBE(ne);if(!ae(oe))throw new Error("Point is not on curve");const Ie=U(oe);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&h)===h;return(K&1)===1!==Ce&&(Be=m.neg(Be)),{x:oe,y:Be}}else if(E===le&&K===4){const oe=m.fromBytes(ne.subarray(0,m.BYTES)),Ie=m.fromBytes(ne.subarray(m.BYTES,2*m.BYTES));return{x:oe,y:Ie}}else throw new Error(`Point of length ${E} was invalid. Expected ${Z} compressed bytes or ${le} uncompressed bytes`)}}),q=_=>o.bytesToHex(o.numberToBytesBE(_,S.nByteLength));function J(_){const E=j>>h;return _>E}function V(_){return J(_)?ee(-_):_}const re=(_,E,K)=>o.bytesToNumberBE(_.slice(E,K));class H{constructor(E,K,ne){this.r=E,this.s=K,this.recovery=ne,this.assertValidity()}static fromCompact(E){const K=S.nByteLength;return E=(0,s.ensureBytes)("compactSignature",E,K*2),new H(re(E,0,K),re(E,K,2*K))}static fromDER(E){const{r:K,s:ne}=e.DER.toSig((0,s.ensureBytes)("DER",E));return new H(K,ne)}assertValidity(){if(!$(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!$(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(E){return new H(this.r,this.s,E)}recoverPublicKey(E){const{r:K,s:ne,recovery:oe}=this,Ie=be((0,s.ensureBytes)("msgHash",E));if(oe==null||![0,1,2,3].includes(oe))throw new Error("recovery id invalid");const Be=oe===2||oe===3?K+S.n:K;if(Be>=m.ORDER)throw new Error("recovery id 2 or 3 invalid");const Ce=oe&1?"03":"02",Ue=me.fromHex(Ce+q(Be)),Re=Se(Be),He=ee(-Ie*Re),_t=ee(ne*Re),tt=me.BASE.multiplyAndAddUnsafe(Ue,He,_t);if(!tt)throw new Error("point at infinify");return tt.assertValidity(),tt}hasHighS(){return J(this.s)}normalizeS(){return this.hasHighS()?new H(this.r,ee(-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 q(this.r)+q(this.s)}}const z={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 se(_,E=!0){return me.fromPrivateKey(_).toRawBytes(E)}function ce(_){const E=o.isBytes(_),K=typeof _=="string",ne=(E||K)&&_.length;return E?ne===Z||ne===le:K?ne===2*Z||ne===2*le:_ instanceof me}function te(_,E,K=!0){if(ce(_))throw new Error("first arg must be private key");if(!ce(E))throw new Error("second arg must be public key");return me.fromHex(E).multiply(F(_)).toRawBytes(K)}const _e=S.bits2int||function(_){const E=o.bytesToNumberBE(_),K=_.length*8-S.nBitLength;return K>0?E>>BigInt(K):E},be=S.bits2int_modN||function(_){return ee(_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 W(_,E,K=ie){if(["recovered","canonical"].some(Xe=>Xe in K))throw new Error("sign() legacy options not supported");const{hash:ne,randomBytes:oe}=S;let{lowS:Ie,prehash:Be,extraEntropy:Ce}=K;Ie==null&&(Ie=!0),_=(0,s.ensureBytes)("msgHash",_),Be&&(_=(0,s.ensureBytes)("prehashed msgHash",ne(_)));const Ue=be(_),Re=F(E),He=[O(Re),O(Ue)];if(Ce!=null&&Ce!==!1){const Xe=Ce===!0?oe(m.BYTES):Ce;He.push((0,s.ensureBytes)("extraEntropy",Xe))}const _t=o.concatBytes(...He),tt=Ue;function yt(Xe){const Ge=_e(Xe);if(!$(Ge))return;const jt=Se(Ge),Pt=me.BASE.multiply(Ge).toAffine(),ut=ee(Pt.x);if(ut===l)return;const Nt=ee(jt*ee(tt+ut*Re));if(Nt===l)return;let lr=(Pt.x===ut?0:2)|Number(Pt.y&h),tr=Nt;return Ie&&J(Nt)&&(tr=V(Nt),lr^=1),new H(ut,tr,lr)}return{seed:_t,k2sig:yt}}const ie={lowS:S.lowS,prehash:!1},ye={lowS:S.lowS,prehash:!1};function d(_,E,K=ie){const{seed:ne,k2sig:oe}=W(_,E,K),Ie=S;return o.createHmacDrbg(Ie.hash.outputLen,Ie.nByteLength,Ie.hmac)(ne,oe)}me.BASE._setWindowSize(8);function p(_,E,K,ne=ye){var Pt;const oe=_;if(E=(0,s.ensureBytes)("msgHash",E),K=(0,s.ensureBytes)("publicKey",K),"strict"in ne)throw new Error("options.strict was renamed to lowS");const{lowS:Ie,prehash:Be}=ne;let Ce,Ue;try{if(typeof oe=="string"||o.isBytes(oe))try{Ce=H.fromDER(oe)}catch(ut){if(!(ut instanceof e.DER.Err))throw ut;Ce=H.fromCompact(oe)}else if(typeof oe=="object"&&typeof oe.r=="bigint"&&typeof oe.s=="bigint"){const{r:ut,s:Nt}=oe;Ce=new H(ut,Nt)}else throw new Error("PARSE");Ue=me.fromHex(K)}catch(ut){if(ut.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,_t=be(E),tt=Se(He),yt=ee(_t*tt),Xe=ee(Re*tt),Ge=(Pt=me.BASE.multiplyAndAddUnsafe(Ue,yt,Xe))==null?void 0:Pt.toAffine();return Ge?ee(Ge.x)===Re:!1}return{CURVE:S,getPublicKey:se,getSharedSecret:te,sign:d,verify:p,ProjectivePoint:me,Signature:H,utils:z}}function C(P,S){const m=P.ORDER;let j=l;for(let J=m-h;J%b===l;J/=b)j+=h;const Z=j,le=b<<Z-h-h,ae=le*b,ee=(m-h)/ae,Se=(ee-h)/b,me=ae-h,F=le,U=P.pow(S,ee),$=P.pow(S,(ee+h)/b);let q=(J,V)=>{let re=U,H=P.pow(V,me),z=P.sqr(H);z=P.mul(z,V);let se=P.mul(J,z);se=P.pow(se,Se),se=P.mul(se,H),H=P.mul(se,V),z=P.mul(se,J);let ce=P.mul(z,H);se=P.pow(ce,F);let te=P.eql(se,P.ONE);H=P.mul(z,$),se=P.mul(ce,re),z=P.cmov(H,z,te),ce=P.cmov(se,ce,te);for(let _e=Z;_e>h;_e--){let be=_e-b;be=b<<be-h;let R=P.pow(ce,be);const O=P.eql(R,P.ONE);H=P.mul(z,re),re=P.mul(re,re),R=P.mul(ce,re),z=P.cmov(H,z,O),ce=P.cmov(R,ce,O)}return{isValid:te,value:z}};if(P.ORDER%I===w){const J=(P.ORDER-w)/I,V=P.sqrt(P.neg(S));q=(re,H)=>{let z=P.sqr(H);const se=P.mul(re,H);z=P.mul(z,se);let ce=P.pow(z,J);ce=P.mul(ce,se);const te=P.mul(ce,V),_e=P.mul(P.sqr(ce),H),be=P.eql(_e,re);let R=P.cmov(te,ce,be);return{isValid:be,value:R}}}return q}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 Z,le,ae,ee,Se,me,F,U;Z=P.sqr(j),Z=P.mul(Z,S.Z),le=P.sqr(Z),le=P.add(le,Z),ae=P.add(le,P.ONE),ae=P.mul(ae,S.B),ee=P.cmov(S.Z,P.neg(le),!P.eql(le,P.ZERO)),ee=P.mul(ee,S.A),le=P.sqr(ae),me=P.sqr(ee),Se=P.mul(me,S.A),le=P.add(le,Se),le=P.mul(le,ae),me=P.mul(me,ee),Se=P.mul(me,S.B),le=P.add(le,Se),F=P.mul(Z,ae);const{isValid:$,value:q}=m(le,me);U=P.mul(Z,j),U=P.mul(U,q),F=P.cmov(F,ae,$),U=P.cmov(U,q,$);const J=P.isOdd(j)===P.isOdd(U);return U=P.cmov(P.neg(U),U,J),F=P.div(F,ee),{x:F,y:U}}}})(Od);Object.defineProperty(Qu,"__esModule",{value:!0});Qu.getHash=u0;Qu.createCurve=RP;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const vP=Xy,Eb=ri,SP=Od;function u0(e){return{hash:e,hmac:(t,...r)=>(0,vP.hmac)(e,t,(0,Eb.concatBytes)(...r)),randomBytes:Eb.randomBytes}}function RP(e,t){const r=o=>(0,SP.weierstrass)({...e,...u0(o)});return Object.freeze({...r(t),create:r})}var io={};Object.defineProperty(io,"__esModule",{value:!0});io.expand_message_xmd=f0;io.expand_message_xof=l0;io.hash_to_field=Fc;io.isogenyMap=OP;io.createHasher=CP;const AP=bt,Qt=st,TP=Qt.bytesToNumberBE;function vi(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 IP(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 Nd(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function f0(e,t,r,o){(0,Qt.abytes)(e),(0,Qt.abytes)(t),Nd(r),t.length>255&&(t=o((0,Qt.concatBytes)((0,Qt.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 g=(0,Qt.concatBytes)(t,vi(t.length,1)),l=vi(0,u),h=vi(r,2),b=new Array(f),w=o((0,Qt.concatBytes)(l,e,h,vi(0,1),g));b[0]=o((0,Qt.concatBytes)(w,vi(1,1),g));for(let A=1;A<=f;A++){const x=[IP(w,b[A-1]),vi(A+1,1),g];b[A]=o((0,Qt.concatBytes)(...x))}return(0,Qt.concatBytes)(...b).slice(0,r)}function l0(e,t,r,o,s){if((0,Qt.abytes)(e),(0,Qt.abytes)(t),Nd(r),t.length>255){const u=Math.ceil(2*o/8);t=s.create({dkLen:u}).update((0,Qt.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(vi(r,2)).update(t).update(vi(t.length,1)).digest()}function Fc(e,t,r){(0,Qt.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:o,k:s,m:u,hash:f,expand:g,DST:l}=r;(0,Qt.abytes)(e),Nd(t);const h=typeof l=="string"?(0,Qt.utf8ToBytes)(l):l,b=o.toString(2).length,w=Math.ceil((b+s)/8),I=t*u*w;let A;if(g==="xmd")A=f0(e,h,I,f);else if(g==="xof")A=l0(e,h,I,s,f);else if(g==="_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)(TP(S),o)}x[v]=C}return x}function OP(e,t){const r=t.map(o=>Array.from(o).reverse());return(o,s)=>{const[u,f,g,l]=r.map(h=>h.reduce((b,w)=>e.add(e.mul(b,o),w)));return o=e.div(u,f),s=e.mul(s,e.div(g,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=Fc(o,2,{...r,DST:r.DST,...s}),f=e.fromAffine(t(u[0])),g=e.fromAffine(t(u[1])),l=f.add(g).clearCofactor();return l.assertValidity(),l},encodeToCurve(o,s){const u=Fc(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=Uo,r=ri,o=Qu,s=io,u=bt,f=st,g=Od,l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),h=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),b=BigInt(1),w=BigInt(2),I=(H,z)=>(H+z/w)/z;function A(H){const z=l,se=BigInt(3),ce=BigInt(6),te=BigInt(11),_e=BigInt(22),be=BigInt(23),R=BigInt(44),O=BigInt(88),W=H*H*H%z,ie=W*W*H%z,ye=(0,u.pow2)(ie,se,z)*ie%z,d=(0,u.pow2)(ye,se,z)*ie%z,p=(0,u.pow2)(d,w,z)*W%z,_=(0,u.pow2)(p,te,z)*p%z,E=(0,u.pow2)(_,_e,z)*_%z,K=(0,u.pow2)(E,R,z)*E%z,ne=(0,u.pow2)(K,O,z)*K%z,oe=(0,u.pow2)(ne,R,z)*E%z,Ie=(0,u.pow2)(oe,se,z)*ie%z,Be=(0,u.pow2)(Ie,be,z)*_%z,Ce=(0,u.pow2)(Be,ce,z)*W%z,Ue=(0,u.pow2)(Ce,w,z);if(!x.eql(x.sqr(Ue),H))throw new Error("Cannot find square root");return Ue}const x=(0,u.Field)(l,void 0,void 0,{sqrt:A});e.secp256k1=(0,o.createCurve)({a:BigInt(0),b:BigInt(7),Fp:x,n:h,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:H=>{const z=h,se=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),ce=-b*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),te=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),_e=se,be=BigInt("0x100000000000000000000000000000000"),R=I(_e*H,z),O=I(-ce*H,z);let W=(0,u.mod)(H-R*se-O*te,z),ie=(0,u.mod)(-R*ce-O*_e,z);const ye=W>be,d=ie>be;if(ye&&(W=z-W),d&&(ie=z-ie),W>be||ie>be)throw new Error("splitScalar: Endomorphism failed, k="+H);return{k1neg:ye,k1:W,k2neg:d,k2:ie}}}},t.sha256);const v=BigInt(0),C=H=>typeof H=="bigint"&&v<H&&H<l,B=H=>typeof H=="bigint"&&v<H&&H<h,P={};function S(H,...z){let se=P[H];if(se===void 0){const ce=(0,t.sha256)(Uint8Array.from(H,te=>te.charCodeAt(0)));se=(0,f.concatBytes)(ce,ce),P[H]=se}return(0,t.sha256)((0,f.concatBytes)(se,...z))}const m=H=>H.toRawBytes(!0).slice(1),j=H=>(0,f.numberToBytesBE)(H,32),Z=H=>(0,u.mod)(H,l),le=H=>(0,u.mod)(H,h),ae=e.secp256k1.ProjectivePoint,ee=(H,z,se)=>ae.BASE.multiplyAndAddUnsafe(H,z,se);function Se(H){let z=e.secp256k1.utils.normPrivateKeyToScalar(H),se=ae.fromPrivateKey(z);return{scalar:se.hasEvenY()?z:le(-z),bytes:m(se)}}function me(H){if(!C(H))throw new Error("bad x: need 0 < x < p");const z=Z(H*H),se=Z(z*H+BigInt(7));let ce=A(se);ce%w!==v&&(ce=Z(-ce));const te=new ae(H,ce,b);return te.assertValidity(),te}function F(...H){return le((0,f.bytesToNumberBE)(S("BIP0340/challenge",...H)))}function U(H){return Se(H).bytes}function $(H,z,se=(0,r.randomBytes)(32)){const ce=(0,f.ensureBytes)("message",H),{bytes:te,scalar:_e}=Se(z),be=(0,f.ensureBytes)("auxRand",se,32),R=j(_e^(0,f.bytesToNumberBE)(S("BIP0340/aux",be))),O=S("BIP0340/nonce",R,te,ce),W=le((0,f.bytesToNumberBE)(O));if(W===v)throw new Error("sign failed: k is zero");const{bytes:ie,scalar:ye}=Se(W),d=F(ie,te,ce),p=new Uint8Array(64);if(p.set(ie,0),p.set(j(le(ye+d*_e)),32),!q(p,ce,te))throw new Error("sign: Invalid signature produced");return p}function q(H,z,se){const ce=(0,f.ensureBytes)("signature",H,64),te=(0,f.ensureBytes)("message",z),_e=(0,f.ensureBytes)("publicKey",se,32);try{const be=me((0,f.bytesToNumberBE)(_e)),R=(0,f.bytesToNumberBE)(ce.subarray(0,32));if(!C(R))return!1;const O=(0,f.bytesToNumberBE)(ce.subarray(32,64));if(!B(O))return!1;const W=F(j(R),m(be),te),ie=ee(be,O,le(-W));return!(!ie||!ie.hasEvenY()||ie.toAffine().x!==R)}catch{return!1}}e.schnorr={getPublicKey:U,sign:$,verify:q,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:me,pointToBytes:m,numberToBytesBE:f.numberToBytesBE,bytesToNumberBE:f.bytesToNumberBE,taggedHash:S,mod:u.mod}};const J=(0,s.isogenyMap)(x,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(H=>H.map(z=>BigInt(z)))),V=(0,g.mapToCurveSimpleSWU)(x,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:x.create(BigInt("-11"))}),re=(0,s.createHasher)(e.secp256k1.ProjectivePoint,H=>{const{x:z,y:se}=V(x.create(H[0]));return J(z,se)},{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=re.hashToCurve,e.encodeToCurve=re.encodeToCurve})(qy);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.secp256k1=void 0;var t=qy;Object.defineProperty(e,"secp256k1",{enumerable:!0,get:function(){return t.secp256k1}})})(Xu);(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=_r,r=Xu;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})(Yu);var sf={};Object.defineProperty(sf,"__esModule",{value:!0});sf.GWEI_TO_WEI=void 0;sf.GWEI_TO_WEI=BigInt(1e9);var $d={},Tn={};Object.defineProperty(Tn,"__esModule",{value:!0});Tn.RLP=Tn.utils=Tn.decode=Tn.encode=void 0;function Md(e){if(Array.isArray(e)){const r=[];let o=0;for(let s=0;s<e.length;s++){const u=Md(e[s]);r.push(u),o+=u.length}return Wc(Sb(o,192),...r)}const t=b0(e);return t.length===1&&t[0]<128?t:Wc(Sb(t.length,128),t)}Tn.encode=Md;function To(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 vb(e){if(e[0]===0)throw new Error("invalid RLP: extra zeros");return h0(d0(e))}function Sb(e,t){if(e<56)return Uint8Array.from([e+t]);const r=qc(e),o=r.length/2,s=qc(t+55+o);return Uint8Array.from(Au(s+r))}function c0(e,t=!1){if(typeof e>"u"||e===null||e.length===0)return Uint8Array.from([]);const r=b0(e),o=Hc(r);if(t)return o;if(o.remainder.length!==0)throw new Error("invalid RLP: remainder must be zero");return o.data}Tn.decode=c0;function Hc(e){let t,r,o,s,u;const f=[],g=e[0];if(g<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(g<=183){if(t=g-127,g===128?o=Uint8Array.from([]):o=To(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(g<=191){if(r=g-182,e.length-1<r)throw new Error("invalid RLP: not enough bytes for string length");if(t=vb(To(e,1,r)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return o=To(e,r,t+r),{data:o,remainder:e.slice(t+r)}}else if(g<=247){for(t=g-191,s=To(e,1,t);s.length;)u=Hc(s),f.push(u.data),s=u.remainder;return{data:f,remainder:e.slice(t)}}else{if(r=g-246,t=vb(To(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=To(e,r,l);s.length;)u=Hc(s),f.push(u.data),s=u.remainder;return{data:f,remainder:e.slice(l)}}}const LP=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function d0(e){let t="";for(let r=0;r<e.length;r++)t+=LP[e[r]];return t}function h0(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function Au(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]=h0(e.slice(o,o+2))}return t}function Wc(...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 g0(e){return new TextEncoder().encode(e)}function qc(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 PP(e){return e.length%2?`0${e}`:e}function p0(e){return e.length>=2&&e[0]==="0"&&e[1]==="x"}function BP(e){return typeof e!="string"?e:p0(e)?e.slice(2):e}function b0(e){if(e instanceof Uint8Array)return e;if(typeof e=="string")return p0(e)?Au(PP(BP(e))):g0(e);if(typeof e=="number"||typeof e=="bigint")return e?Au(qc(e)):Uint8Array.from([]);if(e==null)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}Tn.utils={bytesToHex:d0,concatBytes:Wc,hexToBytes:Au,utf8ToBytes:g0};Tn.RLP={encode:Md,decode:c0};var on={},ht={},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 uu=BigInt(2**32-1),Vc=BigInt(32);function xd(e,t=!1){return t?{h:Number(e&uu),l:Number(e>>Vc&uu)}:{h:Number(e>>Vc&uu)|0,l:Number(e&uu)|0}}je.fromBig=xd;function _0(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}=xd(e[s],t);[r[s],o[s]]=[u,f]}return[r,o]}je.split=_0;const y0=(e,t)=>BigInt(e>>>0)<<Vc|BigInt(t>>>0);je.toBig=y0;const w0=(e,t,r)=>e>>>r;je.shrSH=w0;const m0=(e,t,r)=>e<<32-r|t>>>r;je.shrSL=m0;const E0=(e,t,r)=>e>>>r|t<<32-r;je.rotrSH=E0;const v0=(e,t,r)=>e<<32-r|t>>>r;je.rotrSL=v0;const S0=(e,t,r)=>e<<64-r|t>>>r-32;je.rotrBH=S0;const R0=(e,t,r)=>e>>>r-32|t<<64-r;je.rotrBL=R0;const A0=(e,t)=>t;je.rotr32H=A0;const T0=(e,t)=>e;je.rotr32L=T0;const I0=(e,t,r)=>e<<r|t>>>32-r;je.rotlSH=I0;const O0=(e,t,r)=>t<<r|e>>>32-r;je.rotlSL=O0;const C0=(e,t,r)=>t<<r-32|e>>>64-r;je.rotlBH=C0;const L0=(e,t,r)=>e<<r-32|t>>>64-r;je.rotlBL=L0;function P0(e,t,r,o){const s=(t>>>0)+(o>>>0);return{h:e+r+(s/2**32|0)|0,l:s|0}}je.add=P0;const B0=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);je.add3L=B0;const N0=(e,t,r,o)=>t+r+o+(e/2**32|0)|0;je.add3H=N0;const $0=(e,t,r,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0);je.add4L=$0;const M0=(e,t,r,o,s)=>t+r+o+s+(e/2**32|0)|0;je.add4H=M0;const x0=(e,t,r,o,s)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0)+(s>>>0);je.add5L=x0;const D0=(e,t,r,o,s,u)=>t+r+o+s+u+(e/2**32|0)|0;je.add5H=D0;const NP={fromBig:xd,split:_0,toBig:y0,shrSH:w0,shrSL:m0,rotrSH:E0,rotrSL:v0,rotrBH:S0,rotrBL:R0,rotr32H:A0,rotr32L:T0,rotlSH:I0,rotlSL:O0,rotlBH:C0,rotlBL:L0,add:P0,add3L:B0,add3H:N0,add4L:$0,add4H:M0,add5H:D0,add5L:x0};je.default=NP;Object.defineProperty(ht,"__esModule",{value:!0});ht.shake256=ht.shake128=ht.keccak_512=ht.keccak_384=ht.keccak_256=ht.keccak_224=ht.sha3_512=ht.sha3_384=ht.sha3_256=ht.sha3_224=ht.Keccak=ht.keccakP=void 0;const Io=Ct,Ds=je,Yn=ri,j0=[],U0=[],k0=[],$P=BigInt(0),Es=BigInt(1),MP=BigInt(2),xP=BigInt(7),DP=BigInt(256),jP=BigInt(113);for(let e=0,t=Es,r=1,o=0;e<24;e++){[r,o]=[o,(2*r+3*o)%5],j0.push(2*(5*o+r)),U0.push((e+1)*(e+2)/2%64);let s=$P;for(let u=0;u<7;u++)t=(t<<Es^(t>>xP)*jP)%DP,t&MP&&(s^=Es<<(Es<<BigInt(u))-Es);k0.push(s)}const[UP,kP]=(0,Ds.split)(k0,!0),Rb=(e,t,r)=>r>32?(0,Ds.rotlBH)(e,t,r):(0,Ds.rotlSH)(e,t,r),Ab=(e,t,r)=>r>32?(0,Ds.rotlBL)(e,t,r):(0,Ds.rotlSL)(e,t,r);function F0(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 g=(f+8)%10,l=(f+2)%10,h=r[l],b=r[l+1],w=Rb(h,b,1)^r[g],I=Ab(h,b,1)^r[g+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 g=U0[f],l=Rb(s,u,g),h=Ab(s,u,g),b=j0[f];s=e[b],u=e[b+1],e[b]=l,e[b+1]=h}for(let f=0;f<50;f+=10){for(let g=0;g<10;g++)r[g]=e[f+g];for(let g=0;g<10;g++)e[f+g]^=~r[(g+2)%10]&r[(g+4)%10]}e[0]^=UP[o],e[1]^=kP[o]}r.fill(0)}ht.keccakP=F0;class Ys extends Yn.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,Io.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,Yn.u32)(this.state)}keccak(){Yn.isLE||(0,Yn.byteSwap32)(this.state32),F0(this.state32,this.rounds),Yn.isLE||(0,Yn.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,Io.exists)(this);const{blockLen:r,state:o}=this;t=(0,Yn.toBytes)(t);const s=t.length;for(let u=0;u<s;){const f=Math.min(r-this.pos,s-u);for(let g=0;g<f;g++)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,Io.exists)(this,!1),(0,Io.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,Io.number)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,Io.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 Ys(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}}ht.Keccak=Ys;const Li=(e,t,r)=>(0,Yn.wrapConstructor)(()=>new Ys(t,e,r));ht.sha3_224=Li(6,144,224/8);ht.sha3_256=Li(6,136,256/8);ht.sha3_384=Li(6,104,384/8);ht.sha3_512=Li(6,72,512/8);ht.keccak_224=Li(1,144,224/8);ht.keccak_256=Li(1,136,256/8);ht.keccak_384=Li(1,104,384/8);ht.keccak_512=Li(1,72,512/8);const H0=(e,t,r)=>(0,Yn.wrapXOFConstructorWithOpts)((o={})=>new Ys(t,e,o.dkLen===void 0?r:o.dkLen,!0));ht.shake128=H0(31,168,128/8);ht.shake256=H0(31,136,256/8);var Tu={exports:{}};Tu.exports;(function(e,t){var r=Ye&&Ye.__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=h,t.equalsBytes=b,t.wrapHash=w;const o=r(Ct),s=ri,u=o.default.bool;t.assertBool=u;const f=o.default.bytes;t.assertBytes=f;var g=ri;Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return g.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return g.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return g.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return g.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return g.utf8ToBytes}});function l(I){if(!(I instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof I}`);return new TextDecoder().decode(I)}function h(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 zg=="function"&&zg.bind(e);return{node:A&&!I?A("crypto"):void 0,web:I}})()})(Tu,Tu.exports);var W0=Tu.exports;Object.defineProperty(on,"__esModule",{value:!0});on.keccak512=on.keccak384=on.keccak256=on.keccak224=void 0;const js=ht,af=W0;on.keccak224=(0,af.wrapHash)(js.keccak_224);on.keccak256=(()=>{const e=(0,af.wrapHash)(js.keccak_256);return e.create=js.keccak_256.create,e})();on.keccak384=(0,af.wrapHash)(js.keccak_384);on.keccak512=(0,af.wrapHash)(js.keccak_512);var oo={},Wr={},gt={};Object.defineProperty(gt,"__esModule",{value:!0});gt.isHexString=gt.getKeys=gt.fromAscii=gt.fromUtf8=gt.toAscii=gt.arrayContainsArray=gt.getBinarySize=gt.padToEven=gt.stripHexPrefix=gt.isHexPrefixed=void 0;function q0(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"}gt.isHexPrefixed=q0;const FP=e=>{if(typeof e!="string")throw new Error(`[stripHexPrefix] input must be type 'string', received ${typeof e}`);return q0(e)?e.slice(2):e};gt.stripHexPrefix=FP;function V0(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}gt.padToEven=V0;function HP(e){if(typeof e!="string")throw new Error(`[getBinarySize] method requires input type 'string', received ${typeof e}`);return de.Buffer.byteLength(e,"utf8")}gt.getBinarySize=HP;function WP(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)}gt.arrayContainsArray=WP;function qP(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}gt.toAscii=qP;function VP(e){const t=de.Buffer.from(e,"utf8");return`0x${V0(t.toString("hex")).replace(/^0+|0+$/g,"")}`}gt.fromUtf8=VP;function GP(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}`}gt.fromAscii=GP;function zP(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}gt.getKeys=zP;function KP(e,t){return!(typeof e!="string"||!e.match(/^0x[0-9A-Fa-f]*$/)||typeof t<"u"&&t>0&&e.length!==2+2*t)}gt.isHexString=KP;Object.defineProperty(Wr,"__esModule",{value:!0});Wr.assertIsString=Wr.assertIsArray=Wr.assertIsBuffer=Wr.assertIsHexString=void 0;const JP=gt,YP=function(e){if(!(0,JP.isHexString)(e)){const t=`This method only supports 0x-prefixed hex strings but input was: ${e}`;throw new Error(t)}};Wr.assertIsHexString=YP;const XP=function(e){if(!de.Buffer.isBuffer(e)){const t=`This method only supports Buffer but input was: ${e}`;throw new Error(t)}};Wr.assertIsBuffer=XP;const ZP=function(e){if(!Array.isArray(e)){const t=`This method only supports number arrays but input was: ${e}`;throw new Error(t)}};Wr.assertIsArray=ZP;const QP=function(e){if(typeof e!="string"){const t=`This method only supports strings but input was: ${e}`;throw new Error(t)}};Wr.assertIsString=QP;(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=Wr,r=gt,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 q=(0,e.intToHex)($);return de.Buffer.from((0,r.padToEven)(q.slice(2)),"hex")};e.intToBuffer=s;const u=function($){return de.Buffer.allocUnsafe($).fill(0)};e.zeros=u;const f=function($,q,J){const V=(0,e.zeros)(q);return J?$.length<q?($.copy(V),V):$.slice(0,q):$.length<q?($.copy(V,q-$.length),V):$.slice(-q)},g=function($,q){return(0,t.assertIsBuffer)($),f($,q,!1)};e.setLengthLeft=g;const l=function($,q){return(0,t.assertIsBuffer)($),f($,q,!0)};e.setLengthRight=l;const h=function($){let q=$[0];for(;$.length>0&&q.toString()==="0";)$=$.slice(1),q=$[0];return $},b=function($){return(0,t.assertIsBuffer)($),h($)};e.unpadBuffer=b;const w=function($){return(0,t.assertIsArray)($),h($)};e.unpadArray=w;const I=function($){return(0,t.assertIsHexString)($),$=(0,r.stripHexPrefix)($),"0x"+h($)};e.unpadHexString=I;const A=function($){if($==null)return de.Buffer.allocUnsafe(0);if(de.Buffer.isBuffer($))return de.Buffer.from($);if(Array.isArray($)||$ instanceof Uint8Array)return de.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 de.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 q=$.toString(16);return q.length%2&&(q="0"+q),de.Buffer.from(q,"hex")}if($.toArray)return de.Buffer.from($.toArray());if($.toBuffer)return de.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 q=(0,e.bufferToHex)($);return BigInt(q==="0x"?0:q)}e.bufferToBigInt=v;function C($){return(0,e.toBuffer)("0x"+$.toString(16))}e.bigIntToBuffer=C;const B=function($){const q=Number(v($));if(!Number.isSafeInteger(q))throw new Error("Number exceeds 53 bits");return q};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($,q=50){const J=de.Buffer.isBuffer($)?$.toString("hex"):$;return J.length<=q?J:J.slice(0,q)+"…"}e.short=j;const Z=function($){const q=/^(00)+|(00)+$/g;if($=(0,r.stripHexPrefix)($),$.length%2!==0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return de.Buffer.from($.replace(q,""),"hex").toString("utf8")};e.toUtf8=Z;const le=function($){if(de.Buffer.isBuffer($))return`0x${$.toString("hex")}`;if($ instanceof Array){const q=[];for(let J=0;J<$.length;J++)q.push((0,e.baToJSON)($[J]));return q}};e.baToJSON=le;const ae=function($){for(const[q,J]of Object.entries($))if(J!==void 0&&J.length>0&&J[0]===0)throw new Error(`${q} cannot have leading zeroes, received: ${J.toString("hex")}`)};e.validateNoLeadingZeroes=ae;function ee($){return Array.isArray($)?$.map(q=>ee(q)):de.Buffer.from($)}e.arrToBufArr=ee;function Se($){return Array.isArray($)?$.map(q=>Se(q)):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})(oo);(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=Tn,r=on,o=Xu,s=W0,u=oo,f=Yu,g=Wr,l=gt,h=BigInt(0);class b{constructor(U=h,$=h,q=f.KECCAK256_RLP,J=f.KECCAK256_NULL){this.nonce=U,this.balance=$,this.storageRoot=q,this.codeHash=J,this._validate()}static fromAccountData(U){const{nonce:$,balance:q,storageRoot:J,codeHash:V}=U;return new b($!==void 0?(0,u.bufferToBigInt)((0,u.toBuffer)($)):void 0,q!==void 0?(0,u.bufferToBigInt)((0,u.toBuffer)(q)):void 0,J!==void 0?(0,u.toBuffer)(J):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[$,q,J,V]=U;return new b((0,u.bufferToBigInt)($),(0,u.bufferToBigInt)(q),J,V)}_validate(){if(this.nonce<h)throw new Error("nonce must be greater than zero");if(this.balance<h)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 de.Buffer.from(t.RLP.encode((0,u.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(f.KECCAK256_NULL)}isEmpty(){return this.balance===h&&this.nonce===h&&this.codeHash.equals(f.KECCAK256_NULL)}}e.Account=b;const w=function(F){try{(0,g.assertIsString)(F)}catch{return!1}return/^0x[0-9a-fA-F]{40}$/.test(F)};e.isValidAddress=w;const I=function(F,U){(0,g.assertIsHexString)(F);const $=(0,l.stripHexPrefix)(F).toLowerCase();let q="";U!==void 0&&(q=(0,u.bufferToBigInt)((0,u.toBuffer)(U)).toString()+"0x");const J=de.Buffer.from(q+$,"utf8"),V=(0,s.bytesToHex)((0,r.keccak256)(J));let re="0x";for(let H=0;H<$.length;H++)parseInt(V[H],16)>=8?re+=$[H].toUpperCase():re+=$[H];return re};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,g.assertIsBuffer)(F),(0,g.assertIsBuffer)(U),(0,u.bufferToBigInt)(U)===BigInt(0)?de.Buffer.from((0,r.keccak256)(t.RLP.encode((0,u.bufArrToArr)([F,null])))).slice(-20):de.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,g.assertIsBuffer)(F),(0,g.assertIsBuffer)(U),(0,g.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 q=(0,r.keccak256)(de.Buffer.concat([de.Buffer.from("ff","hex"),F,U,(0,r.keccak256)($)]));return(0,u.toBuffer)(q).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,g.assertIsBuffer)(F),F.length===64)try{return o.secp256k1.ProjectivePoint.fromHex(de.Buffer.concat([de.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,g.assertIsBuffer)(F),U&&F.length!==64&&(F=de.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 de.Buffer.from((0,r.keccak256)(F)).slice(-20)};e.pubToAddress=P,e.publicToAddress=e.pubToAddress;const S=function(F){return(0,g.assertIsBuffer)(F),de.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,g.assertIsBuffer)(F),F.length!==64&&(F=de.Buffer.from(o.secp256k1.ProjectivePoint.fromHex(F).toRawBytes(!1).slice(1))),F};e.importPublic=j;const Z=function(){const U=(0,u.zeros)(20);return(0,u.bufferToHex)(U)};e.zeroAddress=Z;const le=function(F){try{(0,g.assertIsString)(F)}catch{return!1}return(0,e.zeroAddress)()===F};e.isZeroAddress=le;function ae(F){const[U,$,q,J]=F;return[U,$,(0,u.arrToBufArr)(q).length===0?f.KECCAK256_RLP:q,(0,u.arrToBufArr)(J).length===0?f.KECCAK256_NULL:J]}e.accountBodyFromSlim=ae;const ee=new Uint8Array(0);function Se(F){const[U,$,q,J]=F;return[U,$,(0,u.arrToBufArr)(q).equals(f.KECCAK256_RLP)?ee:q,(0,u.arrToBufArr)(J).equals(f.KECCAK256_NULL)?ee:J]}e.accountBodyToSlim=Se;function me(F,U=!0){const $=U?ae(F):F;return(0,u.arrToBufArr)(t.RLP.encode($))}e.accountBodyToRLP=me})($d);var Xs={};Object.defineProperty(Xs,"__esModule",{value:!0});Xs.Address=void 0;const vs=$d,fu=oo;class Xn{constructor(t){if(t.length!==20)throw new Error("Invalid address length");this.buf=t}static zero(){return new Xn((0,fu.zeros)(20))}static fromString(t){if(!(0,vs.isValidAddress)(t))throw new Error("Invalid address");return new Xn((0,fu.toBuffer)(t))}static fromPublicKey(t){if(!de.Buffer.isBuffer(t))throw new Error("Public key should be Buffer");const r=(0,vs.pubToAddress)(t);return new Xn(r)}static fromPrivateKey(t){if(!de.Buffer.isBuffer(t))throw new Error("Private key should be Buffer");const r=(0,vs.privateToAddress)(t);return new Xn(r)}static generate(t,r){if(typeof r!="bigint")throw new Error("Expected nonce to be a bigint");return new Xn((0,vs.generateAddress)(t.buf,(0,fu.bigIntToBuffer)(r)))}static generate2(t,r,o){if(!de.Buffer.isBuffer(r))throw new Error("Expected salt to be a Buffer");if(!de.Buffer.isBuffer(o))throw new Error("Expected initCode to be a Buffer");return new Xn((0,vs.generateAddress2)(t.buf,r,o))}equals(t){return this.buf.equals(t.buf)}isZero(){return this.equals(Xn.zero())}isPrecompileOrSystemAddress(){const t=(0,fu.bufferToBigInt)(this.buf),r=BigInt(0),o=BigInt("0xffff");return t>=r&&t<=o}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return de.Buffer.from(this.buf)}}Xs.Address=Xn;var uf={},Dd={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toType=e.TypeOutput=void 0;const t=oo,r=gt;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 g=(0,t.toBuffer)(u);switch(f){case o.Buffer:return g;case o.BigInt:return(0,t.bufferToBigInt)(g);case o.Number:{const l=(0,t.bufferToBigInt)(g);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)(g);default:throw new Error("unknown outputType")}}e.toType=s})(Dd);Object.defineProperty(uf,"__esModule",{value:!0});uf.Withdrawal=void 0;const Tb=Xs,cc=oo,Tt=Dd;class Os{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,Tt.toType)(r,Tt.TypeOutput.BigInt),g=(0,Tt.toType)(o,Tt.TypeOutput.BigInt),l=new Tb.Address((0,Tt.toType)(s,Tt.TypeOutput.Buffer)),h=(0,Tt.toType)(u,Tt.TypeOutput.BigInt);return new Os(f,g,l,h)}static fromValuesArray(t){if(t.length!==4)throw Error(`Invalid withdrawalArray length expected=4 actual=${t.length}`);const[r,o,s,u]=t;return Os.fromWithdrawalData({index:r,validatorIndex:o,address:s,amount:u})}static toBufferArray(t){const{index:r,validatorIndex:o,address:s,amount:u}=t,f=(0,Tt.toType)(r,Tt.TypeOutput.BigInt)===BigInt(0)?de.Buffer.alloc(0):(0,Tt.toType)(r,Tt.TypeOutput.Buffer),g=(0,Tt.toType)(o,Tt.TypeOutput.BigInt)===BigInt(0)?de.Buffer.alloc(0):(0,Tt.toType)(o,Tt.TypeOutput.Buffer);let l;s instanceof Tb.Address?l=s.buf:l=(0,Tt.toType)(s,Tt.TypeOutput.Buffer);const h=(0,Tt.toType)(u,Tt.TypeOutput.BigInt)===BigInt(0)?de.Buffer.alloc(0):(0,Tt.toType)(u,Tt.TypeOutput.Buffer);return[f,g,l,h]}raw(){return Os.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,cc.bigIntToHex)(this.index),validatorIndex:(0,cc.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,cc.bigIntToHex)(this.amount)}}}uf.Withdrawal=Os;var er={};Object.defineProperty(er,"__esModule",{value:!0});er.hashPersonalMessage=er.isValidSignature=er.fromRpcSig=er.toCompactSig=er.toRpcSig=er.ecrecover=er.ecsign=void 0;const eB=on,G0=Xu,br=oo,dc=Yu,tB=Wr;function rB(e,t,r){const o=G0.secp256k1.sign(e,t),s=o.toCompactRawBytes(),u=de.Buffer.from(s.slice(0,32)),f=de.Buffer.from(s.slice(32,64)),g=r===void 0?BigInt(o.recovery+27):BigInt(o.recovery+35)+BigInt(r)*BigInt(2);return{r:u,s:f,v:g}}er.ecsign=rB;function ff(e,t){return e===BigInt(0)||e===BigInt(1)?e:t===void 0?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function lf(e){return e===BigInt(0)||e===BigInt(1)}const nB=function(e,t,r,o,s){const u=de.Buffer.concat([(0,br.setLengthLeft)(r,32),(0,br.setLengthLeft)(o,32)],64),f=ff(t,s);if(!lf(f))throw new Error("Invalid signature v value");const l=G0.secp256k1.Signature.fromCompact(u).addRecoveryBit(Number(f)).recoverPublicKey(e);return de.Buffer.from(l.toRawBytes(!1).slice(1))};er.ecrecover=nB;const iB=function(e,t,r,o){const s=ff(e,o);if(!lf(s))throw new Error("Invalid signature v value");return(0,br.bufferToHex)(de.Buffer.concat([(0,br.setLengthLeft)(t,32),(0,br.setLengthLeft)(r,32),(0,br.toBuffer)(e)]))};er.toRpcSig=iB;const oB=function(e,t,r,o){const s=ff(e,o);if(!lf(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=de.Buffer.from(r),u[0]|=128),(0,br.bufferToHex)(de.Buffer.concat([(0,br.setLengthLeft)(t,32),(0,br.setLengthLeft)(u,32)]))};er.toCompactSig=oB;const sB=function(e){const t=(0,br.toBuffer)(e);let r,o,s;if(t.length>=65)r=t.slice(0,32),o=t.slice(32,64),s=(0,br.bufferToBigInt)(t.slice(64));else if(t.length===64)r=t.slice(0,32),o=t.slice(32,64),s=BigInt((0,br.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}};er.fromRpcSig=sB;const aB=function(e,t,r,o=!0,s){if(t.length!==32||r.length!==32||!lf(ff(e,s)))return!1;const u=(0,br.bufferToBigInt)(t),f=(0,br.bufferToBigInt)(r);return!(u===BigInt(0)||u>=dc.SECP256K1_ORDER||f===BigInt(0)||f>=dc.SECP256K1_ORDER||o&&f>=dc.SECP256K1_ORDER_DIV_2)};er.isValidSignature=aB;const uB=function(e){(0,tB.assertIsBuffer)(e);const t=de.Buffer.from(`Ethereum Signed Message:
|
|
3
|
-
${e.length}`,"utf-8");return de.Buffer.from((0,eB.keccak256)(de.Buffer.concat([t,e])))};er.hashPersonalMessage=uB;var z0={};(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,g)=>{for(let l=0,h=0;h<f.length;l+=1,h+=2)g[l]=f[h]<<4|f[h+1]};e.nibblesToBytes=r;const o=f=>{let g=0;(0,e.hasTerminator)(f)&&(g=1,f=f.subarray(0,f.length-1));const l=new Uint8Array(f.length/2+1);return l[0]=g<<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 g=f.length*2+1,l=new Uint8Array(g);for(let h=0;h<f.length;h++){const b=f[h];l[h*2]=b/16,l[h*2+1]=b%16}return l[g-1]=16,l};e.bytesToNibbles=s;const u=f=>{if(f.length===0)return f;let g=(0,e.bytesToNibbles)(f);g[0]<2&&(g=g.subarray(0,g.length-1));const l=2-(g[0]&1);return g.subarray(l)};e.compactBytesToNibbles=u})(z0);var cf={};Object.defineProperty(cf,"__esModule",{value:!0});cf.AsyncEventEmitter=void 0;const fB=Pn;async function lB(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,g=>{g?f(g):u()})})}catch(u){o=u}if(o)throw o}class cB extends fB.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],lB(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,g;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]),g=u.length,f=u.length;f--;)if(u[f]===r){g=f+l;break}return u.splice(g,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)}}cf.AsyncEventEmitter=cB;var df={};Object.defineProperty(df,"__esModule",{value:!0});df.Lock=void 0;class dB{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)}}}df.Lock=dB;var ko={},Yi={};Object.defineProperty(Yi,"__esModule",{value:!0});Yi.InvalidStatusCodeError=Yi.InvalidCertError=void 0;const K0=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class Gc extends Error{constructor(t,r){super(t),this.fingerprint256=r}}Yi.InvalidCertError=Gc;class jd extends Error{constructor(t){super(`Request Failed. Status Code: ${t}`),this.statusCode=t}}Yi.InvalidStatusCodeError=jd;function J0(e,t){if(!t||t==="text"||t==="json")try{let r=new TextDecoder("utf8",{fatal:!0}).decode(e);if(t==="text")return r;try{return JSON.parse(r)}catch(o){if(t==="json")throw o;return r}}catch(r){if(t==="text"||t==="json")throw r}return e}let Ib={};function zc(e,t){var I;let r={...K0,...t};const o=K1,s=z1,u=Y1,{promisify:f}=J1,{resolve:g}=G1,l=!!/^https/.test(e);let h={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();h.agent=Ib[x]||(Ib[x]=new(l?s:o).Agent(A))}r.type==="json"&&(h.headers["Content-Type"]="application/json"),r.data&&(r.method||(h.method="POST"),h.body=r.type==="json"?JSON.stringify(r.data):r.data),h.headers={...h.headers,...r.headers},r.sslAllowSelfSigned&&(h.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 zc(g(e,A.headers.location),r)}if(r.expectStatusCode&&x!==r.expectStatusCode)throw A.resume(),new jd(x);let v=[];for await(const S of A)v.push(S);let C=de.Buffer.concat(v);const B=A.headers["content-encoding"];B==="br"&&(C=await f(u.brotliDecompress)(C)),(B==="gzip"||B==="deflate")&&(C=await f(u.unzip)(C));const P=J0(C,r.type);return r.full?{headers:A.headers,status:x,body:P}:P};return new Promise((A,x)=>{var S;const v=async m=>{if(m&&m.code==="DEPTH_ZERO_SELF_SIGNED_CERT")try{await zc(e,{...r,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(j){j&&j.fingerprint256&&(m=new Gc(`Self-signed SSL certificate: ${j.fingerprint256}`,j.fingerprint256))}x(m)},C=(l?s:o).request(e,h,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 Z;const j=b(((Z=m.getPeerCertificate())==null?void 0:Z.fingerprint256)||"");if(!(!j&&m.isSessionReused())&&!B.includes(j))return C.emit("error",new Gc(`Invalid SSL certificate: ${j} Expected: ${B}`,j)),C.abort()};r.sslPinnedCertificates&&C.on("socket",m=>{m.listeners("secureConnect").map(Z=>(Z.name||"").replace("bound ","")).includes("mfetchSecureConnect")||m.on("secureConnect",P.bind(null,m))}),r.keepAlive&&C.setNoDelay(!0),h.body&&C.write(h.body),C.end()})}const hB=new Set(["Accept","Accept-Language","Content-Language","Content-Type"].map(e=>e.toLowerCase())),gB=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 pB(e,t){let r={...K0,...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 h=l.toLowerCase();(hB.has(h)||r.cors&&!gB.has(h))&&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 jd(f.status);const g=J0(new Uint8Array(await f.arrayBuffer()),r.type);return r.full?{headers:Object.fromEntries(f.headers.entries()),status:f.status,body:g}:g}const bB=!!(typeof de.process=="object"&&de.process.versions&&de.process.versions.node&&de.process.versions.v8);function _B(e,t){return(bB?zc:pB)(e,t)}Yi.default=_B;Object.defineProperty(ko,"__esModule",{value:!0});ko.getProvider=ko.fetchFromProvider=void 0;const yB=Yi,wB=async(e,t)=>(await(0,yB.default)(e,{headers:{"content-type":"application/json"},type:"json",data:{method:t.method,params:t.params,jsonrpc:"2.0",id:1}})).result;ko.fetchFromProvider=wB;const mB=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")};ko.getProvider=mB;(function(e){var t=Ye&&Ye.__createBinding||(Object.create?function(s,u,f,g){g===void 0&&(g=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,g,l)}:function(s,u,f,g){g===void 0&&(g=f),s[g]=u[f]}),r=Ye&&Ye.__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(Yu,e),r(sf,e),r($d,e),r(Xs,e),r(uf,e),r(er,e),r(oo,e),r(Dd,e),r(z0,e),r(cf,e);var o=gt;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(df,e),r(ko,e)})(xL);var Y0={exports:{}};(function(e){(function(t,r){e.exports?e.exports=r():t.log=r()})(Ye,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 g(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 h(v){return v==="debug"&&(v="log"),typeof console===r?!1:v==="trace"&&o?l:console[v]!==void 0?g(console,v):console.log!==void 0?g(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 h(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 Z(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 le(){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 ae(){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 ee(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=ee(me),F!==!1&&Z(m),b.call(B)},B.setDefaultLevel=function(me){S=ee(me),le()||B.setLevel(me,!1)},B.resetLevel=function(){m=null,ae(),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=ee(f.getLevel())),b.call(B),f===B)for(var me in u)u[me].rebuild()},P=ee(f?f.getLevel():"WARN");var Se=le();Se!=null&&(m=ee(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})})(Y0);var X0=Y0.exports;const Iu=Oi(X0);var Ou={exports:{}};Ou.exports;(function(e,t){var r=200,o="__lodash_hash_undefined__",s=800,u=16,f=9007199254740991,g="[object Arguments]",l="[object Array]",h="[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]",Z="[object String]",le="[object Undefined]",ae="[object WeakMap]",ee="[object ArrayBuffer]",Se="[object DataView]",me="[object Float32Array]",F="[object Float64Array]",U="[object Int8Array]",$="[object Int16Array]",q="[object Int32Array]",J="[object Uint8Array]",V="[object Uint8ClampedArray]",re="[object Uint16Array]",H="[object Uint32Array]",z=/[\\^$.*+?()[\]{}|]/g,se=/^\[object .+?Constructor\]$/,ce=/^(?:0|[1-9]\d*)$/,te={};te[me]=te[F]=te[U]=te[$]=te[q]=te[J]=te[V]=te[re]=te[H]=!0,te[g]=te[l]=te[ee]=te[b]=te[Se]=te[w]=te[I]=te[A]=te[v]=te[C]=te[P]=te[m]=te[j]=te[Z]=te[ae]=!1;var _e=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,be=typeof self=="object"&&self&&self.Object===Object&&self,R=_e||be||Function("return this")(),O=t&&!t.nodeType&&t,W=O&&!0&&e&&!e.nodeType&&e,ie=W&&W.exports===O,ye=ie&&_e.process,d=function(){try{var M=W&&W.require&&W.require("util").types;return M||ye&&ye.binding&&ye.binding("util")}catch{}}(),p=d&&d.isTypedArray;function _(M,Y,fe){switch(fe.length){case 0:return M.call(Y);case 1:return M.call(Y,fe[0]);case 2:return M.call(Y,fe[0],fe[1]);case 3:return M.call(Y,fe[0],fe[1],fe[2])}return M.apply(Y,fe)}function E(M,Y){for(var fe=-1,Le=Array(M);++fe<M;)Le[fe]=Y(fe);return Le}function K(M){return function(Y){return M(Y)}}function ne(M,Y){return M==null?void 0:M[Y]}function oe(M,Y){return function(fe){return M(Y(fe))}}var Ie=Array.prototype,Be=Function.prototype,Ce=Object.prototype,Ue=R["__core-js_shared__"],Re=Be.toString,He=Ce.hasOwnProperty,_t=function(){var M=/[^.]+$/.exec(Ue&&Ue.keys&&Ue.keys.IE_PROTO||"");return M?"Symbol(src)_1."+M:""}(),tt=Ce.toString,yt=Re.call(Object),Xe=RegExp("^"+Re.call(He).replace(z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ge=ie?R.Buffer:void 0,jt=R.Symbol,Pt=R.Uint8Array;Ge&&Ge.allocUnsafe;var ut=oe(Object.getPrototypeOf,Object),Nt=Object.create,lr=Ce.propertyIsEnumerable,tr=Ie.splice,Ft=jt?jt.toStringTag:void 0,cr=function(){try{var M=Ko(Object,"defineProperty");return M({},"",{}),M}catch{}}(),Jr=Ge?Ge.isBuffer:void 0,Yr=Math.max,un=Date.now,fn=Ko(R,"Map"),rr=Ko(Object,"create"),Lr=function(){function M(){}return function(Y){if(!Dn(Y))return{};if(Nt)return Nt(Y);M.prototype=Y;var fe=new M;return M.prototype=void 0,fe}}();function nr(M){var Y=-1,fe=M==null?0:M.length;for(this.clear();++Y<fe;){var Le=M[Y];this.set(Le[0],Le[1])}}function $n(){this.__data__=rr?rr(null):{},this.size=0}function Xr(M){var Y=this.has(M)&&delete this.__data__[M];return this.size-=Y?1:0,Y}function ln(M){var Y=this.__data__;if(rr){var fe=Y[M];return fe===o?void 0:fe}return He.call(Y,M)?Y[M]:void 0}function N(M){var Y=this.__data__;return rr?Y[M]!==void 0:He.call(Y,M)}function D(M,Y){var fe=this.__data__;return this.size+=this.has(M)?0:1,fe[M]=rr&&Y===void 0?o:Y,this}nr.prototype.clear=$n,nr.prototype.delete=Xr,nr.prototype.get=ln,nr.prototype.has=N,nr.prototype.set=D;function Ee(M){var Y=-1,fe=M==null?0:M.length;for(this.clear();++Y<fe;){var Le=M[Y];this.set(Le[0],Le[1])}}function ve(){this.__data__=[],this.size=0}function Te(M){var Y=this.__data__,fe=bn(Y,M);if(fe<0)return!1;var Le=Y.length-1;return fe==Le?Y.pop():tr.call(Y,fe,1),--this.size,!0}function wt(M){var Y=this.__data__,fe=bn(Y,M);return fe<0?void 0:Y[fe][1]}function Rt(M){return bn(this.__data__,M)>-1}function cn(M,Y){var fe=this.__data__,Le=bn(fe,M);return Le<0?(++this.size,fe.push([M,Y])):fe[Le][1]=Y,this}Ee.prototype.clear=ve,Ee.prototype.delete=Te,Ee.prototype.get=wt,Ee.prototype.has=Rt,Ee.prototype.set=cn;function Bt(M){var Y=-1,fe=M==null?0:M.length;for(this.clear();++Y<fe;){var Le=M[Y];this.set(Le[0],Le[1])}}function dn(){this.size=0,this.__data__={hash:new nr,map:new(fn||Ee),string:new nr}}function Mn(M){var Y=$i(this,M).delete(M);return this.size-=Y?1:0,Y}function hn(M){return $i(this,M).get(M)}function gn(M){return $i(this,M).has(M)}function Zr(M,Y){var fe=$i(this,M),Le=fe.size;return fe.set(M,Y),this.size+=fe.size==Le?0:1,this}Bt.prototype.clear=dn,Bt.prototype.delete=Mn,Bt.prototype.get=hn,Bt.prototype.has=gn,Bt.prototype.set=Zr;function Gt(M){var Y=this.__data__=new Ee(M);this.size=Y.size}function Pr(){this.__data__=new Ee,this.size=0}function mr(M){var Y=this.__data__,fe=Y.delete(M);return this.size=Y.size,fe}function ir(M){return this.__data__.get(M)}function Ht(M){return this.__data__.has(M)}function Pi(M,Y){var fe=this.__data__;if(fe instanceof Ee){var Le=fe.__data__;if(!fn||Le.length<r-1)return Le.push([M,Y]),this.size=++fe.size,this;fe=this.__data__=new Bt(Le)}return fe.set(M,Y),this.size=fe.size,this}Gt.prototype.clear=Pr,Gt.prototype.delete=mr,Gt.prototype.get=ir,Gt.prototype.has=Ht,Gt.prototype.set=Pi;function Bi(M,Y){var fe=Zo(M),Le=!fe&&Xo(M),Ke=!fe&&!Le&&da(M),rt=!fe&&!Le&&!Ke&&ga(M),dt=fe||Le||Ke||rt,De=dt?E(M.length,String):[],at=De.length;for(var $t in M)dt&&($t=="length"||Ke&&($t=="offset"||$t=="parent")||rt&&($t=="buffer"||$t=="byteLength"||$t=="byteOffset")||uo($t,at))||De.push($t);return De}function xn(M,Y,fe){(fe!==void 0&&!Mi(M[Y],fe)||fe===void 0&&!(Y in M))&&Br(M,Y,fe)}function pn(M,Y,fe){var Le=M[Y];(!(He.call(M,Y)&&Mi(Le,fe))||fe===void 0&&!(Y in M))&&Br(M,Y,fe)}function bn(M,Y){for(var fe=M.length;fe--;)if(Mi(M[fe][0],Y))return fe;return-1}function Br(M,Y,fe){Y=="__proto__"&&cr?cr(M,Y,{configurable:!0,enumerable:!0,value:fe,writable:!0}):M[Y]=fe}var Ni=ao();function _n(M){return M==null?M===void 0?le:B:Ft&&Ft in Object(M)?na(M):sa(M)}function oi(M){return jn(M)&&_n(M)==g}function si(M){if(!Dn(M)||Jo(M))return!1;var Y=es(M)?Xe:se;return Y.test(la(M))}function ai(M){return jn(M)&&ha(M.length)&&!!te[_n(M)]}function ui(M){if(!Dn(M))return fi(M);var Y=fo(M),fe=[];for(var Le in M)Le=="constructor"&&(Y||!He.call(M,Le))||fe.push(Le);return fe}function Zs(M,Y,fe,Le,Ke){M!==Y&&Ni(Y,function(rt,dt){if(Ke||(Ke=new Gt),Dn(rt))wf(M,Y,dt,fe,Zs,Le,Ke);else{var De=Le?Le(Yo(M,dt),rt,dt+"",M,Y,Ke):void 0;De===void 0&&(De=rt),xn(M,dt,De)}},pa)}function wf(M,Y,fe,Le,Ke,rt,dt){var De=Yo(M,fe),at=Yo(Y,fe),$t=dt.get(at);if($t){xn(M,fe,$t);return}var zt=rt?rt(De,at,fe+"",M,Y,dt):void 0,Un=zt===void 0;if(Un){var Kt=Zo(at),lo=!Kt&&da(at),ts=!Kt&&!lo&&ga(at);zt=at,Kt||lo||ts?Zo(De)?zt=De:ca(De)?zt=zo(De):lo?(Un=!1,zt=Qs(at)):ts?(Un=!1,zt=ta(at)):zt=[]:Rf(at)||Xo(at)?(zt=De,Xo(De)?zt=Af(De):(!Dn(De)||es(De))&&(zt=ia(at))):Un=!1}Un&&(dt.set(at,zt),Ke(zt,at,Le,rt,dt),dt.delete(at)),xn(M,fe,zt)}function mf(M,Y){return ua(aa(M,Y,it),M+"")}var Ef=cr?function(M,Y){return cr(M,"toString",{configurable:!0,enumerable:!1,value:ft(Y),writable:!0})}:it;function Qs(M,Y){return M.slice()}function ea(M){var Y=new M.constructor(M.byteLength);return new Pt(Y).set(new Pt(M)),Y}function ta(M,Y){var fe=ea(M.buffer);return new M.constructor(fe,M.byteOffset,M.length)}function zo(M,Y){var fe=-1,Le=M.length;for(Y||(Y=Array(Le));++fe<Le;)Y[fe]=M[fe];return Y}function vf(M,Y,fe,Le){var Ke=!fe;fe||(fe={});for(var rt=-1,dt=Y.length;++rt<dt;){var De=Y[rt],at=void 0;at===void 0&&(at=M[De]),Ke?Br(fe,De,at):pn(fe,De,at)}return fe}function ra(M){return mf(function(Y,fe){var Le=-1,Ke=fe.length,rt=Ke>1?fe[Ke-1]:void 0,dt=Ke>2?fe[2]:void 0;for(rt=M.length>3&&typeof rt=="function"?(Ke--,rt):void 0,dt&&Sf(fe[0],fe[1],dt)&&(rt=Ke<3?void 0:rt,Ke=1),Y=Object(Y);++Le<Ke;){var De=fe[Le];De&&M(Y,De,Le,rt)}return Y})}function ao(M){return function(Y,fe,Le){for(var Ke=-1,rt=Object(Y),dt=Le(Y),De=dt.length;De--;){var at=dt[++Ke];if(fe(rt[at],at,rt)===!1)break}return Y}}function $i(M,Y){var fe=M.__data__;return oa(Y)?fe[typeof Y=="string"?"string":"hash"]:fe.map}function Ko(M,Y){var fe=ne(M,Y);return si(fe)?fe:void 0}function na(M){var Y=He.call(M,Ft),fe=M[Ft];try{M[Ft]=void 0;var Le=!0}catch{}var Ke=tt.call(M);return Le&&(Y?M[Ft]=fe:delete M[Ft]),Ke}function ia(M){return typeof M.constructor=="function"&&!fo(M)?Lr(ut(M)):{}}function uo(M,Y){var fe=typeof M;return Y=Y??f,!!Y&&(fe=="number"||fe!="symbol"&&ce.test(M))&&M>-1&&M%1==0&&M<Y}function Sf(M,Y,fe){if(!Dn(fe))return!1;var Le=typeof Y;return(Le=="number"?Qo(fe)&&uo(Y,fe.length):Le=="string"&&Y in fe)?Mi(fe[Y],M):!1}function oa(M){var Y=typeof M;return Y=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?M!=="__proto__":M===null}function Jo(M){return!!_t&&_t in M}function fo(M){var Y=M&&M.constructor,fe=typeof Y=="function"&&Y.prototype||Ce;return M===fe}function fi(M){var Y=[];if(M!=null)for(var fe in Object(M))Y.push(fe);return Y}function sa(M){return tt.call(M)}function aa(M,Y,fe){return Y=Yr(Y===void 0?M.length-1:Y,0),function(){for(var Le=arguments,Ke=-1,rt=Yr(Le.length-Y,0),dt=Array(rt);++Ke<rt;)dt[Ke]=Le[Y+Ke];Ke=-1;for(var De=Array(Y+1);++Ke<Y;)De[Ke]=Le[Ke];return De[Y]=fe(dt),_(M,this,De)}}function Yo(M,Y){if(!(Y==="constructor"&&typeof M[Y]=="function")&&Y!="__proto__")return M[Y]}var ua=fa(Ef);function fa(M){var Y=0,fe=0;return function(){var Le=un(),Ke=u-(Le-fe);if(fe=Le,Ke>0){if(++Y>=s)return arguments[0]}else Y=0;return M.apply(void 0,arguments)}}function la(M){if(M!=null){try{return Re.call(M)}catch{}try{return M+""}catch{}}return""}function Mi(M,Y){return M===Y||M!==M&&Y!==Y}var Xo=oi(function(){return arguments}())?oi:function(M){return jn(M)&&He.call(M,"callee")&&!lr.call(M,"callee")},Zo=Array.isArray;function Qo(M){return M!=null&&ha(M.length)&&!es(M)}function ca(M){return jn(M)&&Qo(M)}var da=Jr||If;function es(M){if(!Dn(M))return!1;var Y=_n(M);return Y==A||Y==x||Y==h||Y==S}function ha(M){return typeof M=="number"&&M>-1&&M%1==0&&M<=f}function Dn(M){var Y=typeof M;return M!=null&&(Y=="object"||Y=="function")}function jn(M){return M!=null&&typeof M=="object"}function Rf(M){if(!jn(M)||_n(M)!=P)return!1;var Y=ut(M);if(Y===null)return!0;var fe=He.call(Y,"constructor")&&Y.constructor;return typeof fe=="function"&&fe instanceof fe&&Re.call(fe)==yt}var ga=p?K(p):ai;function Af(M){return vf(M,pa(M))}function pa(M){return Qo(M)?Bi(M):ui(M)}var Tf=ra(function(M,Y,fe){Zs(M,Y,fe)});function ft(M){return function(){return M}}function it(M){return M}function If(){return!1}e.exports=Tf})(Ou,Ou.exports);Ou.exports;const EB=Iu.getLogger("http-helpers");EB.setLevel(X0.levels.INFO);var Cu={exports:{}};/**
|
|
4
|
-
* @license
|
|
5
|
-
* Lodash <https://lodash.com/>
|
|
6
|
-
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
7
|
-
* Released under MIT license <https://lodash.com/license>
|
|
8
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
9
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
10
|
-
*/Cu.exports;(function(e,t){(function(){var r,o="4.17.21",s=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",f="Expected a function",g="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",h=500,b="__lodash_placeholder__",w=1,I=2,A=4,x=1,v=2,C=1,B=2,P=4,S=8,m=16,j=32,Z=64,le=128,ae=256,ee=512,Se=30,me="...",F=800,U=16,$=1,q=2,J=3,V=1/0,re=9007199254740991,H=17976931348623157e292,z=NaN,se=4294967295,ce=se-1,te=se>>>1,_e=[["ary",le],["bind",C],["bindKey",B],["curry",S],["curryRight",m],["flip",ee],["partial",j],["partialRight",Z],["rearg",ae]],be="[object Arguments]",R="[object Array]",O="[object AsyncFunction]",W="[object Boolean]",ie="[object Date]",ye="[object DOMException]",d="[object Error]",p="[object Function]",_="[object GeneratorFunction]",E="[object Map]",K="[object Number]",ne="[object Null]",oe="[object Object]",Ie="[object Promise]",Be="[object Proxy]",Ce="[object RegExp]",Ue="[object Set]",Re="[object String]",He="[object Symbol]",_t="[object Undefined]",tt="[object WeakMap]",yt="[object WeakSet]",Xe="[object ArrayBuffer]",Ge="[object DataView]",jt="[object Float32Array]",Pt="[object Float64Array]",ut="[object Int8Array]",Nt="[object Int16Array]",lr="[object Int32Array]",tr="[object Uint8Array]",Ft="[object Uint8ClampedArray]",cr="[object Uint16Array]",Jr="[object Uint32Array]",Yr=/\b__p \+= '';/g,un=/\b(__p \+=) '' \+/g,fn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,rr=/&(?:amp|lt|gt|quot|#39);/g,Lr=/[&<>"']/g,nr=RegExp(rr.source),$n=RegExp(Lr.source),Xr=/<%-([\s\S]+?)%>/g,ln=/<%([\s\S]+?)%>/g,N=/<%=([\s\S]+?)%>/g,D=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ee=/^\w*$/,ve=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Te=/[\\^$.*+?()[\]{}|]/g,wt=RegExp(Te.source),Rt=/^\s+/,cn=/\s/,Bt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,dn=/\{\n\/\* \[wrapped with (.+)\] \*/,Mn=/,? & /,hn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,gn=/[()=,{}\[\]\/\s]/,Zr=/\\(\\)?/g,Gt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Pr=/\w*$/,mr=/^[-+]0x[0-9a-f]+$/i,ir=/^0b[01]+$/i,Ht=/^\[object .+?Constructor\]$/,Pi=/^0o[0-7]+$/i,Bi=/^(?:0|[1-9]\d*)$/,xn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,pn=/($^)/,bn=/['\n\r\u2028\u2029\\]/g,Br="\\ud800-\\udfff",Ni="\\u0300-\\u036f",_n="\\ufe20-\\ufe2f",oi="\\u20d0-\\u20ff",si=Ni+_n+oi,ai="\\u2700-\\u27bf",ui="a-z\\xdf-\\xf6\\xf8-\\xff",Zs="\\xac\\xb1\\xd7\\xf7",wf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",mf="\\u2000-\\u206f",Ef=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Qs="A-Z\\xc0-\\xd6\\xd8-\\xde",ea="\\ufe0e\\ufe0f",ta=Zs+wf+mf+Ef,zo="['’]",vf="["+Br+"]",ra="["+ta+"]",ao="["+si+"]",$i="\\d+",Ko="["+ai+"]",na="["+ui+"]",ia="[^"+Br+ta+$i+ai+ui+Qs+"]",uo="\\ud83c[\\udffb-\\udfff]",Sf="(?:"+ao+"|"+uo+")",oa="[^"+Br+"]",Jo="(?:\\ud83c[\\udde6-\\uddff]){2}",fo="[\\ud800-\\udbff][\\udc00-\\udfff]",fi="["+Qs+"]",sa="\\u200d",aa="(?:"+na+"|"+ia+")",Yo="(?:"+fi+"|"+ia+")",ua="(?:"+zo+"(?:d|ll|m|re|s|t|ve))?",fa="(?:"+zo+"(?:D|LL|M|RE|S|T|VE))?",la=Sf+"?",Mi="["+ea+"]?",Xo="(?:"+sa+"(?:"+[oa,Jo,fo].join("|")+")"+Mi+la+")*",Zo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Qo="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ca=Mi+la+Xo,da="(?:"+[Ko,Jo,fo].join("|")+")"+ca,es="(?:"+[oa+ao+"?",ao,Jo,fo,vf].join("|")+")",ha=RegExp(zo,"g"),Dn=RegExp(ao,"g"),jn=RegExp(uo+"(?="+uo+")|"+es+ca,"g"),Rf=RegExp([fi+"?"+na+"+"+ua+"(?="+[ra,fi,"$"].join("|")+")",Yo+"+"+fa+"(?="+[ra,fi+aa,"$"].join("|")+")",fi+"?"+aa+"+"+ua,fi+"+"+fa,Qo,Zo,$i,da].join("|"),"g"),ga=RegExp("["+sa+Br+si+ea+"]"),Af=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,pa=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Tf=-1,ft={};ft[jt]=ft[Pt]=ft[ut]=ft[Nt]=ft[lr]=ft[tr]=ft[Ft]=ft[cr]=ft[Jr]=!0,ft[be]=ft[R]=ft[Xe]=ft[W]=ft[Ge]=ft[ie]=ft[d]=ft[p]=ft[E]=ft[K]=ft[oe]=ft[Ce]=ft[Ue]=ft[Re]=ft[tt]=!1;var it={};it[be]=it[R]=it[Xe]=it[Ge]=it[W]=it[ie]=it[jt]=it[Pt]=it[ut]=it[Nt]=it[lr]=it[E]=it[K]=it[oe]=it[Ce]=it[Ue]=it[Re]=it[He]=it[tr]=it[Ft]=it[cr]=it[Jr]=!0,it[d]=it[p]=it[tt]=!1;var If={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},M={"&":"&","<":"<",">":">",'"':""","'":"'"},Y={"&":"&","<":"<",">":">",""":'"',"'":"'"},fe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Le=parseFloat,Ke=parseInt,rt=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,dt=typeof self=="object"&&self&&self.Object===Object&&self,De=rt||dt||Function("return this")(),at=t&&!t.nodeType&&t,$t=at&&!0&&e&&!e.nodeType&&e,zt=$t&&$t.exports===at,Un=zt&&rt.process,Kt=function(){try{var X=$t&&$t.require&&$t.require("util").types;return X||Un&&Un.binding&&Un.binding("util")}catch{}}(),lo=Kt&&Kt.isArrayBuffer,ts=Kt&&Kt.isDate,qd=Kt&&Kt.isMap,Vd=Kt&&Kt.isRegExp,Gd=Kt&&Kt.isSet,zd=Kt&&Kt.isTypedArray;function Er(X,he,ue){switch(ue.length){case 0:return X.call(he);case 1:return X.call(he,ue[0]);case 2:return X.call(he,ue[0],ue[1]);case 3:return X.call(he,ue[0],ue[1],ue[2])}return X.apply(he,ue)}function gw(X,he,ue,Oe){for(var ke=-1,et=X==null?0:X.length;++ke<et;){var Mt=X[ke];he(Oe,Mt,ue(Mt),X)}return Oe}function Nr(X,he){for(var ue=-1,Oe=X==null?0:X.length;++ue<Oe&&he(X[ue],ue,X)!==!1;);return X}function pw(X,he){for(var ue=X==null?0:X.length;ue--&&he(X[ue],ue,X)!==!1;);return X}function Kd(X,he){for(var ue=-1,Oe=X==null?0:X.length;++ue<Oe;)if(!he(X[ue],ue,X))return!1;return!0}function li(X,he){for(var ue=-1,Oe=X==null?0:X.length,ke=0,et=[];++ue<Oe;){var Mt=X[ue];he(Mt,ue,X)&&(et[ke++]=Mt)}return et}function ba(X,he){var ue=X==null?0:X.length;return!!ue&&co(X,he,0)>-1}function Of(X,he,ue){for(var Oe=-1,ke=X==null?0:X.length;++Oe<ke;)if(ue(he,X[Oe]))return!0;return!1}function mt(X,he){for(var ue=-1,Oe=X==null?0:X.length,ke=Array(Oe);++ue<Oe;)ke[ue]=he(X[ue],ue,X);return ke}function ci(X,he){for(var ue=-1,Oe=he.length,ke=X.length;++ue<Oe;)X[ke+ue]=he[ue];return X}function Cf(X,he,ue,Oe){var ke=-1,et=X==null?0:X.length;for(Oe&&et&&(ue=X[++ke]);++ke<et;)ue=he(ue,X[ke],ke,X);return ue}function bw(X,he,ue,Oe){var ke=X==null?0:X.length;for(Oe&&ke&&(ue=X[--ke]);ke--;)ue=he(ue,X[ke],ke,X);return ue}function Lf(X,he){for(var ue=-1,Oe=X==null?0:X.length;++ue<Oe;)if(he(X[ue],ue,X))return!0;return!1}var _w=Pf("length");function yw(X){return X.split("")}function ww(X){return X.match(hn)||[]}function Jd(X,he,ue){var Oe;return ue(X,function(ke,et,Mt){if(he(ke,et,Mt))return Oe=et,!1}),Oe}function _a(X,he,ue,Oe){for(var ke=X.length,et=ue+(Oe?1:-1);Oe?et--:++et<ke;)if(he(X[et],et,X))return et;return-1}function co(X,he,ue){return he===he?Pw(X,he,ue):_a(X,Yd,ue)}function mw(X,he,ue,Oe){for(var ke=ue-1,et=X.length;++ke<et;)if(Oe(X[ke],he))return ke;return-1}function Yd(X){return X!==X}function Xd(X,he){var ue=X==null?0:X.length;return ue?Nf(X,he)/ue:z}function Pf(X){return function(he){return he==null?r:he[X]}}function Bf(X){return function(he){return X==null?r:X[he]}}function Zd(X,he,ue,Oe,ke){return ke(X,function(et,Mt,lt){ue=Oe?(Oe=!1,et):he(ue,et,Mt,lt)}),ue}function Ew(X,he){var ue=X.length;for(X.sort(he);ue--;)X[ue]=X[ue].value;return X}function Nf(X,he){for(var ue,Oe=-1,ke=X.length;++Oe<ke;){var et=he(X[Oe]);et!==r&&(ue=ue===r?et:ue+et)}return ue}function $f(X,he){for(var ue=-1,Oe=Array(X);++ue<X;)Oe[ue]=he(ue);return Oe}function vw(X,he){return mt(he,function(ue){return[ue,X[ue]]})}function Qd(X){return X&&X.slice(0,nh(X)+1).replace(Rt,"")}function vr(X){return function(he){return X(he)}}function Mf(X,he){return mt(he,function(ue){return X[ue]})}function rs(X,he){return X.has(he)}function eh(X,he){for(var ue=-1,Oe=X.length;++ue<Oe&&co(he,X[ue],0)>-1;);return ue}function th(X,he){for(var ue=X.length;ue--&&co(he,X[ue],0)>-1;);return ue}function Sw(X,he){for(var ue=X.length,Oe=0;ue--;)X[ue]===he&&++Oe;return Oe}var Rw=Bf(If),Aw=Bf(M);function Tw(X){return"\\"+fe[X]}function Iw(X,he){return X==null?r:X[he]}function ho(X){return ga.test(X)}function Ow(X){return Af.test(X)}function Cw(X){for(var he,ue=[];!(he=X.next()).done;)ue.push(he.value);return ue}function xf(X){var he=-1,ue=Array(X.size);return X.forEach(function(Oe,ke){ue[++he]=[ke,Oe]}),ue}function rh(X,he){return function(ue){return X(he(ue))}}function di(X,he){for(var ue=-1,Oe=X.length,ke=0,et=[];++ue<Oe;){var Mt=X[ue];(Mt===he||Mt===b)&&(X[ue]=b,et[ke++]=ue)}return et}function ya(X){var he=-1,ue=Array(X.size);return X.forEach(function(Oe){ue[++he]=Oe}),ue}function Lw(X){var he=-1,ue=Array(X.size);return X.forEach(function(Oe){ue[++he]=[Oe,Oe]}),ue}function Pw(X,he,ue){for(var Oe=ue-1,ke=X.length;++Oe<ke;)if(X[Oe]===he)return Oe;return-1}function Bw(X,he,ue){for(var Oe=ue+1;Oe--;)if(X[Oe]===he)return Oe;return Oe}function go(X){return ho(X)?$w(X):_w(X)}function Qr(X){return ho(X)?Mw(X):yw(X)}function nh(X){for(var he=X.length;he--&&cn.test(X.charAt(he)););return he}var Nw=Bf(Y);function $w(X){for(var he=jn.lastIndex=0;jn.test(X);)++he;return he}function Mw(X){return X.match(jn)||[]}function xw(X){return X.match(Rf)||[]}var Dw=function X(he){he=he==null?De:po.defaults(De.Object(),he,po.pick(De,pa));var ue=he.Array,Oe=he.Date,ke=he.Error,et=he.Function,Mt=he.Math,lt=he.Object,Df=he.RegExp,jw=he.String,$r=he.TypeError,wa=ue.prototype,Uw=et.prototype,bo=lt.prototype,ma=he["__core-js_shared__"],Ea=Uw.toString,ot=bo.hasOwnProperty,kw=0,ih=function(){var n=/[^.]+$/.exec(ma&&ma.keys&&ma.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),va=bo.toString,Fw=Ea.call(lt),Hw=De._,Ww=Df("^"+Ea.call(ot).replace(Te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Sa=zt?he.Buffer:r,hi=he.Symbol,Ra=he.Uint8Array,oh=Sa?Sa.allocUnsafe:r,Aa=rh(lt.getPrototypeOf,lt),sh=lt.create,ah=bo.propertyIsEnumerable,Ta=wa.splice,uh=hi?hi.isConcatSpreadable:r,ns=hi?hi.iterator:r,xi=hi?hi.toStringTag:r,Ia=function(){try{var n=Fi(lt,"defineProperty");return n({},"",{}),n}catch{}}(),qw=he.clearTimeout!==De.clearTimeout&&he.clearTimeout,Vw=Oe&&Oe.now!==De.Date.now&&Oe.now,Gw=he.setTimeout!==De.setTimeout&&he.setTimeout,Oa=Mt.ceil,Ca=Mt.floor,jf=lt.getOwnPropertySymbols,zw=Sa?Sa.isBuffer:r,fh=he.isFinite,Kw=wa.join,Jw=rh(lt.keys,lt),xt=Mt.max,Jt=Mt.min,Yw=Oe.now,Xw=he.parseInt,lh=Mt.random,Zw=wa.reverse,Uf=Fi(he,"DataView"),is=Fi(he,"Map"),kf=Fi(he,"Promise"),_o=Fi(he,"Set"),os=Fi(he,"WeakMap"),ss=Fi(lt,"create"),La=os&&new os,yo={},Qw=Hi(Uf),em=Hi(is),tm=Hi(kf),rm=Hi(_o),nm=Hi(os),Pa=hi?hi.prototype:r,as=Pa?Pa.valueOf:r,ch=Pa?Pa.toString:r;function T(n){if(At(n)&&!Fe(n)&&!(n instanceof Je)){if(n instanceof Mr)return n;if(ot.call(n,"__wrapped__"))return dg(n)}return new Mr(n)}var wo=function(){function n(){}return function(i){if(!Et(i))return{};if(sh)return sh(i);n.prototype=i;var a=new n;return n.prototype=r,a}}();function Ba(){}function Mr(n,i){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!i,this.__index__=0,this.__values__=r}T.templateSettings={escape:Xr,evaluate:ln,interpolate:N,variable:"",imports:{_:T}},T.prototype=Ba.prototype,T.prototype.constructor=T,Mr.prototype=wo(Ba.prototype),Mr.prototype.constructor=Mr;function Je(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=se,this.__views__=[]}function im(){var n=new Je(this.__wrapped__);return n.__actions__=dr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=dr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=dr(this.__views__),n}function om(){if(this.__filtered__){var n=new Je(this);n.__dir__=-1,n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function sm(){var n=this.__wrapped__.value(),i=this.__dir__,a=Fe(n),c=i<0,y=a?n.length:0,L=yE(0,y,this.__views__),k=L.start,G=L.end,Q=G-k,ge=c?G:k-1,pe=this.__iteratees__,we=pe.length,Ae=0,Pe=Jt(Q,this.__takeCount__);if(!a||!c&&y==Q&&Pe==Q)return Mh(n,this.__actions__);var Me=[];e:for(;Q--&&Ae<Pe;){ge+=i;for(var qe=-1,xe=n[ge];++qe<we;){var ze=pe[qe],Ze=ze.iteratee,Ar=ze.type,ar=Ze(xe);if(Ar==q)xe=ar;else if(!ar){if(Ar==$)continue e;break e}}Me[Ae++]=xe}return Me}Je.prototype=wo(Ba.prototype),Je.prototype.constructor=Je;function Di(n){var i=-1,a=n==null?0:n.length;for(this.clear();++i<a;){var c=n[i];this.set(c[0],c[1])}}function am(){this.__data__=ss?ss(null):{},this.size=0}function um(n){var i=this.has(n)&&delete this.__data__[n];return this.size-=i?1:0,i}function fm(n){var i=this.__data__;if(ss){var a=i[n];return a===l?r:a}return ot.call(i,n)?i[n]:r}function lm(n){var i=this.__data__;return ss?i[n]!==r:ot.call(i,n)}function cm(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=ss&&i===r?l:i,this}Di.prototype.clear=am,Di.prototype.delete=um,Di.prototype.get=fm,Di.prototype.has=lm,Di.prototype.set=cm;function kn(n){var i=-1,a=n==null?0:n.length;for(this.clear();++i<a;){var c=n[i];this.set(c[0],c[1])}}function dm(){this.__data__=[],this.size=0}function hm(n){var i=this.__data__,a=Na(i,n);if(a<0)return!1;var c=i.length-1;return a==c?i.pop():Ta.call(i,a,1),--this.size,!0}function gm(n){var i=this.__data__,a=Na(i,n);return a<0?r:i[a][1]}function pm(n){return Na(this.__data__,n)>-1}function bm(n,i){var a=this.__data__,c=Na(a,n);return c<0?(++this.size,a.push([n,i])):a[c][1]=i,this}kn.prototype.clear=dm,kn.prototype.delete=hm,kn.prototype.get=gm,kn.prototype.has=pm,kn.prototype.set=bm;function Fn(n){var i=-1,a=n==null?0:n.length;for(this.clear();++i<a;){var c=n[i];this.set(c[0],c[1])}}function _m(){this.size=0,this.__data__={hash:new Di,map:new(is||kn),string:new Di}}function ym(n){var i=Va(this,n).delete(n);return this.size-=i?1:0,i}function wm(n){return Va(this,n).get(n)}function mm(n){return Va(this,n).has(n)}function Em(n,i){var a=Va(this,n),c=a.size;return a.set(n,i),this.size+=a.size==c?0:1,this}Fn.prototype.clear=_m,Fn.prototype.delete=ym,Fn.prototype.get=wm,Fn.prototype.has=mm,Fn.prototype.set=Em;function ji(n){var i=-1,a=n==null?0:n.length;for(this.__data__=new Fn;++i<a;)this.add(n[i])}function vm(n){return this.__data__.set(n,l),this}function Sm(n){return this.__data__.has(n)}ji.prototype.add=ji.prototype.push=vm,ji.prototype.has=Sm;function en(n){var i=this.__data__=new kn(n);this.size=i.size}function Rm(){this.__data__=new kn,this.size=0}function Am(n){var i=this.__data__,a=i.delete(n);return this.size=i.size,a}function Tm(n){return this.__data__.get(n)}function Im(n){return this.__data__.has(n)}function Om(n,i){var a=this.__data__;if(a instanceof kn){var c=a.__data__;if(!is||c.length<s-1)return c.push([n,i]),this.size=++a.size,this;a=this.__data__=new Fn(c)}return a.set(n,i),this.size=a.size,this}en.prototype.clear=Rm,en.prototype.delete=Am,en.prototype.get=Tm,en.prototype.has=Im,en.prototype.set=Om;function dh(n,i){var a=Fe(n),c=!a&&Wi(n),y=!a&&!c&&yi(n),L=!a&&!c&&!y&&So(n),k=a||c||y||L,G=k?$f(n.length,jw):[],Q=G.length;for(var ge in n)(i||ot.call(n,ge))&&!(k&&(ge=="length"||y&&(ge=="offset"||ge=="parent")||L&&(ge=="buffer"||ge=="byteLength"||ge=="byteOffset")||Vn(ge,Q)))&&G.push(ge);return G}function hh(n){var i=n.length;return i?n[Xf(0,i-1)]:r}function Cm(n,i){return Ga(dr(n),Ui(i,0,n.length))}function Lm(n){return Ga(dr(n))}function Ff(n,i,a){(a!==r&&!tn(n[i],a)||a===r&&!(i in n))&&Hn(n,i,a)}function us(n,i,a){var c=n[i];(!(ot.call(n,i)&&tn(c,a))||a===r&&!(i in n))&&Hn(n,i,a)}function Na(n,i){for(var a=n.length;a--;)if(tn(n[a][0],i))return a;return-1}function Pm(n,i,a,c){return gi(n,function(y,L,k){i(c,y,a(y),k)}),c}function gh(n,i){return n&&wn(i,Ut(i),n)}function Bm(n,i){return n&&wn(i,gr(i),n)}function Hn(n,i,a){i=="__proto__"&&Ia?Ia(n,i,{configurable:!0,enumerable:!0,value:a,writable:!0}):n[i]=a}function Hf(n,i){for(var a=-1,c=i.length,y=ue(c),L=n==null;++a<c;)y[a]=L?r:vl(n,i[a]);return y}function Ui(n,i,a){return n===n&&(a!==r&&(n=n<=a?n:a),i!==r&&(n=n>=i?n:i)),n}function xr(n,i,a,c,y,L){var k,G=i&w,Q=i&I,ge=i&A;if(a&&(k=y?a(n,c,y,L):a(n)),k!==r)return k;if(!Et(n))return n;var pe=Fe(n);if(pe){if(k=mE(n),!G)return dr(n,k)}else{var we=Yt(n),Ae=we==p||we==_;if(yi(n))return jh(n,G);if(we==oe||we==be||Ae&&!y){if(k=Q||Ae?{}:ng(n),!G)return Q?fE(n,Bm(k,n)):uE(n,gh(k,n))}else{if(!it[we])return y?n:{};k=EE(n,we,G)}}L||(L=new en);var Pe=L.get(n);if(Pe)return Pe;L.set(n,k),Bg(n)?n.forEach(function(xe){k.add(xr(xe,i,a,xe,n,L))}):Lg(n)&&n.forEach(function(xe,ze){k.set(ze,xr(xe,i,a,ze,n,L))});var Me=ge?Q?ul:al:Q?gr:Ut,qe=pe?r:Me(n);return Nr(qe||n,function(xe,ze){qe&&(ze=xe,xe=n[ze]),us(k,ze,xr(xe,i,a,ze,n,L))}),k}function Nm(n){var i=Ut(n);return function(a){return ph(a,n,i)}}function ph(n,i,a){var c=a.length;if(n==null)return!c;for(n=lt(n);c--;){var y=a[c],L=i[y],k=n[y];if(k===r&&!(y in n)||!L(k))return!1}return!0}function bh(n,i,a){if(typeof n!="function")throw new $r(f);return ps(function(){n.apply(r,a)},i)}function fs(n,i,a,c){var y=-1,L=ba,k=!0,G=n.length,Q=[],ge=i.length;if(!G)return Q;a&&(i=mt(i,vr(a))),c?(L=Of,k=!1):i.length>=s&&(L=rs,k=!1,i=new ji(i));e:for(;++y<G;){var pe=n[y],we=a==null?pe:a(pe);if(pe=c||pe!==0?pe:0,k&&we===we){for(var Ae=ge;Ae--;)if(i[Ae]===we)continue e;Q.push(pe)}else L(i,we,c)||Q.push(pe)}return Q}var gi=Wh(yn),_h=Wh(qf,!0);function $m(n,i){var a=!0;return gi(n,function(c,y,L){return a=!!i(c,y,L),a}),a}function $a(n,i,a){for(var c=-1,y=n.length;++c<y;){var L=n[c],k=i(L);if(k!=null&&(G===r?k===k&&!Rr(k):a(k,G)))var G=k,Q=L}return Q}function Mm(n,i,a,c){var y=n.length;for(a=We(a),a<0&&(a=-a>y?0:y+a),c=c===r||c>y?y:We(c),c<0&&(c+=y),c=a>c?0:$g(c);a<c;)n[a++]=i;return n}function yh(n,i){var a=[];return gi(n,function(c,y,L){i(c,y,L)&&a.push(c)}),a}function Wt(n,i,a,c,y){var L=-1,k=n.length;for(a||(a=SE),y||(y=[]);++L<k;){var G=n[L];i>0&&a(G)?i>1?Wt(G,i-1,a,c,y):ci(y,G):c||(y[y.length]=G)}return y}var Wf=qh(),wh=qh(!0);function yn(n,i){return n&&Wf(n,i,Ut)}function qf(n,i){return n&&wh(n,i,Ut)}function Ma(n,i){return li(i,function(a){return Gn(n[a])})}function ki(n,i){i=bi(i,n);for(var a=0,c=i.length;n!=null&&a<c;)n=n[mn(i[a++])];return a&&a==c?n:r}function mh(n,i,a){var c=i(n);return Fe(n)?c:ci(c,a(n))}function or(n){return n==null?n===r?_t:ne:xi&&xi in lt(n)?_E(n):LE(n)}function Vf(n,i){return n>i}function xm(n,i){return n!=null&&ot.call(n,i)}function Dm(n,i){return n!=null&&i in lt(n)}function jm(n,i,a){return n>=Jt(i,a)&&n<xt(i,a)}function Gf(n,i,a){for(var c=a?Of:ba,y=n[0].length,L=n.length,k=L,G=ue(L),Q=1/0,ge=[];k--;){var pe=n[k];k&&i&&(pe=mt(pe,vr(i))),Q=Jt(pe.length,Q),G[k]=!a&&(i||y>=120&&pe.length>=120)?new ji(k&&pe):r}pe=n[0];var we=-1,Ae=G[0];e:for(;++we<y&&ge.length<Q;){var Pe=pe[we],Me=i?i(Pe):Pe;if(Pe=a||Pe!==0?Pe:0,!(Ae?rs(Ae,Me):c(ge,Me,a))){for(k=L;--k;){var qe=G[k];if(!(qe?rs(qe,Me):c(n[k],Me,a)))continue e}Ae&&Ae.push(Me),ge.push(Pe)}}return ge}function Um(n,i,a,c){return yn(n,function(y,L,k){i(c,a(y),L,k)}),c}function ls(n,i,a){i=bi(i,n),n=ag(n,i);var c=n==null?n:n[mn(jr(i))];return c==null?r:Er(c,n,a)}function Eh(n){return At(n)&&or(n)==be}function km(n){return At(n)&&or(n)==Xe}function Fm(n){return At(n)&&or(n)==ie}function cs(n,i,a,c,y){return n===i?!0:n==null||i==null||!At(n)&&!At(i)?n!==n&&i!==i:Hm(n,i,a,c,cs,y)}function Hm(n,i,a,c,y,L){var k=Fe(n),G=Fe(i),Q=k?R:Yt(n),ge=G?R:Yt(i);Q=Q==be?oe:Q,ge=ge==be?oe:ge;var pe=Q==oe,we=ge==oe,Ae=Q==ge;if(Ae&&yi(n)){if(!yi(i))return!1;k=!0,pe=!1}if(Ae&&!pe)return L||(L=new en),k||So(n)?eg(n,i,a,c,y,L):pE(n,i,Q,a,c,y,L);if(!(a&x)){var Pe=pe&&ot.call(n,"__wrapped__"),Me=we&&ot.call(i,"__wrapped__");if(Pe||Me){var qe=Pe?n.value():n,xe=Me?i.value():i;return L||(L=new en),y(qe,xe,a,c,L)}}return Ae?(L||(L=new en),bE(n,i,a,c,y,L)):!1}function Wm(n){return At(n)&&Yt(n)==E}function zf(n,i,a,c){var y=a.length,L=y,k=!c;if(n==null)return!L;for(n=lt(n);y--;){var G=a[y];if(k&&G[2]?G[1]!==n[G[0]]:!(G[0]in n))return!1}for(;++y<L;){G=a[y];var Q=G[0],ge=n[Q],pe=G[1];if(k&&G[2]){if(ge===r&&!(Q in n))return!1}else{var we=new en;if(c)var Ae=c(ge,pe,Q,n,i,we);if(!(Ae===r?cs(pe,ge,x|v,c,we):Ae))return!1}}return!0}function vh(n){if(!Et(n)||AE(n))return!1;var i=Gn(n)?Ww:Ht;return i.test(Hi(n))}function qm(n){return At(n)&&or(n)==Ce}function Vm(n){return At(n)&&Yt(n)==Ue}function Gm(n){return At(n)&&Za(n.length)&&!!ft[or(n)]}function Sh(n){return typeof n=="function"?n:n==null?pr:typeof n=="object"?Fe(n)?Th(n[0],n[1]):Ah(n):Vg(n)}function Kf(n){if(!gs(n))return Jw(n);var i=[];for(var a in lt(n))ot.call(n,a)&&a!="constructor"&&i.push(a);return i}function zm(n){if(!Et(n))return CE(n);var i=gs(n),a=[];for(var c in n)c=="constructor"&&(i||!ot.call(n,c))||a.push(c);return a}function Jf(n,i){return n<i}function Rh(n,i){var a=-1,c=hr(n)?ue(n.length):[];return gi(n,function(y,L,k){c[++a]=i(y,L,k)}),c}function Ah(n){var i=ll(n);return i.length==1&&i[0][2]?og(i[0][0],i[0][1]):function(a){return a===n||zf(a,n,i)}}function Th(n,i){return dl(n)&&ig(i)?og(mn(n),i):function(a){var c=vl(a,n);return c===r&&c===i?Sl(a,n):cs(i,c,x|v)}}function xa(n,i,a,c,y){n!==i&&Wf(i,function(L,k){if(y||(y=new en),Et(L))Km(n,i,k,a,xa,c,y);else{var G=c?c(gl(n,k),L,k+"",n,i,y):r;G===r&&(G=L),Ff(n,k,G)}},gr)}function Km(n,i,a,c,y,L,k){var G=gl(n,a),Q=gl(i,a),ge=k.get(Q);if(ge){Ff(n,a,ge);return}var pe=L?L(G,Q,a+"",n,i,k):r,we=pe===r;if(we){var Ae=Fe(Q),Pe=!Ae&&yi(Q),Me=!Ae&&!Pe&&So(Q);pe=Q,Ae||Pe||Me?Fe(G)?pe=G:It(G)?pe=dr(G):Pe?(we=!1,pe=jh(Q,!0)):Me?(we=!1,pe=Uh(Q,!0)):pe=[]:bs(Q)||Wi(Q)?(pe=G,Wi(G)?pe=Mg(G):(!Et(G)||Gn(G))&&(pe=ng(Q))):we=!1}we&&(k.set(Q,pe),y(pe,Q,c,L,k),k.delete(Q)),Ff(n,a,pe)}function Ih(n,i){var a=n.length;if(a)return i+=i<0?a:0,Vn(i,a)?n[i]:r}function Oh(n,i,a){i.length?i=mt(i,function(L){return Fe(L)?function(k){return ki(k,L.length===1?L[0]:L)}:L}):i=[pr];var c=-1;i=mt(i,vr($e()));var y=Rh(n,function(L,k,G){var Q=mt(i,function(ge){return ge(L)});return{criteria:Q,index:++c,value:L}});return Ew(y,function(L,k){return aE(L,k,a)})}function Jm(n,i){return Ch(n,i,function(a,c){return Sl(n,c)})}function Ch(n,i,a){for(var c=-1,y=i.length,L={};++c<y;){var k=i[c],G=ki(n,k);a(G,k)&&ds(L,bi(k,n),G)}return L}function Ym(n){return function(i){return ki(i,n)}}function Yf(n,i,a,c){var y=c?mw:co,L=-1,k=i.length,G=n;for(n===i&&(i=dr(i)),a&&(G=mt(n,vr(a)));++L<k;)for(var Q=0,ge=i[L],pe=a?a(ge):ge;(Q=y(G,pe,Q,c))>-1;)G!==n&&Ta.call(G,Q,1),Ta.call(n,Q,1);return n}function Lh(n,i){for(var a=n?i.length:0,c=a-1;a--;){var y=i[a];if(a==c||y!==L){var L=y;Vn(y)?Ta.call(n,y,1):el(n,y)}}return n}function Xf(n,i){return n+Ca(lh()*(i-n+1))}function Xm(n,i,a,c){for(var y=-1,L=xt(Oa((i-n)/(a||1)),0),k=ue(L);L--;)k[c?L:++y]=n,n+=a;return k}function Zf(n,i){var a="";if(!n||i<1||i>re)return a;do i%2&&(a+=n),i=Ca(i/2),i&&(n+=n);while(i);return a}function Ve(n,i){return pl(sg(n,i,pr),n+"")}function Zm(n){return hh(Ro(n))}function Qm(n,i){var a=Ro(n);return Ga(a,Ui(i,0,a.length))}function ds(n,i,a,c){if(!Et(n))return n;i=bi(i,n);for(var y=-1,L=i.length,k=L-1,G=n;G!=null&&++y<L;){var Q=mn(i[y]),ge=a;if(Q==="__proto__"||Q==="constructor"||Q==="prototype")return n;if(y!=k){var pe=G[Q];ge=c?c(pe,Q,G):r,ge===r&&(ge=Et(pe)?pe:Vn(i[y+1])?[]:{})}us(G,Q,ge),G=G[Q]}return n}var Ph=La?function(n,i){return La.set(n,i),n}:pr,eE=Ia?function(n,i){return Ia(n,"toString",{configurable:!0,enumerable:!1,value:Al(i),writable:!0})}:pr;function tE(n){return Ga(Ro(n))}function Dr(n,i,a){var c=-1,y=n.length;i<0&&(i=-i>y?0:y+i),a=a>y?y:a,a<0&&(a+=y),y=i>a?0:a-i>>>0,i>>>=0;for(var L=ue(y);++c<y;)L[c]=n[c+i];return L}function rE(n,i){var a;return gi(n,function(c,y,L){return a=i(c,y,L),!a}),!!a}function Da(n,i,a){var c=0,y=n==null?c:n.length;if(typeof i=="number"&&i===i&&y<=te){for(;c<y;){var L=c+y>>>1,k=n[L];k!==null&&!Rr(k)&&(a?k<=i:k<i)?c=L+1:y=L}return y}return Qf(n,i,pr,a)}function Qf(n,i,a,c){var y=0,L=n==null?0:n.length;if(L===0)return 0;i=a(i);for(var k=i!==i,G=i===null,Q=Rr(i),ge=i===r;y<L;){var pe=Ca((y+L)/2),we=a(n[pe]),Ae=we!==r,Pe=we===null,Me=we===we,qe=Rr(we);if(k)var xe=c||Me;else ge?xe=Me&&(c||Ae):G?xe=Me&&Ae&&(c||!Pe):Q?xe=Me&&Ae&&!Pe&&(c||!qe):Pe||qe?xe=!1:xe=c?we<=i:we<i;xe?y=pe+1:L=pe}return Jt(L,ce)}function Bh(n,i){for(var a=-1,c=n.length,y=0,L=[];++a<c;){var k=n[a],G=i?i(k):k;if(!a||!tn(G,Q)){var Q=G;L[y++]=k===0?0:k}}return L}function Nh(n){return typeof n=="number"?n:Rr(n)?z:+n}function Sr(n){if(typeof n=="string")return n;if(Fe(n))return mt(n,Sr)+"";if(Rr(n))return ch?ch.call(n):"";var i=n+"";return i=="0"&&1/n==-1/0?"-0":i}function pi(n,i,a){var c=-1,y=ba,L=n.length,k=!0,G=[],Q=G;if(a)k=!1,y=Of;else if(L>=s){var ge=i?null:hE(n);if(ge)return ya(ge);k=!1,y=rs,Q=new ji}else Q=i?[]:G;e:for(;++c<L;){var pe=n[c],we=i?i(pe):pe;if(pe=a||pe!==0?pe:0,k&&we===we){for(var Ae=Q.length;Ae--;)if(Q[Ae]===we)continue e;i&&Q.push(we),G.push(pe)}else y(Q,we,a)||(Q!==G&&Q.push(we),G.push(pe))}return G}function el(n,i){return i=bi(i,n),n=ag(n,i),n==null||delete n[mn(jr(i))]}function $h(n,i,a,c){return ds(n,i,a(ki(n,i)),c)}function ja(n,i,a,c){for(var y=n.length,L=c?y:-1;(c?L--:++L<y)&&i(n[L],L,n););return a?Dr(n,c?0:L,c?L+1:y):Dr(n,c?L+1:0,c?y:L)}function Mh(n,i){var a=n;return a instanceof Je&&(a=a.value()),Cf(i,function(c,y){return y.func.apply(y.thisArg,ci([c],y.args))},a)}function tl(n,i,a){var c=n.length;if(c<2)return c?pi(n[0]):[];for(var y=-1,L=ue(c);++y<c;)for(var k=n[y],G=-1;++G<c;)G!=y&&(L[y]=fs(L[y]||k,n[G],i,a));return pi(Wt(L,1),i,a)}function xh(n,i,a){for(var c=-1,y=n.length,L=i.length,k={};++c<y;){var G=c<L?i[c]:r;a(k,n[c],G)}return k}function rl(n){return It(n)?n:[]}function nl(n){return typeof n=="function"?n:pr}function bi(n,i){return Fe(n)?n:dl(n,i)?[n]:cg(nt(n))}var nE=Ve;function _i(n,i,a){var c=n.length;return a=a===r?c:a,!i&&a>=c?n:Dr(n,i,a)}var Dh=qw||function(n){return De.clearTimeout(n)};function jh(n,i){if(i)return n.slice();var a=n.length,c=oh?oh(a):new n.constructor(a);return n.copy(c),c}function il(n){var i=new n.constructor(n.byteLength);return new Ra(i).set(new Ra(n)),i}function iE(n,i){var a=i?il(n.buffer):n.buffer;return new n.constructor(a,n.byteOffset,n.byteLength)}function oE(n){var i=new n.constructor(n.source,Pr.exec(n));return i.lastIndex=n.lastIndex,i}function sE(n){return as?lt(as.call(n)):{}}function Uh(n,i){var a=i?il(n.buffer):n.buffer;return new n.constructor(a,n.byteOffset,n.length)}function kh(n,i){if(n!==i){var a=n!==r,c=n===null,y=n===n,L=Rr(n),k=i!==r,G=i===null,Q=i===i,ge=Rr(i);if(!G&&!ge&&!L&&n>i||L&&k&&Q&&!G&&!ge||c&&k&&Q||!a&&Q||!y)return 1;if(!c&&!L&&!ge&&n<i||ge&&a&&y&&!c&&!L||G&&a&&y||!k&&y||!Q)return-1}return 0}function aE(n,i,a){for(var c=-1,y=n.criteria,L=i.criteria,k=y.length,G=a.length;++c<k;){var Q=kh(y[c],L[c]);if(Q){if(c>=G)return Q;var ge=a[c];return Q*(ge=="desc"?-1:1)}}return n.index-i.index}function Fh(n,i,a,c){for(var y=-1,L=n.length,k=a.length,G=-1,Q=i.length,ge=xt(L-k,0),pe=ue(Q+ge),we=!c;++G<Q;)pe[G]=i[G];for(;++y<k;)(we||y<L)&&(pe[a[y]]=n[y]);for(;ge--;)pe[G++]=n[y++];return pe}function Hh(n,i,a,c){for(var y=-1,L=n.length,k=-1,G=a.length,Q=-1,ge=i.length,pe=xt(L-G,0),we=ue(pe+ge),Ae=!c;++y<pe;)we[y]=n[y];for(var Pe=y;++Q<ge;)we[Pe+Q]=i[Q];for(;++k<G;)(Ae||y<L)&&(we[Pe+a[k]]=n[y++]);return we}function dr(n,i){var a=-1,c=n.length;for(i||(i=ue(c));++a<c;)i[a]=n[a];return i}function wn(n,i,a,c){var y=!a;a||(a={});for(var L=-1,k=i.length;++L<k;){var G=i[L],Q=c?c(a[G],n[G],G,a,n):r;Q===r&&(Q=n[G]),y?Hn(a,G,Q):us(a,G,Q)}return a}function uE(n,i){return wn(n,cl(n),i)}function fE(n,i){return wn(n,tg(n),i)}function Ua(n,i){return function(a,c){var y=Fe(a)?gw:Pm,L=i?i():{};return y(a,n,$e(c,2),L)}}function mo(n){return Ve(function(i,a){var c=-1,y=a.length,L=y>1?a[y-1]:r,k=y>2?a[2]:r;for(L=n.length>3&&typeof L=="function"?(y--,L):r,k&&sr(a[0],a[1],k)&&(L=y<3?r:L,y=1),i=lt(i);++c<y;){var G=a[c];G&&n(i,G,c,L)}return i})}function Wh(n,i){return function(a,c){if(a==null)return a;if(!hr(a))return n(a,c);for(var y=a.length,L=i?y:-1,k=lt(a);(i?L--:++L<y)&&c(k[L],L,k)!==!1;);return a}}function qh(n){return function(i,a,c){for(var y=-1,L=lt(i),k=c(i),G=k.length;G--;){var Q=k[n?G:++y];if(a(L[Q],Q,L)===!1)break}return i}}function lE(n,i,a){var c=i&C,y=hs(n);function L(){var k=this&&this!==De&&this instanceof L?y:n;return k.apply(c?a:this,arguments)}return L}function Vh(n){return function(i){i=nt(i);var a=ho(i)?Qr(i):r,c=a?a[0]:i.charAt(0),y=a?_i(a,1).join(""):i.slice(1);return c[n]()+y}}function Eo(n){return function(i){return Cf(Wg(Hg(i).replace(ha,"")),n,"")}}function hs(n){return function(){var i=arguments;switch(i.length){case 0:return new n;case 1:return new n(i[0]);case 2:return new n(i[0],i[1]);case 3:return new n(i[0],i[1],i[2]);case 4:return new n(i[0],i[1],i[2],i[3]);case 5:return new n(i[0],i[1],i[2],i[3],i[4]);case 6:return new n(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return new n(i[0],i[1],i[2],i[3],i[4],i[5],i[6])}var a=wo(n.prototype),c=n.apply(a,i);return Et(c)?c:a}}function cE(n,i,a){var c=hs(n);function y(){for(var L=arguments.length,k=ue(L),G=L,Q=vo(y);G--;)k[G]=arguments[G];var ge=L<3&&k[0]!==Q&&k[L-1]!==Q?[]:di(k,Q);if(L-=ge.length,L<a)return Yh(n,i,ka,y.placeholder,r,k,ge,r,r,a-L);var pe=this&&this!==De&&this instanceof y?c:n;return Er(pe,this,k)}return y}function Gh(n){return function(i,a,c){var y=lt(i);if(!hr(i)){var L=$e(a,3);i=Ut(i),a=function(G){return L(y[G],G,y)}}var k=n(i,a,c);return k>-1?y[L?i[k]:k]:r}}function zh(n){return qn(function(i){var a=i.length,c=a,y=Mr.prototype.thru;for(n&&i.reverse();c--;){var L=i[c];if(typeof L!="function")throw new $r(f);if(y&&!k&&qa(L)=="wrapper")var k=new Mr([],!0)}for(c=k?c:a;++c<a;){L=i[c];var G=qa(L),Q=G=="wrapper"?fl(L):r;Q&&hl(Q[0])&&Q[1]==(le|S|j|ae)&&!Q[4].length&&Q[9]==1?k=k[qa(Q[0])].apply(k,Q[3]):k=L.length==1&&hl(L)?k[G]():k.thru(L)}return function(){var ge=arguments,pe=ge[0];if(k&&ge.length==1&&Fe(pe))return k.plant(pe).value();for(var we=0,Ae=a?i[we].apply(this,ge):pe;++we<a;)Ae=i[we].call(this,Ae);return Ae}})}function ka(n,i,a,c,y,L,k,G,Q,ge){var pe=i&le,we=i&C,Ae=i&B,Pe=i&(S|m),Me=i&ee,qe=Ae?r:hs(n);function xe(){for(var ze=arguments.length,Ze=ue(ze),Ar=ze;Ar--;)Ze[Ar]=arguments[Ar];if(Pe)var ar=vo(xe),Tr=Sw(Ze,ar);if(c&&(Ze=Fh(Ze,c,y,Pe)),L&&(Ze=Hh(Ze,L,k,Pe)),ze-=Tr,Pe&&ze<ge){var Ot=di(Ze,ar);return Yh(n,i,ka,xe.placeholder,a,Ze,Ot,G,Q,ge-ze)}var rn=we?a:this,Kn=Ae?rn[n]:n;return ze=Ze.length,G?Ze=PE(Ze,G):Me&&ze>1&&Ze.reverse(),pe&&Q<ze&&(Ze.length=Q),this&&this!==De&&this instanceof xe&&(Kn=qe||hs(Kn)),Kn.apply(rn,Ze)}return xe}function Kh(n,i){return function(a,c){return Um(a,n,i(c),{})}}function Fa(n,i){return function(a,c){var y;if(a===r&&c===r)return i;if(a!==r&&(y=a),c!==r){if(y===r)return c;typeof a=="string"||typeof c=="string"?(a=Sr(a),c=Sr(c)):(a=Nh(a),c=Nh(c)),y=n(a,c)}return y}}function ol(n){return qn(function(i){return i=mt(i,vr($e())),Ve(function(a){var c=this;return n(i,function(y){return Er(y,c,a)})})})}function Ha(n,i){i=i===r?" ":Sr(i);var a=i.length;if(a<2)return a?Zf(i,n):i;var c=Zf(i,Oa(n/go(i)));return ho(i)?_i(Qr(c),0,n).join(""):c.slice(0,n)}function dE(n,i,a,c){var y=i&C,L=hs(n);function k(){for(var G=-1,Q=arguments.length,ge=-1,pe=c.length,we=ue(pe+Q),Ae=this&&this!==De&&this instanceof k?L:n;++ge<pe;)we[ge]=c[ge];for(;Q--;)we[ge++]=arguments[++G];return Er(Ae,y?a:this,we)}return k}function Jh(n){return function(i,a,c){return c&&typeof c!="number"&&sr(i,a,c)&&(a=c=r),i=zn(i),a===r?(a=i,i=0):a=zn(a),c=c===r?i<a?1:-1:zn(c),Xm(i,a,c,n)}}function Wa(n){return function(i,a){return typeof i=="string"&&typeof a=="string"||(i=Ur(i),a=Ur(a)),n(i,a)}}function Yh(n,i,a,c,y,L,k,G,Q,ge){var pe=i&S,we=pe?k:r,Ae=pe?r:k,Pe=pe?L:r,Me=pe?r:L;i|=pe?j:Z,i&=~(pe?Z:j),i&P||(i&=-4);var qe=[n,i,y,Pe,we,Me,Ae,G,Q,ge],xe=a.apply(r,qe);return hl(n)&&ug(xe,qe),xe.placeholder=c,fg(xe,n,i)}function sl(n){var i=Mt[n];return function(a,c){if(a=Ur(a),c=c==null?0:Jt(We(c),292),c&&fh(a)){var y=(nt(a)+"e").split("e"),L=i(y[0]+"e"+(+y[1]+c));return y=(nt(L)+"e").split("e"),+(y[0]+"e"+(+y[1]-c))}return i(a)}}var hE=_o&&1/ya(new _o([,-0]))[1]==V?function(n){return new _o(n)}:Ol;function Xh(n){return function(i){var a=Yt(i);return a==E?xf(i):a==Ue?Lw(i):vw(i,n(i))}}function Wn(n,i,a,c,y,L,k,G){var Q=i&B;if(!Q&&typeof n!="function")throw new $r(f);var ge=c?c.length:0;if(ge||(i&=-97,c=y=r),k=k===r?k:xt(We(k),0),G=G===r?G:We(G),ge-=y?y.length:0,i&Z){var pe=c,we=y;c=y=r}var Ae=Q?r:fl(n),Pe=[n,i,a,c,y,pe,we,L,k,G];if(Ae&&OE(Pe,Ae),n=Pe[0],i=Pe[1],a=Pe[2],c=Pe[3],y=Pe[4],G=Pe[9]=Pe[9]===r?Q?0:n.length:xt(Pe[9]-ge,0),!G&&i&(S|m)&&(i&=-25),!i||i==C)var Me=lE(n,i,a);else i==S||i==m?Me=cE(n,i,G):(i==j||i==(C|j))&&!y.length?Me=dE(n,i,a,c):Me=ka.apply(r,Pe);var qe=Ae?Ph:ug;return fg(qe(Me,Pe),n,i)}function Zh(n,i,a,c){return n===r||tn(n,bo[a])&&!ot.call(c,a)?i:n}function Qh(n,i,a,c,y,L){return Et(n)&&Et(i)&&(L.set(i,n),xa(n,i,r,Qh,L),L.delete(i)),n}function gE(n){return bs(n)?r:n}function eg(n,i,a,c,y,L){var k=a&x,G=n.length,Q=i.length;if(G!=Q&&!(k&&Q>G))return!1;var ge=L.get(n),pe=L.get(i);if(ge&&pe)return ge==i&&pe==n;var we=-1,Ae=!0,Pe=a&v?new ji:r;for(L.set(n,i),L.set(i,n);++we<G;){var Me=n[we],qe=i[we];if(c)var xe=k?c(qe,Me,we,i,n,L):c(Me,qe,we,n,i,L);if(xe!==r){if(xe)continue;Ae=!1;break}if(Pe){if(!Lf(i,function(ze,Ze){if(!rs(Pe,Ze)&&(Me===ze||y(Me,ze,a,c,L)))return Pe.push(Ze)})){Ae=!1;break}}else if(!(Me===qe||y(Me,qe,a,c,L))){Ae=!1;break}}return L.delete(n),L.delete(i),Ae}function pE(n,i,a,c,y,L,k){switch(a){case Ge:if(n.byteLength!=i.byteLength||n.byteOffset!=i.byteOffset)return!1;n=n.buffer,i=i.buffer;case Xe:return!(n.byteLength!=i.byteLength||!L(new Ra(n),new Ra(i)));case W:case ie:case K:return tn(+n,+i);case d:return n.name==i.name&&n.message==i.message;case Ce:case Re:return n==i+"";case E:var G=xf;case Ue:var Q=c&x;if(G||(G=ya),n.size!=i.size&&!Q)return!1;var ge=k.get(n);if(ge)return ge==i;c|=v,k.set(n,i);var pe=eg(G(n),G(i),c,y,L,k);return k.delete(n),pe;case He:if(as)return as.call(n)==as.call(i)}return!1}function bE(n,i,a,c,y,L){var k=a&x,G=al(n),Q=G.length,ge=al(i),pe=ge.length;if(Q!=pe&&!k)return!1;for(var we=Q;we--;){var Ae=G[we];if(!(k?Ae in i:ot.call(i,Ae)))return!1}var Pe=L.get(n),Me=L.get(i);if(Pe&&Me)return Pe==i&&Me==n;var qe=!0;L.set(n,i),L.set(i,n);for(var xe=k;++we<Q;){Ae=G[we];var ze=n[Ae],Ze=i[Ae];if(c)var Ar=k?c(Ze,ze,Ae,i,n,L):c(ze,Ze,Ae,n,i,L);if(!(Ar===r?ze===Ze||y(ze,Ze,a,c,L):Ar)){qe=!1;break}xe||(xe=Ae=="constructor")}if(qe&&!xe){var ar=n.constructor,Tr=i.constructor;ar!=Tr&&"constructor"in n&&"constructor"in i&&!(typeof ar=="function"&&ar instanceof ar&&typeof Tr=="function"&&Tr instanceof Tr)&&(qe=!1)}return L.delete(n),L.delete(i),qe}function qn(n){return pl(sg(n,r,pg),n+"")}function al(n){return mh(n,Ut,cl)}function ul(n){return mh(n,gr,tg)}var fl=La?function(n){return La.get(n)}:Ol;function qa(n){for(var i=n.name+"",a=yo[i],c=ot.call(yo,i)?a.length:0;c--;){var y=a[c],L=y.func;if(L==null||L==n)return y.name}return i}function vo(n){var i=ot.call(T,"placeholder")?T:n;return i.placeholder}function $e(){var n=T.iteratee||Tl;return n=n===Tl?Sh:n,arguments.length?n(arguments[0],arguments[1]):n}function Va(n,i){var a=n.__data__;return RE(i)?a[typeof i=="string"?"string":"hash"]:a.map}function ll(n){for(var i=Ut(n),a=i.length;a--;){var c=i[a],y=n[c];i[a]=[c,y,ig(y)]}return i}function Fi(n,i){var a=Iw(n,i);return vh(a)?a:r}function _E(n){var i=ot.call(n,xi),a=n[xi];try{n[xi]=r;var c=!0}catch{}var y=va.call(n);return c&&(i?n[xi]=a:delete n[xi]),y}var cl=jf?function(n){return n==null?[]:(n=lt(n),li(jf(n),function(i){return ah.call(n,i)}))}:Cl,tg=jf?function(n){for(var i=[];n;)ci(i,cl(n)),n=Aa(n);return i}:Cl,Yt=or;(Uf&&Yt(new Uf(new ArrayBuffer(1)))!=Ge||is&&Yt(new is)!=E||kf&&Yt(kf.resolve())!=Ie||_o&&Yt(new _o)!=Ue||os&&Yt(new os)!=tt)&&(Yt=function(n){var i=or(n),a=i==oe?n.constructor:r,c=a?Hi(a):"";if(c)switch(c){case Qw:return Ge;case em:return E;case tm:return Ie;case rm:return Ue;case nm:return tt}return i});function yE(n,i,a){for(var c=-1,y=a.length;++c<y;){var L=a[c],k=L.size;switch(L.type){case"drop":n+=k;break;case"dropRight":i-=k;break;case"take":i=Jt(i,n+k);break;case"takeRight":n=xt(n,i-k);break}}return{start:n,end:i}}function wE(n){var i=n.match(dn);return i?i[1].split(Mn):[]}function rg(n,i,a){i=bi(i,n);for(var c=-1,y=i.length,L=!1;++c<y;){var k=mn(i[c]);if(!(L=n!=null&&a(n,k)))break;n=n[k]}return L||++c!=y?L:(y=n==null?0:n.length,!!y&&Za(y)&&Vn(k,y)&&(Fe(n)||Wi(n)))}function mE(n){var i=n.length,a=new n.constructor(i);return i&&typeof n[0]=="string"&&ot.call(n,"index")&&(a.index=n.index,a.input=n.input),a}function ng(n){return typeof n.constructor=="function"&&!gs(n)?wo(Aa(n)):{}}function EE(n,i,a){var c=n.constructor;switch(i){case Xe:return il(n);case W:case ie:return new c(+n);case Ge:return iE(n,a);case jt:case Pt:case ut:case Nt:case lr:case tr:case Ft:case cr:case Jr:return Uh(n,a);case E:return new c;case K:case Re:return new c(n);case Ce:return oE(n);case Ue:return new c;case He:return sE(n)}}function vE(n,i){var a=i.length;if(!a)return n;var c=a-1;return i[c]=(a>1?"& ":"")+i[c],i=i.join(a>2?", ":" "),n.replace(Bt,`{
|
|
11
|
-
/* [wrapped with `+i+`] */
|
|
12
|
-
`)}function SE(n){return Fe(n)||Wi(n)||!!(uh&&n&&n[uh])}function Vn(n,i){var a=typeof n;return i=i??re,!!i&&(a=="number"||a!="symbol"&&Bi.test(n))&&n>-1&&n%1==0&&n<i}function sr(n,i,a){if(!Et(a))return!1;var c=typeof i;return(c=="number"?hr(a)&&Vn(i,a.length):c=="string"&&i in a)?tn(a[i],n):!1}function dl(n,i){if(Fe(n))return!1;var a=typeof n;return a=="number"||a=="symbol"||a=="boolean"||n==null||Rr(n)?!0:Ee.test(n)||!D.test(n)||i!=null&&n in lt(i)}function RE(n){var i=typeof n;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?n!=="__proto__":n===null}function hl(n){var i=qa(n),a=T[i];if(typeof a!="function"||!(i in Je.prototype))return!1;if(n===a)return!0;var c=fl(a);return!!c&&n===c[0]}function AE(n){return!!ih&&ih in n}var TE=ma?Gn:Ll;function gs(n){var i=n&&n.constructor,a=typeof i=="function"&&i.prototype||bo;return n===a}function ig(n){return n===n&&!Et(n)}function og(n,i){return function(a){return a==null?!1:a[n]===i&&(i!==r||n in lt(a))}}function IE(n){var i=Ya(n,function(c){return a.size===h&&a.clear(),c}),a=i.cache;return i}function OE(n,i){var a=n[1],c=i[1],y=a|c,L=y<(C|B|le),k=c==le&&a==S||c==le&&a==ae&&n[7].length<=i[8]||c==(le|ae)&&i[7].length<=i[8]&&a==S;if(!(L||k))return n;c&C&&(n[2]=i[2],y|=a&C?0:P);var G=i[3];if(G){var Q=n[3];n[3]=Q?Fh(Q,G,i[4]):G,n[4]=Q?di(n[3],b):i[4]}return G=i[5],G&&(Q=n[5],n[5]=Q?Hh(Q,G,i[6]):G,n[6]=Q?di(n[5],b):i[6]),G=i[7],G&&(n[7]=G),c&le&&(n[8]=n[8]==null?i[8]:Jt(n[8],i[8])),n[9]==null&&(n[9]=i[9]),n[0]=i[0],n[1]=y,n}function CE(n){var i=[];if(n!=null)for(var a in lt(n))i.push(a);return i}function LE(n){return va.call(n)}function sg(n,i,a){return i=xt(i===r?n.length-1:i,0),function(){for(var c=arguments,y=-1,L=xt(c.length-i,0),k=ue(L);++y<L;)k[y]=c[i+y];y=-1;for(var G=ue(i+1);++y<i;)G[y]=c[y];return G[i]=a(k),Er(n,this,G)}}function ag(n,i){return i.length<2?n:ki(n,Dr(i,0,-1))}function PE(n,i){for(var a=n.length,c=Jt(i.length,a),y=dr(n);c--;){var L=i[c];n[c]=Vn(L,a)?y[L]:r}return n}function gl(n,i){if(!(i==="constructor"&&typeof n[i]=="function")&&i!="__proto__")return n[i]}var ug=lg(Ph),ps=Gw||function(n,i){return De.setTimeout(n,i)},pl=lg(eE);function fg(n,i,a){var c=i+"";return pl(n,vE(c,BE(wE(c),a)))}function lg(n){var i=0,a=0;return function(){var c=Yw(),y=U-(c-a);if(a=c,y>0){if(++i>=F)return arguments[0]}else i=0;return n.apply(r,arguments)}}function Ga(n,i){var a=-1,c=n.length,y=c-1;for(i=i===r?c:i;++a<i;){var L=Xf(a,y),k=n[L];n[L]=n[a],n[a]=k}return n.length=i,n}var cg=IE(function(n){var i=[];return n.charCodeAt(0)===46&&i.push(""),n.replace(ve,function(a,c,y,L){i.push(y?L.replace(Zr,"$1"):c||a)}),i});function mn(n){if(typeof n=="string"||Rr(n))return n;var i=n+"";return i=="0"&&1/n==-1/0?"-0":i}function Hi(n){if(n!=null){try{return Ea.call(n)}catch{}try{return n+""}catch{}}return""}function BE(n,i){return Nr(_e,function(a){var c="_."+a[0];i&a[1]&&!ba(n,c)&&n.push(c)}),n.sort()}function dg(n){if(n instanceof Je)return n.clone();var i=new Mr(n.__wrapped__,n.__chain__);return i.__actions__=dr(n.__actions__),i.__index__=n.__index__,i.__values__=n.__values__,i}function NE(n,i,a){(a?sr(n,i,a):i===r)?i=1:i=xt(We(i),0);var c=n==null?0:n.length;if(!c||i<1)return[];for(var y=0,L=0,k=ue(Oa(c/i));y<c;)k[L++]=Dr(n,y,y+=i);return k}function $E(n){for(var i=-1,a=n==null?0:n.length,c=0,y=[];++i<a;){var L=n[i];L&&(y[c++]=L)}return y}function ME(){var n=arguments.length;if(!n)return[];for(var i=ue(n-1),a=arguments[0],c=n;c--;)i[c-1]=arguments[c];return ci(Fe(a)?dr(a):[a],Wt(i,1))}var xE=Ve(function(n,i){return It(n)?fs(n,Wt(i,1,It,!0)):[]}),DE=Ve(function(n,i){var a=jr(i);return It(a)&&(a=r),It(n)?fs(n,Wt(i,1,It,!0),$e(a,2)):[]}),jE=Ve(function(n,i){var a=jr(i);return It(a)&&(a=r),It(n)?fs(n,Wt(i,1,It,!0),r,a):[]});function UE(n,i,a){var c=n==null?0:n.length;return c?(i=a||i===r?1:We(i),Dr(n,i<0?0:i,c)):[]}function kE(n,i,a){var c=n==null?0:n.length;return c?(i=a||i===r?1:We(i),i=c-i,Dr(n,0,i<0?0:i)):[]}function FE(n,i){return n&&n.length?ja(n,$e(i,3),!0,!0):[]}function HE(n,i){return n&&n.length?ja(n,$e(i,3),!0):[]}function WE(n,i,a,c){var y=n==null?0:n.length;return y?(a&&typeof a!="number"&&sr(n,i,a)&&(a=0,c=y),Mm(n,i,a,c)):[]}function hg(n,i,a){var c=n==null?0:n.length;if(!c)return-1;var y=a==null?0:We(a);return y<0&&(y=xt(c+y,0)),_a(n,$e(i,3),y)}function gg(n,i,a){var c=n==null?0:n.length;if(!c)return-1;var y=c-1;return a!==r&&(y=We(a),y=a<0?xt(c+y,0):Jt(y,c-1)),_a(n,$e(i,3),y,!0)}function pg(n){var i=n==null?0:n.length;return i?Wt(n,1):[]}function qE(n){var i=n==null?0:n.length;return i?Wt(n,V):[]}function VE(n,i){var a=n==null?0:n.length;return a?(i=i===r?1:We(i),Wt(n,i)):[]}function GE(n){for(var i=-1,a=n==null?0:n.length,c={};++i<a;){var y=n[i];c[y[0]]=y[1]}return c}function bg(n){return n&&n.length?n[0]:r}function zE(n,i,a){var c=n==null?0:n.length;if(!c)return-1;var y=a==null?0:We(a);return y<0&&(y=xt(c+y,0)),co(n,i,y)}function KE(n){var i=n==null?0:n.length;return i?Dr(n,0,-1):[]}var JE=Ve(function(n){var i=mt(n,rl);return i.length&&i[0]===n[0]?Gf(i):[]}),YE=Ve(function(n){var i=jr(n),a=mt(n,rl);return i===jr(a)?i=r:a.pop(),a.length&&a[0]===n[0]?Gf(a,$e(i,2)):[]}),XE=Ve(function(n){var i=jr(n),a=mt(n,rl);return i=typeof i=="function"?i:r,i&&a.pop(),a.length&&a[0]===n[0]?Gf(a,r,i):[]});function ZE(n,i){return n==null?"":Kw.call(n,i)}function jr(n){var i=n==null?0:n.length;return i?n[i-1]:r}function QE(n,i,a){var c=n==null?0:n.length;if(!c)return-1;var y=c;return a!==r&&(y=We(a),y=y<0?xt(c+y,0):Jt(y,c-1)),i===i?Bw(n,i,y):_a(n,Yd,y,!0)}function ev(n,i){return n&&n.length?Ih(n,We(i)):r}var tv=Ve(_g);function _g(n,i){return n&&n.length&&i&&i.length?Yf(n,i):n}function rv(n,i,a){return n&&n.length&&i&&i.length?Yf(n,i,$e(a,2)):n}function nv(n,i,a){return n&&n.length&&i&&i.length?Yf(n,i,r,a):n}var iv=qn(function(n,i){var a=n==null?0:n.length,c=Hf(n,i);return Lh(n,mt(i,function(y){return Vn(y,a)?+y:y}).sort(kh)),c});function ov(n,i){var a=[];if(!(n&&n.length))return a;var c=-1,y=[],L=n.length;for(i=$e(i,3);++c<L;){var k=n[c];i(k,c,n)&&(a.push(k),y.push(c))}return Lh(n,y),a}function bl(n){return n==null?n:Zw.call(n)}function sv(n,i,a){var c=n==null?0:n.length;return c?(a&&typeof a!="number"&&sr(n,i,a)?(i=0,a=c):(i=i==null?0:We(i),a=a===r?c:We(a)),Dr(n,i,a)):[]}function av(n,i){return Da(n,i)}function uv(n,i,a){return Qf(n,i,$e(a,2))}function fv(n,i){var a=n==null?0:n.length;if(a){var c=Da(n,i);if(c<a&&tn(n[c],i))return c}return-1}function lv(n,i){return Da(n,i,!0)}function cv(n,i,a){return Qf(n,i,$e(a,2),!0)}function dv(n,i){var a=n==null?0:n.length;if(a){var c=Da(n,i,!0)-1;if(tn(n[c],i))return c}return-1}function hv(n){return n&&n.length?Bh(n):[]}function gv(n,i){return n&&n.length?Bh(n,$e(i,2)):[]}function pv(n){var i=n==null?0:n.length;return i?Dr(n,1,i):[]}function bv(n,i,a){return n&&n.length?(i=a||i===r?1:We(i),Dr(n,0,i<0?0:i)):[]}function _v(n,i,a){var c=n==null?0:n.length;return c?(i=a||i===r?1:We(i),i=c-i,Dr(n,i<0?0:i,c)):[]}function yv(n,i){return n&&n.length?ja(n,$e(i,3),!1,!0):[]}function wv(n,i){return n&&n.length?ja(n,$e(i,3)):[]}var mv=Ve(function(n){return pi(Wt(n,1,It,!0))}),Ev=Ve(function(n){var i=jr(n);return It(i)&&(i=r),pi(Wt(n,1,It,!0),$e(i,2))}),vv=Ve(function(n){var i=jr(n);return i=typeof i=="function"?i:r,pi(Wt(n,1,It,!0),r,i)});function Sv(n){return n&&n.length?pi(n):[]}function Rv(n,i){return n&&n.length?pi(n,$e(i,2)):[]}function Av(n,i){return i=typeof i=="function"?i:r,n&&n.length?pi(n,r,i):[]}function _l(n){if(!(n&&n.length))return[];var i=0;return n=li(n,function(a){if(It(a))return i=xt(a.length,i),!0}),$f(i,function(a){return mt(n,Pf(a))})}function yg(n,i){if(!(n&&n.length))return[];var a=_l(n);return i==null?a:mt(a,function(c){return Er(i,r,c)})}var Tv=Ve(function(n,i){return It(n)?fs(n,i):[]}),Iv=Ve(function(n){return tl(li(n,It))}),Ov=Ve(function(n){var i=jr(n);return It(i)&&(i=r),tl(li(n,It),$e(i,2))}),Cv=Ve(function(n){var i=jr(n);return i=typeof i=="function"?i:r,tl(li(n,It),r,i)}),Lv=Ve(_l);function Pv(n,i){return xh(n||[],i||[],us)}function Bv(n,i){return xh(n||[],i||[],ds)}var Nv=Ve(function(n){var i=n.length,a=i>1?n[i-1]:r;return a=typeof a=="function"?(n.pop(),a):r,yg(n,a)});function wg(n){var i=T(n);return i.__chain__=!0,i}function $v(n,i){return i(n),n}function za(n,i){return i(n)}var Mv=qn(function(n){var i=n.length,a=i?n[0]:0,c=this.__wrapped__,y=function(L){return Hf(L,n)};return i>1||this.__actions__.length||!(c instanceof Je)||!Vn(a)?this.thru(y):(c=c.slice(a,+a+(i?1:0)),c.__actions__.push({func:za,args:[y],thisArg:r}),new Mr(c,this.__chain__).thru(function(L){return i&&!L.length&&L.push(r),L}))});function xv(){return wg(this)}function Dv(){return new Mr(this.value(),this.__chain__)}function jv(){this.__values__===r&&(this.__values__=Ng(this.value()));var n=this.__index__>=this.__values__.length,i=n?r:this.__values__[this.__index__++];return{done:n,value:i}}function Uv(){return this}function kv(n){for(var i,a=this;a instanceof Ba;){var c=dg(a);c.__index__=0,c.__values__=r,i?y.__wrapped__=c:i=c;var y=c;a=a.__wrapped__}return y.__wrapped__=n,i}function Fv(){var n=this.__wrapped__;if(n instanceof Je){var i=n;return this.__actions__.length&&(i=new Je(this)),i=i.reverse(),i.__actions__.push({func:za,args:[bl],thisArg:r}),new Mr(i,this.__chain__)}return this.thru(bl)}function Hv(){return Mh(this.__wrapped__,this.__actions__)}var Wv=Ua(function(n,i,a){ot.call(n,a)?++n[a]:Hn(n,a,1)});function qv(n,i,a){var c=Fe(n)?Kd:$m;return a&&sr(n,i,a)&&(i=r),c(n,$e(i,3))}function Vv(n,i){var a=Fe(n)?li:yh;return a(n,$e(i,3))}var Gv=Gh(hg),zv=Gh(gg);function Kv(n,i){return Wt(Ka(n,i),1)}function Jv(n,i){return Wt(Ka(n,i),V)}function Yv(n,i,a){return a=a===r?1:We(a),Wt(Ka(n,i),a)}function mg(n,i){var a=Fe(n)?Nr:gi;return a(n,$e(i,3))}function Eg(n,i){var a=Fe(n)?pw:_h;return a(n,$e(i,3))}var Xv=Ua(function(n,i,a){ot.call(n,a)?n[a].push(i):Hn(n,a,[i])});function Zv(n,i,a,c){n=hr(n)?n:Ro(n),a=a&&!c?We(a):0;var y=n.length;return a<0&&(a=xt(y+a,0)),Qa(n)?a<=y&&n.indexOf(i,a)>-1:!!y&&co(n,i,a)>-1}var Qv=Ve(function(n,i,a){var c=-1,y=typeof i=="function",L=hr(n)?ue(n.length):[];return gi(n,function(k){L[++c]=y?Er(i,k,a):ls(k,i,a)}),L}),eS=Ua(function(n,i,a){Hn(n,a,i)});function Ka(n,i){var a=Fe(n)?mt:Rh;return a(n,$e(i,3))}function tS(n,i,a,c){return n==null?[]:(Fe(i)||(i=i==null?[]:[i]),a=c?r:a,Fe(a)||(a=a==null?[]:[a]),Oh(n,i,a))}var rS=Ua(function(n,i,a){n[a?0:1].push(i)},function(){return[[],[]]});function nS(n,i,a){var c=Fe(n)?Cf:Zd,y=arguments.length<3;return c(n,$e(i,4),a,y,gi)}function iS(n,i,a){var c=Fe(n)?bw:Zd,y=arguments.length<3;return c(n,$e(i,4),a,y,_h)}function oS(n,i){var a=Fe(n)?li:yh;return a(n,Xa($e(i,3)))}function sS(n){var i=Fe(n)?hh:Zm;return i(n)}function aS(n,i,a){(a?sr(n,i,a):i===r)?i=1:i=We(i);var c=Fe(n)?Cm:Qm;return c(n,i)}function uS(n){var i=Fe(n)?Lm:tE;return i(n)}function fS(n){if(n==null)return 0;if(hr(n))return Qa(n)?go(n):n.length;var i=Yt(n);return i==E||i==Ue?n.size:Kf(n).length}function lS(n,i,a){var c=Fe(n)?Lf:rE;return a&&sr(n,i,a)&&(i=r),c(n,$e(i,3))}var cS=Ve(function(n,i){if(n==null)return[];var a=i.length;return a>1&&sr(n,i[0],i[1])?i=[]:a>2&&sr(i[0],i[1],i[2])&&(i=[i[0]]),Oh(n,Wt(i,1),[])}),Ja=Vw||function(){return De.Date.now()};function dS(n,i){if(typeof i!="function")throw new $r(f);return n=We(n),function(){if(--n<1)return i.apply(this,arguments)}}function vg(n,i,a){return i=a?r:i,i=n&&i==null?n.length:i,Wn(n,le,r,r,r,r,i)}function Sg(n,i){var a;if(typeof i!="function")throw new $r(f);return n=We(n),function(){return--n>0&&(a=i.apply(this,arguments)),n<=1&&(i=r),a}}var yl=Ve(function(n,i,a){var c=C;if(a.length){var y=di(a,vo(yl));c|=j}return Wn(n,c,i,a,y)}),Rg=Ve(function(n,i,a){var c=C|B;if(a.length){var y=di(a,vo(Rg));c|=j}return Wn(i,c,n,a,y)});function Ag(n,i,a){i=a?r:i;var c=Wn(n,S,r,r,r,r,r,i);return c.placeholder=Ag.placeholder,c}function Tg(n,i,a){i=a?r:i;var c=Wn(n,m,r,r,r,r,r,i);return c.placeholder=Tg.placeholder,c}function Ig(n,i,a){var c,y,L,k,G,Q,ge=0,pe=!1,we=!1,Ae=!0;if(typeof n!="function")throw new $r(f);i=Ur(i)||0,Et(a)&&(pe=!!a.leading,we="maxWait"in a,L=we?xt(Ur(a.maxWait)||0,i):L,Ae="trailing"in a?!!a.trailing:Ae);function Pe(Ot){var rn=c,Kn=y;return c=y=r,ge=Ot,k=n.apply(Kn,rn),k}function Me(Ot){return ge=Ot,G=ps(ze,i),pe?Pe(Ot):k}function qe(Ot){var rn=Ot-Q,Kn=Ot-ge,Gg=i-rn;return we?Jt(Gg,L-Kn):Gg}function xe(Ot){var rn=Ot-Q,Kn=Ot-ge;return Q===r||rn>=i||rn<0||we&&Kn>=L}function ze(){var Ot=Ja();if(xe(Ot))return Ze(Ot);G=ps(ze,qe(Ot))}function Ze(Ot){return G=r,Ae&&c?Pe(Ot):(c=y=r,k)}function Ar(){G!==r&&Dh(G),ge=0,c=Q=y=G=r}function ar(){return G===r?k:Ze(Ja())}function Tr(){var Ot=Ja(),rn=xe(Ot);if(c=arguments,y=this,Q=Ot,rn){if(G===r)return Me(Q);if(we)return Dh(G),G=ps(ze,i),Pe(Q)}return G===r&&(G=ps(ze,i)),k}return Tr.cancel=Ar,Tr.flush=ar,Tr}var hS=Ve(function(n,i){return bh(n,1,i)}),gS=Ve(function(n,i,a){return bh(n,Ur(i)||0,a)});function pS(n){return Wn(n,ee)}function Ya(n,i){if(typeof n!="function"||i!=null&&typeof i!="function")throw new $r(f);var a=function(){var c=arguments,y=i?i.apply(this,c):c[0],L=a.cache;if(L.has(y))return L.get(y);var k=n.apply(this,c);return a.cache=L.set(y,k)||L,k};return a.cache=new(Ya.Cache||Fn),a}Ya.Cache=Fn;function Xa(n){if(typeof n!="function")throw new $r(f);return function(){var i=arguments;switch(i.length){case 0:return!n.call(this);case 1:return!n.call(this,i[0]);case 2:return!n.call(this,i[0],i[1]);case 3:return!n.call(this,i[0],i[1],i[2])}return!n.apply(this,i)}}function bS(n){return Sg(2,n)}var _S=nE(function(n,i){i=i.length==1&&Fe(i[0])?mt(i[0],vr($e())):mt(Wt(i,1),vr($e()));var a=i.length;return Ve(function(c){for(var y=-1,L=Jt(c.length,a);++y<L;)c[y]=i[y].call(this,c[y]);return Er(n,this,c)})}),wl=Ve(function(n,i){var a=di(i,vo(wl));return Wn(n,j,r,i,a)}),Og=Ve(function(n,i){var a=di(i,vo(Og));return Wn(n,Z,r,i,a)}),yS=qn(function(n,i){return Wn(n,ae,r,r,r,i)});function wS(n,i){if(typeof n!="function")throw new $r(f);return i=i===r?i:We(i),Ve(n,i)}function mS(n,i){if(typeof n!="function")throw new $r(f);return i=i==null?0:xt(We(i),0),Ve(function(a){var c=a[i],y=_i(a,0,i);return c&&ci(y,c),Er(n,this,y)})}function ES(n,i,a){var c=!0,y=!0;if(typeof n!="function")throw new $r(f);return Et(a)&&(c="leading"in a?!!a.leading:c,y="trailing"in a?!!a.trailing:y),Ig(n,i,{leading:c,maxWait:i,trailing:y})}function vS(n){return vg(n,1)}function SS(n,i){return wl(nl(i),n)}function RS(){if(!arguments.length)return[];var n=arguments[0];return Fe(n)?n:[n]}function AS(n){return xr(n,A)}function TS(n,i){return i=typeof i=="function"?i:r,xr(n,A,i)}function IS(n){return xr(n,w|A)}function OS(n,i){return i=typeof i=="function"?i:r,xr(n,w|A,i)}function CS(n,i){return i==null||ph(n,i,Ut(i))}function tn(n,i){return n===i||n!==n&&i!==i}var LS=Wa(Vf),PS=Wa(function(n,i){return n>=i}),Wi=Eh(function(){return arguments}())?Eh:function(n){return At(n)&&ot.call(n,"callee")&&!ah.call(n,"callee")},Fe=ue.isArray,BS=lo?vr(lo):km;function hr(n){return n!=null&&Za(n.length)&&!Gn(n)}function It(n){return At(n)&&hr(n)}function NS(n){return n===!0||n===!1||At(n)&&or(n)==W}var yi=zw||Ll,$S=ts?vr(ts):Fm;function MS(n){return At(n)&&n.nodeType===1&&!bs(n)}function xS(n){if(n==null)return!0;if(hr(n)&&(Fe(n)||typeof n=="string"||typeof n.splice=="function"||yi(n)||So(n)||Wi(n)))return!n.length;var i=Yt(n);if(i==E||i==Ue)return!n.size;if(gs(n))return!Kf(n).length;for(var a in n)if(ot.call(n,a))return!1;return!0}function DS(n,i){return cs(n,i)}function jS(n,i,a){a=typeof a=="function"?a:r;var c=a?a(n,i):r;return c===r?cs(n,i,r,a):!!c}function ml(n){if(!At(n))return!1;var i=or(n);return i==d||i==ye||typeof n.message=="string"&&typeof n.name=="string"&&!bs(n)}function US(n){return typeof n=="number"&&fh(n)}function Gn(n){if(!Et(n))return!1;var i=or(n);return i==p||i==_||i==O||i==Be}function Cg(n){return typeof n=="number"&&n==We(n)}function Za(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=re}function Et(n){var i=typeof n;return n!=null&&(i=="object"||i=="function")}function At(n){return n!=null&&typeof n=="object"}var Lg=qd?vr(qd):Wm;function kS(n,i){return n===i||zf(n,i,ll(i))}function FS(n,i,a){return a=typeof a=="function"?a:r,zf(n,i,ll(i),a)}function HS(n){return Pg(n)&&n!=+n}function WS(n){if(TE(n))throw new ke(u);return vh(n)}function qS(n){return n===null}function VS(n){return n==null}function Pg(n){return typeof n=="number"||At(n)&&or(n)==K}function bs(n){if(!At(n)||or(n)!=oe)return!1;var i=Aa(n);if(i===null)return!0;var a=ot.call(i,"constructor")&&i.constructor;return typeof a=="function"&&a instanceof a&&Ea.call(a)==Fw}var El=Vd?vr(Vd):qm;function GS(n){return Cg(n)&&n>=-9007199254740991&&n<=re}var Bg=Gd?vr(Gd):Vm;function Qa(n){return typeof n=="string"||!Fe(n)&&At(n)&&or(n)==Re}function Rr(n){return typeof n=="symbol"||At(n)&&or(n)==He}var So=zd?vr(zd):Gm;function zS(n){return n===r}function KS(n){return At(n)&&Yt(n)==tt}function JS(n){return At(n)&&or(n)==yt}var YS=Wa(Jf),XS=Wa(function(n,i){return n<=i});function Ng(n){if(!n)return[];if(hr(n))return Qa(n)?Qr(n):dr(n);if(ns&&n[ns])return Cw(n[ns]());var i=Yt(n),a=i==E?xf:i==Ue?ya:Ro;return a(n)}function zn(n){if(!n)return n===0?n:0;if(n=Ur(n),n===V||n===-1/0){var i=n<0?-1:1;return i*H}return n===n?n:0}function We(n){var i=zn(n),a=i%1;return i===i?a?i-a:i:0}function $g(n){return n?Ui(We(n),0,se):0}function Ur(n){if(typeof n=="number")return n;if(Rr(n))return z;if(Et(n)){var i=typeof n.valueOf=="function"?n.valueOf():n;n=Et(i)?i+"":i}if(typeof n!="string")return n===0?n:+n;n=Qd(n);var a=ir.test(n);return a||Pi.test(n)?Ke(n.slice(2),a?2:8):mr.test(n)?z:+n}function Mg(n){return wn(n,gr(n))}function ZS(n){return n?Ui(We(n),-9007199254740991,re):n===0?n:0}function nt(n){return n==null?"":Sr(n)}var QS=mo(function(n,i){if(gs(i)||hr(i)){wn(i,Ut(i),n);return}for(var a in i)ot.call(i,a)&&us(n,a,i[a])}),xg=mo(function(n,i){wn(i,gr(i),n)}),eu=mo(function(n,i,a,c){wn(i,gr(i),n,c)}),eR=mo(function(n,i,a,c){wn(i,Ut(i),n,c)}),tR=qn(Hf);function rR(n,i){var a=wo(n);return i==null?a:gh(a,i)}var nR=Ve(function(n,i){n=lt(n);var a=-1,c=i.length,y=c>2?i[2]:r;for(y&&sr(i[0],i[1],y)&&(c=1);++a<c;)for(var L=i[a],k=gr(L),G=-1,Q=k.length;++G<Q;){var ge=k[G],pe=n[ge];(pe===r||tn(pe,bo[ge])&&!ot.call(n,ge))&&(n[ge]=L[ge])}return n}),iR=Ve(function(n){return n.push(r,Qh),Er(Dg,r,n)});function oR(n,i){return Jd(n,$e(i,3),yn)}function sR(n,i){return Jd(n,$e(i,3),qf)}function aR(n,i){return n==null?n:Wf(n,$e(i,3),gr)}function uR(n,i){return n==null?n:wh(n,$e(i,3),gr)}function fR(n,i){return n&&yn(n,$e(i,3))}function lR(n,i){return n&&qf(n,$e(i,3))}function cR(n){return n==null?[]:Ma(n,Ut(n))}function dR(n){return n==null?[]:Ma(n,gr(n))}function vl(n,i,a){var c=n==null?r:ki(n,i);return c===r?a:c}function hR(n,i){return n!=null&&rg(n,i,xm)}function Sl(n,i){return n!=null&&rg(n,i,Dm)}var gR=Kh(function(n,i,a){i!=null&&typeof i.toString!="function"&&(i=va.call(i)),n[i]=a},Al(pr)),pR=Kh(function(n,i,a){i!=null&&typeof i.toString!="function"&&(i=va.call(i)),ot.call(n,i)?n[i].push(a):n[i]=[a]},$e),bR=Ve(ls);function Ut(n){return hr(n)?dh(n):Kf(n)}function gr(n){return hr(n)?dh(n,!0):zm(n)}function _R(n,i){var a={};return i=$e(i,3),yn(n,function(c,y,L){Hn(a,i(c,y,L),c)}),a}function yR(n,i){var a={};return i=$e(i,3),yn(n,function(c,y,L){Hn(a,y,i(c,y,L))}),a}var wR=mo(function(n,i,a){xa(n,i,a)}),Dg=mo(function(n,i,a,c){xa(n,i,a,c)}),mR=qn(function(n,i){var a={};if(n==null)return a;var c=!1;i=mt(i,function(L){return L=bi(L,n),c||(c=L.length>1),L}),wn(n,ul(n),a),c&&(a=xr(a,w|I|A,gE));for(var y=i.length;y--;)el(a,i[y]);return a});function ER(n,i){return jg(n,Xa($e(i)))}var vR=qn(function(n,i){return n==null?{}:Jm(n,i)});function jg(n,i){if(n==null)return{};var a=mt(ul(n),function(c){return[c]});return i=$e(i),Ch(n,a,function(c,y){return i(c,y[0])})}function SR(n,i,a){i=bi(i,n);var c=-1,y=i.length;for(y||(y=1,n=r);++c<y;){var L=n==null?r:n[mn(i[c])];L===r&&(c=y,L=a),n=Gn(L)?L.call(n):L}return n}function RR(n,i,a){return n==null?n:ds(n,i,a)}function AR(n,i,a,c){return c=typeof c=="function"?c:r,n==null?n:ds(n,i,a,c)}var Ug=Xh(Ut),kg=Xh(gr);function TR(n,i,a){var c=Fe(n),y=c||yi(n)||So(n);if(i=$e(i,4),a==null){var L=n&&n.constructor;y?a=c?new L:[]:Et(n)?a=Gn(L)?wo(Aa(n)):{}:a={}}return(y?Nr:yn)(n,function(k,G,Q){return i(a,k,G,Q)}),a}function IR(n,i){return n==null?!0:el(n,i)}function OR(n,i,a){return n==null?n:$h(n,i,nl(a))}function CR(n,i,a,c){return c=typeof c=="function"?c:r,n==null?n:$h(n,i,nl(a),c)}function Ro(n){return n==null?[]:Mf(n,Ut(n))}function LR(n){return n==null?[]:Mf(n,gr(n))}function PR(n,i,a){return a===r&&(a=i,i=r),a!==r&&(a=Ur(a),a=a===a?a:0),i!==r&&(i=Ur(i),i=i===i?i:0),Ui(Ur(n),i,a)}function BR(n,i,a){return i=zn(i),a===r?(a=i,i=0):a=zn(a),n=Ur(n),jm(n,i,a)}function NR(n,i,a){if(a&&typeof a!="boolean"&&sr(n,i,a)&&(i=a=r),a===r&&(typeof i=="boolean"?(a=i,i=r):typeof n=="boolean"&&(a=n,n=r)),n===r&&i===r?(n=0,i=1):(n=zn(n),i===r?(i=n,n=0):i=zn(i)),n>i){var c=n;n=i,i=c}if(a||n%1||i%1){var y=lh();return Jt(n+y*(i-n+Le("1e-"+((y+"").length-1))),i)}return Xf(n,i)}var $R=Eo(function(n,i,a){return i=i.toLowerCase(),n+(a?Fg(i):i)});function Fg(n){return Rl(nt(n).toLowerCase())}function Hg(n){return n=nt(n),n&&n.replace(xn,Rw).replace(Dn,"")}function MR(n,i,a){n=nt(n),i=Sr(i);var c=n.length;a=a===r?c:Ui(We(a),0,c);var y=a;return a-=i.length,a>=0&&n.slice(a,y)==i}function xR(n){return n=nt(n),n&&$n.test(n)?n.replace(Lr,Aw):n}function DR(n){return n=nt(n),n&&wt.test(n)?n.replace(Te,"\\$&"):n}var jR=Eo(function(n,i,a){return n+(a?"-":"")+i.toLowerCase()}),UR=Eo(function(n,i,a){return n+(a?" ":"")+i.toLowerCase()}),kR=Vh("toLowerCase");function FR(n,i,a){n=nt(n),i=We(i);var c=i?go(n):0;if(!i||c>=i)return n;var y=(i-c)/2;return Ha(Ca(y),a)+n+Ha(Oa(y),a)}function HR(n,i,a){n=nt(n),i=We(i);var c=i?go(n):0;return i&&c<i?n+Ha(i-c,a):n}function WR(n,i,a){n=nt(n),i=We(i);var c=i?go(n):0;return i&&c<i?Ha(i-c,a)+n:n}function qR(n,i,a){return a||i==null?i=0:i&&(i=+i),Xw(nt(n).replace(Rt,""),i||0)}function VR(n,i,a){return(a?sr(n,i,a):i===r)?i=1:i=We(i),Zf(nt(n),i)}function GR(){var n=arguments,i=nt(n[0]);return n.length<3?i:i.replace(n[1],n[2])}var zR=Eo(function(n,i,a){return n+(a?"_":"")+i.toLowerCase()});function KR(n,i,a){return a&&typeof a!="number"&&sr(n,i,a)&&(i=a=r),a=a===r?se:a>>>0,a?(n=nt(n),n&&(typeof i=="string"||i!=null&&!El(i))&&(i=Sr(i),!i&&ho(n))?_i(Qr(n),0,a):n.split(i,a)):[]}var JR=Eo(function(n,i,a){return n+(a?" ":"")+Rl(i)});function YR(n,i,a){return n=nt(n),a=a==null?0:Ui(We(a),0,n.length),i=Sr(i),n.slice(a,a+i.length)==i}function XR(n,i,a){var c=T.templateSettings;a&&sr(n,i,a)&&(i=r),n=nt(n),i=eu({},i,c,Zh);var y=eu({},i.imports,c.imports,Zh),L=Ut(y),k=Mf(y,L),G,Q,ge=0,pe=i.interpolate||pn,we="__p += '",Ae=Df((i.escape||pn).source+"|"+pe.source+"|"+(pe===N?Gt:pn).source+"|"+(i.evaluate||pn).source+"|$","g"),Pe="//# sourceURL="+(ot.call(i,"sourceURL")?(i.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Tf+"]")+`
|
|
13
|
-
`;n.replace(Ae,function(xe,ze,Ze,Ar,ar,Tr){return Ze||(Ze=Ar),we+=n.slice(ge,Tr).replace(bn,Tw),ze&&(G=!0,we+=`' +
|
|
14
|
-
__e(`+ze+`) +
|
|
15
|
-
'`),ar&&(Q=!0,we+=`';
|
|
16
|
-
`+ar+`;
|
|
17
|
-
__p += '`),Ze&&(we+=`' +
|
|
18
|
-
((__t = (`+Ze+`)) == null ? '' : __t) +
|
|
19
|
-
'`),ge=Tr+xe.length,xe}),we+=`';
|
|
20
|
-
`;var Me=ot.call(i,"variable")&&i.variable;if(!Me)we=`with (obj) {
|
|
21
|
-
`+we+`
|
|
22
|
-
}
|
|
23
|
-
`;else if(gn.test(Me))throw new ke(g);we=(Q?we.replace(Yr,""):we).replace(un,"$1").replace(fn,"$1;"),we="function("+(Me||"obj")+`) {
|
|
24
|
-
`+(Me?"":`obj || (obj = {});
|
|
25
|
-
`)+"var __t, __p = ''"+(G?", __e = _.escape":"")+(Q?`, __j = Array.prototype.join;
|
|
26
|
-
function print() { __p += __j.call(arguments, '') }
|
|
27
|
-
`:`;
|
|
28
|
-
`)+we+`return __p
|
|
29
|
-
}`;var qe=qg(function(){return et(L,Pe+"return "+we).apply(r,k)});if(qe.source=we,ml(qe))throw qe;return qe}function ZR(n){return nt(n).toLowerCase()}function QR(n){return nt(n).toUpperCase()}function e1(n,i,a){if(n=nt(n),n&&(a||i===r))return Qd(n);if(!n||!(i=Sr(i)))return n;var c=Qr(n),y=Qr(i),L=eh(c,y),k=th(c,y)+1;return _i(c,L,k).join("")}function t1(n,i,a){if(n=nt(n),n&&(a||i===r))return n.slice(0,nh(n)+1);if(!n||!(i=Sr(i)))return n;var c=Qr(n),y=th(c,Qr(i))+1;return _i(c,0,y).join("")}function r1(n,i,a){if(n=nt(n),n&&(a||i===r))return n.replace(Rt,"");if(!n||!(i=Sr(i)))return n;var c=Qr(n),y=eh(c,Qr(i));return _i(c,y).join("")}function n1(n,i){var a=Se,c=me;if(Et(i)){var y="separator"in i?i.separator:y;a="length"in i?We(i.length):a,c="omission"in i?Sr(i.omission):c}n=nt(n);var L=n.length;if(ho(n)){var k=Qr(n);L=k.length}if(a>=L)return n;var G=a-go(c);if(G<1)return c;var Q=k?_i(k,0,G).join(""):n.slice(0,G);if(y===r)return Q+c;if(k&&(G+=Q.length-G),El(y)){if(n.slice(G).search(y)){var ge,pe=Q;for(y.global||(y=Df(y.source,nt(Pr.exec(y))+"g")),y.lastIndex=0;ge=y.exec(pe);)var we=ge.index;Q=Q.slice(0,we===r?G:we)}}else if(n.indexOf(Sr(y),G)!=G){var Ae=Q.lastIndexOf(y);Ae>-1&&(Q=Q.slice(0,Ae))}return Q+c}function i1(n){return n=nt(n),n&&nr.test(n)?n.replace(rr,Nw):n}var o1=Eo(function(n,i,a){return n+(a?" ":"")+i.toUpperCase()}),Rl=Vh("toUpperCase");function Wg(n,i,a){return n=nt(n),i=a?r:i,i===r?Ow(n)?xw(n):ww(n):n.match(i)||[]}var qg=Ve(function(n,i){try{return Er(n,r,i)}catch(a){return ml(a)?a:new ke(a)}}),s1=qn(function(n,i){return Nr(i,function(a){a=mn(a),Hn(n,a,yl(n[a],n))}),n});function a1(n){var i=n==null?0:n.length,a=$e();return n=i?mt(n,function(c){if(typeof c[1]!="function")throw new $r(f);return[a(c[0]),c[1]]}):[],Ve(function(c){for(var y=-1;++y<i;){var L=n[y];if(Er(L[0],this,c))return Er(L[1],this,c)}})}function u1(n){return Nm(xr(n,w))}function Al(n){return function(){return n}}function f1(n,i){return n==null||n!==n?i:n}var l1=zh(),c1=zh(!0);function pr(n){return n}function Tl(n){return Sh(typeof n=="function"?n:xr(n,w))}function d1(n){return Ah(xr(n,w))}function h1(n,i){return Th(n,xr(i,w))}var g1=Ve(function(n,i){return function(a){return ls(a,n,i)}}),p1=Ve(function(n,i){return function(a){return ls(n,a,i)}});function Il(n,i,a){var c=Ut(i),y=Ma(i,c);a==null&&!(Et(i)&&(y.length||!c.length))&&(a=i,i=n,n=this,y=Ma(i,Ut(i)));var L=!(Et(a)&&"chain"in a)||!!a.chain,k=Gn(n);return Nr(y,function(G){var Q=i[G];n[G]=Q,k&&(n.prototype[G]=function(){var ge=this.__chain__;if(L||ge){var pe=n(this.__wrapped__),we=pe.__actions__=dr(this.__actions__);return we.push({func:Q,args:arguments,thisArg:n}),pe.__chain__=ge,pe}return Q.apply(n,ci([this.value()],arguments))})}),n}function b1(){return De._===this&&(De._=Hw),this}function Ol(){}function _1(n){return n=We(n),Ve(function(i){return Ih(i,n)})}var y1=ol(mt),w1=ol(Kd),m1=ol(Lf);function Vg(n){return dl(n)?Pf(mn(n)):Ym(n)}function E1(n){return function(i){return n==null?r:ki(n,i)}}var v1=Jh(),S1=Jh(!0);function Cl(){return[]}function Ll(){return!1}function R1(){return{}}function A1(){return""}function T1(){return!0}function I1(n,i){if(n=We(n),n<1||n>re)return[];var a=se,c=Jt(n,se);i=$e(i),n-=se;for(var y=$f(c,i);++a<n;)i(a);return y}function O1(n){return Fe(n)?mt(n,mn):Rr(n)?[n]:dr(cg(nt(n)))}function C1(n){var i=++kw;return nt(n)+i}var L1=Fa(function(n,i){return n+i},0),P1=sl("ceil"),B1=Fa(function(n,i){return n/i},1),N1=sl("floor");function $1(n){return n&&n.length?$a(n,pr,Vf):r}function M1(n,i){return n&&n.length?$a(n,$e(i,2),Vf):r}function x1(n){return Xd(n,pr)}function D1(n,i){return Xd(n,$e(i,2))}function j1(n){return n&&n.length?$a(n,pr,Jf):r}function U1(n,i){return n&&n.length?$a(n,$e(i,2),Jf):r}var k1=Fa(function(n,i){return n*i},1),F1=sl("round"),H1=Fa(function(n,i){return n-i},0);function W1(n){return n&&n.length?Nf(n,pr):0}function q1(n,i){return n&&n.length?Nf(n,$e(i,2)):0}return T.after=dS,T.ary=vg,T.assign=QS,T.assignIn=xg,T.assignInWith=eu,T.assignWith=eR,T.at=tR,T.before=Sg,T.bind=yl,T.bindAll=s1,T.bindKey=Rg,T.castArray=RS,T.chain=wg,T.chunk=NE,T.compact=$E,T.concat=ME,T.cond=a1,T.conforms=u1,T.constant=Al,T.countBy=Wv,T.create=rR,T.curry=Ag,T.curryRight=Tg,T.debounce=Ig,T.defaults=nR,T.defaultsDeep=iR,T.defer=hS,T.delay=gS,T.difference=xE,T.differenceBy=DE,T.differenceWith=jE,T.drop=UE,T.dropRight=kE,T.dropRightWhile=FE,T.dropWhile=HE,T.fill=WE,T.filter=Vv,T.flatMap=Kv,T.flatMapDeep=Jv,T.flatMapDepth=Yv,T.flatten=pg,T.flattenDeep=qE,T.flattenDepth=VE,T.flip=pS,T.flow=l1,T.flowRight=c1,T.fromPairs=GE,T.functions=cR,T.functionsIn=dR,T.groupBy=Xv,T.initial=KE,T.intersection=JE,T.intersectionBy=YE,T.intersectionWith=XE,T.invert=gR,T.invertBy=pR,T.invokeMap=Qv,T.iteratee=Tl,T.keyBy=eS,T.keys=Ut,T.keysIn=gr,T.map=Ka,T.mapKeys=_R,T.mapValues=yR,T.matches=d1,T.matchesProperty=h1,T.memoize=Ya,T.merge=wR,T.mergeWith=Dg,T.method=g1,T.methodOf=p1,T.mixin=Il,T.negate=Xa,T.nthArg=_1,T.omit=mR,T.omitBy=ER,T.once=bS,T.orderBy=tS,T.over=y1,T.overArgs=_S,T.overEvery=w1,T.overSome=m1,T.partial=wl,T.partialRight=Og,T.partition=rS,T.pick=vR,T.pickBy=jg,T.property=Vg,T.propertyOf=E1,T.pull=tv,T.pullAll=_g,T.pullAllBy=rv,T.pullAllWith=nv,T.pullAt=iv,T.range=v1,T.rangeRight=S1,T.rearg=yS,T.reject=oS,T.remove=ov,T.rest=wS,T.reverse=bl,T.sampleSize=aS,T.set=RR,T.setWith=AR,T.shuffle=uS,T.slice=sv,T.sortBy=cS,T.sortedUniq=hv,T.sortedUniqBy=gv,T.split=KR,T.spread=mS,T.tail=pv,T.take=bv,T.takeRight=_v,T.takeRightWhile=yv,T.takeWhile=wv,T.tap=$v,T.throttle=ES,T.thru=za,T.toArray=Ng,T.toPairs=Ug,T.toPairsIn=kg,T.toPath=O1,T.toPlainObject=Mg,T.transform=TR,T.unary=vS,T.union=mv,T.unionBy=Ev,T.unionWith=vv,T.uniq=Sv,T.uniqBy=Rv,T.uniqWith=Av,T.unset=IR,T.unzip=_l,T.unzipWith=yg,T.update=OR,T.updateWith=CR,T.values=Ro,T.valuesIn=LR,T.without=Tv,T.words=Wg,T.wrap=SS,T.xor=Iv,T.xorBy=Ov,T.xorWith=Cv,T.zip=Lv,T.zipObject=Pv,T.zipObjectDeep=Bv,T.zipWith=Nv,T.entries=Ug,T.entriesIn=kg,T.extend=xg,T.extendWith=eu,Il(T,T),T.add=L1,T.attempt=qg,T.camelCase=$R,T.capitalize=Fg,T.ceil=P1,T.clamp=PR,T.clone=AS,T.cloneDeep=IS,T.cloneDeepWith=OS,T.cloneWith=TS,T.conformsTo=CS,T.deburr=Hg,T.defaultTo=f1,T.divide=B1,T.endsWith=MR,T.eq=tn,T.escape=xR,T.escapeRegExp=DR,T.every=qv,T.find=Gv,T.findIndex=hg,T.findKey=oR,T.findLast=zv,T.findLastIndex=gg,T.findLastKey=sR,T.floor=N1,T.forEach=mg,T.forEachRight=Eg,T.forIn=aR,T.forInRight=uR,T.forOwn=fR,T.forOwnRight=lR,T.get=vl,T.gt=LS,T.gte=PS,T.has=hR,T.hasIn=Sl,T.head=bg,T.identity=pr,T.includes=Zv,T.indexOf=zE,T.inRange=BR,T.invoke=bR,T.isArguments=Wi,T.isArray=Fe,T.isArrayBuffer=BS,T.isArrayLike=hr,T.isArrayLikeObject=It,T.isBoolean=NS,T.isBuffer=yi,T.isDate=$S,T.isElement=MS,T.isEmpty=xS,T.isEqual=DS,T.isEqualWith=jS,T.isError=ml,T.isFinite=US,T.isFunction=Gn,T.isInteger=Cg,T.isLength=Za,T.isMap=Lg,T.isMatch=kS,T.isMatchWith=FS,T.isNaN=HS,T.isNative=WS,T.isNil=VS,T.isNull=qS,T.isNumber=Pg,T.isObject=Et,T.isObjectLike=At,T.isPlainObject=bs,T.isRegExp=El,T.isSafeInteger=GS,T.isSet=Bg,T.isString=Qa,T.isSymbol=Rr,T.isTypedArray=So,T.isUndefined=zS,T.isWeakMap=KS,T.isWeakSet=JS,T.join=ZE,T.kebabCase=jR,T.last=jr,T.lastIndexOf=QE,T.lowerCase=UR,T.lowerFirst=kR,T.lt=YS,T.lte=XS,T.max=$1,T.maxBy=M1,T.mean=x1,T.meanBy=D1,T.min=j1,T.minBy=U1,T.stubArray=Cl,T.stubFalse=Ll,T.stubObject=R1,T.stubString=A1,T.stubTrue=T1,T.multiply=k1,T.nth=ev,T.noConflict=b1,T.noop=Ol,T.now=Ja,T.pad=FR,T.padEnd=HR,T.padStart=WR,T.parseInt=qR,T.random=NR,T.reduce=nS,T.reduceRight=iS,T.repeat=VR,T.replace=GR,T.result=SR,T.round=F1,T.runInContext=X,T.sample=sS,T.size=fS,T.snakeCase=zR,T.some=lS,T.sortedIndex=av,T.sortedIndexBy=uv,T.sortedIndexOf=fv,T.sortedLastIndex=lv,T.sortedLastIndexBy=cv,T.sortedLastIndexOf=dv,T.startCase=JR,T.startsWith=YR,T.subtract=H1,T.sum=W1,T.sumBy=q1,T.template=XR,T.times=I1,T.toFinite=zn,T.toInteger=We,T.toLength=$g,T.toLower=ZR,T.toNumber=Ur,T.toSafeInteger=ZS,T.toString=nt,T.toUpper=QR,T.trim=e1,T.trimEnd=t1,T.trimStart=r1,T.truncate=n1,T.unescape=i1,T.uniqueId=C1,T.upperCase=o1,T.upperFirst=Rl,T.each=mg,T.eachRight=Eg,T.first=bg,Il(T,function(){var n={};return yn(T,function(i,a){ot.call(T.prototype,a)||(n[a]=i)}),n}(),{chain:!1}),T.VERSION=o,Nr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){T[n].placeholder=T}),Nr(["drop","take"],function(n,i){Je.prototype[n]=function(a){a=a===r?1:xt(We(a),0);var c=this.__filtered__&&!i?new Je(this):this.clone();return c.__filtered__?c.__takeCount__=Jt(a,c.__takeCount__):c.__views__.push({size:Jt(a,se),type:n+(c.__dir__<0?"Right":"")}),c},Je.prototype[n+"Right"]=function(a){return this.reverse()[n](a).reverse()}}),Nr(["filter","map","takeWhile"],function(n,i){var a=i+1,c=a==$||a==J;Je.prototype[n]=function(y){var L=this.clone();return L.__iteratees__.push({iteratee:$e(y,3),type:a}),L.__filtered__=L.__filtered__||c,L}}),Nr(["head","last"],function(n,i){var a="take"+(i?"Right":"");Je.prototype[n]=function(){return this[a](1).value()[0]}}),Nr(["initial","tail"],function(n,i){var a="drop"+(i?"":"Right");Je.prototype[n]=function(){return this.__filtered__?new Je(this):this[a](1)}}),Je.prototype.compact=function(){return this.filter(pr)},Je.prototype.find=function(n){return this.filter(n).head()},Je.prototype.findLast=function(n){return this.reverse().find(n)},Je.prototype.invokeMap=Ve(function(n,i){return typeof n=="function"?new Je(this):this.map(function(a){return ls(a,n,i)})}),Je.prototype.reject=function(n){return this.filter(Xa($e(n)))},Je.prototype.slice=function(n,i){n=We(n);var a=this;return a.__filtered__&&(n>0||i<0)?new Je(a):(n<0?a=a.takeRight(-n):n&&(a=a.drop(n)),i!==r&&(i=We(i),a=i<0?a.dropRight(-i):a.take(i-n)),a)},Je.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Je.prototype.toArray=function(){return this.take(se)},yn(Je.prototype,function(n,i){var a=/^(?:filter|find|map|reject)|While$/.test(i),c=/^(?:head|last)$/.test(i),y=T[c?"take"+(i=="last"?"Right":""):i],L=c||/^find/.test(i);y&&(T.prototype[i]=function(){var k=this.__wrapped__,G=c?[1]:arguments,Q=k instanceof Je,ge=G[0],pe=Q||Fe(k),we=function(ze){var Ze=y.apply(T,ci([ze],G));return c&&Ae?Ze[0]:Ze};pe&&a&&typeof ge=="function"&&ge.length!=1&&(Q=pe=!1);var Ae=this.__chain__,Pe=!!this.__actions__.length,Me=L&&!Ae,qe=Q&&!Pe;if(!L&&pe){k=qe?k:new Je(this);var xe=n.apply(k,G);return xe.__actions__.push({func:za,args:[we],thisArg:r}),new Mr(xe,Ae)}return Me&&qe?n.apply(this,G):(xe=this.thru(we),Me?c?xe.value()[0]:xe.value():xe)})}),Nr(["pop","push","shift","sort","splice","unshift"],function(n){var i=wa[n],a=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",c=/^(?:pop|shift)$/.test(n);T.prototype[n]=function(){var y=arguments;if(c&&!this.__chain__){var L=this.value();return i.apply(Fe(L)?L:[],y)}return this[a](function(k){return i.apply(Fe(k)?k:[],y)})}}),yn(Je.prototype,function(n,i){var a=T[i];if(a){var c=a.name+"";ot.call(yo,c)||(yo[c]=[]),yo[c].push({name:i,func:a})}}),yo[ka(r,B).name]=[{name:"wrapper",func:r}],Je.prototype.clone=im,Je.prototype.reverse=om,Je.prototype.value=sm,T.prototype.at=Mv,T.prototype.chain=xv,T.prototype.commit=Dv,T.prototype.next=jv,T.prototype.plant=kv,T.prototype.reverse=Fv,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=Hv,T.prototype.first=T.prototype.head,ns&&(T.prototype[ns]=Uv),T},po=Dw();$t?(($t.exports=po)._=po,at._=po):De._=po}).call(Ye)})(Cu,Cu.exports);Cu.exports;$A();const Ss={IFRAME_STATUS:"iframe_status",CREATE_WINDOW:"create_window",CLOSE_WINDOW:"close_window",USER_LOGGED_IN:"user_logged_in",USER_LOGGED_OUT:"user_logged_out"},Sn={LOGOUT:"logout",WALLET_INSTANCE_ID:"wallet_instance_id",USER_INFO:"user_info",SET_PROVIDER:"set_provider",TOPUP:"topup",IFRAME_STATUS:"iframe_status",OPENED_WINDOW:"opened_window",CLOSED_WINDOW:"closed_window",GET_PROVIDER_STATE:"get_provider_state",LOGIN_WITH_PRIVATE_KEY:"login_with_private_key"},vB={GET_PROVIDER_STATE:"wallet_get_provider_state"},hc={ACCOUNTS_CHANGED:"wallet_accounts_changed",CHAIN_CHANGED:"wallet_chain_changed",UNLOCK_STATE_CHANGED:"wallet_unlock_state_changed"};function SB(e){return function(r,o,s){s(u=>{o.error&&Iu.warn(`Error in RPC response:
|
|
30
|
-
`,o),!r.isTorusInternal&&(Iu.info(`RPC (${e.origin}):`,r,"->",o),u())})}}var Ob;(function(e){e.approved="approved",e.cancelled="cancelled",e.confirmed="confirmed",e.failed="failed",e.finalized="finalized",e.processed="processed",e.rejected="rejected",e.signed="signed",e.submitted="submitted",e.unapproved="unapproved",e.dropped="dropped",e.expired="expired"})(Ob||(Ob={}));var Kc={exports:{}},Z0=Pn.EventEmitter,gc,Cb;function RB(){if(Cb)return gc;Cb=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=g(x,"string");return typeof v=="symbol"?v:String(v)}function g(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=_r,h=l.Buffer,b=ks,w=b.inspect,I=w&&w.custom||"inspect";function A(x,v,C){h.prototype.copy.call(x,v,C)}return gc=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 h.alloc(0);for(var B=h.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=h.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}(),gc}function AB(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,de.process.nextTick(Jc,this,e)):de.process.nextTick(Jc,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?de.process.nextTick(_u,r):(r._writableState.errorEmitted=!0,de.process.nextTick(Lb,r,u)):de.process.nextTick(Lb,r,u):t?(de.process.nextTick(_u,r),t(u)):de.process.nextTick(_u,r)}),this)}function Lb(e,t){Jc(e,t),_u(e)}function _u(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function TB(){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 Jc(e,t){e.emit("error",t)}function IB(e,t){var r=e._readableState,o=e._writableState;r&&r.autoDestroy||o&&o.autoDestroy?e.destroy(t):e.emit("error",t)}var Q0={destroy:AB,undestroy:TB,errorOrDestroy:IB},so={};function OB(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var ew={};function Kr(e,t,r){r||(r=Error);function o(u,f,g){return typeof t=="string"?t:t(u,f,g)}var s=function(u){OB(f,u);function f(g,l,h){return u.call(this,o(g,l,h))||this}return f}(r);s.prototype.name=r.name,s.prototype.code=e,ew[e]=s}function Pb(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 CB(e,t,r){return e.substr(0,t.length)===t}function LB(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function PB(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}Kr("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Kr("ERR_INVALID_ARG_TYPE",function(e,t,r){var o;typeof t=="string"&&CB(t,"not ")?(o="must not be",t=t.replace(/^not /,"")):o="must be";var s;if(LB(e," argument"))s="The ".concat(e," ").concat(o," ").concat(Pb(t,"type"));else{var u=PB(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(o," ").concat(Pb(t,"type"))}return s+=". Received type ".concat(typeof r),s},TypeError);Kr("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Kr("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Kr("ERR_STREAM_PREMATURE_CLOSE","Premature close");Kr("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Kr("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Kr("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Kr("ERR_STREAM_WRITE_AFTER_END","write after end");Kr("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Kr("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Kr("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");so.codes=ew;var BB=so.codes.ERR_INVALID_OPT_VALUE;function NB(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function $B(e,t,r,o){var s=NB(t,o,r);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var u=o?r:"highWaterMark";throw new BB(u,s)}return Math.floor(s)}return e.objectMode?16:16*1024}var tw={getHighWaterMark:$B},pc,Bb;function rw(){if(Bb)return pc;Bb=1,pc=ae;function e(R){var O=this;this.next=null,this.entry=null,this.finish=function(){be(O,R)}}var t;ae.WritableState=Z;var r={deprecate:Qb},o=Z0,s=_r.Buffer,u=(typeof Ye<"u"?Ye:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function f(R){return s.from(R)}function g(R){return s.isBuffer(R)||R instanceof u}var l=Q0,h=tw,b=h.getHighWaterMark,w=so.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;Bn(ae,o);function j(){}function Z(R,O,W){t=t||Fo(),R=R||{},typeof W!="boolean"&&(W=O instanceof t),this.objectMode=!!R.objectMode,W&&(this.objectMode=this.objectMode||!!R.writableObjectMode),this.highWaterMark=b(this,R,"writableHighWaterMark",W),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ie=R.decodeStrings===!1;this.decodeStrings=!ie,this.defaultEncoding=R.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ye){J(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)}Z.prototype.getBuffer=function(){for(var O=this.bufferedRequest,W=[];O;)W.push(O),O=O.next;return W},function(){try{Object.defineProperty(Z.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var le;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(le=Function.prototype[Symbol.hasInstance],Object.defineProperty(ae,Symbol.hasInstance,{value:function(O){return le.call(this,O)?!0:this!==ae?!1:O&&O._writableState instanceof Z}})):le=function(O){return O instanceof this};function ae(R){t=t||Fo();var O=this instanceof t;if(!O&&!le.call(ae,this))return new ae(R);this._writableState=new Z(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)}ae.prototype.pipe=function(){m(this,new v)};function ee(R,O){var W=new P;m(R,W),de.process.nextTick(O,W)}function Se(R,O,W,ie){var ye;return W===null?ye=new B:typeof W!="string"&&!O.objectMode&&(ye=new I("chunk",["string","Buffer"],W)),ye?(m(R,ye),de.process.nextTick(ie,ye),!1):!0}ae.prototype.write=function(R,O,W){var ie=this._writableState,ye=!1,d=!ie.objectMode&&g(R);return d&&!s.isBuffer(R)&&(R=f(R)),typeof O=="function"&&(W=O,O=null),d?O="buffer":O||(O=ie.defaultEncoding),typeof W!="function"&&(W=j),ie.ending?ee(this,W):(d||Se(this,ie,R,W))&&(ie.pendingcb++,ye=F(this,ie,d,R,O,W)),ye},ae.prototype.cork=function(){this._writableState.corked++},ae.prototype.uncork=function(){var R=this._writableState;R.corked&&(R.corked--,!R.writing&&!R.corked&&!R.bufferProcessing&&R.bufferedRequest&&H(this,R))},ae.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(ae.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function me(R,O,W){return!R.objectMode&&R.decodeStrings!==!1&&typeof O=="string"&&(O=s.from(O,W)),O}Object.defineProperty(ae.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function F(R,O,W,ie,ye,d){if(!W){var p=me(O,ie,ye);ie!==p&&(W=!0,ye="buffer",ie=p)}var _=O.objectMode?1:ie.length;O.length+=_;var E=O.length<O.highWaterMark;if(E||(O.needDrain=!0),O.writing||O.corked){var K=O.lastBufferedRequest;O.lastBufferedRequest={chunk:ie,encoding:ye,isBuf:W,callback:d,next:null},K?K.next=O.lastBufferedRequest:O.bufferedRequest=O.lastBufferedRequest,O.bufferedRequestCount+=1}else U(R,O,!1,_,ie,ye,d);return E}function U(R,O,W,ie,ye,d,p){O.writelen=ie,O.writecb=p,O.writing=!0,O.sync=!0,O.destroyed?O.onwrite(new C("write")):W?R._writev(ye,O.onwrite):R._write(ye,d,O.onwrite),O.sync=!1}function $(R,O,W,ie,ye){--O.pendingcb,W?(de.process.nextTick(ye,ie),de.process.nextTick(te,R,O),R._writableState.errorEmitted=!0,m(R,ie)):(ye(ie),R._writableState.errorEmitted=!0,m(R,ie),te(R,O))}function q(R){R.writing=!1,R.writecb=null,R.length-=R.writelen,R.writelen=0}function J(R,O){var W=R._writableState,ie=W.sync,ye=W.writecb;if(typeof ye!="function")throw new x;if(q(W),O)$(R,W,ie,O,ye);else{var d=z(W)||R.destroyed;!d&&!W.corked&&!W.bufferProcessing&&W.bufferedRequest&&H(R,W),ie?de.process.nextTick(V,R,W,d,ye):V(R,W,d,ye)}}function V(R,O,W,ie){W||re(R,O),O.pendingcb--,ie(),te(R,O)}function re(R,O){O.length===0&&O.needDrain&&(O.needDrain=!1,R.emit("drain"))}function H(R,O){O.bufferProcessing=!0;var W=O.bufferedRequest;if(R._writev&&W&&W.next){var ie=O.bufferedRequestCount,ye=new Array(ie),d=O.corkedRequestsFree;d.entry=W;for(var p=0,_=!0;W;)ye[p]=W,W.isBuf||(_=!1),W=W.next,p+=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(;W;){var E=W.chunk,K=W.encoding,ne=W.callback,oe=O.objectMode?1:E.length;if(U(R,O,!1,oe,E,K,ne),W=W.next,O.bufferedRequestCount--,O.writing)break}W===null&&(O.lastBufferedRequest=null)}O.bufferedRequest=W,O.bufferProcessing=!1}ae.prototype._write=function(R,O,W){W(new A("_write()"))},ae.prototype._writev=null,ae.prototype.end=function(R,O,W){var ie=this._writableState;return typeof R=="function"?(W=R,R=null,O=null):typeof O=="function"&&(W=O,O=null),R!=null&&this.write(R,O),ie.corked&&(ie.corked=1,this.uncork()),ie.ending||_e(this,ie,W),this},Object.defineProperty(ae.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function z(R){return R.ending&&R.length===0&&R.bufferedRequest===null&&!R.finished&&!R.writing}function se(R,O){R._final(function(W){O.pendingcb--,W&&m(R,W),O.prefinished=!0,R.emit("prefinish"),te(R,O)})}function ce(R,O){!O.prefinished&&!O.finalCalled&&(typeof R._final=="function"&&!O.destroyed?(O.pendingcb++,O.finalCalled=!0,de.process.nextTick(se,R,O)):(O.prefinished=!0,R.emit("prefinish")))}function te(R,O){var W=z(O);if(W&&(ce(R,O),O.pendingcb===0&&(O.finished=!0,R.emit("finish"),O.autoDestroy))){var ie=R._readableState;(!ie||ie.autoDestroy&&ie.endEmitted)&&R.destroy()}return W}function _e(R,O,W){O.ending=!0,te(R,O),W&&(O.finished?de.process.nextTick(W):R.once("finish",W)),O.ended=!0,R.writable=!1}function be(R,O,W){var ie=R.entry;for(R.entry=null;ie;){var ye=ie.callback;O.pendingcb--,ye(W),ie=ie.next}O.corkedRequestsFree.next=R}return Object.defineProperty(ae.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(O){this._writableState&&(this._writableState.destroyed=O)}}),ae.prototype.destroy=l.destroy,ae.prototype._undestroy=l.undestroy,ae.prototype._destroy=function(R,O){O(R)},pc}var bc,Nb;function Fo(){if(Nb)return bc;Nb=1;var e=Object.keys||function(h){var b=[];for(var w in h)b.push(w);return b};bc=f;var t=iw(),r=rw();Bn(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(h){if(!(this instanceof f))return new f(h);t.call(this,h),r.call(this,h),this.allowHalfOpen=!0,h&&(h.readable===!1&&(this.readable=!1),h.writable===!1&&(this.writable=!1),h.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",g)))}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 g(){this._writableState.ended||de.process.nextTick(l,this)}function l(h){h.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)}}),bc}var $b=so.codes.ERR_STREAM_PREMATURE_CLOSE;function MB(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 xB(){}function DB(e){return e.setHeader&&typeof e.abort=="function"}function nw(e,t,r){if(typeof t=="function")return nw(e,null,t);t||(t={}),r=MB(r||xB);var o=t.readable||t.readable!==!1&&e.readable,s=t.writable||t.writable!==!1&&e.writable,u=function(){e.writable||g()},f=e._writableState&&e._writableState.finished,g=function(){s=!1,f=!0,o||r.call(e)},l=e._readableState&&e._readableState.endEmitted,h=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 $b),r.call(e,x);if(s&&!f)return(!e._writableState||!e._writableState.ended)&&(x=new $b),r.call(e,x)},I=function(){e.req.on("finish",g)};return DB(e)?(e.on("complete",g),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",h),e.on("finish",g),t.error!==!1&&e.on("error",b),e.on("close",w),function(){e.removeListener("complete",g),e.removeListener("abort",w),e.removeListener("request",I),e.req&&e.req.removeListener("finish",g),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",g),e.removeListener("end",h),e.removeListener("error",b),e.removeListener("close",w)}}var Ud=nw,_c,Mb;function jB(){if(Mb)return _c;Mb=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 Z=j.call(S,m);if(typeof Z!="object")return Z;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(S)}var s=Ud,u=Symbol("lastResolve"),f=Symbol("lastReject"),g=Symbol("error"),l=Symbol("ended"),h=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[h]=null,S[u]=null,S[f]=null,m(I(j,!1)))}}function x(S){de.process.nextTick(A,S)}function v(S,m){return function(j,Z){S.then(function(){if(m[l]){j(I(void 0,!0));return}m[b](j,Z)},Z)}}var C=Object.getPrototypeOf(function(){}),B=Object.setPrototypeOf((e={get stream(){return this[w]},next:function(){var m=this,j=this[g];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(ee,Se){de.process.nextTick(function(){m[g]?Se(m[g]):ee(I(void 0,!0))})});var Z=this[h],le;if(Z)le=new Promise(v(Z,this));else{var ae=this[w].read();if(ae!==null)return Promise.resolve(I(ae,!1));le=new Promise(this[b])}return this[h]=le,le}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var m=this;return new Promise(function(j,Z){m[w].destroy(null,function(le){if(le){Z(le);return}j(I(void 0,!0))})})}),e),C),P=function(m){var j,Z=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,g,{value:null,writable:!0}),t(j,l,{value:m._readableState.endEmitted,writable:!0}),t(j,b,{value:function(ae,ee){var Se=Z[w].read();Se?(Z[h]=null,Z[u]=null,Z[f]=null,ae(I(Se,!1))):(Z[u]=ae,Z[f]=ee)},writable:!0}),j));return Z[h]=null,s(m,function(le){if(le&&le.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ae=Z[f];ae!==null&&(Z[h]=null,Z[u]=null,Z[f]=null,ae(le)),Z[g]=le;return}var ee=Z[u];ee!==null&&(Z[h]=null,Z[u]=null,Z[f]=null,ee(I(void 0,!0))),Z[l]=!0}),m.on("readable",x.bind(null,Z)),Z};return _c=P,_c}var yc,xb;function UB(){return xb||(xb=1,yc=function(){throw new Error("Readable.from is not available in the browser")}),yc}var wc,Db;function iw(){if(Db)return wc;Db=1,wc=ee;var e;ee.ReadableState=ae,Pn.EventEmitter;var t=function(p,_){return p.listeners(_).length},r=Z0,o=_r.Buffer,s=(typeof Ye<"u"?Ye: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 g=ks,l;g&&g.debuglog?l=g.debuglog("stream"):l=function(){};var h=RB(),b=Q0,w=tw,I=w.getHighWaterMark,A=so.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;Bn(ee,r);var j=b.errorOrDestroy,Z=["error","close","destroy","pause","resume"];function le(d,p,_){if(typeof d.prependListener=="function")return d.prependListener(p,_);!d._events||!d._events[p]?d.on(p,_):Array.isArray(d._events[p])?d._events[p].unshift(_):d._events[p]=[_,d._events[p]]}function ae(d,p,_){e=e||Fo(),d=d||{},typeof _!="boolean"&&(_=p instanceof e),this.objectMode=!!d.objectMode,_&&(this.objectMode=this.objectMode||!!d.readableObjectMode),this.highWaterMark=I(this,d,"readableHighWaterMark",_),this.buffer=new h,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=Ls().StringDecoder),this.decoder=new P(d.encoding),this.encoding=d.encoding)}function ee(d){if(e=e||Fo(),!(this instanceof ee))return new ee(d);var p=this instanceof e;this._readableState=new ae(d,this,p),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(ee.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(p){this._readableState&&(this._readableState.destroyed=p)}}),ee.prototype.destroy=b.destroy,ee.prototype._undestroy=b.undestroy,ee.prototype._destroy=function(d,p){p(d)},ee.prototype.push=function(d,p){var _=this._readableState,E;return _.objectMode?E=!0:typeof d=="string"&&(p=p||_.defaultEncoding,p!==_.encoding&&(d=o.from(d,p),p=""),E=!0),Se(this,d,p,!1,E)},ee.prototype.unshift=function(d){return Se(this,d,null,!0,!1)};function Se(d,p,_,E,K){l("readableAddChunk",p);var ne=d._readableState;if(p===null)ne.reading=!1,J(d,ne);else{var oe;if(K||(oe=F(ne,p)),oe)j(d,oe);else if(ne.objectMode||p&&p.length>0)if(typeof p!="string"&&!ne.objectMode&&Object.getPrototypeOf(p)!==o.prototype&&(p=u(p)),E)ne.endEmitted?j(d,new B):me(d,ne,p,!0);else if(ne.ended)j(d,new v);else{if(ne.destroyed)return!1;ne.reading=!1,ne.decoder&&!_?(p=ne.decoder.write(p),ne.objectMode||p.length!==0?me(d,ne,p,!1):H(d,ne)):me(d,ne,p,!1)}else E||(ne.reading=!1,H(d,ne))}return!ne.ended&&(ne.length<ne.highWaterMark||ne.length===0)}function me(d,p,_,E){p.flowing&&p.length===0&&!p.sync?(p.awaitDrain=0,d.emit("data",_)):(p.length+=p.objectMode?1:_.length,E?p.buffer.unshift(_):p.buffer.push(_),p.needReadable&&V(d)),H(d,p)}function F(d,p){var _;return!f(p)&&typeof p!="string"&&p!==void 0&&!d.objectMode&&(_=new x("chunk",["string","Buffer","Uint8Array"],p)),_}ee.prototype.isPaused=function(){return this._readableState.flowing===!1},ee.prototype.setEncoding=function(d){P||(P=Ls().StringDecoder);var p=new P(d);this._readableState.decoder=p,this._readableState.encoding=this._readableState.decoder.encoding;for(var _=this._readableState.buffer.head,E="";_!==null;)E+=p.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 q(d,p){return d<=0||p.length===0&&p.ended?0:p.objectMode?1:d!==d?p.flowing&&p.length?p.buffer.head.data.length:p.length:(d>p.highWaterMark&&(p.highWaterMark=$(d)),d<=p.length?d:p.ended?p.length:(p.needReadable=!0,0))}ee.prototype.read=function(d){l("read",d),d=parseInt(d,10);var p=this._readableState,_=d;if(d!==0&&(p.emittedReadable=!1),d===0&&p.needReadable&&((p.highWaterMark!==0?p.length>=p.highWaterMark:p.length>0)||p.ended))return l("read: emitReadable",p.length,p.ended),p.length===0&&p.ended?W(this):V(this),null;if(d=q(d,p),d===0&&p.ended)return p.length===0&&W(this),null;var E=p.needReadable;l("need readable",E),(p.length===0||p.length-d<p.highWaterMark)&&(E=!0,l("length less than watermark",E)),p.ended||p.reading?(E=!1,l("reading or ended",E)):E&&(l("do read"),p.reading=!0,p.sync=!0,p.length===0&&(p.needReadable=!0),this._read(p.highWaterMark),p.sync=!1,p.reading||(d=q(_,p)));var K;return d>0?K=O(d,p):K=null,K===null?(p.needReadable=p.length<=p.highWaterMark,d=0):(p.length-=d,p.awaitDrain=0),p.length===0&&(p.ended||(p.needReadable=!0),_!==d&&p.ended&&W(this)),K!==null&&this.emit("data",K),K};function J(d,p){if(l("onEofChunk"),!p.ended){if(p.decoder){var _=p.decoder.end();_&&_.length&&(p.buffer.push(_),p.length+=p.objectMode?1:_.length)}p.ended=!0,p.sync?V(d):(p.needReadable=!1,p.emittedReadable||(p.emittedReadable=!0,re(d)))}}function V(d){var p=d._readableState;l("emitReadable",p.needReadable,p.emittedReadable),p.needReadable=!1,p.emittedReadable||(l("emitReadable",p.flowing),p.emittedReadable=!0,de.process.nextTick(re,d))}function re(d){var p=d._readableState;l("emitReadable_",p.destroyed,p.length,p.ended),!p.destroyed&&(p.length||p.ended)&&(d.emit("readable"),p.emittedReadable=!1),p.needReadable=!p.flowing&&!p.ended&&p.length<=p.highWaterMark,R(d)}function H(d,p){p.readingMore||(p.readingMore=!0,de.process.nextTick(z,d,p))}function z(d,p){for(;!p.reading&&!p.ended&&(p.length<p.highWaterMark||p.flowing&&p.length===0);){var _=p.length;if(l("maybeReadMore read 0"),d.read(0),_===p.length)break}p.readingMore=!1}ee.prototype._read=function(d){j(this,new C("_read()"))},ee.prototype.pipe=function(d,p){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,p);var K=(!p||p.end!==!1)&&d!==de.process.stdout&&d!==de.process.stderr,ne=K?Ie:yt;E.endEmitted?de.process.nextTick(ne):_.once("end",ne),d.on("unpipe",oe);function oe(Xe,Ge){l("onunpipe"),Xe===_&&Ge&&Ge.hasUnpiped===!1&&(Ge.hasUnpiped=!0,Ue())}function Ie(){l("onend"),d.end()}var Be=se(_);d.on("drain",Be);var Ce=!1;function Ue(){l("cleanup"),d.removeListener("close",_t),d.removeListener("finish",tt),d.removeListener("drain",Be),d.removeListener("error",He),d.removeListener("unpipe",oe),_.removeListener("end",Ie),_.removeListener("end",yt),_.removeListener("data",Re),Ce=!0,E.awaitDrain&&(!d._writableState||d._writableState.needDrain)&&Be()}_.on("data",Re);function Re(Xe){l("ondata");var Ge=d.write(Xe);l("dest.write",Ge),Ge===!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(Xe){l("onerror",Xe),yt(),d.removeListener("error",He),t(d,"error")===0&&j(d,Xe)}le(d,"error",He);function _t(){d.removeListener("finish",tt),yt()}d.once("close",_t);function tt(){l("onfinish"),d.removeListener("close",_t),yt()}d.once("finish",tt);function yt(){l("unpipe"),_.unpipe(d)}return d.emit("pipe",_),E.flowing||(l("pipe resume"),_.resume()),d};function se(d){return function(){var _=d._readableState;l("pipeOnDrain",_.awaitDrain),_.awaitDrain&&_.awaitDrain--,_.awaitDrain===0&&t(d,"data")&&(_.flowing=!0,R(d))}}ee.prototype.unpipe=function(d){var p=this._readableState,_={hasUnpiped:!1};if(p.pipesCount===0)return this;if(p.pipesCount===1)return d&&d!==p.pipes?this:(d||(d=p.pipes),p.pipes=null,p.pipesCount=0,p.flowing=!1,d&&d.emit("unpipe",this,_),this);if(!d){var E=p.pipes,K=p.pipesCount;p.pipes=null,p.pipesCount=0,p.flowing=!1;for(var ne=0;ne<K;ne++)E[ne].emit("unpipe",this,{hasUnpiped:!1});return this}var oe=ye(p.pipes,d);return oe===-1?this:(p.pipes.splice(oe,1),p.pipesCount-=1,p.pipesCount===1&&(p.pipes=p.pipes[0]),d.emit("unpipe",this,_),this)},ee.prototype.on=function(d,p){var _=r.prototype.on.call(this,d,p),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||de.process.nextTick(te,this)),_},ee.prototype.addListener=ee.prototype.on,ee.prototype.removeListener=function(d,p){var _=r.prototype.removeListener.call(this,d,p);return d==="readable"&&de.process.nextTick(ce,this),_},ee.prototype.removeAllListeners=function(d){var p=r.prototype.removeAllListeners.apply(this,arguments);return(d==="readable"||d===void 0)&&de.process.nextTick(ce,this),p};function ce(d){var p=d._readableState;p.readableListening=d.listenerCount("readable")>0,p.resumeScheduled&&!p.paused?p.flowing=!0:d.listenerCount("data")>0&&d.resume()}function te(d){l("readable nexttick read 0"),d.read(0)}ee.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,p){p.resumeScheduled||(p.resumeScheduled=!0,de.process.nextTick(be,d,p))}function be(d,p){l("resume",p.reading),p.reading||d.read(0),p.resumeScheduled=!1,d.emit("resume"),R(d),p.flowing&&!p.reading&&d.read(0)}ee.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 p=d._readableState;for(l("flow",p.flowing);p.flowing&&d.read()!==null;);}ee.prototype.wrap=function(d){var p=this,_=this._readableState,E=!1;d.on("end",function(){if(l("wrapped end"),_.decoder&&!_.ended){var oe=_.decoder.end();oe&&oe.length&&p.push(oe)}p.push(null)}),d.on("data",function(oe){if(l("wrapped data"),_.decoder&&(oe=_.decoder.write(oe)),!(_.objectMode&&oe==null)&&!(!_.objectMode&&(!oe||!oe.length))){var Ie=p.push(oe);Ie||(E=!0,d.pause())}});for(var K in d)this[K]===void 0&&typeof d[K]=="function"&&(this[K]=function(Ie){return function(){return d[Ie].apply(d,arguments)}}(K));for(var ne=0;ne<Z.length;ne++)d.on(Z[ne],this.emit.bind(this,Z[ne]));return this._read=function(oe){l("wrapped _read",oe),E&&(E=!1,d.resume())},this},typeof Symbol=="function"&&(ee.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=jB()),S(this)}),Object.defineProperty(ee.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(ee.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(ee.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(p){this._readableState&&(this._readableState.flowing=p)}}),ee._fromList=O,Object.defineProperty(ee.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function O(d,p){if(p.length===0)return null;var _;return p.objectMode?_=p.buffer.shift():!d||d>=p.length?(p.decoder?_=p.buffer.join(""):p.buffer.length===1?_=p.buffer.first():_=p.buffer.concat(p.length),p.buffer.clear()):_=p.buffer.consume(d,p.decoder),_}function W(d){var p=d._readableState;l("endReadable",p.endEmitted),p.endEmitted||(p.ended=!0,de.process.nextTick(ie,p,d))}function ie(d,p){if(l("endReadableNT",d.endEmitted,d.length),!d.endEmitted&&d.length===0&&(d.endEmitted=!0,p.readable=!1,p.emit("end"),d.autoDestroy)){var _=p._writableState;(!_||_.autoDestroy&&_.finished)&&p.destroy()}}typeof Symbol=="function"&&(ee.from=function(d,p){return m===void 0&&(m=UB()),m(ee,d,p)});function ye(d,p){for(var _=0,E=d.length;_<E;_++)if(d[_]===p)return _;return-1}return wc}var ow=ni,hf=so.codes,kB=hf.ERR_METHOD_NOT_IMPLEMENTED,FB=hf.ERR_MULTIPLE_CALLBACK,HB=hf.ERR_TRANSFORM_ALREADY_TRANSFORMING,WB=hf.ERR_TRANSFORM_WITH_LENGTH_0,gf=Fo();Bn(ni,gf);function qB(e,t){var r=this._transformState;r.transforming=!1;var o=r.writecb;if(o===null)return this.emit("error",new FB);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 ni(e){if(!(this instanceof ni))return new ni(e);gf.call(this,e),this._transformState={afterTransform:qB.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",VB)}function VB(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){jb(e,t,r)}):jb(this,null,null)}ni.prototype.push=function(e,t){return this._transformState.needTransform=!1,gf.prototype.push.call(this,e,t)};ni.prototype._transform=function(e,t,r){r(new kB("_transform()"))};ni.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)}};ni.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};ni.prototype._destroy=function(e,t){gf.prototype._destroy.call(this,e,function(r){t(r)})};function jb(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new WB;if(e._transformState.transforming)throw new HB;return e.push(null)}var GB=Us,sw=ow;Bn(Us,sw);function Us(e){if(!(this instanceof Us))return new Us(e);sw.call(this,e)}Us.prototype._transform=function(e,t,r){r(null,e)};var mc;function zB(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var aw=so.codes,KB=aw.ERR_MISSING_ARGS,JB=aw.ERR_STREAM_DESTROYED;function Ub(e){if(e)throw e}function YB(e){return e.setHeader&&typeof e.abort=="function"}function XB(e,t,r,o){o=zB(o);var s=!1;e.on("close",function(){s=!0}),mc===void 0&&(mc=Ud),mc(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,YB(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();o(f||new JB("pipe"))}}}function kb(e){e()}function ZB(e,t){return e.pipe(t)}function QB(e){return!e.length||typeof e[e.length-1]!="function"?Ub:e.pop()}function eN(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o=QB(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new KB("streams");var s,u=t.map(function(f,g){var l=g<t.length-1,h=g>0;return XB(f,l,h,function(b){s||(s=b),b&&u.forEach(kb),!l&&(u.forEach(kb),o(s))})});return t.reduce(ZB)}var tN=eN;(function(e,t){t=e.exports=iw(),t.Stream=t,t.Readable=t,t.Writable=rw(),t.Duplex=Fo(),t.Transform=ow,t.PassThrough=GB,t.finished=Ud,t.pipeline=tN})(Kc,Kc.exports);var pf=Kc.exports,rN=X1();const nN=Oi(rN);var iN={exports:{}},kd={},Fd={};Object.defineProperty(Fd,"__esModule",{value:!0});function oN(e){var t=4,r=e.length,o=r%t;if(!o)return e;var s=r,u=t-o,f=r+u,g=de.Buffer.alloc(f);for(g.write(e);u--;)g.write("=",s++);return g.toString()}Fd.default=oN;Object.defineProperty(kd,"__esModule",{value:!0});var sN=Fd;function uw(e,t){return t===void 0&&(t="utf8"),de.Buffer.isBuffer(e)?Yc(e.toString("base64")):Yc(de.Buffer.from(e,t).toString("base64"))}function aN(e,t){return t===void 0&&(t="utf8"),de.Buffer.from(Hd(e),"base64").toString(t)}function Hd(e){return e=e.toString(),sN.default(e).replace(/\-/g,"+").replace(/_/g,"/")}function Yc(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function uN(e){return de.Buffer.from(Hd(e),"base64")}var Go=uw;Go.encode=uw;Go.decode=aN;Go.toBase64=Hd;Go.fromBase64=Yc;Go.toBuffer=uN;kd.default=Go;(function(e){e.exports=kd.default,e.exports.default=e.exports})(iN);const fN=()=>nN(32).toString("hex");function lu(){}const Fb="SYN",Ec="ACK",Hb="BRK";class Wb extends pf.Duplex{constructor(t){let{name:r,target:o,targetWindow:s=window,targetOrigin:u="*"}=t;if(super({objectMode:!0}),Ne(this,"_init",void 0),Ne(this,"_haveSyn",void 0),Ne(this,"_name",void 0),Ne(this,"_target",void 0),Ne(this,"_targetWindow",void 0),Ne(this,"_targetOrigin",void 0),Ne(this,"_onMessage",void 0),Ne(this,"_synIntervalId",void 0),!r||!o)throw new Error("Invalid input.");this._init=!1,this._haveSyn=!1,this._name=r,this._target=o,this._targetWindow=s,this._targetOrigin=u,this._onMessage=this.onMessage.bind(this),this._synIntervalId=null,window.addEventListener("message",this._onMessage,!1),this._handShake()}_break(){this.cork(),this._write(Hb,null,lu),this._haveSyn=!1,this._init=!1}_handShake(){this._write(Fb,null,lu),this.cork()}_onData(t){if(!this._init)t===Fb?(this._haveSyn=!0,this._write(Ec,null,lu)):t===Ec&&(this._init=!0,this._haveSyn||this._write(Ec,null,lu),this.uncork());else if(t===Hb)this._break();else try{this.push(t)}catch(r){this.emit("error",r)}}_postMessage(t){const r=this._targetOrigin;this._targetWindow.postMessage({target:this._target,data:t},r)}onMessage(t){const r=t.data;this._targetOrigin!=="*"&&t.origin!==this._targetOrigin||t.source!==this._targetWindow||typeof r!="object"||r.target!==this._name||!r.data||this._onData(r.data)}_read(){}_write(t,r,o){this._postMessage(t),o()}_destroy(){window.removeEventListener("message",this._onMessage,!1)}}function qb(e,t,r){try{Reflect.apply(e,t,r)}catch(o){setTimeout(()=>{throw o})}}function lN(e){const t=e.length,r=new Array(t);for(let o=0;o<t;o+=1)r[o]=e[o];return r}class bf extends Pn.EventEmitter{emit(t){let r=t==="error";const o=this._events;if(o!==void 0)r=r&&o.error===void 0;else if(!r)return!1;for(var s=arguments.length,u=new Array(s>1?s-1:0),f=1;f<s;f++)u[f-1]=arguments[f];if(r){let l;if(u.length>0&&([l]=u),l instanceof Error)throw l;const h=new Error(`Unhandled error.${l?` (${l.message})`:""}`);throw h.context=l,h}const g=o[t];if(g===void 0)return!1;if(typeof g=="function")qb(g,this,u);else{const l=g.length,h=lN(g);for(let b=0;b<l;b+=1)qb(h[b],this,u)}return!0}}class Rs extends Error{constructor(t){let{code:r,message:o,data:s}=t;if(!Number.isInteger(r))throw new Error("code must be an integer");if(!o||typeof o!="string")throw new Error("message must be string");super(o),Ne(this,"code",void 0),Ne(this,"data",void 0),this.code=r,s!==void 0&&(this.data=s)}toString(){return kA({code:this.code,message:this.message,data:this.data,stack:this.stack})}}const Xc=function(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return(o,s)=>{o||s.error?t(o||s.error):!r||Array.isArray(s)?e(s):e(s.result)}};function cN(){const e={};function t(){return!1}const r=new bf;function o(l){const h=e[l.id];if(!h)throw new Error(`StreamMiddleware - Unknown response id "${l.id}"`);delete e[l.id],Object.assign(h.res,l),setTimeout(h.end)}function s(l){r.emit("notification",l)}function u(l,h,b){let w;try{!l.id?s(l):o(l)}catch(I){w=I}b(w)}const f=new pf.Duplex({objectMode:!0,read:t,write:u});return{events:r,middleware:(l,h,b,w)=>{f.push(l),e[l.id]={req:l,res:h,next:b,end:w}},stream:f}}function dN(){return(e,t,r,o)=>{const s=e.id,u=fN();e.id=u,t.id=u,r(f=>{e.id=s,t.id=s,f()})}}function Vb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,o)}return r}function hN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vb(Object(r),!0).forEach(function(o){Ne(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vb(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}class Zn extends bf{constructor(){super(),Ne(this,"_middleware",void 0),this._middleware=[]}static async _runAllMiddleware(t,r,o){const s=[];let u=null,f=!1;for(const g of o)if([u,f]=await Zn._runMiddleware(t,r,g,s),f)break;return[u,f,s.reverse()]}static _runMiddleware(t,r,o,s){return new Promise(u=>{const f=l=>{const h=l||r.error;h&&(r.error=sn.serializeError(h)),u([h,!0])},g=l=>{r.error?f(r.error):(l&&(typeof l!="function"&&f(new Rs({code:-32603,message:"JRPCEngine: 'next' return handlers must be functions"})),s.push(l)),u([null,!1]))};try{o(t,r,g,f)}catch(l){f(l)}})}static async _runReturnHandlers(t){for(const r of t)await new Promise((o,s)=>{r(u=>u?s(u):o())})}static _checkForCompletion(t,r,o){if(!("result"in r)&&!("error"in r))throw new Rs({code:-32603,message:"Response has no error or result for request"});if(!o)throw new Rs({code:-32603,message:"Nothing ended request"})}push(t){this._middleware.push(t)}handle(t,r){if(r&&typeof r!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(t)?r?this._handleBatch(t,r):this._handleBatch(t):r?this._handle(t,r):this._promiseHandle(t)}asMiddleware(){return async(t,r,o,s)=>{try{const[u,f,g]=await Zn._runAllMiddleware(t,r,this._middleware);return f?(await Zn._runReturnHandlers(g),s(u)):o(async l=>{try{await Zn._runReturnHandlers(g)}catch(h){return l(h)}return l()})}catch(u){return s(u)}}}async _handleBatch(t,r){try{const o=await Promise.all(t.map(this._promiseHandle.bind(this)));return r?r(null,o):o}catch(o){if(r)return r(o);throw o}}_promiseHandle(t){return new Promise(r=>{this._handle(t,(o,s)=>{r(s)})})}async _handle(t,r){if(!t||Array.isArray(t)||typeof t!="object"){const f=new Rs({code:-32603,message:"request must be plain object"});return r(f,{id:void 0,jsonrpc:"2.0",error:f})}if(typeof t.method!="string"){const f=new Rs({code:-32603,message:"method must be string"});return r(f,{id:t.id,jsonrpc:"2.0",error:f})}const o=hN({},t),s={id:o.id,jsonrpc:o.jsonrpc};let u=null;try{await this._processRequest(o,s)}catch(f){u=f}return u&&(delete s.result,s.error||(s.error=sn.serializeError(u))),r(u,s)}async _processRequest(t,r){const[o,s,u]=await Zn._runAllMiddleware(t,r,this._middleware);if(Zn._checkForCompletion(t,r,s),await Zn._runReturnHandlers(u),o)throw o}}class gN extends pf.Duplex{constructor(t){let{parent:r,name:o}=t;super({objectMode:!0}),Ne(this,"_parent",void 0),Ne(this,"_name",void 0),this._parent=r,this._name=o}_read(){}_write(t,r,o){this._parent.push({name:this._name,data:t}),o()}}function Gb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,o)}return r}function zb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gb(Object(r),!0).forEach(function(o){Ne(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gb(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}const Kb=Symbol("IGNORE_SUBSTREAM");class pN extends pf.Duplex{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(zb(zb({},t),{},{objectMode:!0})),Ne(this,"_substreams",void 0),Ne(this,"getStream",void 0),this._substreams={}}createStream(t){if(!t)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[t])throw new Error(`ObjectMultiplex - Substream for name "${t}" already exists`);const r=new gN({parent:this,name:t});return this._substreams[t]=r,bN(this,o=>r.destroy(o||void 0)),r}ignoreStream(t){if(!t)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[t])throw new Error(`ObjectMultiplex - Substream for name "${t}" already exists`);this._substreams[t]=Kb}_read(){}_write(t,r,o){const{name:s,data:u}=t;if(!s)return window.console.warn(`ObjectMultiplex - malformed chunk without name "${t}"`),o();const f=this._substreams[s];return f?(f!==Kb&&f.push(u),o()):(window.console.warn(`ObjectMultiplex - orphaned data for stream "${s}"`),o())}}function bN(e,t){const r=vL(t);hb(e,{readable:!1},r),hb(e,{writable:!1},r)}const Cn=e=>e!==null&&typeof e=="object"&&typeof e.pipe=="function";Cn.writable=e=>Cn(e)&&e.writable!==!1&&typeof e._write=="function"&&typeof e._writableState=="object";Cn.readable=e=>Cn(e)&&e.readable!==!1&&typeof e._read=="function"&&typeof e._readableState=="object";Cn.duplex=e=>Cn.writable(e)&&Cn.readable(e);Cn.transform=e=>Cn.duplex(e)&&typeof e._transform=="function";var _N=Cn,yN=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,s,u;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(s=o;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(u=Object.keys(t),o=u.length,o!==Object.keys(r).length)return!1;for(s=o;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,u[s]))return!1;for(s=o;s--!==0;){var f=u[s];if(!e(t[f],r[f]))return!1}return!0}return t!==t&&r!==r};const wN=Oi(yN);var mN="0.3.4",In={errors:{disconnected:()=>"Torus: Lost connection to Torus.",permanentlyDisconnected:()=>"Torus: Disconnected from iframe. Page reload required.",unsupportedSync:e=>`Torus: The Torus Ethereum provider does not support synchronous methods like ${e} without a callback parameter.`,invalidDuplexStream:()=>"Must provide a Node.js-style duplex stream.",invalidOptions:e=>`Invalid options. Received: { maxEventListeners: ${e}}`,invalidRequestArgs:()=>"Expected a single, non-array, object argument.",invalidRequestMethod:()=>"'args.method' must be a non-empty string.",invalidRequestParams:()=>"'args.params' must be an object or array if provided.",invalidLoggerObject:()=>"'args.logger' must be an object if provided.",invalidLoggerMethod:e=>`'args.logger' must include required method '${e}'.`},info:{connected:e=>`Torus: Connected to chain with ID "${e}".`}};const EN={PRODUCTION:"production"},Ts={BOTTOM_LEFT:"bottom-left",TOP_LEFT:"top-left",BOTTOM_RIGHT:"bottom-right",TOP_RIGHT:"top-right"},vN={en:{embed:{continue:"Continue",actionRequired:"Authorization required",pendingAction:"Click continue to proceed with your request in a popup",cookiesRequired:"Cookies Required",enableCookies:"Please enable cookies in your browser preferences to access Torus",clickHere:"More Info"}},de:{embed:{continue:"Fortsetzen",actionRequired:"Autorisierung erforderlich",pendingAction:"Klicken Sie in einem Popup auf Weiter, um mit Ihrer Anfrage fortzufahren",cookiesRequired:"Cookies benötigt",enableCookies:"Bitte aktivieren Sie Cookies in Ihren Browsereinstellungen, um auf Torus zuzugreifen",clickHere:"Mehr Info"}},ja:{embed:{continue:"継続する",actionRequired:"認証が必要です",pendingAction:"続行をクリックして、ポップアップでリクエストを続行します",cookiesRequired:"必要なクッキー",enableCookies:"Torusにアクセスするには、ブラウザの設定でCookieを有効にしてください。",clickHere:"詳しくは"}},ko:{embed:{continue:"계속하다",actionRequired:"승인 필요",pendingAction:"팝업에서 요청을 진행하려면 계속을 클릭하십시오.",cookiesRequired:"쿠키 필요",enableCookies:"브라우저 환경 설정에서 쿠키를 활성화하여 Torus에 액세스하십시오.",clickHere:"더 많은 정보"}},zh:{embed:{continue:"继续",actionRequired:"需要授权",pendingAction:"单击继续以在弹出窗口中继续您的请求",cookiesRequired:"必填Cookie",enableCookies:"请在您的浏览器首选项中启用cookie以访问Torus。",clickHere:"更多信息"}}};var Wd={translations:vN,localStorageKeyPrefix:"torus-"},ct=Iu.getLogger("solana-embed");function SN(){return(e,t,r)=>{(typeof e.method!="string"||!e.method)&&(t.error=sn.ethErrors.rpc.invalidRequest({message:"The request 'method' must be a non-empty string.",data:e})),r(o=>{const{error:s}=t;return s&&ct.error(`Torus - RPC Error: ${s.message}`,s),o()})}}function RN(e,t,r){let o=`Torus: Lost connection to "${e}".`;t!=null&&t.stack&&(o+=`
|
|
31
|
-
${t.stack}`),ct.warn(o),r&&r.listenerCount("error")>0&&r.emit("error",o)}const cu=()=>Math.random().toString(36).slice(2),fw=async e=>{let t,r;switch(e){case"testing":t="https://solana-testing.tor.us",r="debug";break;case"development":t="http://localhost:8080",r="debug";break;default:t="https://solana.tor.us",r="error";break}return{torusUrl:t,logLevel:r}},AN=()=>{let e=window.navigator.language||"en-US";const t=e.split("-");return e=Object.prototype.hasOwnProperty.call(Wd.translations,t[0])?t[0]:"en",e},TN={height:660,width:375},IN={height:740,width:1315},ON={height:700,width:1200},lw={height:600,width:400};function CN(e){let t;try{t=window[e];const r="__storage_test__";return t.setItem(r,r),t.removeItem(r),!0}catch(r){return r&&(r.code===22||r.code===1014||r.name==="QuotaExceededError"||r.name==="NS_ERROR_DOM_QUOTA_REACHED")&&t&&t.length!==0}}function Cs(e){let{width:t,height:r}=e;const o=window.screenLeft!==void 0?window.screenLeft:window.screenX,s=window.screenTop!==void 0?window.screenTop:window.screenY,u=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:window.screen.width,f=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:window.screen.height,g=1,l=Math.abs((u-t)/2/g+o),h=Math.abs((f-r)/2/g+s);return`titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=${r/g},width=${t/g},top=${h},left=${l}`}class cw extends bf{constructor(t,r){let{maxEventListeners:o=100,jsonRpcStreamName:s="provider"}=r;if(super(),Ne(this,"isTorus",void 0),Ne(this,"_rpcEngine",void 0),Ne(this,"jsonRpcConnectionEvents",void 0),Ne(this,"_state",void 0),!_N.duplex(t))throw new Error(In.errors.invalidDuplexStream());this.isTorus=!0,this.setMaxListeners(o),this._handleConnect=this._handleConnect.bind(this),this._handleDisconnect=this._handleDisconnect.bind(this),this._handleStreamDisconnect=this._handleStreamDisconnect.bind(this),this._rpcRequest=this._rpcRequest.bind(this),this._initializeState=this._initializeState.bind(this),this.request=this.request.bind(this),this.sendAsync=this.sendAsync.bind(this);const u=new pN;pb(t,u,t,this._handleStreamDisconnect.bind(this,"Torus")),u.ignoreStream("phishing");const f=cN();pb(f.stream,u.createStream(s),f.stream,this._handleStreamDisconnect.bind(this,"Torus RpcProvider"));const g=new Zn;g.push(dN()),g.push(SN()),g.push(SB({origin:location.origin})),g.push(f.middleware),this._rpcEngine=g,this.jsonRpcConnectionEvents=f.events}async request(t){if(!t||typeof t!="object"||Array.isArray(t))throw sn.ethErrors.rpc.invalidRequest({message:In.errors.invalidRequestArgs(),data:t});const{method:r,params:o}=t;if(typeof r!="string"||r.length===0)throw sn.ethErrors.rpc.invalidRequest({message:In.errors.invalidRequestMethod(),data:t});if(o!==void 0&&!Array.isArray(o)&&(typeof o!="object"||o===null))throw sn.ethErrors.rpc.invalidRequest({message:In.errors.invalidRequestParams(),data:t});return new Promise((s,u)=>{this._rpcRequest({method:r,params:o},Xc(s,u))})}send(t,r){this._rpcRequest(t,r)}sendAsync(t){return new Promise((r,o)=>{this._rpcRequest(t,Xc(r,o))})}_handleStreamDisconnect(t,r){RN(t,r,this),this._handleDisconnect(!1,r?r.message:void 0)}}const LN=function(e,t,r){for(var o=arguments.length,s=new Array(o>3?o-3:0),u=3;u<o;u++)s[u-3]=arguments[u];const f=()=>{r(...s),e.removeEventListener(t,f)};e.addEventListener(t,f)};async function dw(){return new Promise(e=>{document.readyState!=="loading"?e():LN(document,"DOMContentLoaded",e)})}const Bo=e=>{const t=window.document.createElement("template"),r=e.trim();return t.innerHTML=r,t.content.firstChild};function du(e){return e.version===void 0}class hw extends bf{constructor(t){let{url:r,target:o,features:s}=t;super(),Ne(this,"url",void 0),Ne(this,"target",void 0),Ne(this,"features",void 0),Ne(this,"window",void 0),Ne(this,"windowTimer",void 0),Ne(this,"iClosedWindow",void 0),this.url=r,this.target=o||"_blank",this.features=s||Cs(ON),this.window=void 0,this.windowTimer=void 0,this.iClosedWindow=!1,this._setupTimer()}_setupTimer(){this.windowTimer=Number(setInterval(()=>{this.window&&this.window.closed&&(clearInterval(this.windowTimer),this.iClosedWindow||this.emit("close"),this.iClosedWindow=!1,this.window=void 0),this.window===void 0&&clearInterval(this.windowTimer)},500))}open(){var t;return this.window=window.open(this.url.href,this.target,this.features),(t=this.window)!=null&&t.focus&&this.window.focus(),Promise.resolve()}close(){this.iClosedWindow=!0,this.window&&this.window.close()}redirect(t){t?window.location.replace(this.url.href):window.location.href=this.url.href}}function Jb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,o)}return r}function PN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jb(Object(r),!0).forEach(function(o){Ne(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jb(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}class _f extends cw{constructor(t,r){let{maxEventListeners:o=100,jsonRpcStreamName:s="provider"}=r;super(t,{maxEventListeners:o,jsonRpcStreamName:s}),Ne(this,"embedTranslations",void 0),Ne(this,"torusUrl",void 0),Ne(this,"dappStorageKey",void 0),Ne(this,"windowRefs",void 0),Ne(this,"tryWindowHandle",void 0),Ne(this,"torusAlertContainer",void 0),Ne(this,"torusIframe",void 0),this._state=PN({},_f._defaultState),this.torusUrl="",this.dappStorageKey="";const u=Wd.translations[AN()];this.embedTranslations=u.embed,this.windowRefs={},this.on("connect",()=>{this._state.isConnected=!0});const f=g=>{const{method:l,params:h}=g;if(l===Ss.IFRAME_STATUS){const{isFullScreen:b,rid:w}=h;this._displayIframe({isFull:b,rid:w})}else if(l===Ss.CREATE_WINDOW){const{windowId:b,url:w}=h;this._createPopupBlockAlert(b,w)}else if(l===Ss.CLOSE_WINDOW)this._handleCloseWindow(h);else if(l===Ss.USER_LOGGED_IN){const{currentLoginProvider:b}=h;this._state.isLoggedIn=!0,this._state.currentLoginProvider=b}else l===Ss.USER_LOGGED_OUT&&(this._state.isLoggedIn=!1,this._state.currentLoginProvider=null,this._displayIframe())};this.jsonRpcConnectionEvents.on("notification",f)}get isLoggedIn(){return this._state.isLoggedIn}get isIFrameFullScreen(){return this._state.isIFrameFullScreen}isConnected(){return this._state.isConnected}async _initializeState(t){try{const{torusUrl:r,dappStorageKey:o,torusAlertContainer:s,torusIframe:u}=t;this.torusUrl=r,this.dappStorageKey=o,this.torusAlertContainer=s,this.torusIframe=u,this.torusIframe.addEventListener("load",()=>{this._state.isIFrameFullScreen||this._displayIframe()});const{currentLoginProvider:f,isLoggedIn:g}=await this.request({method:Sn.GET_PROVIDER_STATE,params:[]});this._handleConnect(f,g)}catch(r){ct.error("Torus: Failed to get initial state. Please report this bug.",r)}finally{ct.info("initialized communication state"),this._state.initialized=!0,this.emit("_initialized")}}_handleWindow(t){let{url:r,target:o,features:s}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const u=new URL(r||`${this.torusUrl}/redirect?windowId=${t}`);this.dappStorageKey&&(u.hash?u.hash+=`&dappStorageKey=${this.dappStorageKey}`:u.hash=`#dappStorageKey=${this.dappStorageKey}`);const f=new hw({url:u,target:o,features:s});if(f.open(),!f.window){this._createPopupBlockAlert(t,u.href);return}this.windowRefs[t]=f,this.request({method:Sn.OPENED_WINDOW,params:{windowId:t}}),f.once("close",()=>{delete this.windowRefs[t],this.request({method:Sn.CLOSED_WINDOW,params:{windowId:t}})})}_displayIframe(){let{isFull:t=!1,rid:r=""}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const o={};if(t)o.display="block",o.width="100%",o.height="100%",o.top="0px",o.right="0px",o.left="0px",o.bottom="0px";else switch(o.display=this._state.torusWidgetVisibility?"block":"none",o.height="70px",o.width="70px",this._state.buttonPosition){case Ts.TOP_LEFT:o.top="0px",o.left="0px",o.right="auto",o.bottom="auto";break;case Ts.TOP_RIGHT:o.top="0px",o.right="0px",o.left="auto",o.bottom="auto";break;case Ts.BOTTOM_RIGHT:o.bottom="0px",o.right="0px",o.top="auto",o.left="auto";break;case Ts.BOTTOM_LEFT:default:o.bottom="0px",o.left="0px",o.top="auto",o.right="auto";break}Object.assign(this.torusIframe.style,o),this._state.isIFrameFullScreen=t,this.request({method:Sn.IFRAME_STATUS,params:{isIFrameFullScreen:t,rid:r}})}hideTorusButton(){this._state.torusWidgetVisibility=!1,this._displayIframe()}showTorusButton(){this._state.torusWidgetVisibility=!0,this._displayIframe()}_rpcRequest(t,r){const o=r,s=t;Array.isArray(s)||s.jsonrpc||(s.jsonrpc="2.0"),this.tryWindowHandle(s,o)}_handleConnect(t,r){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{currentLoginProvider:t,isLoggedIn:r}),ct.debug(In.info.connected(t)))}_handleDisconnect(t,r){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!t){this._state.isConnected=!1;let o;t?(o=new sn.EthereumRpcError(1013,r||In.errors.disconnected()),ct.debug(o)):(o=new sn.EthereumRpcError(1011,r||In.errors.permanentlyDisconnected()),ct.error(o),this._state.currentLoginProvider=null,this._state.isLoggedIn=!1,this._state.torusWidgetVisibility=!1,this._state.isIFrameFullScreen=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",o)}}_handleCloseWindow(t){const{windowId:r}=t;this.windowRefs[r]&&(this.windowRefs[r].close(),delete this.windowRefs[r])}async _createPopupBlockAlert(t,r){const o=this.getLogoUrl(),s=Bo(`<div id="torusAlert" class="torus-alert--v2"><div id="torusAlert__logo"><img src="${o}" /></div><div><h1 id="torusAlert__title">${this.embedTranslations.actionRequired}</h1><p id="torusAlert__desc">${this.embedTranslations.pendingAction}</p></div></div>`),u=Bo(`<div><a id="torusAlert__btn">${this.embedTranslations.continue}</a></div>`),f=Bo('<div id="torusAlert__btn-container"></div>');f.appendChild(u),s.appendChild(f);const g=()=>{u.addEventListener("click",()=>{this._handleWindow(t,{url:r,target:"_blank",features:Cs(lw)}),s.remove(),this.torusAlertContainer.children.length===0&&(this.torusAlertContainer.style.display="none")})},l=()=>{this.torusAlertContainer.appendChild(s)};await dw(),l(),g(),this.torusAlertContainer.style.display="block"}getLogoUrl(){return`${this.torusUrl}/images/torus_icon-blue.svg`}}Ne(_f,"_defaultState",{buttonPosition:"bottom-left",currentLoginProvider:null,isIFrameFullScreen:!1,hasEmittedConnection:!1,torusWidgetVisibility:!1,initialized:!1,isLoggedIn:!1,isPermanentlyDisconnected:!1,isConnected:!1});function Yb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,o)}return r}function BN(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yb(Object(r),!0).forEach(function(o){Ne(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yb(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}class yf extends cw{constructor(t,r){let{maxEventListeners:o=100,jsonRpcStreamName:s="provider"}=r;super(t,{maxEventListeners:o,jsonRpcStreamName:s}),Ne(this,"chainId",void 0),Ne(this,"selectedAddress",void 0),Ne(this,"tryWindowHandle",void 0),this._state=BN({},yf._defaultState),this.selectedAddress=null,this.chainId=null,this._handleAccountsChanged=this._handleAccountsChanged.bind(this),this._handleChainChanged=this._handleChainChanged.bind(this),this._handleUnlockStateChanged=this._handleUnlockStateChanged.bind(this),this.on("connect",()=>{this._state.isConnected=!0});const u=f=>{const{method:g,params:l}=f;g===hc.ACCOUNTS_CHANGED?this._handleAccountsChanged(l):g===hc.UNLOCK_STATE_CHANGED?this._handleUnlockStateChanged(l):g===hc.CHAIN_CHANGED&&this._handleChainChanged(l)};this.jsonRpcConnectionEvents.on("notification",u)}isConnected(){return this._state.isConnected}async _initializeState(){try{const{accounts:t,chainId:r,isUnlocked:o}=await this.request({method:vB.GET_PROVIDER_STATE,params:[]});this.emit("connect",{chainId:r}),this._handleChainChanged({chainId:r}),this._handleUnlockStateChanged({accounts:t,isUnlocked:o}),this._handleAccountsChanged(t)}catch(t){ct.error("Torus: Failed to get initial state. Please report this bug.",t)}finally{ct.info("initialized provider state"),this._state.initialized=!0,this.emit("_initialized")}}_rpcRequest(t,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=r;const u=t;if(!Array.isArray(u)){if(u.jsonrpc||(u.jsonrpc="2.0"),u.method==="solana_accounts"||u.method==="solana_requestAccounts")s=(f,g)=>{this._handleAccountsChanged(g.result||[],u.method==="solana_accounts",o),r(f,g)};else if(u.method==="wallet_getProviderState"){this._rpcEngine.handle(t,s);return}}this.tryWindowHandle(u,s)}_handleConnect(t){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{chainId:t}),ct.debug(In.info.connected(t)))}_handleDisconnect(t,r){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!t){this._state.isConnected=!1;let o;t?(o=new sn.EthereumRpcError(1013,r||In.errors.disconnected()),ct.debug(o)):(o=new sn.EthereumRpcError(1011,r||In.errors.permanentlyDisconnected()),ct.error(o),this.chainId=null,this._state.accounts=null,this.selectedAddress=null,this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",o)}}_handleAccountsChanged(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=t;Array.isArray(s)||(ct.error("Torus: Received non-array accounts parameter. Please report this bug.",s),s=[]);for(const u of t)if(typeof u!="string"){ct.error("Torus: Received non-string account. Please report this bug.",t),s=[];break}wN(this._state.accounts,s)||(r&&Array.isArray(this._state.accounts)&&this._state.accounts.length>0&&!o&&ct.error('Torus: "solana_accounts" unexpectedly updated accounts. Please report this bug.',s),this._state.accounts=s,this.emit("accountsChanged",s)),this.selectedAddress!==s[0]&&(this.selectedAddress=s[0]||null)}_handleChainChanged(){let{chainId:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!t){ct.error("Torus: Received invalid network parameters. Please report this bug.",{chainId:t});return}t==="loading"?this._handleDisconnect(!0):(this._handleConnect(t),t!==this.chainId&&(this.chainId=t,this._state.initialized&&this.emit("chainChanged",this.chainId)))}_handleUnlockStateChanged(){let{accounts:t,isUnlocked:r}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(typeof r!="boolean"){ct.error("Torus: Received invalid isUnlocked parameter. Please report this bug.",{isUnlocked:r});return}r!==this._state.isUnlocked&&(this._state.isUnlocked=r,this._handleAccountsChanged(t||[]))}}Ne(yf,"_defaultState",{accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1,hasEmittedConnection:!1});function Xb(e){return new Promise((t,r)=>{try{const o=document.createElement("img");o.onload=()=>t(!0),o.onerror=()=>t(!1),o.src=e}catch(o){r(o)}})}const NN=e=>{const{document:t}=e,r=t.querySelector('head > meta[property="og:site_name"]');if(r)return r.content;const o=t.querySelector('head > meta[name="title"]');return o?o.content:t.title&&t.title.length>0?t.title:e.location.hostname};async function $N(e){try{const{document:t}=e;let r=t.querySelector('head > link[rel="shortcut icon"]');return r&&await Xb(r.href)||(r=Array.from(t.querySelectorAll('head > link[rel="icon"]')).find(o=>!!o.href),r&&await Xb(r.href))?r.href:""}catch{return""}}const MN=async()=>({name:NN(window),icon:await $N(window)});function Zb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,o)}return r}function vc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zb(Object(r),!0).forEach(function(o){Ne(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zb(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}const xN=["send_transaction","sign_transaction","sign_all_transactions","sign_message","connect"],DN=[Sn.SET_PROVIDER],jN=CN("localStorage");(async function(){try{if(typeof document>"u")return;const t=document.createElement("link"),{torusUrl:r}=await fw("production");t.href=`${r}/frame`,t.crossOrigin="anonymous",t.type="text/html",t.rel="prefetch",t.relList&&t.relList.supports&&t.relList.supports("prefetch")&&document.head.appendChild(t)}catch(t){ct.warn(t)}})();class i${constructor(){let{modalZIndex:t=99999}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ne(this,"isInitialized",void 0),Ne(this,"torusAlert",void 0),Ne(this,"modalZIndex",void 0),Ne(this,"alertZIndex",void 0),Ne(this,"requestedLoginProvider",void 0),Ne(this,"provider",void 0),Ne(this,"communicationProvider",void 0),Ne(this,"dappStorageKey",void 0),Ne(this,"isTopupHidden",!1),Ne(this,"torusAlertContainer",void 0),Ne(this,"torusUrl",void 0),Ne(this,"torusIframe",void 0),Ne(this,"styleLink",void 0),this.torusUrl="",this.isInitialized=!1,this.requestedLoginProvider=null,this.modalZIndex=t,this.alertZIndex=t+1e3,this.dappStorageKey=""}get isLoggedIn(){return this.communicationProvider?this.communicationProvider.isLoggedIn:!1}async init(){let{buildEnv:t=EN.PRODUCTION,enableLogging:r=!1,network:o,showTorusButton:s=!1,useLocalStorage:u=!1,buttonPosition:f=Ts.BOTTOM_LEFT,apiKey:g="torus-default",extraParams:l={},whiteLabel:h}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(this.isInitialized)throw new Error("Already initialized");const{torusUrl:b,logLevel:w}=await fw(t);ct.enableAll(),ct.info(b,"url loaded"),ct.info(`Solana Embed Version :${mN}`),this.torusUrl=b,ct.setDefaultLevel(w),r?ct.enableAll():ct.disableAll();const I=this.handleDappStorageKey(u),A=new URL(b);A.pathname.endsWith("/")?A.pathname+="frame":A.pathname+="/frame";const x=new URLSearchParams;I&&x.append("dappStorageKey",I),x.append("origin",window.location.origin),A.hash=x.toString(),this.torusIframe=Bo(`<iframe
|
|
32
|
-
id="torusIframe"
|
|
33
|
-
class="torusIframe"
|
|
34
|
-
src="${A.href}"
|
|
35
|
-
style="display: none; position: fixed; top: 0; right: 0; width: 100%;
|
|
36
|
-
height: 100%; border: none; border-radius: 0; z-index: ${this.modalZIndex.toString()}"
|
|
37
|
-
></iframe>`),this.torusAlertContainer=Bo(`<div id="torusAlertContainer" style="display:none; z-index: ${this.alertZIndex.toString()}"></div>`),this.styleLink=Bo(`<link href="${b}/css/widget.css" rel="stylesheet" type="text/css">`);const v=async()=>new Promise((C,B)=>{try{window.document.head.appendChild(this.styleLink),window.document.body.appendChild(this.torusIframe),window.document.body.appendChild(this.torusAlertContainer),this.torusIframe.addEventListener("load",async()=>{const P=await MN();this.torusIframe.contentWindow.postMessage({buttonPosition:f,apiKey:g,network:o,dappMetadata:P,extraParams:l,whiteLabel:h},A.origin),await this._setupWeb3({torusUrl:b}),s&&this.showTorusButton(),h!=null&&h.topupHide?this.isTopupHidden=h.topupHide:this.hideTorusButton(),this.isInitialized=!0,window.torus=this,C()})}catch(P){B(P)}});await dw(),await v()}async login(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.isInitialized)throw new Error("Call init() first");try{this.requestedLoginProvider=t.loginProvider||null,this.requestedLoginProvider||this.communicationProvider._displayIframe({isFull:!0});const r=await new Promise((o,s)=>{this.provider._rpcRequest({method:"solana_requestAccounts",params:[this.requestedLoginProvider,t.login_hint]},Xc(o,s))});if(Array.isArray(r)&&r.length>0)return r;throw new Error("Login failed")}catch(r){throw ct.error("login failed",r),r}finally{this.communicationProvider.isIFrameFullScreen&&this.communicationProvider._displayIframe()}}async loginWithPrivateKey(t){if(!this.isInitialized)throw new Error("Call init() first");const{privateKey:r,userInfo:o}=t,{success:s}=await this.communicationProvider.request({method:"login_with_private_key",params:{privateKey:r,userInfo:o}});if(!s)throw new Error("Login Failed")}async logout(){if(!this.communicationProvider.isLoggedIn)throw new Error("Not logged in");await this.communicationProvider.request({method:Sn.LOGOUT,params:[]}),this.requestedLoginProvider=null}async cleanUp(){this.communicationProvider.isLoggedIn&&await this.logout(),this.clearInit()}clearInit(){function t(r){return r instanceof Element||r instanceof Document}t(this.styleLink)&&window.document.body.contains(this.styleLink)&&(this.styleLink.remove(),this.styleLink=void 0),t(this.torusIframe)&&window.document.body.contains(this.torusIframe)&&(this.torusIframe.remove(),this.torusIframe=void 0),t(this.torusAlertContainer)&&window.document.body.contains(this.torusAlertContainer)&&(this.torusAlert=void 0,this.torusAlertContainer.remove(),this.torusAlertContainer=void 0),this.isInitialized=!1}hideTorusButton(){this.communicationProvider.hideTorusButton()}showTorusButton(){this.communicationProvider.showTorusButton()}async setProvider(t){await this.communicationProvider.request({method:Sn.SET_PROVIDER,params:vc({},t)})}async showWallet(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=await this.communicationProvider.request({method:Sn.WALLET_INSTANCE_ID,params:[]}),s=t?`/${t}`:"",u=new URL(`${this.torusUrl}/wallet${s}`);u.searchParams.append("instanceId",o),Object.keys(r).forEach(g=>{u.searchParams.append(g,r[g])}),this.dappStorageKey&&(u.hash=`#dappStorageKey=${this.dappStorageKey}`),new hw({url:u,features:Cs(IN)}).open()}async getUserInfo(){return await this.communicationProvider.request({method:Sn.USER_INFO,params:[]})}async initiateTopup(t,r){if(!this.isInitialized)throw new Error("Torus is not initialized");const o=cu();return this.communicationProvider._handleWindow(o),await this.communicationProvider.request({method:Sn.TOPUP,params:{provider:t,params:r,windowId:o}})}async getAccounts(){return await this.provider.request({method:"getAccounts",params:[]})}async sendTransaction(t){const r=du(t),o=r?t.serialize({requireAllSignatures:!1}).toString("hex"):de.Buffer.from(t.serialize()).toString("hex");return await this.provider.request({method:"send_transaction",params:{message:o,isLegacyTransaction:r}})}async signAndSendTransaction(t,r){const o=du(t),s=o?t.serialize({requireAllSignatures:!1}).toString("hex"):de.Buffer.from(t.serialize()).toString("hex");return{signature:await this.provider.request({method:"send_transaction",params:{message:s,options:r,isLegacyTransaction:o}})}}async signTransaction(t){const r=du(t),o=r?t.serializeMessage().toString("hex"):de.Buffer.from(t.message.serialize()).toString("hex"),s=await this.provider.request({method:"sign_transaction",params:{message:o,messageOnly:!0,isLegacyTransaction:r}}),u=JSON.parse(s),f={publicKey:new Kg(u.publicKey),signature:de.Buffer.from(u.signature,"hex")};return t.addSignature(f.publicKey,f.signature),t}async signAllTransactions(t){let r;const o=t.map(f=>(r=du(f),r?f.serializeMessage().toString("hex"):de.Buffer.from(f.message.serialize()).toString("hex"))),u=(await this.provider.request({method:"sign_all_transactions",params:{message:o,messageOnly:!0,isLegacyTransaction:r}})).map(f=>{const g=JSON.parse(f);return{publicKey:new Kg(g.publicKey),signature:de.Buffer.from(g.signature,"hex")}});return t.forEach((f,g)=>(f.addSignature(u[g].publicKey,u[g].signature),f)),t}async signMessage(t){return await this.provider.request({method:"sign_message",params:{data:t}})}async getGaslessPublicKey(){return await this.provider.request({method:"get_gasless_public_key",params:[]})}handleDappStorageKey(t){const r=`${Wd.localStorageKeyPrefix}${window.location.hostname}`;let o="";if(jN&&t){const s=window.localStorage.getItem(r);if(s)o=s;else{const u=`torus-app-${cu()}`;window.localStorage.setItem(r,u),o=u}}return this.dappStorageKey=o,o}async _setupWeb3(t){ct.info("setupWeb3 running");const r=new Wb({name:"embed_torus",target:"iframe_torus",targetWindow:this.torusIframe.contentWindow}),o=new Wb({name:"embed_communication",target:"iframe_communication",targetWindow:this.torusIframe.contentWindow}),s=new yf(r,{}),u=new _f(o,{});s.tryWindowHandle=(h,b)=>{const w=h;if(!Array.isArray(w)&&xN.includes(w.method)){if(!this.communicationProvider.isLoggedIn)throw new Error("User Not Logged In");const I=cu();u._handleWindow(I,{target:"_blank",features:Cs(lw)}),w.windowId=I}s._rpcEngine.handle(w,b)},u.tryWindowHandle=(h,b)=>{const w=h;if(!Array.isArray(w)&&DN.includes(w.method)){const I=cu();u._handleWindow(I,{target:"_blank",features:Cs(TN)}),w.params.windowId=I}u._rpcEngine.handle(w,b)};const f=h=>{const b=s[h],w=this;s[h]=function(A,x){const{method:v,params:C=[]}=A;if(v==="solana_requestAccounts"){if(!x)return w.login({loginProvider:C[0]});w.login({loginProvider:C[0]}).then(B=>x(null,B)).catch(B=>x(B))}return b.apply(this,[A,x])}};f("request"),f("sendAsync"),f("send");const g=new Proxy(s,{deleteProperty:()=>!0}),l=new Proxy(u,{deleteProperty:()=>!0});this.provider=g,this.communicationProvider=l,await Promise.all([s._initializeState(),u._initializeState(vc(vc({},t),{},{dappStorageKey:this.dappStorageKey,torusAlertContainer:this.torusAlertContainer,torusIframe:this.torusIframe}))]),ct.debug("Torus - injected provider")}}export{Ts as BUTTON_POSITION,EN as TORUS_BUILD_ENV,yf as TorusInPageProvider,i$ as default};
|