@xoxno/sdk-js 0.1.54-alpha → 0.1.55-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/236.bundle.js +1 -0
  2. package/dist/265.bundle.js +2 -0
  3. package/dist/265.bundle.js.LICENSE.txt +10 -0
  4. package/dist/collection/index.d.ts +13 -1
  5. package/dist/common/index.d.ts +1 -9
  6. package/dist/index.bundle.js +1 -0
  7. package/dist/index.d.ts +0 -2
  8. package/dist/interactions.bundle.js +1 -0
  9. package/dist/launchpad.bundle.js +1 -0
  10. package/dist/runtime.bundle.js +1 -0
  11. package/dist/types/collection.d.ts +3 -0
  12. package/dist/types/trading.d.ts +39 -19
  13. package/dist/utils/api.d.ts +1 -1
  14. package/package.json +11 -8
  15. package/dist/collection/index.js +0 -520
  16. package/dist/collection/index.js.map +0 -1
  17. package/dist/common/index.js +0 -78
  18. package/dist/common/index.js.map +0 -1
  19. package/dist/index.js +0 -26
  20. package/dist/index.js.map +0 -1
  21. package/dist/interactions/index.js +0 -678
  22. package/dist/interactions/index.js.map +0 -1
  23. package/dist/launchpad/index.js +0 -158
  24. package/dist/launchpad/index.js.map +0 -1
  25. package/dist/nft/index.js +0 -121
  26. package/dist/nft/index.js.map +0 -1
  27. package/dist/staking/index.js +0 -29
  28. package/dist/staking/index.js.map +0 -1
  29. package/dist/types/collection.js +0 -183
  30. package/dist/types/collection.js.map +0 -1
  31. package/dist/types/common.js +0 -3
  32. package/dist/types/common.js.map +0 -1
  33. package/dist/types/index.js +0 -21
  34. package/dist/types/index.js.map +0 -1
  35. package/dist/types/interactions.js +0 -11
  36. package/dist/types/interactions.js.map +0 -1
  37. package/dist/types/nft.js +0 -3
  38. package/dist/types/nft.js.map +0 -1
  39. package/dist/types/staking.js +0 -15
  40. package/dist/types/staking.js.map +0 -1
  41. package/dist/types/trading.js +0 -26
  42. package/dist/types/trading.js.map +0 -1
  43. package/dist/types/user.js +0 -13
  44. package/dist/types/user.js.map +0 -1
  45. package/dist/users/index.js +0 -220
  46. package/dist/users/index.js.map +0 -1
  47. package/dist/utils/SmartContractAbis.js +0 -103
  48. package/dist/utils/SmartContractAbis.js.map +0 -1
  49. package/dist/utils/SmartContractService.js +0 -13
  50. package/dist/utils/SmartContractService.js.map +0 -1
  51. package/dist/utils/api.js +0 -79
  52. package/dist/utils/api.js.map +0 -1
  53. package/dist/utils/const.js +0 -17
  54. package/dist/utils/const.js.map +0 -1
  55. package/dist/utils/getActivity.js +0 -53
  56. package/dist/utils/getActivity.js.map +0 -1
  57. package/dist/utils/helpers.js +0 -27
  58. package/dist/utils/helpers.js.map +0 -1
  59. package/dist/utils/regex.js +0 -12
  60. package/dist/utils/regex.js.map +0 -1
  61. package/dist/utils/scCalls.js +0 -39
  62. package/dist/utils/scCalls.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 265.bundle.js.LICENSE.txt */
2
+ (this.webpackChunk_xoxno_sdk_js=this.webpackChunk_xoxno_sdk_js||[]).push([[265],{1220:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Compatibility=void 0;const n=r(236);class i{static guardAddressIsSetAndNonZero(e,t,r){this.areWarningsEnabled&&(e&&""!=e.bech32()?e.bech32()==n.Address.Zero().bech32()&&console.warn(`${t}: address should not be the 'zero' address (also known as the 'contracts deployment address'); ${r}. In the future, this will throw an exception instead of emitting a WARN.`):console.warn(`${t}: address should be set; ${r}. In the future, this will throw an exception instead of emitting a WARN.`))}}t.Compatibility=i,i.areWarningsEnabled=!0},7353:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ARGUMENTS_SEPARATOR=t.ESDT_TRANSFER_VALUE=t.MULTI_ESDTNFT_TRANSFER_FUNCTION_NAME=t.ESDTNFT_TRANSFER_FUNCTION_NAME=t.ESDT_TRANSFER_FUNCTION_NAME=t.ESDT_TRANSFER_GAS_LIMIT=t.TRANSACTION_VERSION_WITH_OPTIONS=t.TRANSACTION_VERSION_DEFAULT=t.TRANSACTION_OPTIONS_TX_GUARDED=t.TRANSACTION_OPTIONS_TX_HASH_SIGN=t.TRANSACTION_OPTIONS_DEFAULT=t.TRANSACTION_MIN_GAS_PRICE=void 0,t.TRANSACTION_MIN_GAS_PRICE=1e9,t.TRANSACTION_OPTIONS_DEFAULT=0,t.TRANSACTION_OPTIONS_TX_HASH_SIGN=1,t.TRANSACTION_OPTIONS_TX_GUARDED=2,t.TRANSACTION_VERSION_DEFAULT=1,t.TRANSACTION_VERSION_WITH_OPTIONS=2,t.ESDT_TRANSFER_GAS_LIMIT=5e5,t.ESDT_TRANSFER_FUNCTION_NAME="ESDTTransfer",t.ESDTNFT_TRANSFER_FUNCTION_NAME="ESDTNFTTransfer",t.MULTI_ESDTNFT_TRANSFER_FUNCTION_NAME="MultiESDTNFTTransfer",t.ESDT_TRANSFER_VALUE="0",t.ARGUMENTS_SEPARATOR="@"},9342:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Hash=void 0;const o=s(r(2581));class a{constructor(e){if(e)if(e instanceof Buffer)this.hash=e;else{if("string"!=typeof e)throw new o.ErrBadType("hash","buffer | string",e);this.hash=Buffer.from(e,"hex")}else this.hash=Buffer.from([])}static empty(){return new a(Buffer.from([]))}isEmpty(){return 0==this.hash.length}toString(){return this.hex()}hex(){return this.hash.toString("hex")}valueOf(){return this.hash}}t.Hash=a},6458:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=t.LogLevel=void 0,function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warn=3]="Warn",e[e.Error=4]="Error",e[e.None=5]="None"}(r=t.LogLevel||(t.LogLevel={}));class n{static setLevel(e){n.logLevel=e}static trace(e,...t){n.logLevel>=r.Debug||console.debug(e,t)}static debug(e,...t){n.logLevel>=r.Debug||console.debug(e,t)}static info(e,...t){n.logLevel>=r.Info||console.log(e,t)}static warn(e,...t){n.logLevel>=r.Warn||console.warn(e,t)}static error(e,...t){n.logLevel>=r.Error||console.error(e,t)}}t.Logger=n,n.logLevel=r.Debug},3500:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionOptions=t.TransactionVersion=void 0;const o=r(7353),a=s(r(2581));class u{constructor(e){if((e=Number(e))<1)throw new a.ErrTransactionVersionInvalid(e);this.value=e}static withDefaultVersion(){return new u(o.TRANSACTION_VERSION_DEFAULT)}static withTxOptions(){return new u(o.TRANSACTION_VERSION_WITH_OPTIONS)}valueOf(){return this.value}}t.TransactionVersion=u;class c{constructor(e){if((e=Number(e))<0)throw new a.ErrTransactionOptionsInvalid(e);this.value=e}static withDefaultOptions(){return new c(o.TRANSACTION_OPTIONS_DEFAULT)}static withOptions(e){let t=0;return e.hashSign&&(t|=o.TRANSACTION_OPTIONS_TX_HASH_SIGN),e.guarded&&(t|=o.TRANSACTION_OPTIONS_TX_GUARDED),new c(t)}isWithHashSign(){return(this.value&o.TRANSACTION_OPTIONS_TX_HASH_SIGN)==o.TRANSACTION_OPTIONS_TX_HASH_SIGN}isWithGuardian(){return(this.value&o.TRANSACTION_OPTIONS_TX_GUARDED)==o.TRANSACTION_OPTIONS_TX_GUARDED}setWithHashSign(){this.value|=o.TRANSACTION_OPTIONS_TX_HASH_SIGN}setWithGuardian(){this.value|=o.TRANSACTION_OPTIONS_TX_GUARDED}valueOf(){return this.value}}t.TransactionOptions=c},4330:(e,t,r)=>{"use strict";var n,i=r(6946),s=i.Reader,o=i.Writer,a=i.util,u=i.roots.default||(i.roots.default={});u.proto=((n={}).Transaction=function(){function e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&(this[t[r]]=e[t[r]])}return e.prototype.Nonce=a.Long?a.Long.fromBits(0,0,!0):0,e.prototype.Value=a.newBuffer([]),e.prototype.RcvAddr=a.newBuffer([]),e.prototype.RcvUserName=a.newBuffer([]),e.prototype.SndAddr=a.newBuffer([]),e.prototype.SndUserName=a.newBuffer([]),e.prototype.GasPrice=a.Long?a.Long.fromBits(0,0,!0):0,e.prototype.GasLimit=a.Long?a.Long.fromBits(0,0,!0):0,e.prototype.Data=a.newBuffer([]),e.prototype.ChainID=a.newBuffer([]),e.prototype.Version=0,e.prototype.Signature=a.newBuffer([]),e.prototype.Options=0,e.prototype.GuardAddr=a.newBuffer([]),e.prototype.GuardSignature=a.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=o.create()),null!=e.Nonce&&Object.hasOwnProperty.call(e,"Nonce")&&t.uint32(8).uint64(e.Nonce),null!=e.Value&&Object.hasOwnProperty.call(e,"Value")&&t.uint32(18).bytes(e.Value),null!=e.RcvAddr&&Object.hasOwnProperty.call(e,"RcvAddr")&&t.uint32(26).bytes(e.RcvAddr),null!=e.RcvUserName&&Object.hasOwnProperty.call(e,"RcvUserName")&&t.uint32(34).bytes(e.RcvUserName),null!=e.SndAddr&&Object.hasOwnProperty.call(e,"SndAddr")&&t.uint32(42).bytes(e.SndAddr),null!=e.SndUserName&&Object.hasOwnProperty.call(e,"SndUserName")&&t.uint32(50).bytes(e.SndUserName),null!=e.GasPrice&&Object.hasOwnProperty.call(e,"GasPrice")&&t.uint32(56).uint64(e.GasPrice),null!=e.GasLimit&&Object.hasOwnProperty.call(e,"GasLimit")&&t.uint32(64).uint64(e.GasLimit),null!=e.Data&&Object.hasOwnProperty.call(e,"Data")&&t.uint32(74).bytes(e.Data),null!=e.ChainID&&Object.hasOwnProperty.call(e,"ChainID")&&t.uint32(82).bytes(e.ChainID),null!=e.Version&&Object.hasOwnProperty.call(e,"Version")&&t.uint32(88).uint32(e.Version),null!=e.Signature&&Object.hasOwnProperty.call(e,"Signature")&&t.uint32(98).bytes(e.Signature),null!=e.Options&&Object.hasOwnProperty.call(e,"Options")&&t.uint32(104).uint32(e.Options),null!=e.GuardAddr&&Object.hasOwnProperty.call(e,"GuardAddr")&&t.uint32(114).bytes(e.GuardAddr),null!=e.GuardSignature&&Object.hasOwnProperty.call(e,"GuardSignature")&&t.uint32(122).bytes(e.GuardSignature),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof s||(e=s.create(e));for(var r=void 0===t?e.len:e.pos+t,n=new u.proto.Transaction;e.pos<r;){var i=e.uint32();switch(i>>>3){case 1:n.Nonce=e.uint64();break;case 2:n.Value=e.bytes();break;case 3:n.RcvAddr=e.bytes();break;case 4:n.RcvUserName=e.bytes();break;case 5:n.SndAddr=e.bytes();break;case 6:n.SndUserName=e.bytes();break;case 7:n.GasPrice=e.uint64();break;case 8:n.GasLimit=e.uint64();break;case 9:n.Data=e.bytes();break;case 10:n.ChainID=e.bytes();break;case 11:n.Version=e.uint32();break;case 12:n.Signature=e.bytes();break;case 13:n.Options=e.uint32();break;case 14:n.GuardAddr=e.bytes();break;case 15:n.GuardSignature=e.bytes();break;default:e.skipType(7&i)}}return n},e.decodeDelimited=function(e){return e instanceof s||(e=new s(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.Nonce&&e.hasOwnProperty("Nonce")&&!(a.isInteger(e.Nonce)||e.Nonce&&a.isInteger(e.Nonce.low)&&a.isInteger(e.Nonce.high))?"Nonce: integer|Long expected":null!=e.Value&&e.hasOwnProperty("Value")&&!(e.Value&&"number"==typeof e.Value.length||a.isString(e.Value))?"Value: buffer expected":null!=e.RcvAddr&&e.hasOwnProperty("RcvAddr")&&!(e.RcvAddr&&"number"==typeof e.RcvAddr.length||a.isString(e.RcvAddr))?"RcvAddr: buffer expected":null!=e.RcvUserName&&e.hasOwnProperty("RcvUserName")&&!(e.RcvUserName&&"number"==typeof e.RcvUserName.length||a.isString(e.RcvUserName))?"RcvUserName: buffer expected":null!=e.SndAddr&&e.hasOwnProperty("SndAddr")&&!(e.SndAddr&&"number"==typeof e.SndAddr.length||a.isString(e.SndAddr))?"SndAddr: buffer expected":null!=e.SndUserName&&e.hasOwnProperty("SndUserName")&&!(e.SndUserName&&"number"==typeof e.SndUserName.length||a.isString(e.SndUserName))?"SndUserName: buffer expected":null!=e.GasPrice&&e.hasOwnProperty("GasPrice")&&!(a.isInteger(e.GasPrice)||e.GasPrice&&a.isInteger(e.GasPrice.low)&&a.isInteger(e.GasPrice.high))?"GasPrice: integer|Long expected":null!=e.GasLimit&&e.hasOwnProperty("GasLimit")&&!(a.isInteger(e.GasLimit)||e.GasLimit&&a.isInteger(e.GasLimit.low)&&a.isInteger(e.GasLimit.high))?"GasLimit: integer|Long expected":null!=e.Data&&e.hasOwnProperty("Data")&&!(e.Data&&"number"==typeof e.Data.length||a.isString(e.Data))?"Data: buffer expected":null!=e.ChainID&&e.hasOwnProperty("ChainID")&&!(e.ChainID&&"number"==typeof e.ChainID.length||a.isString(e.ChainID))?"ChainID: buffer expected":null!=e.Version&&e.hasOwnProperty("Version")&&!a.isInteger(e.Version)?"Version: integer expected":null!=e.Signature&&e.hasOwnProperty("Signature")&&!(e.Signature&&"number"==typeof e.Signature.length||a.isString(e.Signature))?"Signature: buffer expected":null!=e.Options&&e.hasOwnProperty("Options")&&!a.isInteger(e.Options)?"Options: integer expected":null!=e.GuardAddr&&e.hasOwnProperty("GuardAddr")&&!(e.GuardAddr&&"number"==typeof e.GuardAddr.length||a.isString(e.GuardAddr))?"GuardAddr: buffer expected":null!=e.GuardSignature&&e.hasOwnProperty("GuardSignature")&&!(e.GuardSignature&&"number"==typeof e.GuardSignature.length||a.isString(e.GuardSignature))?"GuardSignature: buffer expected":null},e.fromObject=function(e){if(e instanceof u.proto.Transaction)return e;var t=new u.proto.Transaction;return null!=e.Nonce&&(a.Long?(t.Nonce=a.Long.fromValue(e.Nonce)).unsigned=!0:"string"==typeof e.Nonce?t.Nonce=parseInt(e.Nonce,10):"number"==typeof e.Nonce?t.Nonce=e.Nonce:"object"==typeof e.Nonce&&(t.Nonce=new a.LongBits(e.Nonce.low>>>0,e.Nonce.high>>>0).toNumber(!0))),null!=e.Value&&("string"==typeof e.Value?a.base64.decode(e.Value,t.Value=a.newBuffer(a.base64.length(e.Value)),0):e.Value.length&&(t.Value=e.Value)),null!=e.RcvAddr&&("string"==typeof e.RcvAddr?a.base64.decode(e.RcvAddr,t.RcvAddr=a.newBuffer(a.base64.length(e.RcvAddr)),0):e.RcvAddr.length&&(t.RcvAddr=e.RcvAddr)),null!=e.RcvUserName&&("string"==typeof e.RcvUserName?a.base64.decode(e.RcvUserName,t.RcvUserName=a.newBuffer(a.base64.length(e.RcvUserName)),0):e.RcvUserName.length&&(t.RcvUserName=e.RcvUserName)),null!=e.SndAddr&&("string"==typeof e.SndAddr?a.base64.decode(e.SndAddr,t.SndAddr=a.newBuffer(a.base64.length(e.SndAddr)),0):e.SndAddr.length&&(t.SndAddr=e.SndAddr)),null!=e.SndUserName&&("string"==typeof e.SndUserName?a.base64.decode(e.SndUserName,t.SndUserName=a.newBuffer(a.base64.length(e.SndUserName)),0):e.SndUserName.length&&(t.SndUserName=e.SndUserName)),null!=e.GasPrice&&(a.Long?(t.GasPrice=a.Long.fromValue(e.GasPrice)).unsigned=!0:"string"==typeof e.GasPrice?t.GasPrice=parseInt(e.GasPrice,10):"number"==typeof e.GasPrice?t.GasPrice=e.GasPrice:"object"==typeof e.GasPrice&&(t.GasPrice=new a.LongBits(e.GasPrice.low>>>0,e.GasPrice.high>>>0).toNumber(!0))),null!=e.GasLimit&&(a.Long?(t.GasLimit=a.Long.fromValue(e.GasLimit)).unsigned=!0:"string"==typeof e.GasLimit?t.GasLimit=parseInt(e.GasLimit,10):"number"==typeof e.GasLimit?t.GasLimit=e.GasLimit:"object"==typeof e.GasLimit&&(t.GasLimit=new a.LongBits(e.GasLimit.low>>>0,e.GasLimit.high>>>0).toNumber(!0))),null!=e.Data&&("string"==typeof e.Data?a.base64.decode(e.Data,t.Data=a.newBuffer(a.base64.length(e.Data)),0):e.Data.length&&(t.Data=e.Data)),null!=e.ChainID&&("string"==typeof e.ChainID?a.base64.decode(e.ChainID,t.ChainID=a.newBuffer(a.base64.length(e.ChainID)),0):e.ChainID.length&&(t.ChainID=e.ChainID)),null!=e.Version&&(t.Version=e.Version>>>0),null!=e.Signature&&("string"==typeof e.Signature?a.base64.decode(e.Signature,t.Signature=a.newBuffer(a.base64.length(e.Signature)),0):e.Signature.length&&(t.Signature=e.Signature)),null!=e.Options&&(t.Options=e.Options>>>0),null!=e.GuardAddr&&("string"==typeof e.GuardAddr?a.base64.decode(e.GuardAddr,t.GuardAddr=a.newBuffer(a.base64.length(e.GuardAddr)),0):e.GuardAddr.length&&(t.GuardAddr=e.GuardAddr)),null!=e.GuardSignature&&("string"==typeof e.GuardSignature?a.base64.decode(e.GuardSignature,t.GuardSignature=a.newBuffer(a.base64.length(e.GuardSignature)),0):e.GuardSignature.length&&(t.GuardSignature=e.GuardSignature)),t},e.toObject=function(e,t){t||(t={});var r={};if(t.defaults){if(a.Long){var n=new a.Long(0,0,!0);r.Nonce=t.longs===String?n.toString():t.longs===Number?n.toNumber():n}else r.Nonce=t.longs===String?"0":0;t.bytes===String?r.Value="":(r.Value=[],t.bytes!==Array&&(r.Value=a.newBuffer(r.Value))),t.bytes===String?r.RcvAddr="":(r.RcvAddr=[],t.bytes!==Array&&(r.RcvAddr=a.newBuffer(r.RcvAddr))),t.bytes===String?r.RcvUserName="":(r.RcvUserName=[],t.bytes!==Array&&(r.RcvUserName=a.newBuffer(r.RcvUserName))),t.bytes===String?r.SndAddr="":(r.SndAddr=[],t.bytes!==Array&&(r.SndAddr=a.newBuffer(r.SndAddr))),t.bytes===String?r.SndUserName="":(r.SndUserName=[],t.bytes!==Array&&(r.SndUserName=a.newBuffer(r.SndUserName))),a.Long?(n=new a.Long(0,0,!0),r.GasPrice=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):r.GasPrice=t.longs===String?"0":0,a.Long?(n=new a.Long(0,0,!0),r.GasLimit=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):r.GasLimit=t.longs===String?"0":0,t.bytes===String?r.Data="":(r.Data=[],t.bytes!==Array&&(r.Data=a.newBuffer(r.Data))),t.bytes===String?r.ChainID="":(r.ChainID=[],t.bytes!==Array&&(r.ChainID=a.newBuffer(r.ChainID))),r.Version=0,t.bytes===String?r.Signature="":(r.Signature=[],t.bytes!==Array&&(r.Signature=a.newBuffer(r.Signature))),r.Options=0,t.bytes===String?r.GuardAddr="":(r.GuardAddr=[],t.bytes!==Array&&(r.GuardAddr=a.newBuffer(r.GuardAddr))),t.bytes===String?r.GuardSignature="":(r.GuardSignature=[],t.bytes!==Array&&(r.GuardSignature=a.newBuffer(r.GuardSignature)))}return null!=e.Nonce&&e.hasOwnProperty("Nonce")&&("number"==typeof e.Nonce?r.Nonce=t.longs===String?String(e.Nonce):e.Nonce:r.Nonce=t.longs===String?a.Long.prototype.toString.call(e.Nonce):t.longs===Number?new a.LongBits(e.Nonce.low>>>0,e.Nonce.high>>>0).toNumber(!0):e.Nonce),null!=e.Value&&e.hasOwnProperty("Value")&&(r.Value=t.bytes===String?a.base64.encode(e.Value,0,e.Value.length):t.bytes===Array?Array.prototype.slice.call(e.Value):e.Value),null!=e.RcvAddr&&e.hasOwnProperty("RcvAddr")&&(r.RcvAddr=t.bytes===String?a.base64.encode(e.RcvAddr,0,e.RcvAddr.length):t.bytes===Array?Array.prototype.slice.call(e.RcvAddr):e.RcvAddr),null!=e.RcvUserName&&e.hasOwnProperty("RcvUserName")&&(r.RcvUserName=t.bytes===String?a.base64.encode(e.RcvUserName,0,e.RcvUserName.length):t.bytes===Array?Array.prototype.slice.call(e.RcvUserName):e.RcvUserName),null!=e.SndAddr&&e.hasOwnProperty("SndAddr")&&(r.SndAddr=t.bytes===String?a.base64.encode(e.SndAddr,0,e.SndAddr.length):t.bytes===Array?Array.prototype.slice.call(e.SndAddr):e.SndAddr),null!=e.SndUserName&&e.hasOwnProperty("SndUserName")&&(r.SndUserName=t.bytes===String?a.base64.encode(e.SndUserName,0,e.SndUserName.length):t.bytes===Array?Array.prototype.slice.call(e.SndUserName):e.SndUserName),null!=e.GasPrice&&e.hasOwnProperty("GasPrice")&&("number"==typeof e.GasPrice?r.GasPrice=t.longs===String?String(e.GasPrice):e.GasPrice:r.GasPrice=t.longs===String?a.Long.prototype.toString.call(e.GasPrice):t.longs===Number?new a.LongBits(e.GasPrice.low>>>0,e.GasPrice.high>>>0).toNumber(!0):e.GasPrice),null!=e.GasLimit&&e.hasOwnProperty("GasLimit")&&("number"==typeof e.GasLimit?r.GasLimit=t.longs===String?String(e.GasLimit):e.GasLimit:r.GasLimit=t.longs===String?a.Long.prototype.toString.call(e.GasLimit):t.longs===Number?new a.LongBits(e.GasLimit.low>>>0,e.GasLimit.high>>>0).toNumber(!0):e.GasLimit),null!=e.Data&&e.hasOwnProperty("Data")&&(r.Data=t.bytes===String?a.base64.encode(e.Data,0,e.Data.length):t.bytes===Array?Array.prototype.slice.call(e.Data):e.Data),null!=e.ChainID&&e.hasOwnProperty("ChainID")&&(r.ChainID=t.bytes===String?a.base64.encode(e.ChainID,0,e.ChainID.length):t.bytes===Array?Array.prototype.slice.call(e.ChainID):e.ChainID),null!=e.Version&&e.hasOwnProperty("Version")&&(r.Version=e.Version),null!=e.Signature&&e.hasOwnProperty("Signature")&&(r.Signature=t.bytes===String?a.base64.encode(e.Signature,0,e.Signature.length):t.bytes===Array?Array.prototype.slice.call(e.Signature):e.Signature),null!=e.Options&&e.hasOwnProperty("Options")&&(r.Options=e.Options),null!=e.GuardAddr&&e.hasOwnProperty("GuardAddr")&&(r.GuardAddr=t.bytes===String?a.base64.encode(e.GuardAddr,0,e.GuardAddr.length):t.bytes===Array?Array.prototype.slice.call(e.GuardAddr):e.GuardAddr),null!=e.GuardSignature&&e.hasOwnProperty("GuardSignature")&&(r.GuardSignature=t.bytes===String?a.base64.encode(e.GuardSignature,0,e.GuardSignature.length):t.bytes===Array?Array.prototype.slice.call(e.GuardSignature):e.GuardSignature),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,i.util.toJSONOptions)},e}(),n),e.exports=u},9277:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(3325),t)},3325:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProtoSerializer=void 0;const a=o(r(1594)),u=r(236),c=r(7353),l=s(r(2581)),f=r(7553);t.ProtoSerializer=class{serializeTransaction(e){const t=r(4330).proto,n=new u.Address(e.getReceiver().bech32()).pubkey(),i=new u.Address(e.getSender().bech32()).pubkey();let s=new t.Transaction({Nonce:e.getNonce().valueOf()?e.getNonce().valueOf():void 0,Value:this.serializeTransactionValue(e.getValue()),RcvAddr:n,RcvUserName:e.getReceiverUsername()?Buffer.from(e.getReceiverUsername()).toString("base64"):void 0,SndAddr:i,SndUserName:e.getSenderUsername()?Buffer.from(e.getSenderUsername()).toString("base64"):void 0,GasPrice:e.getGasPrice().valueOf(),GasLimit:e.getGasLimit().valueOf(),Data:0==e.getData().length()?null:e.getData().valueOf(),ChainID:Buffer.from(e.getChainID().valueOf()),Version:e.getVersion().valueOf(),Signature:e.getSignature()});if(e.getOptions().valueOf()!==c.TRANSACTION_OPTIONS_DEFAULT&&(s.Options=e.getOptions().valueOf()),e.isGuardedTransaction()){const t=e.getGuardian();s.GuardAddr=new u.Address(t.bech32()).pubkey(),s.GuardSignature=e.getGuardianSignature()}const o=t.Transaction.encode(s).finish();return Buffer.from(o)}serializeTransactionValue(e){let t=new a.default(e.toString());if(t.isZero())return Buffer.from([0,0]);let r=f.bigIntToBuffer(t);return r=Buffer.concat([Buffer.from([0]),r]),r}deserializeTransaction(e){throw new l.ErrUnsupportedOperation("deserializeTransaction")}}},6063:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getJavascriptPrototypesInHierarchy=void 0,t.getJavascriptPrototypesInHierarchy=function(e,t){let r=[],n=Object.getPrototypeOf(e);for(;n&&t(n);)r.push(n),n=Object.getPrototypeOf(n);return r}},9874:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.interpretSignatureAsBuffer=t.Signature=void 0;const o=s(r(2581));class a{constructor(e){if(this.valueHex="",e)return"string"==typeof e?a.fromHex(e):e instanceof Buffer?a.fromBuffer(e):void 0}static empty(){return new a}static fromHex(e){if(e.startsWith("0x")&&(e=e.slice(2)),!a.isValidHex(e))throw new o.ErrSignatureCannotCreate(e);return a.fromValidHex(e)}static isValidHex(e){return 64==Buffer.from(e,"hex").length}static fromValidHex(e){let t=new a;return t.valueHex=e,t}static fromBuffer(e){if(64!=e.length)throw new o.ErrSignatureCannotCreate(e);return a.fromValidHex(e.toString("hex"))}hex(){return this.valueHex}}t.Signature=a,t.interpretSignatureAsBuffer=function(e){if(ArrayBuffer.isView(e))return Buffer.from(e);if(null!=e.hex)return Buffer.from(e.hex(),"hex");throw new Error(`Object cannot be interpreted as a signature: ${e}`)}},1157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgSerializer=void 0;const n=r(7353),i=r(9272),s=r(2747),o=r(1055),a=r(7472),u=r(6054),c={codec:new i.BinaryCodec};t.ArgSerializer=class{constructor(e){e=Object.assign(Object.assign({},c),e),this.codec=e.codec}stringToValues(e,t){let r=this.stringToBuffers(e);return this.buffersToValues(r,t)}stringToBuffers(e){return e.split(n.ARGUMENTS_SEPARATOR).map((e=>Buffer.from(e,"hex")))}buffersToValues(e,t){const r=this;let n=[],i=0,c=(e=e||[]).length;for(let e=0;e<t.length;e++){let r=l(t[e].type);n.push(r)}function l(t){if(t.hasExactClass(o.OptionalType.ClassName)){const e=l(t.getFirstTypeParameter());return new o.OptionalValue(t,e)}if(t.hasExactClass(u.VariadicType.ClassName))return function(e){const t=e,r=[];if(t.isCounted){const t=l(new s.U32Type).valueOf().toNumber();for(let n=0;n<t;n++)r.push(l(e.getFirstTypeParameter()))}else for(;!f();)r.push(l(e.getFirstTypeParameter()));return new u.VariadicValue(t,r)}(t);if(t.hasExactClass(a.CompositeType.ClassName)){const e=[];for(const r of t.getTypeParameters())e.push(l(r));return new a.CompositeValue(t,e)}const n=function(t){if(f())return null;let n=e[i++],s=r.codec.decodeTopLevel(n,t);return s}(t);return n}function f(){return i>=c}return n}valuesToString(e){let t=this.valuesToStrings(e);return{argumentsString:t.join(n.ARGUMENTS_SEPARATOR),count:t.length}}valuesToStrings(e){return this.valuesToBuffers(e).map((e=>e.toString("hex")))}valuesToBuffers(e){const t=this,r=[];for(const t of e)n(t);function n(e){if(e.hasExactClass(o.OptionalValue.ClassName)){const t=e;return void(t.isSet()&&n(t.getTypedValue()))}if(e.hasExactClass(u.VariadicValue.ClassName))return void function(e){const i=e.getType();if(i.isCounted){const n=new s.U32Value(e.getItems().length);r.push(t.codec.encodeTopLevel(n))}for(const t of e.getItems())n(t)}(e);if(e.hasExactClass(a.CompositeValue.ClassName)){const t=e;for(const e of t.getItems())n(e);return}const i=t.codec.encodeTopLevel(e);r.push(i)}return r}}},6147:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentErrorContext=void 0;const n=r(2581);t.ArgumentErrorContext=class{constructor(e,t,r){this.endpointName=e,this.argumentIndex=t,this.parameterDefinition=r}throwError(e){throw new n.ErrInvalidArgument(`Error when converting arguments for endpoint (endpoint name: ${this.endpointName}, argument index: ${this.argumentIndex}, name: ${this.parameterDefinition.name}, type: ${this.parameterDefinition.type})\nNested error: ${e}`)}convertError(e,t){this.throwError(`Can't convert argument (argument: ${e}, type ${typeof e}), wanted type: ${t})`)}unhandledType(e,t){this.throwError(`Unhandled type (function: ${e}, type: ${t})`)}guardSameLength(e,t){(e=e||[]).length!=t.length&&this.throwError(`Incorrect composite type length: have ${e.length}, expected ${t.length} (argument: ${e})`)}guardHasField(e,t){t in(e=e||{})||this.throwError(`Struct argument does not contain a field named "${t}" (argument: ${JSON.stringify(e)})`)}}},5225:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeMetadata=void 0;class r{constructor(e=!0,t=!1,r=!1,n=!1){this.upgradeable=e,this.readable=t,this.payable=r,this.payableBySc=n}static fromBuffer(e){if(e.length<2)throw new Error("Buffer is too short.");const t=e[0],n=e[1],i=0!=(t&r.ByteZero.Upgradeable),s=0!=(t&r.ByteZero.Readable),o=0!=(n&r.ByteOne.Payable),a=0!=(n&r.ByteOne.PayableBySc);return new r(i,s,o,a)}toggleUpgradeable(e){this.upgradeable=e}toggleReadable(e){this.readable=e}togglePayable(e){this.payable=e}togglePayableBySc(e){this.payableBySc=e}toBuffer(){let e=0,t=0;return this.upgradeable&&(e|=r.ByteZero.Upgradeable),this.readable&&(e|=r.ByteZero.Readable),this.payable&&(t|=r.ByteOne.Payable),this.payableBySc&&(t|=r.ByteOne.PayableBySc),Buffer.from([e,t])}toString(){return this.toBuffer().toString("hex")}toJSON(){return{upgradeable:this.upgradeable,readable:this.readable,payable:this.payable,payableBySc:this.payableBySc}}equals(e){return this.upgradeable==e.upgradeable&&this.readable==e.readable&&this.payable==e.payable&&this.payableBySc==e.payableBySc}}t.CodeMetadata=r,r.ByteZero={Upgradeable:1,Reserved2:2,Readable:4},r.ByteOne={Reserved1:1,Payable:2,PayableBySc:4}},7648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddressBinaryCodec=void 0;const n=r(236),i=r(2747);t.AddressBinaryCodec=class{decodeNested(e){let t=e.slice(0,32),r=new n.Address(t);return[new i.AddressValue(r),32]}decodeTopLevel(e){let[t,r]=this.decodeNested(e);return t}encodeNested(e){return e.valueOf().pubkey()}encodeTopLevel(e){return e.valueOf().pubkey()}}},2739:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayVecBinaryCodec=void 0;const n=r(2747);t.ArrayVecBinaryCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){let r=t.length,i=t.getFirstTypeParameter(),s=[],o=0;for(let t=0;t<r;t++){let[t,r]=this.binaryCodec.decodeNested(e,i);s.push(t),o+=r,e=e.slice(r)}return[new n.ArrayVec(t,s),o]}decodeTopLevel(e,t){let[r,n]=this.decodeNested(e,t);return r}encodeNested(e){let t=[];for(const r of e.getItems()){let e=this.binaryCodec.encodeNested(r);t.push(e)}return Buffer.concat(t)}encodeTopLevel(e){return this.encodeNested(e)}}},675:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BinaryCodecConstraints=t.BinaryCodec=void 0;const o=s(r(2581)),a=r(2747),u=r(1069),c=r(9603),l=r(8673),f=r(82),h=r(3551),d=r(6855),p=r(8954),g=r(2739);t.BinaryCodec=class{constructor(e=null){this.constraints=e||new y,this.optionCodec=new c.OptionValueBinaryCodec(this),this.listCodec=new f.ListBinaryCodec(this),this.arrayCodec=new g.ArrayVecBinaryCodec(this),this.primitiveCodec=new l.PrimitiveBinaryCodec(this),this.structCodec=new h.StructBinaryCodec(this),this.tupleCodec=new p.TupleBinaryCodec(this),this.enumCodec=new d.EnumBinaryCodec(this)}decodeTopLevel(e,t){return this.constraints.checkBufferLength(e),a.onTypeSelect(t,{onOption:()=>this.optionCodec.decodeTopLevel(e,t.getFirstTypeParameter()),onList:()=>this.listCodec.decodeTopLevel(e,t),onArray:()=>this.arrayCodec.decodeTopLevel(e,t),onPrimitive:()=>this.primitiveCodec.decodeTopLevel(e,t),onStruct:()=>this.structCodec.decodeTopLevel(e,t),onTuple:()=>this.tupleCodec.decodeTopLevel(e,t),onEnum:()=>this.enumCodec.decodeTopLevel(e,t)})}decodeNested(e,t){this.constraints.checkBufferLength(e);let[r,n]=a.onTypeSelect(t,{onOption:()=>this.optionCodec.decodeNested(e,t.getFirstTypeParameter()),onList:()=>this.listCodec.decodeNested(e,t),onArray:()=>this.arrayCodec.decodeNested(e,t),onPrimitive:()=>this.primitiveCodec.decodeNested(e,t),onStruct:()=>this.structCodec.decodeNested(e,t),onTuple:()=>this.tupleCodec.decodeNested(e,t),onEnum:()=>this.enumCodec.decodeNested(e,t)});return[r,n]}encodeNested(e){return u.guardTrue(e.getType().getCardinality().isSingular(),"singular cardinality, thus encodable type"),a.onTypedValueSelect(e,{onPrimitive:()=>this.primitiveCodec.encodeNested(e),onOption:()=>this.optionCodec.encodeNested(e),onList:()=>this.listCodec.encodeNested(e),onArray:()=>this.arrayCodec.encodeNested(e),onStruct:()=>this.structCodec.encodeNested(e),onTuple:()=>this.tupleCodec.encodeNested(e),onEnum:()=>this.enumCodec.encodeNested(e)})}encodeTopLevel(e){return u.guardTrue(e.getType().getCardinality().isSingular(),"singular cardinality, thus encodable type"),a.onTypedValueSelect(e,{onPrimitive:()=>this.primitiveCodec.encodeTopLevel(e),onOption:()=>this.optionCodec.encodeTopLevel(e),onList:()=>this.listCodec.encodeTopLevel(e),onArray:()=>this.arrayCodec.encodeTopLevel(e),onStruct:()=>this.structCodec.encodeTopLevel(e),onTuple:()=>this.tupleCodec.encodeTopLevel(e),onEnum:()=>this.enumCodec.encodeTopLevel(e)})}};class y{constructor(e){this.maxBufferLength=(null==e?void 0:e.maxBufferLength)||256e3,this.maxListLength=(null==e?void 0:e.maxListLength)||128e3}checkBufferLength(e){if(e.length>this.maxBufferLength)throw new o.ErrCodec(`Buffer too large: ${e.length} > ${this.maxBufferLength}`)}checkListLength(e){if(e>this.maxListLength)throw new o.ErrCodec(`List too large: ${e} > ${this.maxListLength}`)}}t.BinaryCodecConstraints=y},3232:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBigNumber=t.decodeString=t.decodeBool=t.decodeUnsignedNumber=void 0;const i=n(r(1594)),s=r(2747),o=new(r(675).BinaryCodec);t.decodeUnsignedNumber=function(e){let t=o.decodeTopLevel(e,new s.BigUIntType);return Number(t.valueOf())},t.decodeBool=function(e){let t=o.decodeTopLevel(e,new s.BooleanType);return Boolean(t.valueOf())},t.decodeString=function(e){let t=o.decodeTopLevel(e,new s.BytesType);return String(t.valueOf())},t.decodeBigNumber=function(e){let t=o.decodeTopLevel(e,new s.BigUIntType);return new i.default(t.valueOf())}},7380:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanBinaryCodec=void 0;const o=s(r(2581)),a=r(2747);class u{decodeNested(e){let t=e.readUInt8(0);return[new a.BooleanValue(t==u.TRUE),1]}decodeTopLevel(e){if(e.length>1)throw new o.ErrInvalidArgument("buffer should be of size <= 1");let t=e[0];return new a.BooleanValue(t==u.TRUE)}encodeNested(e){return e.isTrue()?Buffer.from([u.TRUE]):Buffer.from([u.FALSE])}encodeTopLevel(e){return e.isTrue()?Buffer.from([u.TRUE]):Buffer.from([])}}t.BooleanBinaryCodec=u,u.TRUE=1,u.FALSE=0},8843:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BytesBinaryCodec=void 0;const n=r(1392),i=r(2461);t.BytesBinaryCodec=class{decodeNested(e){let t=e.readUInt32BE(0),r=e.slice(i.SizeOfU32,i.SizeOfU32+t);return[new n.BytesValue(r),i.SizeOfU32+t]}decodeTopLevel(e){return new n.BytesValue(e)}encodeNested(e){let t=Buffer.alloc(i.SizeOfU32);return t.writeUInt32BE(e.getLength()),Buffer.concat([t,e.valueOf()])}encodeTopLevel(e){return e.valueOf()}}},2461:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SizeOfU32=void 0,t.SizeOfU32=4},6855:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnumBinaryCodec=void 0;const n=r(2747),i=r(9995);t.EnumBinaryCodec=class{constructor(e){this.binaryCodec=e,this.fieldsCodec=new i.FieldsBinaryCodec(e)}decodeTopLevel(e,t){let[r]=this.decodeNested(e,t);return r}decodeNested(e,t){let[r,i]=this.readDiscriminant(e);e=e.slice(i);let s=t.getVariantByDiscriminant(r),o=s.getFieldsDefinitions(),[a,u]=this.fieldsCodec.decodeNested(e,o);return[new n.EnumValue(t,s,a),i+u]}readDiscriminant(e){let[t,r]=this.binaryCodec.decodeNested(e,new n.U8Type);return[t.valueOf(),r]}encodeNested(e){let t=new n.U8Value(e.discriminant),r=this.binaryCodec.encodeNested(t),i=e.getFields(),s=this.fieldsCodec.encodeNested(i);return Buffer.concat([r,s])}encodeTopLevel(e){let t=e.getFields(),r=t.length>0,i=this.fieldsCodec.encodeNested(t),s=new n.U8Value(e.discriminant),o=r?this.binaryCodec.encodeNested(s):this.binaryCodec.encodeTopLevel(s);return Buffer.concat([o,i])}}},9995:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldsBinaryCodec=void 0;const n=r(2747);t.FieldsBinaryCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){let r=[],i=0;for(const s of t){let[t,o]=this.binaryCodec.decodeNested(e,s.type);e=e.slice(o),i+=o;let a=new n.Field(t,s.name);r.push(a)}return[r,i]}encodeNested(e){let t=[];for(const r of e){let e=this.binaryCodec.encodeNested(r.value);t.push(e)}return Buffer.concat(t)}}},8831:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.H256BinaryCodec=void 0;const n=r(1038);t.H256BinaryCodec=class{decodeNested(e){let t=e.slice(0,32);return[new n.H256Value(t),32]}decodeTopLevel(e){let[t,r]=this.decodeNested(e);return t}encodeNested(e){return e.valueOf()}encodeTopLevel(e){return e.valueOf()}}},9272:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(675),t),i(r(3232),t)},82:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListBinaryCodec=void 0;const n=r(2747),i=r(2461);t.ListBinaryCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){let r=t.getFirstTypeParameter(),s=[],o=e.readUInt32BE(0);this.binaryCodec.constraints.checkListLength(o);let a=e,u=i.SizeOfU32;e=a.slice(u);for(let t=0;t<o;t++){let[t,n]=this.binaryCodec.decodeNested(e,r);s.push(t),u+=n,e=a.slice(u)}return[new n.List(t,s),u]}decodeTopLevel(e,t){let r=t.getFirstTypeParameter(),i=[],s=e,o=0;for(;e.length>0;){let[t,n]=this.binaryCodec.decodeNested(e,r);i.push(t),o+=n,e=s.slice(o),this.binaryCodec.constraints.checkListLength(i.length)}return new n.List(t,i)}encodeNested(e){this.binaryCodec.constraints.checkListLength(e.getLength());let t=Buffer.alloc(i.SizeOfU32);t.writeUInt32BE(e.getLength());let r=[];for(const t of e.getItems()){let e=this.binaryCodec.encodeNested(t);r.push(e)}return Buffer.concat([t,...r])}encodeTopLevel(e){this.binaryCodec.constraints.checkListLength(e.getLength());let t=[];for(const r of e.getItems()){let e=this.binaryCodec.encodeNested(r);t.push(e)}return Buffer.concat(t)}}},3157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NothingCodec=void 0;const n=r(2747);t.NothingCodec=class{decodeNested(){return[new n.NothingValue,0]}decodeTopLevel(){return new n.NothingValue}encodeNested(){return Buffer.from([])}encodeTopLevel(){return Buffer.from([])}}},62:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NumericalBinaryCodec=void 0;const i=n(r(1594)),s=r(2747),o=r(2461),a=r(7553);t.NumericalBinaryCodec=class{decodeNested(e,t){let r=0,n=t.sizeInBytes;n||(r=o.SizeOfU32,n=e.readUInt32BE(0));let i=e.slice(r,r+n);return[this.decodeTopLevel(i,t),n+r]}decodeTopLevel(e,t){let r=a.cloneBuffer(e);if(0==e.length)return new s.NumericalValue(t,new i.default(0));if(!t.withSign||a.isMsbZero(r)){let e=a.bufferToBigInt(r);return new s.NumericalValue(t,e)}a.flipBufferBitsInPlace(r);let n=a.bufferToBigInt(r).multipliedBy(new i.default(-1)).minus(new i.default(1));return new s.NumericalValue(t,n)}encodeNested(e){if(e.sizeInBytes)return this.encodeNestedFixedSize(e,e.sizeInBytes);let t=this.encodeTopLevel(e),r=Buffer.alloc(o.SizeOfU32);return r.writeUInt32BE(t.length),Buffer.concat([r,t])}encodeNestedFixedSize(e,t){if(e.value.isZero())return Buffer.alloc(t,0);if(!e.withSign){const r=a.bigIntToBuffer(e.value),n=Buffer.alloc(t-r.length,0);return Buffer.concat([n,r])}if(e.value.isPositive()){let r=a.bigIntToBuffer(e.value);a.isMsbOne(r)&&(r=a.prependByteToBuffer(r,0));const n=Buffer.alloc(t-r.length,0);return Buffer.concat([n,r])}let r=e.value.plus(new i.default(1)),n=a.bigIntToBuffer(r);a.flipBufferBitsInPlace(n),a.isMsbZero(n)&&(n=a.prependByteToBuffer(n,255));const s=Buffer.alloc(t-n.length,255);return Buffer.concat([s,n])}encodeTopLevel(e){let t=e.withSign;return e.value.isZero()?Buffer.alloc(0):t?this.encodePrimitive(e):a.bigIntToBuffer(e.value)}encodePrimitive(e){if(e.value.isPositive()){let t=a.bigIntToBuffer(e.value);return a.isMsbOne(t)&&(t=a.prependByteToBuffer(t,0)),t}let t=e.value.plus(new i.default(1)),r=a.bigIntToBuffer(t);return a.flipBufferBitsInPlace(r),a.isMsbZero(r)&&(r=a.prependByteToBuffer(r,255)),r}}},9603:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.OptionValueBinaryCodec=void 0;const o=s(r(2581)),a=r(2747);t.OptionValueBinaryCodec=class{constructor(e){this.binaryCodec=e}decodeNested(e,t){if(0==e[0])return[a.OptionValue.newMissingTyped(t),1];if(1!=e[0])throw new o.ErrCodec("invalid buffer for optional value");let[r,n]=this.binaryCodec.decodeNested(e.slice(1),t);return[a.OptionValue.newProvided(r),n+1]}decodeTopLevel(e,t){if(0==e.length)return new a.OptionValue(t);if(1!=e[0])throw new o.ErrCodec("invalid buffer for optional value");let[r,n]=this.binaryCodec.decodeNested(e.slice(1),t);return new a.OptionValue(t,r)}encodeNested(e){return e.isSet()?Buffer.concat([Buffer.from([1]),this.binaryCodec.encodeNested(e.getTypedValue())]):Buffer.from([0])}encodeTopLevel(e){return e.isSet()?Buffer.concat([Buffer.from([1]),this.binaryCodec.encodeNested(e.getTypedValue())]):Buffer.from([])}}},8673:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrimitiveBinaryCodec=void 0;const n=r(2747),i=r(7648),s=r(7380),o=r(62),a=r(8831),u=r(8843),c=r(6714),l=r(3157),f=r(1367);t.PrimitiveBinaryCodec=class{constructor(e){this.binaryCodec=e,this.booleanCodec=new s.BooleanBinaryCodec,this.numericalCodec=new o.NumericalBinaryCodec,this.addressCodec=new i.AddressBinaryCodec,this.h256Codec=new a.H256BinaryCodec,this.bytesCodec=new u.BytesBinaryCodec,this.stringCodec=new f.StringBinaryCodec,this.tokenIdentifierCodec=new c.TokenIdentifierCodec,this.nothingCodec=new l.NothingCodec}decodeNested(e,t){return n.onPrimitiveTypeSelect(t,{onBoolean:()=>this.booleanCodec.decodeNested(e),onNumerical:()=>this.numericalCodec.decodeNested(e,t),onAddress:()=>this.addressCodec.decodeNested(e),onBytes:()=>this.bytesCodec.decodeNested(e),onString:()=>this.stringCodec.decodeNested(e),onH256:()=>this.h256Codec.decodeNested(e),onTokenIndetifier:()=>this.tokenIdentifierCodec.decodeNested(e),onNothing:()=>this.nothingCodec.decodeNested()})}decodeTopLevel(e,t){return n.onPrimitiveTypeSelect(t,{onBoolean:()=>this.booleanCodec.decodeTopLevel(e),onNumerical:()=>this.numericalCodec.decodeTopLevel(e,t),onAddress:()=>this.addressCodec.decodeTopLevel(e),onBytes:()=>this.bytesCodec.decodeTopLevel(e),onString:()=>this.stringCodec.decodeTopLevel(e),onH256:()=>this.h256Codec.decodeTopLevel(e),onTokenIndetifier:()=>this.tokenIdentifierCodec.decodeTopLevel(e),onNothing:()=>this.nothingCodec.decodeTopLevel()})}encodeNested(e){return n.onPrimitiveValueSelect(e,{onBoolean:()=>this.booleanCodec.encodeNested(e),onNumerical:()=>this.numericalCodec.encodeNested(e),onAddress:()=>this.addressCodec.encodeNested(e),onBytes:()=>this.bytesCodec.encodeNested(e),onString:()=>this.stringCodec.encodeNested(e),onH256:()=>this.h256Codec.encodeNested(e),onTypeIdentifier:()=>this.tokenIdentifierCodec.encodeNested(e),onNothing:()=>this.nothingCodec.encodeNested()})}encodeTopLevel(e){return n.onPrimitiveValueSelect(e,{onBoolean:()=>this.booleanCodec.encodeTopLevel(e),onNumerical:()=>this.numericalCodec.encodeTopLevel(e),onAddress:()=>this.addressCodec.encodeTopLevel(e),onBytes:()=>this.bytesCodec.encodeTopLevel(e),onString:()=>this.stringCodec.encodeTopLevel(e),onH256:()=>this.h256Codec.encodeTopLevel(e),onTypeIdentifier:()=>this.tokenIdentifierCodec.encodeTopLevel(e),onNothing:()=>this.nothingCodec.encodeTopLevel()})}}},1367:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringBinaryCodec=void 0;const n=r(2747),i=r(1392),s=r(8843);t.StringBinaryCodec=class{constructor(){this.bytesBinaryCodec=new s.BytesBinaryCodec}decodeNested(e){let[t,r]=this.bytesBinaryCodec.decodeNested(e);return[new n.StringValue(t.valueOf().toString()),r]}decodeTopLevel(e){return new n.StringValue(e.toString())}encodeNested(e){let t=i.BytesValue.fromUTF8(e.valueOf());return this.bytesBinaryCodec.encodeNested(t)}encodeTopLevel(e){return Buffer.from(e.valueOf())}}},3551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StructBinaryCodec=void 0;const n=r(2747),i=r(9995);t.StructBinaryCodec=class{constructor(e){this.fieldsCodec=new i.FieldsBinaryCodec(e)}decodeTopLevel(e,t){let[r]=this.decodeNested(e,t);return r}decodeNested(e,t){let r=t.getFieldsDefinitions(),[i,s]=this.fieldsCodec.decodeNested(e,r);return[new n.Struct(t,i),s]}encodeNested(e){let t=e.getFields();return this.fieldsCodec.encodeNested(t)}encodeTopLevel(e){return this.encodeNested(e)}}},6714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenIdentifierCodec=void 0;const n=r(1392),i=r(3145),s=r(8843);t.TokenIdentifierCodec=class{constructor(){this.bytesCodec=new s.BytesBinaryCodec}decodeNested(e){let[t,r]=this.bytesCodec.decodeNested(e);return[new i.TokenIdentifierValue(t.toString()),r]}decodeTopLevel(e){let t=this.bytesCodec.decodeTopLevel(e);return new i.TokenIdentifierValue(t.toString())}encodeNested(e){let t=n.BytesValue.fromUTF8(e.valueOf());return this.bytesCodec.encodeNested(t)}encodeTopLevel(e){return Buffer.from(e.valueOf())}}},8954:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TupleBinaryCodec=void 0;const n=r(3551);t.TupleBinaryCodec=class{constructor(e){this.structCodec=new n.StructBinaryCodec(e)}decodeTopLevel(e,t){return this.structCodec.decodeTopLevel(e,t)}decodeNested(e,t){return this.structCodec.decodeNested(e,t)}encodeNested(e){return this.structCodec.encodeNested(e)}encodeTopLevel(e){return this.structCodec.encodeTopLevel(e)}}},7553:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.prependByteToBuffer=t.flipBufferBitsInPlace=t.getHexMagnitudeOfBigInt=t.bigIntToBuffer=t.bufferToBigInt=t.cloneBuffer=t.isMsbZero=t.isMsbOne=void 0;const i=n(r(1594)),s=r(9161);function o(e,t=0){return 1==e[t]>>7}function a(e){return(e=new i.default(e))?(e.isNegative()&&(e=e.multipliedBy(new i.default(-1))),s.numberToPaddedHex(e)):""}t.isMsbOne=o,t.isMsbZero=function(e,t=0){return!o(e,t)},t.cloneBuffer=function(e){let t=Buffer.alloc(e.length);return e.copy(t),t},t.bufferToBigInt=function(e){let t=e.toString("hex");return new i.default(`0x${t}`,16)},t.bigIntToBuffer=function(e){let t=a(e);return Buffer.from(t,"hex")},t.getHexMagnitudeOfBigInt=a,t.flipBufferBitsInPlace=function(e){for(let t=0;t<e.length;t++)e[t]=~e[t]},t.prependByteToBuffer=function(e,t){return Buffer.concat([Buffer.from([t]),e])}},3685:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ContractFunction=void 0;const o=s(r(2581));class a{constructor(e){if(this.name=e,null==e)throw new o.ErrInvalidFunctionName}static none(){return new a("untitled")}toString(){return this.name}valueOf(){return this.name}}t.ContractFunction=a},1945:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Interaction=void 0;const n=r(236),i=r(1220),s=r(7353),o=r(3685),a=r(1146),u=r(7453),c=r(2747);t.Interaction=class{constructor(e,t,r){this.nonce=0,this.value="0",this.gasLimit=0,this.gasPrice=void 0,this.chainID="",this.querent=new n.Address,this.sender=new n.Address,this.isWithSingleESDTTransfer=!1,this.isWithSingleESDTNFTTransfer=!1,this.isWithMultiESDTNFTTransfer=!1,this.contract=e,this.function=t,this.args=r,this.tokenTransfers=new l([],this)}getContractAddress(){return this.contract.getAddress()}getFunction(){return this.function}getEndpoint(){return this.contract.getEndpoint(this.function)}getArguments(){return this.args}getValue(){return this.value}getTokenTransfers(){return this.tokenTransfers.getTransfers()}getGasLimit(){return this.gasLimit}getExplicitReceiver(){return this.explicitReceiver}buildTransaction(){i.Compatibility.guardAddressIsSetAndNonZero(this.sender,"'sender' of interaction","use interaction.withSender()");let e=this.explicitReceiver||this.contract.getAddress(),t=this.function,r=this.args;this.isWithSingleESDTTransfer?(t=new o.ContractFunction(s.ESDT_TRANSFER_FUNCTION_NAME),r=this.tokenTransfers.buildArgsForSingleESDTTransfer()):this.isWithSingleESDTNFTTransfer?(e=this.sender,t=new o.ContractFunction(s.ESDTNFT_TRANSFER_FUNCTION_NAME),r=this.tokenTransfers.buildArgsForSingleESDTNFTTransfer()):this.isWithMultiESDTNFTTransfer&&(e=this.sender,t=new o.ContractFunction(s.MULTI_ESDTNFT_TRANSFER_FUNCTION_NAME),r=this.tokenTransfers.buildArgsForMultiESDTNFTTransfer());let n=this.contract.call({func:t,gasLimit:this.gasLimit,gasPrice:this.gasPrice,args:r,value:this.value,receiver:e,chainID:this.chainID,caller:this.sender});return n.setNonce(this.nonce),n}buildQuery(){return new u.Query({address:this.contract.getAddress(),func:this.function,args:this.args,value:this.value,caller:this.querent})}withValue(e){return this.value=e,this}withSingleESDTTransfer(e){return this.isWithSingleESDTTransfer=!0,this.tokenTransfers=new l([e],this),this}withSingleESDTNFTTransfer(e,t){return this.isWithSingleESDTNFTTransfer=!0,this.tokenTransfers=new l([e],this),t&&(this.sender=t),this}withMultiESDTNFTTransfer(e,t){return this.isWithMultiESDTNFTTransfer=!0,this.tokenTransfers=new l(e,this),t&&(this.sender=t),this}withGasLimit(e){return this.gasLimit=e,this}withGasPrice(e){return this.gasPrice=e,this}withNonce(e){return this.nonce=e,this}useThenIncrementNonceOf(e){return this.withNonce(e.getNonceThenIncrement())}withChainID(e){return this.chainID=e,this}withSender(e){return this.sender=e,this}withQuerent(e){return this.querent=e,this}withExplicitReceiver(e){return this.explicitReceiver=e,this}check(){return(new a.InteractionChecker).checkInteraction(this,this.getEndpoint()),this}};class l{constructor(e,t){this.transfers=e,this.interaction=t}getTransfers(){return this.transfers}buildArgsForSingleESDTTransfer(){let e=this.transfers[0];return[this.getTypedTokenIdentifier(e),this.getTypedTokenQuantity(e),this.getTypedInteractionFunction(),...this.getInteractionArguments()]}buildArgsForSingleESDTNFTTransfer(){let e=this.transfers[0];return[this.getTypedTokenIdentifier(e),this.getTypedTokenNonce(e),this.getTypedTokenQuantity(e),this.getTypedTokensReceiver(),this.getTypedInteractionFunction(),...this.getInteractionArguments()]}buildArgsForMultiESDTNFTTransfer(){let e=[];e.push(this.getTypedTokensReceiver()),e.push(this.getTypedNumberOfTransfers());for(const t of this.transfers)e.push(this.getTypedTokenIdentifier(t)),e.push(this.getTypedTokenNonce(t)),e.push(this.getTypedTokenQuantity(t));return e.push(this.getTypedInteractionFunction()),e.push(...this.getInteractionArguments()),e}getTypedNumberOfTransfers(){return new c.U8Value(this.transfers.length)}getTypedTokenIdentifier(e){return c.BytesValue.fromUTF8(e.tokenIdentifier)}getTypedTokenNonce(e){return new c.U64Value(e.nonce)}getTypedTokenQuantity(e){return new c.BigUIntValue(e.amountAsBigInteger)}getTypedTokensReceiver(){return new c.AddressValue(this.interaction.getContractAddress())}getTypedInteractionFunction(){return c.BytesValue.fromUTF8(this.interaction.getFunction().valueOf())}getInteractionArguments(){return this.interaction.getArguments()}}},1146:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.InteractionChecker=void 0;const a=s(r(2581)),u=o(r(1594));t.InteractionChecker=class{checkInteraction(e,t){this.checkPayable(e,t),this.checkArguments(e,t)}checkPayable(e,t){let r=!new u.default(e.getValue().toString()).isZero(),n=t.modifiers.isPayableInEGLD();if(r&&!n)throw new a.ErrContractInteraction("cannot send EGLD value to non-payable")}checkArguments(e,t){let r=t.input,n=e.getArguments(),i=r.length,s=n.length;if(i!=s)throw new a.ErrContractInteraction(`bad arguments, expected: ${i}, got: ${s}`);for(let e=0;e<i;e++){let t=r[e].type,i=n[e].getType();if(!t.isAssignableFrom(i))throw new a.ErrContractInteraction(`type mismatch at index ${e}, expected: ${t}, got: ${i}`)}}}},670:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NativeSerializer=void 0;const i=n(r(1594)),s=r(236),o=r(2581),a=r(9161),u=r(6147),c=r(2747);!function(e){function t(e,n,s){return e&&e.belongsToTypesystem?e:n instanceof c.OptionType?function(e,r,n){if(null==e)return c.OptionValue.newMissing();let i=t(e,r.getFirstTypeParameter(),n);return c.OptionValue.newProvided(i)}(e,n,s):n instanceof c.OptionalType?function(e,r,n){if(null==e)return new c.OptionalValue(r);let i=t(e,r.getFirstTypeParameter(),n);return new c.OptionalValue(r,i)}(e,n,s):n instanceof c.VariadicType?function(e,r,n){if(r.isCounted)throw new o.ErrInvalidArgument('Counted variadic arguments must be explicitly typed. E.g. use "VariadicValue.fromItemsCounted()" or "new VariadicValue()"');null==e&&(e=[]);void 0===e.map&&n.convertError(e,"Variadic");let i=e.map((function(e){return t(e,r.getFirstTypeParameter(),n)}));return new c.VariadicValue(r,i)}(e,n,s):n instanceof c.CompositeType?function(e,r,n){let i=[],s=r.getTypeParameters();n.guardSameLength(e,s);for(let r=0;r<s.length;r++)i.push(t(e[r],s[r],n));return new c.CompositeValue(r,i)}(e,n,s):n instanceof c.TupleType?function(e,r,n){let i=[];const s=r.getFieldsDefinitions();n.guardSameLength(e,s);for(let r=0;r<s.length;r++)i.push(t(e[r],s[r].type,n));return c.Tuple.fromItems(i)}(e,n,s):n instanceof c.StructType?function(e,r,n){let i=[];const s=r.getFieldsDefinitions();for(let r=0;r<s.length;r++){const o=s[r].name;n.guardHasField(e,o);const a=t(e[o],s[r].type,n);i.push(new c.Field(a,o))}return new c.Struct(r,i)}(e,n,s):n instanceof c.ListType?function(e,r,n){void 0===e.map&&n.convertError(e,"List");let i=e.map((function(e){return t(e,r.getFirstTypeParameter(),n)}));return new c.List(r,i)}(e,n,s):n instanceof c.PrimitiveType?function(e,t,n){if(t instanceof c.NumericalType){return function(e,t,r){switch(t.constructor){case c.U8Type:return new c.U8Value(e);case c.I8Type:return new c.I8Value(e);case c.U16Type:return new c.U16Value(e);case c.I16Type:return new c.I16Value(e);case c.U32Type:return new c.U32Value(e);case c.I32Type:return new c.I32Value(e);case c.U64Type:return new c.U64Value(e);case c.I64Type:return new c.I64Value(e);case c.BigUIntType:return new c.BigUIntValue(e);case c.BigIntType:return new c.BigIntValue(e);default:r.unhandledType("convertNumericalType",t)}}(new i.default(e),t,n)}if(t instanceof c.BytesType)return function(e,t){const r=e.valueOf();void 0===e&&t.convertError(e,"BytesValue");if(e instanceof Buffer)return new c.BytesValue(e);if("string"==typeof e)return c.BytesValue.fromUTF8(e);if(r instanceof Buffer)return new c.BytesValue(r);if("number"==typeof r)return c.BytesValue.fromHex(a.numberToPaddedHex(r));t.convertError(e,"BytesValue")}(e,n);if(t instanceof c.AddressType)return new c.AddressValue(r(e,n));if(t instanceof c.BooleanType)return new c.BooleanValue(e);if(t instanceof c.TokenIdentifierType)return new c.TokenIdentifierValue(function(e,t){void 0===e&&t.convertError(e,"Buffer");if(e instanceof Buffer)return e.toString();if("string"==typeof e)return e;t.convertError(e,"Buffer")}(e,n));n.throwError(`(function: toPrimitive) unsupported type ${t}`)}(e,n,s):n instanceof c.EnumType?function(e,r,n){if("number"==typeof e)return c.EnumValue.fromDiscriminant(r,e);if("string"==typeof e)return c.EnumValue.fromName(r,e);if("object"==typeof e){n.guardHasField(e,"name");const i=r.getVariantByName(e.name);n.guardHasField(e,"fields");const s=e.fields,o=[],a=i.getFieldsDefinitions();for(let e=0;e<a.length;e++){const r=a[e].name;n.guardHasField(s,r);const i=t(s[r],a[e].type,n);o.push(new c.Field(i,r))}return new c.EnumValue(r,i,o)}n.throwError("(function: toEnumValue) unsupported native type "+typeof e)}(e,n,s):void s.throwError(`convertToTypedValue: unhandled type ${n}`)}function r(e,t){if(e.bech32)return e;if(e.getAddress)return e.getAddress();switch(e.constructor){case Buffer:case String:return new s.Address(e);default:t.convertError(e,"Address")}}e.nativeToTypedValues=function(e,r){(function(e,t){const{min:r,max:n}=function(e){let t=[...e].reverse(),r=e.length,n=e.length,i=!1;t.length>0&&t[0].type.getCardinality().isComposite()&&(n=1/0,i=!0);for(let e of t){if(e.type.getCardinality().isSingular())break;r-=1}return{min:r,max:n,variadic:i}}(t.input);if(!(r<=e.length&&e.length<=n))throw new o.ErrInvalidArgument(`Wrong number of arguments for endpoint ${t.name}: expected between ${r} and ${n} arguments, have ${e.length}`)})(e=e||[],r),function(e){const t=e.input[e.input.length-1];return(null==t?void 0:t.type)instanceof c.VariadicType&&!t.type.isCounted}(r)&&(e=function(e,t){const r=t.input.length-1,n=e[r];if(null==n?void 0:n.belongsToTypesystem){if(!n.hasClassOrSuperclass(c.VariadicValue.ClassName))throw new o.ErrInvalidArgument(`Wrong argument type for endpoint ${t.name}: typed value provided; expected variadic type, have ${n.getClassName()}`)}else e[r]=e.slice(r);return e}(e,r));let n=r.input,i=[];for(let s=0;s<n.length;s++){let o=n[s],a=new u.ArgumentErrorContext(r.name,s,o),c=t(e[s],o.type,a);i.push(c)}return i},e.convertNativeToAddress=r}(t.NativeSerializer||(t.NativeSerializer={}))},7453:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Query=void 0;const n=r(236),i=r(1157);t.Query=class{constructor(e){this.caller=e.caller||new n.Address,this.address=e.address,this.func=e.func,this.args=e.args||[],this.value=e.value||0}getEncodedArguments(){return(new i.ArgSerializer).valuesToStrings(this.args)}}},2528:(e,t,r)=>{"use strict";t.A=void 0;const n=r(2866),i=r(236),s=r(2581),o=r(6458),a=r(1157),u=r(3462);var c,l;!function(e){e.OnTransactionCompleted="completedTxEvent",e.OnSignalError="signalError",e.OnWriteLog="writeLog"}(c||(c={})),function(e){e.TooMuchGas="@too much gas provided for processing"}(l||(l={}));const f={argsSerializer:new a.ArgSerializer};t.A=class{constructor(e){e=Object.assign(Object.assign({},f),e),this.argsSerializer=e.argsSerializer}parseQueryResponse(e,t){let r=e.getReturnDataParts(),n=this.argsSerializer.buffersToValues(r,t.output);return{returnCode:new u.ReturnCode(e.returnCode.toString()),returnMessage:e.returnMessage,values:n,firstValue:n[0],secondValue:n[1],thirdValue:n[2],lastValue:n[n.length-1]}}parseUntypedQueryResponse(e){return{returnCode:new u.ReturnCode(e.returnCode.toString()),returnMessage:e.returnMessage,values:e.getReturnDataParts()}}parseOutcome(e,t){let r=this.parseUntypedOutcome(e),n=this.argsSerializer.buffersToValues(r.values,t.output);return{returnCode:r.returnCode,returnMessage:r.returnMessage,values:n,firstValue:n[0],secondValue:n[1],thirdValue:n[2],lastValue:n[n.length-1]}}parseUntypedOutcome(e){let t,r=this.parseTransactionMetadata(e);if(t=this.createBundleOnSimpleMoveBalance(e),t)return o.Logger.trace("parseUntypedOutcome(): on simple move balance"),t;if(t=this.createBundleOnInvalidTransaction(e),t)return o.Logger.trace("parseUntypedOutcome(): on invalid transaction"),t;if(t=this.createBundleOnEasilyFoundResultWithReturnData(e.contractResults),t)return o.Logger.trace("parseUntypedOutcome(): on easily found result with return data"),t;if(t=this.createBundleOnSignalError(e.logs),t)return o.Logger.trace("parseUntypedOutcome(): on signal error"),t;if(t=this.createBundleOnTooMuchGasWarning(e.logs),t)return o.Logger.trace("parseUntypedOutcome(): on 'too much gas' warning"),t;if(t=this.createBundleOnWriteLogWhereFirstTopicEqualsAddress(e.logs,e.sender),t)return o.Logger.trace("parseUntypedOutcome(): on writelog with topics[0] == tx.sender"),t;if(t=this.createBundleWithCustomHeuristics(e,r),t)return o.Logger.trace("parseUntypedOutcome(): with custom heuristics"),t;if(t=this.createBundleWithFallbackHeuristics(e,r),t)return o.Logger.trace("parseUntypedOutcome(): with fallback heuristics"),t;throw new s.ErrCannotParseContractResults(`transaction ${e.hash.toString()}`)}parseTransactionMetadata(e){return(new n.TransactionDecoder).getTransactionMetadata({sender:e.sender.bech32(),receiver:e.receiver.bech32(),data:e.data.toString("base64"),value:e.value.toString()})}createBundleOnSimpleMoveBalance(e){let t=0==e.contractResults.items.length,r=0==e.logs.events.length;return t&&r?{returnCode:u.ReturnCode.None,returnMessage:u.ReturnCode.None.toString(),values:[]}:null}createBundleOnInvalidTransaction(e){return e.status.isInvalid()&&e.receipt.data?{returnCode:u.ReturnCode.OutOfFunds,returnMessage:e.receipt.data,values:[]}:null}createBundleOnEasilyFoundResultWithReturnData(e){let t=e.items.find((e=>0!=e.nonce.valueOf()&&e.data.startsWith("@")));if(!t)return null;let{returnCode:r,returnDataParts:n}=this.sliceDataFieldInParts(t.data),i=t.returnMessage||r.toString();return{returnCode:r,returnMessage:i,values:n}}createBundleOnSignalError(e){let t=e.findSingleOrNoneEvent(c.OnSignalError);if(!t)return null;let{returnCode:r,returnDataParts:n}=this.sliceDataFieldInParts(t.data),i=t.getLastTopic(),s=(null==i?void 0:i.toString())||r.toString();return{returnCode:r,returnMessage:s,values:n}}createBundleOnTooMuchGasWarning(e){let t=e.findSingleOrNoneEvent(c.OnWriteLog,(e=>null!=e.findFirstOrNoneTopic((e=>e.toString().startsWith(l.TooMuchGas)))));if(!t)return null;let{returnCode:r,returnDataParts:n}=this.sliceDataFieldInParts(t.data),i=t.getLastTopic(),s=(null==i?void 0:i.toString())||r.toString();return{returnCode:r,returnMessage:s,values:n}}createBundleOnWriteLogWhereFirstTopicEqualsAddress(e,t){let r=new i.Address(t.bech32()).hex(),n=e.findSingleOrNoneEvent(c.OnWriteLog,(e=>null!=e.findFirstOrNoneTopic((e=>e.hex()==r))));if(!n)return null;let{returnCode:s,returnDataParts:o}=this.sliceDataFieldInParts(n.data),a=s.toString();return{returnCode:s,returnMessage:a,values:o}}createBundleWithCustomHeuristics(e,t){return null}createBundleWithFallbackHeuristics(e,t){let r=new i.Address(t.receiver);for(const t of e.contractResults.items){let n=t.logs.findSingleOrNoneEvent(c.OnWriteLog,(t=>{var n;let i=t.address.bech32()==e.sender.bech32(),s=(null===(n=t.topics[0])||void 0===n?void 0:n.hex())==r.hex();return i&&s}));if(n){let{returnCode:e,returnDataParts:t}=this.sliceDataFieldInParts(n.data),r=e.toString();return{returnCode:e,returnMessage:r,values:t}}}return null}sliceDataFieldInParts(e){let t=1;e.startsWith("ESDTTransfer")&&(t=3);let r=this.argsSerializer.stringToBuffers(e),n=r[t]||Buffer.from([]),i=r.slice(t+1);if(0==n.length)throw new s.ErrCannotParseContractResults("no return code");return{returnCode:u.ReturnCode.fromBuffer(n),returnDataParts:i}}parseEvent(e,t){var r,n;const i={},s=e.topics.map((e=>Buffer.from(e.valueOf()))).slice(1),o=(null===(r=e.dataPayload)||void 0===r?void 0:r.valueOf())||Buffer.from([]),a=(null===(n=e.additionalData)||void 0===n?void 0:n.map((e=>Buffer.from(e.valueOf()))))||[];0==a.length&&o.length>0&&a.push(Buffer.from(o));const u=t.inputs.filter((e=>e.indexed)),c=this.argsSerializer.buffersToValues(s,u);for(let e=0;e<u.length;e++)i[u[e].name]=c[e].valueOf();const l=t.inputs.filter((e=>!e.indexed)),f=this.argsSerializer.buffersToValues(a,l);for(let e=0;e<l.length;e++)i[l[e].name]=f[e].valueOf();return i}}},3462:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReturnCode=void 0;class r{constructor(e){this.text=e}static fromBuffer(e){let t=e.toString();return new r(t)}toString(){return this.text}valueOf(){return this.text}equals(e){return!!e&&this.text==e.text}isSuccess(){return this.equals(r.Ok)||this.equals(r.None)}}t.ReturnCode=r,r.None=new r(""),r.Ok=new r("ok"),r.FunctionNotFound=new r("function not found"),r.FunctionWrongSignature=new r("wrong signature for function"),r.ContractNotFound=new r("contract not found"),r.UserError=new r("user error"),r.OutOfGas=new r("out of gas"),r.AccountCollision=new r("account collision"),r.OutOfFunds=new r("out of funds"),r.CallStackOverFlow=new r("call stack overflow"),r.ContractInvalid=new r("contract invalid"),r.ExecutionFailed=new r("execution failed"),r.Unknown=new r("unknown")},1998:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SmartContract=void 0;const i=n(r(1594)),s=r(236),o=r(1220),a=r(2581),u=r(476),c=r(1069),l=r(7553),f=r(5225),h=r(3685),d=r(1945),p=r(670),g=r(7453),y=r(7331),A=r(5508);t.SmartContract=class{constructor(e={}){this.address=new s.Address,this.methodsExplicit={},this.methods={},this.address=e.address||new s.Address,this.abi=e.abi,this.abi&&this.setupMethods()}setupMethods(){let e=this,t=this.getAbi();for(const r of t.getEndpoints()){let t=r.name;this.methodsExplicit[t]=function(r){let n=new h.ContractFunction(t);return new d.Interaction(e,n,r||[])},this.methods[t]=function(n){let i=new h.ContractFunction(t),s=p.NativeSerializer.nativeToTypedValues(n||[],r);return new d.Interaction(e,i,s||[])}}}setAddress(e){this.address=e}getAddress(){return this.address}getAbi(){return c.guardValueIsSet("abi",this.abi),this.abi}getEndpoint(e){return this.getAbi().getEndpoint(e)}deploy({deployer:e,code:t,codeMetadata:r,initArguments:n,value:i,gasLimit:a,gasPrice:c,chainID:l}){o.Compatibility.guardAddressIsSetAndNonZero(e,"'deployer' of SmartContract.deploy()","pass the actual address to deploy()"),r=r||new f.CodeMetadata,n=n||[],i=i||0;let h=(new y.ContractDeployPayloadBuilder).setCode(t).setCodeMetadata(r).setInitArgs(n).build();return new u.Transaction({receiver:s.Address.Zero(),sender:e,value:i,gasLimit:a,gasPrice:c,data:h,chainID:l})}upgrade({caller:e,code:t,codeMetadata:r,initArguments:n,value:i,gasLimit:s,gasPrice:a,chainID:c}){o.Compatibility.guardAddressIsSetAndNonZero(e,"'caller' of SmartContract.upgrade()","pass the actual address to upgrade()"),this.ensureHasAddress(),r=r||new f.CodeMetadata,n=n||[],i=i||0;let l=(new y.ContractUpgradePayloadBuilder).setCode(t).setCodeMetadata(r).setInitArgs(n).build();return new u.Transaction({sender:e,receiver:this.getAddress(),value:i,gasLimit:s,gasPrice:a,data:l,chainID:c})}call({func:e,args:t,value:r,gasLimit:n,receiver:i,gasPrice:s,chainID:a,caller:c}){o.Compatibility.guardAddressIsSetAndNonZero(c,"'caller' of SmartContract.call()","pass the actual address to call()"),this.ensureHasAddress(),t=t||[],r=r||0;let l=(new y.ContractCallPayloadBuilder).setFunction(e).setArgs(t).build();return new u.Transaction({sender:c,receiver:i||this.getAddress(),value:r,gasLimit:n,gasPrice:s,data:l,chainID:a})}createQuery({func:e,args:t,value:r,caller:n}){return this.ensureHasAddress(),new g.Query({address:this.getAddress(),func:e,args:t,value:r,caller:n})}ensureHasAddress(){if(!this.getAddress().bech32())throw new a.ErrContractHasNoAddress}static computeAddress(e,t){let r=Buffer.alloc(8,0),n=new s.Address(e.bech32()).pubkey(),o=n.slice(30),a=Buffer.alloc(8);const u=new i.default(t.valueOf().toString(10)),c=l.bigIntToBuffer(u);a.write(c.reverse().toString("hex"),"hex");let f=Buffer.concat([n,a]),h=A("keccak256").update(f).digest(),d=Buffer.from(y.ArwenVirtualMachine,"hex"),p=Buffer.concat([r,d,h.slice(10,30),o]);return new s.Address(p)}}},7331:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContractCallPayloadBuilder=t.ContractUpgradePayloadBuilder=t.ContractDeployPayloadBuilder=t.ArwenVirtualMachine=void 0;const n=r(3548),i=r(1069),s=r(1157);t.ArwenVirtualMachine="0500";t.ContractDeployPayloadBuilder=class{constructor(){this.code=null,this.codeMetadata="",this.arguments=[]}setCode(e){return this.code=e,this}setCodeMetadata(e){return this.codeMetadata=e,this}addInitArg(e){return this.arguments.push(e),this}setInitArgs(e){return this.arguments=e,this}build(){i.guardValueIsSet("code",this.code);let e=this.code.toString(),r=this.codeMetadata.toString(),s=`${e}@${t.ArwenVirtualMachine}@${r}`;return s=o(s,this.arguments),new n.TransactionPayload(s)}};t.ContractUpgradePayloadBuilder=class{constructor(){this.code=null,this.codeMetadata="",this.arguments=[]}setCode(e){return this.code=e,this}setCodeMetadata(e){return this.codeMetadata=e,this}addInitArg(e){return this.arguments.push(e),this}setInitArgs(e){return this.arguments=e,this}build(){i.guardValueIsSet("code",this.code);let e=`upgradeContract@${this.code.toString()}@${this.codeMetadata.toString()}`;return e=o(e,this.arguments),new n.TransactionPayload(e)}};function o(e,t){let{argumentsString:r,count:n}=(new s.ArgSerializer).valuesToString(t);return 0==n?e:`${e}@${r}`}t.ContractCallPayloadBuilder=class{constructor(){this.contractFunction=null,this.arguments=[]}setFunction(e){return this.contractFunction=e,this}addArg(e){return this.arguments.push(e),this}setArgs(e){return this.arguments=e,this}build(){i.guardValueIsSet("calledFunction",this.contractFunction);let e=this.contractFunction.toString();return e=o(e,this.arguments),new n.TransactionPayload(e)}}},4966:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.AbiRegistry=void 0;const o=s(r(2581)),a=r(1069),u=r(5730),c=r(1414),l=r(4143),f=r(7586),h=r(7654);class d{constructor(e){this.endpoints=[],this.customTypes=[],this.events=[],this.name=e.name,this.constructorDefinition=e.constructorDefinition,this.endpoints=e.endpoints,this.customTypes=e.customTypes,this.events=e.events||[]}static create(e){const t=e.name||"?",r=e.constructor||{},n=e.endpoints||[],i=e.types||{},s=e.events||[],a=u.EndpointDefinition.fromJSON(Object.assign({name:"constructor"},r)),h=n.map((e=>u.EndpointDefinition.fromJSON(e))),p=[];for(const e in i){const t=i[e];if("struct"==t.type)p.push(f.StructType.fromJSON({name:e,fields:t.fields}));else{if("enum"!=t.type&&"explicit-enum"!=t.type)throw new o.ErrTypingSystem(`Cannot handle custom type: ${e}`);p.push(c.EnumType.fromJSON({name:e,variants:t.variants}))}}const g=s.map((e=>l.EventDefinition.fromJSON(e)));return new d({name:t,constructorDefinition:a,endpoints:h,customTypes:p,events:g}).remapToKnownTypes()}getCustomType(e){const t=this.customTypes.find((t=>t.getName()==e));return a.guardValueIsSetWithMessage(`custom type [${e}] not found`,t),t}getStruct(e){const t=this.customTypes.find((t=>t.getName()==e&&t.hasExactClass(f.StructType.ClassName)));return a.guardValueIsSetWithMessage(`struct [${e}] not found`,t),t}getStructs(e){return e.map((e=>this.getStruct(e)))}getEnum(e){const t=this.customTypes.find((t=>t.getName()==e&&t.hasExactClass(c.EnumType.ClassName)));return a.guardValueIsSetWithMessage(`enum [${e}] not found`,t),t}getEnums(e){return e.map((e=>this.getEnum(e)))}getEndpoints(){return this.endpoints}getEndpoint(e){const t=this.endpoints.find((t=>t.name==e));return a.guardValueIsSetWithMessage(`endpoint [${e}] not found`,t),t}getEvent(e){const t=this.events.find((t=>t.identifier==e));return a.guardValueIsSetWithMessage(`event [${e}] not found`,t),t}remapToKnownTypes(){const e=new h.TypeMapper([]),t=[];for(const r of this.customTypes)this.mapCustomTypeDepthFirst(r,this.customTypes,e,t);if(this.customTypes.length!=t.length)throw new o.ErrTypingSystem("Did not re-map all custom types");const r=p(this.constructorDefinition,e),n=[];for(const t of this.endpoints)n.push(p(t,e));const i=this.events.map((t=>function(e,t){const r=e.inputs.map((e=>new l.EventTopicDefinition({name:e.name,type:t.mapType(e.type),indexed:e.indexed})));return new l.EventDefinition(e.identifier,r)}(t,e)));return new d({name:this.name,constructorDefinition:r,endpoints:n,customTypes:t,events:i})}mapCustomTypeDepthFirst(e,t,r,n){if(n.findIndex((t=>t.getName()==e.getName()))>=0)return;for(const i of e.getNamesOfDependencies()){const e=t.find((e=>e.getName()==i));e&&this.mapCustomTypeDepthFirst(e,t,r,n)}const i=r.mapType(e);n.push(i)}}function p(e,t){const r=e.input.map((e=>new u.EndpointParameterDefinition(e.name,e.description,t.mapType(e.type)))),n=e.output.map((e=>new u.EndpointParameterDefinition(e.name,e.description,t.mapType(e.type))));return new u.EndpointDefinition(e.name,r,n,e.modifiers)}t.AbiRegistry=d},8551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddressValue=t.AddressType=void 0;const n=r(236),i=r(5626);class s extends i.PrimitiveType{constructor(){super("Address")}getClassName(){return s.ClassName}}t.AddressType=s,s.ClassName="AddressType";class o extends i.PrimitiveValue{constructor(e){super(new s),this.value=new n.Address(e.bech32())}getClassName(){return o.ClassName}equals(e){return this.value.equals(e.value)}valueOf(){return this.value}}t.AddressValue=o,o.ClassName="AddressValue"},1055:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalValue=t.OptionalType=void 0;const n=r(1069),i=r(5626);class s extends i.Type{constructor(e){super("Optional",[e],i.TypeCardinality.variable(1))}getClassName(){return s.ClassName}isAssignableFrom(e){if(!e.hasExactClass(s.ClassName))return!1;let t=this.getFirstTypeParameter().equals(e.getFirstTypeParameter()),r=e.getFirstTypeParameter().hasExactClass(i.NullType.ClassName);return t||r}}t.OptionalType=s,s.ClassName="OptionalType";class o extends i.TypedValue{constructor(e,t=null){super(e),this.value=t}getClassName(){return o.ClassName}static newMissing(){let e=new s(new i.NullType);return new o(e)}isSet(){return!!this.value}getTypedValue(){return n.guardValueIsSet("value",this.value),this.value}valueOf(){return this.value?this.value.valueOf():null}equals(e){var t;return(null===(t=this.value)||void 0===t?void 0:t.equals(e.value))||!1}}t.OptionalValue=o,o.ClassName="OptionalValue"},1392:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BytesValue=t.BytesType=void 0;const n=r(5626);class i extends n.PrimitiveType{constructor(){super("bytes")}getClassName(){return i.ClassName}}t.BytesType=i,i.ClassName="BytesType";class s extends n.PrimitiveValue{constructor(e){super(new i),this.value=e}getClassName(){return s.ClassName}static fromUTF8(e){let t=Buffer.from(e,"utf-8");return new s(t)}static fromHex(e){let t=Buffer.from(e,"hex");return new s(t)}getLength(){return this.value.length}equals(e){return this.getLength()==e.getLength()&&this.value.equals(e.value)}valueOf(){return this.value}toString(){return this.value.toString()}}t.BytesValue=s,s.ClassName="BytesValue"},1847:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeMetadataValue=t.CodeMetadataType=void 0;const n=r(5626);class i extends n.PrimitiveType{constructor(){super("CodeMetadata")}}t.CodeMetadataType=i;class s extends n.PrimitiveValue{constructor(e){super(new i),this.value=e}equals(e){return this.value.equals(e.value)}valueOf(){return this.value}}t.CodeMetadataValue=s},902:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionOfTypedValues=void 0;t.CollectionOfTypedValues=class{constructor(e){this.items=e}getLength(){return this.items.length}getItems(){return this.items}valueOf(){return this.items.map((e=>e.valueOf()))}equals(e){if(this.getLength()!=e.getLength())return!1;for(let t=0;t<this.getLength();t++){let r=this.items[t],n=e.items[t];if(!r.equals(n))return!1}return!0}}},7472:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CompositeValue=t.CompositeType=void 0;const n=r(1069),i=r(5626);class s extends i.Type{constructor(...e){super("Composite",e,i.TypeCardinality.variable(e.length))}getClassName(){return s.ClassName}}t.CompositeType=s,s.ClassName="CompositeType";class o extends i.TypedValue{constructor(e,t){super(e),n.guardLength(t,e.getTypeParameters().length),this.items=t}getClassName(){return o.ClassName}static fromItems(...e){let t=e.map((e=>e.getType())),r=new s(...t);return new o(r,e)}getItems(){return this.items}valueOf(){return this.items.map((e=>null==e?void 0:e.valueOf()))}equals(e){if(this.getType().differs(e.getType()))return!1;for(let t=0;t<this.items.length;t++){let r=this.items[t],n=e.items[t];if(!r.equals(n))return!1}return!0}}t.CompositeValue=o,o.ClassName="CompositeValue"},5730:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EndpointParameterDefinition=t.EndpointModifiers=t.EndpointDefinition=void 0;const n=r(7966);class i{constructor(e,t,r,n){this.input=[],this.output=[],this.name=e,this.input=t||[],this.output=r||[],this.modifiers=n}isConstructor(){return"constructor"==this.name}static fromJSON(e){e.name=null==e.name?"?":e.name,e.onlyOwner=e.onlyOwner||!1,e.payableInTokens=e.payableInTokens||[],e.inputs=e.inputs||[],e.outputs=e.outputs||[];let t=e.inputs.map((e=>o.fromJSON(e))),r=e.outputs.map((e=>o.fromJSON(e))),n=new s(e.mutability,e.payableInTokens,e.onlyOwner);return new i(e.name,t,r,n)}}t.EndpointDefinition=i;class s{constructor(e,t,r){this.mutability=e||"",this.payableInTokens=t||[],this.onlyOwner=r||!1}isPayableInEGLD(){return this.isPayableInToken("EGLD")}isPayableInToken(e){return!!this.payableInTokens.includes(e)||!this.payableInTokens.includes(`!${e}`)&&!!this.payableInTokens.includes("*")}isPayable(){return 0!=this.payableInTokens.length}isReadonly(){return"readonly"==this.mutability}isOnlyOwner(){return this.onlyOwner}}t.EndpointModifiers=s;class o{constructor(e,t,r){this.name=e,this.description=t,this.type=r}static fromJSON(e){let t=(new n.TypeExpressionParser).parse(e.type);return new o(e.name||"?",e.description||"N / A",t)}}t.EndpointParameterDefinition=o},1414:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnumValue=t.EnumVariantDefinition=t.EnumType=void 0;const n=r(2581),i=r(1069),s=r(5766),o=r(5626);class a extends o.CustomType{constructor(e,t){super(e),this.variants=[],this.variants=t}getClassName(){return a.ClassName}static fromJSON(e){const t=a.assignMissingDiscriminants(e.variants||[]).map((e=>u.fromJSON(e)));return new a(e.name,t)}static assignMissingDiscriminants(e){return e.every((e=>null==e.discriminant))?e.map(((e,t)=>Object.assign(Object.assign({},e),{discriminant:t}))):e}getVariantByDiscriminant(e){let t=this.variants.find((t=>t.discriminant==e));return i.guardValueIsSet(`variant by discriminant (${e})`,t),t}getVariantByName(e){let t=this.variants.find((t=>t.name==e));return i.guardValueIsSet(`variant by name (${e})`,t),t}getNamesOfDependencies(){const e=[];for(const t of this.variants)e.push(...t.getNamesOfDependencies());return[...new Set(e)]}}t.EnumType=a,a.ClassName="EnumType";class u{constructor(e,t,r=[]){this.fieldsDefinitions=[],i.guardTrue(t<256,"discriminant for simple enum should be less than 256"),this.name=e,this.discriminant=t,this.fieldsDefinitions=r}static fromJSON(e){let t=(e.fields||[]).map((e=>s.FieldDefinition.fromJSON(e)));return new u(e.name,e.discriminant,t)}getFieldsDefinitions(){return this.fieldsDefinitions}getFieldDefinition(e){return this.fieldsDefinitions.find((t=>t.name==e))}getNamesOfDependencies(){return s.Fields.getNamesOfTypeDependencies(this.fieldsDefinitions)}}t.EnumVariantDefinition=u;class c extends o.TypedValue{constructor(e,t,r){super(e),this.fields=[],this.name=t.name,this.discriminant=t.discriminant,this.fields=r,this.fieldsByName=new Map(r.map((e=>[e.name,e])));let n=t.getFieldsDefinitions();s.Fields.checkTyping(this.fields,n)}getClassName(){return c.ClassName}static fromName(e,t){let r=e.getVariantByName(t);return new c(e,r,[])}static fromDiscriminant(e,t){let r=e.getVariantByDiscriminant(t);return new c(e,r,[])}equals(e){if(!this.getType().equals(e.getType()))return!1;let t=this.getFields(),r=e.getFields();const n=this.name==e.name,i=this.discriminant==e.discriminant,o=s.Fields.equals(t,r);return n&&i&&o}getFields(){return this.fields}getFieldValue(e){let t=this.fieldsByName.get(e);if(t)return t.value.valueOf();throw new n.ErrMissingFieldOnEnum(e,this.getType().getName())}valueOf(){let e={name:this.name,fields:[]};return this.fields.forEach(((t,r)=>e.fields[r]=t.value.valueOf())),e}}t.EnumValue=c,c.ClassName="EnumValue"},4143:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventTopicDefinition=t.EventDefinition=void 0;const n=r(7966);class i{constructor(e,t){this.inputs=[],this.identifier=e,this.inputs=t||[]}static fromJSON(e){e.identifier=null==e.identifier?"?":e.identifier,e.inputs=e.inputs||[];const t=e.inputs.map((e=>s.fromJSON(e)));return new i(e.identifier,t)}}t.EventDefinition=i;class s{constructor(e){this.name=e.name,this.type=e.type,this.indexed=e.indexed}static fromJSON(e){const t=(new n.TypeExpressionParser).parse(e.type);return new s({name:e.name||"?",type:t,indexed:e.indexed})}}t.EventTopicDefinition=s},8689:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createListOfTokenIdentifiers=t.createListOfAddresses=void 0;const n=r(8551),i=r(926),s=r(3145);t.createListOfAddresses=function(e){let t=e.map((e=>new n.AddressValue(e)));return i.List.fromItems(t)},t.createListOfTokenIdentifiers=function(e){let t=e.map((e=>new s.TokenIdentifierValue(e)));return i.List.fromItems(t)}},5766:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Fields=t.Field=t.FieldDefinition=void 0;const o=s(r(2581)),a=r(7966);class u{constructor(e,t,r){this.name=e,this.description=t,this.type=r}static fromJSON(e){let t=(new a.TypeExpressionParser).parse(e.type);return new u(e.name,e.description,t)}}t.FieldDefinition=u;t.Field=class{constructor(e,t=""){this.value=e,this.name=t}checkTyping(e){const t=this.value.getType();if(!t.equals(e.type))throw new o.ErrTypingSystem(`check type of field "${e.name}; expected: ${e.type}, actual: ${t}"`);if(this.name!=e.name)throw new o.ErrTypingSystem(`check name of field "${e.name}"`)}equals(e){return this.name==e.name&&this.value.equals(e.value)}};t.Fields=class{static checkTyping(e,t){if(e.length!=t.length)throw new o.ErrTypingSystem("fields length vs. field definitions length");for(let r=0;r<e.length;r++){let n=e[r],i=t[r];n.checkTyping(i)}}static equals(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++){let n=e[r],i=t[r];if(!n.equals(i))return!1}return!0}static getNamesOfTypeDependencies(e){const t=[];for(const r of e)t.push(r.type.getName()),t.push(...r.type.getNamesOfDependencies());return[...new Set(t)]}}},926:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.List=t.OptionValue=t.ListType=t.OptionType=void 0;const n=r(1069),i=r(902),s=r(5626);class o extends s.Type{constructor(e){super("Option",[e])}getClassName(){return o.ClassName}isAssignableFrom(e){if(!e.hasExactClass(o.ClassName))return!1;let t=this.getFirstTypeParameter().equals(e.getFirstTypeParameter()),r=e.getFirstTypeParameter().hasExactClass(s.NullType.ClassName);return t||r}}t.OptionType=o,o.ClassName="OptionType";class a extends s.Type{constructor(e){super("List",[e])}getClassName(){return a.ClassName}}t.ListType=a,a.ClassName="ListType";class u extends s.TypedValue{constructor(e,t=null){super(e),this.value=t}getClassName(){return u.ClassName}static newMissing(){let e=new o(new s.NullType);return new u(e)}static newMissingTyped(e){return new u(new o(e))}static newProvided(e){let t=new o(e.getType());return new u(t,e)}isSet(){return!!this.value}getTypedValue(){return n.guardValueIsSet("value",this.value),this.value}valueOf(){return this.value?this.value.valueOf():null}equals(e){var t;return(null===(t=this.value)||void 0===t?void 0:t.equals(e.value))||!1}}t.OptionValue=u,u.ClassName="OptionValue";class c extends s.TypedValue{constructor(e,t){super(e),this.backingCollection=new i.CollectionOfTypedValues(t)}getClassName(){return c.ClassName}static fromItems(e){if(0==e.length)return new c(new s.TypePlaceholder,[]);let t=e[0].getType(),r=new a(t);return new c(r,e)}getLength(){return this.backingCollection.getLength()}getItems(){return this.backingCollection.getItems()}valueOf(){return this.backingCollection.valueOf()}equals(e){return this.backingCollection.equals(e.backingCollection)}}t.List=c,c.ClassName="List"},177:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayVec=t.ArrayVecType=void 0;const n=r(1069),i=r(902),s=r(5626);class o extends s.Type{constructor(e,t){super("Array",[t]),n.guardTrue(e>0,"array length > 0"),this.length=e}getClassName(){return o.ClassName}}t.ArrayVecType=o,o.ClassName="ArrayVecType";class a extends s.TypedValue{constructor(e,t){super(e),n.guardLength(t,e.length),this.backingCollection=new i.CollectionOfTypedValues(t)}getClassName(){return a.ClassName}getLength(){return this.backingCollection.getLength()}getItems(){return this.backingCollection.getItems()}valueOf(){return this.backingCollection.valueOf()}equals(e){return this.backingCollection.equals(e.backingCollection)}}t.ArrayVec=a,a.ClassName="ArrayVec"},1038:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.H256Value=t.H256Type=void 0;const n=r(5626);class i extends n.PrimitiveType{constructor(){super("H256")}getClassName(){return i.ClassName}}t.H256Type=i,i.ClassName="H256Type";class s extends n.PrimitiveValue{constructor(e){super(new i),this.value=e}getClassName(){return s.ClassName}equals(e){return this.value.equals(e.value)}valueOf(){return this.value}}t.H256Value=s,s.ClassName="H256Value"},2747:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(4966),t),i(r(8551),t),i(r(1055),t),i(r(3979),t),i(r(1392),t),i(r(7472),t),i(r(5730),t),i(r(1414),t),i(r(8689),t),i(r(5766),t),i(r(926),t),i(r(177),t),i(r(1038),t),i(r(5648),t),i(r(1782),t),i(r(4473),t),i(r(6514),t),i(r(7586),t),i(r(3145),t),i(r(1025),t),i(r(7966),t),i(r(7654),t),i(r(5626),t),i(r(6054),t)},5648:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.onPrimitiveTypeSelect=t.onPrimitiveValueSelect=t.onTypedValueSelect=t.onTypeSelect=void 0;const o=s(r(2581)),a=r(8551),u=r(3979),c=r(1392),l=r(1414),f=r(926),h=r(1038),d=r(4473),p=r(1782),g=r(7586),y=r(3145),A=r(1025),m=r(5626),b=r(177),w=r(6514);t.onTypeSelect=function(e,t){if(e.hasExactClass(f.OptionType.ClassName))return t.onOption();if(e.hasExactClass(f.ListType.ClassName))return t.onList();if(e.hasExactClass(b.ArrayVecType.ClassName))return t.onArray();if(e.hasClassOrSuperclass(m.PrimitiveType.ClassName))return t.onPrimitive();if(e.hasExactClass(g.StructType.ClassName))return t.onStruct();if(e.hasExactClass(A.TupleType.ClassName))return t.onTuple();if(e.hasExactClass(l.EnumType.ClassName))return t.onEnum();if(t.onOther)return t.onOther();throw new o.ErrTypingSystem(`type isn't known: ${e}`)},t.onTypedValueSelect=function(e,t){if(e.hasClassOrSuperclass(m.PrimitiveValue.ClassName))return t.onPrimitive();if(e.hasExactClass(f.OptionValue.ClassName))return t.onOption();if(e.hasExactClass(f.List.ClassName))return t.onList();if(e.hasExactClass(b.ArrayVec.ClassName))return t.onArray();if(e.hasExactClass(g.Struct.ClassName))return t.onStruct();if(e.hasExactClass(A.Tuple.ClassName))return t.onTuple();if(e.hasExactClass(l.EnumValue.ClassName))return t.onEnum();if(t.onOther)return t.onOther();throw new o.ErrTypingSystem(`value isn't typed: ${e}`)},t.onPrimitiveValueSelect=function(e,t){if(e.hasExactClass(u.BooleanValue.ClassName))return t.onBoolean();if(e.hasClassOrSuperclass(d.NumericalValue.ClassName))return t.onNumerical();if(e.hasExactClass(a.AddressValue.ClassName))return t.onAddress();if(e.hasExactClass(c.BytesValue.ClassName))return t.onBytes();if(e.hasExactClass(w.StringValue.ClassName))return t.onString();if(e.hasExactClass(h.H256Value.ClassName))return t.onH256();if(e.hasExactClass(y.TokenIdentifierValue.ClassName))return t.onTypeIdentifier();if(e.hasExactClass(p.NothingValue.ClassName))return t.onNothing();if(t.onOther)return t.onOther();throw new o.ErrTypingSystem(`value isn't a primitive: ${e.getType()}`)},t.onPrimitiveTypeSelect=function(e,t){if(e.hasExactClass(u.BooleanType.ClassName))return t.onBoolean();if(e.hasClassOrSuperclass(d.NumericalType.ClassName))return t.onNumerical();if(e.hasExactClass(a.AddressType.ClassName))return t.onAddress();if(e.hasExactClass(c.BytesType.ClassName))return t.onBytes();if(e.hasExactClass(w.StringType.ClassName))return t.onString();if(e.hasExactClass(h.H256Type.ClassName))return t.onH256();if(e.hasExactClass(y.TokenIdentifierType.ClassName))return t.onTokenIndetifier();if(e.hasExactClass(p.NothingType.ClassName))return t.onNothing();if(t.onOther)return t.onOther();throw new o.ErrTypingSystem(`type isn't a known primitive: ${e}`)}},1782:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NothingValue=t.NothingType=void 0;const n=r(5626);class i extends n.PrimitiveType{constructor(){super("nothing")}getClassName(){return i.ClassName}}t.NothingType=i,i.ClassName="NothingType";class s extends n.PrimitiveValue{constructor(){super(new i)}getClassName(){return s.ClassName}equals(e){return!1}valueOf(){return{}}}t.NothingValue=s,s.ClassName="NothingValue"},4473:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BigIntValue=t.BigUIntValue=t.I64Value=t.U64Value=t.I32Value=t.U32Value=t.I16Value=t.U16Value=t.I8Value=t.U8Value=t.NumericalValue=t.BigIntType=t.BigUIntType=t.I64Type=t.U64Type=t.I32Type=t.U32Type=t.I16Type=t.U16Type=t.I8Type=t.U8Type=t.NumericalType=void 0;const a=s(r(2581)),u=r(5626),c=o(r(1594));class l extends u.PrimitiveType{constructor(e,t,r){super(e),this.sizeInBytes=t,this.withSign=r}getClassName(){return l.ClassName}hasFixedSize(){return!!this.sizeInBytes}hasArbitrarySize(){return!this.hasFixedSize()}}t.NumericalType=l,l.ClassName="NumericalType";class f extends l{constructor(){super("u8",1,!1)}getClassName(){return f.ClassName}}t.U8Type=f,f.ClassName="U8Type";class h extends l{constructor(){super("i8",1,!0)}getClassName(){return h.ClassName}}t.I8Type=h,h.ClassName="I8Type";class d extends l{constructor(){super("u16",2,!1)}getClassName(){return d.ClassName}}t.U16Type=d,d.ClassName="U16Type";class p extends l{constructor(){super("i16",2,!0)}getClassName(){return p.ClassName}}t.I16Type=p,p.ClassName="I16Type";class g extends l{constructor(){super("u32",4,!1)}getClassName(){return g.ClassName}}t.U32Type=g,g.ClassName="U32Type";class y extends l{constructor(){super("i32",4,!0)}getClassName(){return y.ClassName}}t.I32Type=y,y.ClassName="I32Type";class A extends l{constructor(){super("u64",8,!1)}getClassName(){return A.ClassName}}t.U64Type=A,A.ClassName="U64Type";class m extends l{constructor(){super("i64",8,!0)}getClassName(){return m.ClassName}}t.I64Type=m,m.ClassName="I64Type";class b extends l{constructor(){super("BigUint",0,!1)}getClassName(){return b.ClassName}}t.BigUIntType=b,b.ClassName="BigUIntType";class w extends l{constructor(){super("Bigint",0,!0)}getClassName(){return w.ClassName}}t.BigIntType=w,w.ClassName="BigIntType";class v extends u.PrimitiveValue{constructor(e,t){if(super(e),this.value=new c.default(t),this.sizeInBytes=e.sizeInBytes,this.withSign=e.withSign,this.value.isNaN())throw new a.ErrInvalidArgument(`not a number: ${t}`);if(!this.withSign&&this.value.isNegative())throw new a.ErrInvalidArgument(`negative, but type is unsigned: ${t}`)}getClassName(){return v.ClassName}equals(e){return this.value.isEqualTo(e.value)}valueOf(){return this.value}toString(){return this.value.toString()}}t.NumericalValue=v,v.ClassName="NumericalValue";class I extends v{constructor(e){super(new f,new c.default(e))}getClassName(){return I.ClassName}}t.U8Value=I,I.ClassName="U8Value";class C extends v{constructor(e){super(new h,new c.default(e))}getClassName(){return C.ClassName}}t.I8Value=C,C.ClassName="I8Value";class E extends v{constructor(e){super(new d,new c.default(e))}getClassName(){return E.ClassName}}t.U16Value=E,E.ClassName="U16Value";class S extends v{constructor(e){super(new p,new c.default(e))}getClassName(){return S.ClassName}}t.I16Value=S,S.ClassName="I16Value";class T extends v{constructor(e){super(new g,new c.default(e))}getClassName(){return T.ClassName}}t.U32Value=T,T.ClassName="U32Value";class B extends v{constructor(e){super(new y,new c.default(e))}getClassName(){return B.ClassName}}t.I32Value=B,B.ClassName="I32Value";class N extends v{constructor(e){super(new A,e)}getClassName(){return N.ClassName}}t.U64Value=N,N.ClassName="U64Value";class O extends v{constructor(e){super(new m,e)}getClassName(){return O.ClassName}}t.I64Value=O,O.ClassName="I64Value";class _ extends v{constructor(e){super(new b,e)}getClassName(){return _.ClassName}}t.BigUIntValue=_,_.ClassName="BigUIntValue";class P extends v{constructor(e){super(new w,e)}getClassName(){return P.ClassName}}t.BigIntValue=P,P.ClassName="BigIntValue"},6514:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringValue=t.StringType=void 0;const n=r(5626);class i extends n.PrimitiveType{constructor(){super("utf-8 string")}getClassName(){return i.ClassName}}t.StringType=i,i.ClassName="StringType";class s extends n.PrimitiveValue{constructor(e){super(new i),this.value=e}getClassName(){return s.ClassName}static fromUTF8(e){return new s(e)}static fromHex(e){let t=Buffer.from(e,"hex").toString();return new s(t)}getLength(){return this.value.length}equals(e){return this.value===e.value}valueOf(){return this.value}}t.StringValue=s,s.ClassName="StringValue"},1025:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Tuple=t.TupleType=void 0;const o=s(r(2581)),a=r(5766),u=r(7586);class c extends u.StructType{constructor(...e){super(c.prepareName(e),c.prepareFieldDefinitions(e))}getClassName(){return c.ClassName}static prepareName(e){return`tuple<${e.map((e=>e.toString())).join(", ")}>`}static prepareFieldDefinitions(e){return e.map(((e,t)=>new a.FieldDefinition(l(t),"anonymous tuple field",e)))}}function l(e){return`field${e}`}t.TupleType=c,c.ClassName="TupleType";class f extends u.Struct{constructor(e,t){super(e,t)}getClassName(){return f.ClassName}static fromItems(e){if(e.length<1)throw new o.ErrTypingSystem("bad tuple items");let t=e.map((e=>e.getType())),r=new c(...t),n=e.map(((e,t)=>new a.Field(e,l(t))));return new f(r,n)}}t.Tuple=f,f.ClassName="Tuple"},7966:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TypeExpressionParser=void 0;const o=s(r(2581)),a=r(5626);var u=r(6598);t.TypeExpressionParser=class{parse(e){let t=this.doParse(e),r=Object.keys(t);if(1!=r.length)throw new o.ErrTypingSystem(`bad type expression: ${e}`);let n=r[0];return this.nodeToType(n,t[n])}doParse(e){let t=this.getJsonedString(e);try{return u.parse(t)}catch(r){throw new o.ErrTypingSystem(`cannot parse type expression: ${e}. internal json: ${t}.`)}}getJsonedString(e){let t="";for(var r=0;r<e.length;r++){let n=e.charAt(r),i=e.charAt(r-1),s=e.charAt(r+1);"<"==n?t+=": {":">"==n?t+=">"!=i?": {} }":"}":","==n?">"==s||(t+=">"==i?",":": {},"):t+=n}let n=/(:|\{|\}|,|\s)/,i=t.replace(/utf\-8\sstring/gi,"utf-8-string").split(n).filter((e=>e));return t=i.map((e=>n.test(e)?e:`"${e}"`)).map((e=>e.replace(/utf\-8\-string/gi,"utf-8 string"))).join(""),1==i.length?`{${t}: {}}`:`{${t}}`}nodeToType(e,t){"1"===e.charAt(e.length-1)&&(e=e.slice(0,-1));let r=Object.keys(t).map((e=>this.nodeToType(e,t[e])));return new a.Type(e,r)}}},7654:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TypeMapper=void 0;const o=s(r(2581)),a=r(8551),u=r(1055),c=r(3979),l=r(1392),f=r(1847),h=r(7472),d=r(1414),p=r(5766),g=r(926),y=r(177),A=r(1038),m=r(1782),b=r(4473),w=r(6514),v=r(7586),I=r(3145),C=r(1025),E=r(6054);t.TypeMapper=class{constructor(e=[]){this.openTypesFactories=new Map([["Option",(...e)=>new g.OptionType(e[0])],["List",(...e)=>new g.ListType(e[0])],["VarArgs",(...e)=>new E.VariadicType(e[0])],["MultiResultVec",(...e)=>new E.VariadicType(e[0])],["variadic",(...e)=>new E.VariadicType(e[0])],["counted-variadic",(...e)=>new E.VariadicType(e[0],!0)],["OptionalArg",(...e)=>new u.OptionalType(e[0])],["optional",(...e)=>new u.OptionalType(e[0])],["OptionalResult",(...e)=>new u.OptionalType(e[0])],["multi",(...e)=>new h.CompositeType(...e)],["MultiArg",(...e)=>new h.CompositeType(...e)],["MultiResult",(...e)=>new h.CompositeType(...e)],["multi",(...e)=>new h.CompositeType(...e)],["tuple",(...e)=>new C.TupleType(...e)],["tuple2",(...e)=>new C.TupleType(...e)],["tuple3",(...e)=>new C.TupleType(...e)],["tuple4",(...e)=>new C.TupleType(...e)],["tuple5",(...e)=>new C.TupleType(...e)],["tuple6",(...e)=>new C.TupleType(...e)],["tuple7",(...e)=>new C.TupleType(...e)],["tuple8",(...e)=>new C.TupleType(...e)],["array2",(...e)=>new y.ArrayVecType(2,e[0])],["array8",(...e)=>new y.ArrayVecType(8,e[0])],["array16",(...e)=>new y.ArrayVecType(16,e[0])],["array20",(...e)=>new y.ArrayVecType(20,e[0])],["array32",(...e)=>new y.ArrayVecType(32,e[0])],["array46",(...e)=>new y.ArrayVecType(46,e[0])],["array48",(...e)=>new y.ArrayVecType(48,e[0])],["array64",(...e)=>new y.ArrayVecType(64,e[0])],["array128",(...e)=>new y.ArrayVecType(128,e[0])],["array256",(...e)=>new y.ArrayVecType(256,e[0])]]),this.closedTypesMap=new Map([["u8",new b.U8Type],["u16",new b.U16Type],["u32",new b.U32Type],["u64",new b.U64Type],["U64",new b.U64Type],["BigUint",new b.BigUIntType],["i8",new b.I8Type],["i16",new b.I16Type],["i32",new b.I32Type],["i64",new b.I64Type],["Bigint",new b.BigIntType],["BigInt",new b.BigIntType],["bool",new c.BooleanType],["bytes",new l.BytesType],["Address",new a.AddressType],["H256",new A.H256Type],["utf-8 string",new w.StringType],["TokenIdentifier",new I.TokenIdentifierType],["EgldOrEsdtTokenIdentifier",new I.TokenIdentifierType],["CodeMetadata",new f.CodeMetadataType],["nothing",new m.NothingType],["AsyncCall",new m.NothingType]]),this.learnedTypesMap=new Map;for(const t of e)this.learnedTypesMap.set(t.getName(),t)}mapType(e){let t=this.mapTypeRecursively(e);if(t)return t.isGenericType()||this.learnType(t),t;throw new o.ErrTypingSystem(`Cannot map the type "${e.getName()}" to a known type`)}mapTypeRecursively(e){let t=e.isGenericType(),r=this.learnedTypesMap.get(e.getName());if(r)return r;let n=this.closedTypesMap.get(e.getName());return n||(e.hasExactClass(d.EnumType.ClassName)?this.mapEnumType(e):e.hasExactClass(v.StructType.ClassName)?this.mapStructType(e):t?this.mapGenericType(e):null)}learnType(e){this.learnedTypesMap.delete(e.getName()),this.learnedTypesMap.set(e.getName(),e)}mapStructType(e){let t=this.mappedFields(e.getFieldsDefinitions());return new v.StructType(e.getName(),t)}mapEnumType(e){let t=e.variants.map((e=>new d.EnumVariantDefinition(e.name,e.discriminant,this.mappedFields(e.getFieldsDefinitions()))));return new d.EnumType(e.getName(),t)}mappedFields(e){return e.map((e=>new p.FieldDefinition(e.name,e.description,this.mapType(e.type))))}mapGenericType(e){let t=e.getTypeParameters().map((e=>this.mapType(e))),r=this.openTypesFactories.get(e.getName());if(!r)throw new o.ErrTypingSystem(`Cannot map the generic type "${e.getName()}" to a known type`);return r(...t)}}},5626:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NullType=t.TypePlaceholder=t.isTyped=t.PrimitiveValue=t.TypedValue=t.CustomType=t.PrimitiveType=t.TypeCardinality=t.Type=void 0;const n=r(6063),i=r(1069);class s{constructor(e,t=[],r=o.fixed(1)){i.guardValueIsSet("name",e),this.name=e,this.typeParameters=t,this.cardinality=r}getName(){return this.name}getClassName(){return s.ClassName}getClassHierarchy(){return n.getJavascriptPrototypesInHierarchy(this,(e=>e.belongsToTypesystem)).map((e=>e.getClassName())).reverse()}getFullyQualifiedName(){let e=this.getTypeParameters().map((e=>e.getFullyQualifiedName())).join(", ");return this.isGenericType()?`multiversx:types:${this.getName()}<${e}>`:`multiversx:types:${this.getName()}`}hasExactClass(e){return this.getClassName()==e}hasClassOrSuperclass(e){return this.getClassHierarchy().includes(e)}getTypeParameters(){return this.typeParameters}isGenericType(){return this.typeParameters.length>0}getFirstTypeParameter(){return i.guardTrue(this.typeParameters.length>0,"type parameters length > 0"),this.typeParameters[0]}toString(){let e=this.getTypeParameters().map((e=>e.toString())).join(", "),t=e?`<${e}>`:"";return`${this.name}${t}`}equals(e){return s.equals(this,e)}static equals(e,t){return e.getFullyQualifiedName()==t.getFullyQualifiedName()}static equalsMany(e,t){return e.every(((e,r)=>e.equals(t[r])))}static isAssignableFromMany(e,t){return e.every(((e,r)=>e.isAssignableFrom(t[r])))}differs(e){return!this.equals(e)}valueOf(){return this.name}isAssignableFrom(e){if(!s.equalsMany(this.getTypeParameters(),e.getTypeParameters()))return!1;let t=this.getFullyQualifiedName();return!!s.getFullyQualifiedNamesInHierarchy(e).includes(t)||e.hasClassOrSuperclass(this.getClassName())}static getFullyQualifiedNamesInHierarchy(e){return n.getJavascriptPrototypesInHierarchy(e,(e=>e.belongsToTypesystem)).map((t=>t.getFullyQualifiedName.call(e)))}getNamesOfDependencies(){const e=[];for(const t of this.typeParameters)e.push(t.getName()),e.push(...t.getNamesOfDependencies());return[...new Set(e)]}toJSON(){return{name:this.name,typeParameters:this.typeParameters.map((e=>e.toJSON()))}}getCardinality(){return this.cardinality}belongsToTypesystem(){}}t.Type=s,s.ClassName="Type";class o{constructor(e,t){this.lowerBound=e,this.upperBound=t}static fixed(e){return new o(e,e)}static variable(e){return new o(0,e)}isSingular(){return 1==this.lowerBound&&1==this.upperBound}isSingularOrNone(){return 0==this.lowerBound&&1==this.upperBound}isComposite(){return 1!=this.upperBound}isFixed(){return this.lowerBound==this.upperBound}getLowerBound(){return this.lowerBound}getUpperBound(){return this.upperBound||o.MaxCardinality}}t.TypeCardinality=o,o.MaxCardinality=4096;class a extends s{constructor(e){super(e)}getClassName(){return a.ClassName}}t.PrimitiveType=a,a.ClassName="PrimitiveType";class u extends s{getClassName(){return u.ClassName}}t.CustomType=u,u.ClassName="CustomType";class c{constructor(e){this.type=e}getClassName(){return c.ClassName}getClassHierarchy(){return n.getJavascriptPrototypesInHierarchy(this,(e=>e.belongsToTypesystem)).map((e=>e.getClassName())).reverse()}getType(){return this.type}hasExactClass(e){return this.getClassName()==e}hasClassOrSuperclass(e){return this.getClassHierarchy().includes(e)}belongsToTypesystem(){}}t.TypedValue=c,c.ClassName="TypedValue";class l extends c{constructor(e){super(e)}getClassName(){return l.ClassName}}t.PrimitiveValue=l,l.ClassName="PrimitiveValue",t.isTyped=function(e){return void 0!==e.belongsToTypesystem};class f extends s{constructor(){super("...")}getClassName(){return f.ClassName}}t.TypePlaceholder=f,f.ClassName="TypePlaceholder";class h extends s{constructor(){super("?")}getClassName(){return h.ClassName}}t.NullType=h,h.ClassName="NullType"},6054:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VariadicValue=t.CountedVariadicType=t.VariadicType=void 0;const n=r(5626);class i extends n.Type{constructor(e,t=!1){super("Variadic",[e],n.TypeCardinality.variable()),this.isCounted=t}getClassName(){return i.ClassName}}t.VariadicType=i,i.ClassName="VariadicType";class s extends n.Type{constructor(e){super("Variadic",[e],n.TypeCardinality.variable())}getClassName(){return i.ClassName}}t.CountedVariadicType=s,s.ClassName="VariadicType";class o extends n.TypedValue{constructor(e,t){super(e),this.items=t}getClassName(){return o.ClassName}static fromItems(...e){return this.createFromItems(e,!1)}static fromItemsCounted(...e){return this.createFromItems(e,!0)}static createFromItems(e,t){if(0==e.length)return new o(new i(new n.TypePlaceholder,t),[]);const r=e[0].getType();return new o(new i(r,t),e)}getItems(){return this.items}valueOf(){return this.items.map((e=>e.valueOf()))}equals(e){if(this.getType().differs(e.getType()))return!1;for(let t=0;t<this.items.length;t++){let r=this.items[t],n=e.items[t];if(!r.equals(n))return!1}return!0}}t.VariadicValue=o,o.ClassName="VariadicValue"},476:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionHash=t.Transaction=void 0;const o=r(1594),a=r(236),u=r(1220),c=r(7353),l=s(r(2581)),f=r(9342),h=r(3500),d=r(9277),p=r(9874),g=r(3548),y=r(1069),A=r(2206);class m{constructor({nonce:e,value:t,sender:r,receiver:n,senderUsername:i,receiverUsername:s,gasPrice:u,gasLimit:l,data:f,chainID:d,version:p,options:y,guardian:A}){this.nonce=e||0,this.value=t?new o.BigNumber(t.toString()).toFixed(0):0,this.sender=r,this.receiver=n,this.senderUsername=i||"",this.receiverUsername=s||"",this.gasPrice=u||c.TRANSACTION_MIN_GAS_PRICE,this.gasLimit=l,this.data=f||new g.TransactionPayload,this.chainID=d,this.version=p?new h.TransactionVersion(p.valueOf()):h.TransactionVersion.withDefaultVersion(),this.options=y?new h.TransactionOptions(y.valueOf()):h.TransactionOptions.withDefaultOptions(),this.guardian=A||a.Address.empty(),this.signature=Buffer.from([]),this.guardianSignature=Buffer.from([]),this.hash=b.empty()}getNonce(){return this.nonce}setNonce(e){this.nonce=e}getValue(){return this.value}setValue(e){this.value=e}getSender(){return this.sender}setSender(e){this.sender=e}getReceiver(){return this.receiver}getSenderUsername(){return this.senderUsername}setSenderUsername(e){this.senderUsername=e}getReceiverUsername(){return this.receiverUsername}setReceiverUsername(e){this.receiverUsername=e}getGuardian(){return this.guardian}getGasPrice(){return this.gasPrice}setGasPrice(e){this.gasPrice=e}getGasLimit(){return this.gasLimit}setGasLimit(e){this.gasLimit=e}getData(){return this.data}getChainID(){return this.chainID}setChainID(e){this.chainID=e}getVersion(){return this.version}setVersion(e){this.version=new h.TransactionVersion(e.valueOf())}getOptions(){return new h.TransactionOptions(this.options.valueOf())}setOptions(e){this.options=new h.TransactionOptions(e.valueOf())}getSignature(){return this.signature}getGuardianSignature(){return this.guardianSignature}setGuardian(e){this.guardian=e}getHash(){return y.guardNotEmpty(this.hash,"hash"),this.hash}serializeForSigning(){let e=this.toPlainObject();e.signature&&delete e.signature,e.guardianSignature&&delete e.guardianSignature,e.guardian||delete e.guardian;let t=JSON.stringify(e);return Buffer.from(t)}isGuardedTransaction(){const e=this.guardian.bech32().length>0,t=this.guardianSignature.length>0;return this.getOptions().isWithGuardian()&&e&&t}toPlainObject(){var e;const t={nonce:this.nonce.valueOf(),value:this.value.toString(),receiver:this.receiver.bech32(),sender:this.sender.bech32(),senderUsername:this.senderUsername?Buffer.from(this.senderUsername).toString("base64"):void 0,receiverUsername:this.receiverUsername?Buffer.from(this.receiverUsername).toString("base64"):void 0,gasPrice:this.gasPrice.valueOf(),gasLimit:this.gasLimit.valueOf(),data:0==this.data.length()?void 0:this.data.encoded(),chainID:this.chainID.valueOf(),version:this.getVersion().valueOf(),options:0==this.getOptions().valueOf()?void 0:this.getOptions().valueOf(),guardian:(null===(e=this.guardian)||void 0===e?void 0:e.bech32())?""==this.guardian.bech32()?void 0:this.guardian.bech32():void 0,signature:this.signature.toString("hex")?this.signature.toString("hex"):void 0,guardianSignature:this.guardianSignature.toString("hex")?this.guardianSignature.toString("hex"):void 0};return u.Compatibility.guardAddressIsSetAndNonZero(new a.Address(t.sender),"'sender' of transaction","pass the actual sender to the Transaction constructor"),t}static fromPlainObject(e){const t=new m({nonce:Number(e.nonce),value:new o.BigNumber(e.value).toFixed(0),receiver:a.Address.fromString(e.receiver),receiverUsername:e.receiverUsername?Buffer.from(e.receiverUsername,"base64").toString():void 0,sender:a.Address.fromString(e.sender),senderUsername:e.senderUsername?Buffer.from(e.senderUsername,"base64").toString():void 0,guardian:e.guardian?a.Address.fromString(e.guardian):void 0,gasPrice:Number(e.gasPrice),gasLimit:Number(e.gasLimit),data:new g.TransactionPayload(Buffer.from(e.data||"","base64")),chainID:String(e.chainID),version:new h.TransactionVersion(e.version),options:null!=e.options?new h.TransactionOptions(e.options):void 0});return e.signature&&t.applySignature(new p.Signature(e.signature)),e.guardianSignature&&t.applyGuardianSignature(new p.Signature(e.guardianSignature)),t}applySignature(e){this.signature=p.interpretSignatureAsBuffer(e),this.hash=b.compute(this)}applyGuardianSignature(e){this.guardianSignature=p.interpretSignatureAsBuffer(e),this.hash=b.compute(this)}toSendable(){return this.toPlainObject()}computeFee(e){let t=e.MinGasLimit.valueOf()+this.data.length()*e.GasPerDataByte.valueOf();if(t>this.gasLimit.valueOf())throw new l.ErrNotEnoughGas(this.gasLimit.valueOf());let r=new o.BigNumber(this.gasPrice.valueOf()),n=new o.BigNumber(t).multipliedBy(r);if(t===this.gasLimit.valueOf())return n;let i=new o.BigNumber(this.gasLimit.valueOf()-t),s=r.multipliedBy(new o.BigNumber(e.GasPriceModifier.valueOf())),a=i.multipliedBy(s);return n.plus(a)}}t.Transaction=m;class b extends f.Hash{constructor(e){super(e)}static compute(e){let t=(new d.ProtoSerializer).serializeTransaction(e),r=A(32).update(t).digest("hex");return new b(r)}}t.TransactionHash=b},3548:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionPayload=void 0;class r{constructor(e){this.data=Buffer.from(e||[])}static fromEncoded(e){if(!e)return new r("");let t=Buffer.from(e,"base64").toString();return new r(t)}isEmpty(){return 0==this.data.length}encoded(){return this.data.toString("base64")}valueOf(){return this.data}toString(){return this.data.toString()}getEncodedArguments(){return this.toString().split("@")}getRawArguments(){return this.getEncodedArguments().map((e=>Buffer.from(e,"hex")))}length(){return Buffer.from(this.data).length}}t.TransactionPayload=r},9161:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.zeroPadStringIfOddLength=t.isPaddedHex=t.numberToPaddedHex=void 0;const i=n(r(1594));function s(e){return(e=e||"").length%2==1?"0"+e:e}t.numberToPaddedHex=function(e){return s(new i.default(e).toString(16))},t.isPaddedHex=function(e){e=e||"";let t=Buffer.from(e,"hex").toString("hex");return e.toUpperCase()==t.toUpperCase()},t.zeroPadStringIfOddLength=s},1069:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.isEmpty=t.guardEmpty=t.guardNotEmpty=t.guardLength=t.guardSameLength=t.guardValueIsSetWithMessage=t.guardValueIsSet=t.guardTrue=void 0;const o=s(r(2581));function a(e,t){if(null==t||void 0===t)throw new o.ErrInvariantFailed(e)}function u(e){return e.isEmpty?e.isEmpty():0===e.length}t.guardTrue=function(e,t){if(!e)throw new o.ErrInvariantFailed(`[<${t}>] isn't true`)},t.guardValueIsSet=function(e,t){a(`${e} isn't set (null or undefined)`,t)},t.guardValueIsSetWithMessage=a,t.guardSameLength=function(e,t){if(t=t||[],(e=e||[]).length!=t.length)throw new o.ErrInvariantFailed("arrays do not have the same length")},t.guardLength=function(e,t){let r=e.length||0;if(r!=t)throw new o.ErrInvariantFailed(`wrong length, expected: ${t}, actual: ${r}`)},t.guardNotEmpty=function(e,t){if(u(e))throw new o.ErrInvariantFailed(`${t} is empty`)},t.guardEmpty=function(e,t){if(!u(e))throw new o.ErrInvariantFailed(`${t} is not empty`)},t.isEmpty=u},84:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.GuardianData=t.AccountOnNetwork=void 0;const i=n(r(1594)),s=r(1466);class o{constructor(e){this.address=new s.Address(""),this.nonce=0,this.balance=new i.default(0),this.code="",this.userName="",Object.assign(this,e)}static fromHttpResponse(e){let t=new o;return t.address=new s.Address(e.address||""),t.nonce=Number(e.nonce||0),t.balance=new i.default(e.balance||0),t.code=e.code||"",t.userName=e.username||"",t}}t.AccountOnNetwork=o;class a{constructor(e){this.guarded=!1,Object.assign(this,e)}static fromHttpResponse(e){const t=new a;return t.guarded=e.guarded||!1,e.activeGuardian&&(t.activeGuardian=u.fromHttpResponse(e.activeGuardian)),e.pendingGuardian&&(t.pendingGuardian=u.fromHttpResponse(e.pendingGuardian)),t}getCurrentGuardianAddress(){var e;if(this.guarded)return null===(e=this.activeGuardian)||void 0===e?void 0:e.address}}t.GuardianData=a;class u{constructor(){this.activationEpoch=0,this.address=new s.Address(""),this.serviceUID=""}static fromHttpResponse(e){const t=new u;return t.activationEpoch=Number(e.activationEpoch||0),t.address=new s.Address(e.address||""),t.serviceUID=e.serviceUID||"",t}}},6482:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultPagination=t.defaultAxiosConfig=void 0;const n=r(1013)({constructorAction:"ignore"});t.defaultAxiosConfig={timeout:5e3,transformResponse:[function(e){return n.parse(e)}]},t.defaultPagination={from:0,size:100}},4027:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.EsdtContractAddress=t.MaxUint64AsBigNumber=void 0;const i=n(r(1594)),s=r(1466);t.MaxUint64AsBigNumber=new i.default("18446744073709551615"),t.EsdtContractAddress=new s.Address("erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzllls8a5w6u")},8419:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContractQueryRequest=void 0;t.ContractQueryRequest=class{constructor(e){this.query=e}toHttpRequest(){var e;let t={},r=this.query;return t.scAddress=r.address.bech32(),t.caller=(null===(e=r.caller)||void 0===e?void 0:e.bech32())?r.caller.bech32():void 0,t.funcName=r.func.toString(),t.value=r.value?r.value.toString():void 0,t.args=r.getEncodedArguments(),t}}},3767:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ContractQueryResponse=void 0;const i=n(r(1594)),s=r(4027);class o{constructor(e){this.returnData=(null==e?void 0:e.returnData)||[],this.returnCode=(null==e?void 0:e.returnCode)||"",this.returnMessage=(null==e?void 0:e.returnMessage)||"",this.gasUsed=(null==e?void 0:e.gasUsed)||0}static fromHttpResponse(e){let t=e.returnData||e.ReturnData,r=e.returnCode||e.ReturnCode,n=e.returnMessage||e.ReturnMessage,a=new i.default(e.gasRemaining||e.GasRemaining||0),u=s.MaxUint64AsBigNumber.minus(a).toNumber();return new o({returnData:t,returnCode:r,returnMessage:n,gasUsed:u})}getReturnDataParts(){return this.returnData.map((e=>Buffer.from(e||"","base64")))}toJSON(){return{returnData:this.returnData,returnCode:this.returnCode,returnMessage:this.returnMessage,gasUsed:this.gasUsed.valueOf()}}}t.ContractQueryResponse=o},2286:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContractResultItem=t.ContractResults=void 0;const n=r(9857),i=r(1466);class s{constructor(e){this.items=e,this.items.sort((function(e,t){return e.nonce.valueOf()-t.nonce.valueOf()}))}static fromProxyHttpResponse(e){let t=e.map((e=>o.fromProxyHttpResponse(e)));return new s(t)}static fromApiHttpResponse(e){let t=e.map((e=>o.fromApiHttpResponse(e)));return new s(t)}}t.ContractResults=s;class o{constructor(e){this.hash="",this.nonce=0,this.value="",this.receiver=new i.Address(""),this.sender=new i.Address(""),this.data="",this.previousHash="",this.originalHash="",this.gasLimit=0,this.gasPrice=0,this.callType=0,this.returnMessage="",this.logs=new n.TransactionLogs,Object.assign(this,e)}static fromProxyHttpResponse(e){return o.fromHttpResponse(e)}static fromApiHttpResponse(e){let t=o.fromHttpResponse(e);return t.data=Buffer.from(t.data,"base64").toString(),t.callType=Number(t.callType),t}static fromHttpResponse(e){let t=new o;return t.hash=e.hash,t.nonce=Number(e.nonce||0),t.value=(e.value||0).toString(),t.receiver=new i.Address(e.receiver),t.sender=new i.Address(e.sender),t.previousHash=e.prevTxHash,t.originalHash=e.originalTxHash,t.gasLimit=Number(e.gasLimit||0),t.gasPrice=Number(e.gasPrice||0),t.data=e.data||"",t.callType=e.callType,t.returnMessage=e.returnMessage,t.logs=n.TransactionLogs.fromHttpResponse(e.logs||{}),t}}t.ContractResultItem=o},2591:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrContractQuery=t.ErrNetworkProvider=t.ErrUnexpectedCondition=t.Err=void 0;class r extends Error{constructor(e,t){super(e),this.inner=void 0,this.inner=t}}t.Err=r;t.ErrUnexpectedCondition=class extends r{constructor(e){super(`Unexpected condition: [${e}]`)}};t.ErrNetworkProvider=class extends r{constructor(e,t,r){super(`Request error on url [${e}]: [${t}]`,r)}};t.ErrContractQuery=class extends r{constructor(e){super(e.message.replace("executeQuery:",""))}}},3802:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkConfig=void 0;const i=n(r(1594));class s{constructor(){this.ChainID="T",this.GasPerDataByte=1500,this.TopUpFactor=0,this.RoundDuration=0,this.RoundsPerEpoch=0,this.TopUpRewardsGradientPoint=new i.default(0),this.MinGasLimit=5e4,this.MinGasPrice=1e9,this.GasPriceModifier=1,this.MinTransactionVersion=1}static fromHttpResponse(e){let t=new s;return t.ChainID=String(e.erd_chain_id),t.GasPerDataByte=Number(e.erd_gas_per_data_byte),t.TopUpFactor=Number(e.erd_top_up_factor),t.RoundDuration=Number(e.erd_round_duration),t.RoundsPerEpoch=Number(e.erd_rounds_per_epoch),t.TopUpRewardsGradientPoint=new i.default(e.erd_rewards_top_up_gradient_point),t.MinGasLimit=Number(e.erd_min_gas_limit),t.MinGasPrice=Number(e.erd_min_gas_price),t.MinTransactionVersion=Number(e.erd_min_transaction_version),t.GasPriceModifier=Number(e.erd_gas_price_modifier),t}}t.NetworkConfig=s},9358:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkStatus=void 0;class r{constructor(){this.CurrentRound=0,this.EpochNumber=0,this.HighestFinalNonce=0,this.Nonce=0,this.NonceAtEpochStart=0,this.NoncesPassedInCurrentEpoch=0,this.RoundAtEpochStart=0,this.RoundsPassedInCurrentEpoch=0,this.RoundsPerEpoch=0}static fromHttpResponse(e){let t=new r;return t.CurrentRound=Number(e.erd_current_round),t.EpochNumber=Number(e.erd_epoch_number),t.HighestFinalNonce=Number(e.erd_highest_final_nonce),t.Nonce=Number(e.erd_nonce),t.NonceAtEpochStart=Number(e.erd_nonce_at_epoch_start),t.NoncesPassedInCurrentEpoch=Number(e.erd_nonces_passed_in_current_epoch),t.RoundAtEpochStart=Number(e.erd_round_at_epoch_start),t.RoundsPassedInCurrentEpoch=Number(e.erd_rounds_passed_in_current_epoch),t.RoundsPerEpoch=Number(e.erd_rounds_per_epoch),t}}t.NetworkStatus=r},1466:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.zeroPadStringIfOddLength=t.isPaddedHex=t.numberToPaddedHex=t.Nonce=t.Address=void 0;const o=s(r(9674));class a{constructor(e){this.value=e}static fromPubkey(e){let t=o.toWords(e),r=o.encode("erd",t);return new a(r)}bech32(){return this.value}toString(){return this.bech32()}}t.Address=a;function u(e){return c(e.toString(16))}function c(e){return(e=e||"").length%2==1?"0"+e:e}t.Nonce=class{constructor(e){this.value=e}valueOf(){return this.value}hex(){return u(this.value)}},t.numberToPaddedHex=u,t.isPaddedHex=function(e){e=e||"";let t=Buffer.from(e,"hex").toString("hex");return e.toUpperCase()==t.toUpperCase()},t.zeroPadStringIfOddLength=c},8403:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,s){function o(e){try{u(n.next(e))}catch(e){s(e)}}function a(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyNetworkProvider=void 0;const s=i(r(6425)),o=r(84),a=r(6482),u=r(4027),c=r(8419),l=r(3767),f=r(2591),h=r(3802),d=r(9358),p=r(8721),g=r(3962),y=r(6389),A=r(6188);t.ProxyNetworkProvider=class{constructor(e,t){this.url=e,this.config=Object.assign(Object.assign({},a.defaultAxiosConfig),t)}getNetworkConfig(){return n(this,void 0,void 0,(function*(){let e=yield this.doGetGeneric("network/config");return h.NetworkConfig.fromHttpResponse(e.config)}))}getNetworkStatus(){return n(this,void 0,void 0,(function*(){let e=yield this.doGetGeneric("network/status/4294967295");return d.NetworkStatus.fromHttpResponse(e.status)}))}getNetworkStakeStatistics(){return n(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}getNetworkGeneralStatistics(){return n(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}getAccount(e){return n(this,void 0,void 0,(function*(){let t=yield this.doGetGeneric(`address/${e.bech32()}`);return o.AccountOnNetwork.fromHttpResponse(t.account)}))}getGuardianData(e){return n(this,void 0,void 0,(function*(){const t=yield this.doGetGeneric(`address/${e.bech32()}/guardian-data`);return o.GuardianData.fromHttpResponse(t.guardianData)}))}getFungibleTokensOfAccount(e,t){return n(this,void 0,void 0,(function*(){let t=`address/${e.bech32()}/esdt`,r=yield this.doGetGeneric(t),n=Object.values(r.esdts).filter((e=>!e.nonce)).map((e=>g.FungibleTokenOfAccountOnNetwork.fromHttpResponse(e)));return n.sort(((e,t)=>e.identifier.localeCompare(t.identifier))),n}))}getNonFungibleTokensOfAccount(e,t){return n(this,void 0,void 0,(function*(){let t=`address/${e.bech32()}/esdt`,r=yield this.doGetGeneric(t),n=Object.values(r.esdts).filter((e=>e.nonce>=0)).map((e=>g.NonFungibleTokenOfAccountOnNetwork.fromProxyHttpResponse(e)));return n.sort(((e,t)=>e.identifier.localeCompare(t.identifier))),n}))}getFungibleTokenOfAccount(e,t){return n(this,void 0,void 0,(function*(){let r=yield this.doGetGeneric(`address/${e.bech32()}/esdt/${t}`);return g.FungibleTokenOfAccountOnNetwork.fromHttpResponse(r.tokenData)}))}getNonFungibleTokenOfAccount(e,t,r){return n(this,void 0,void 0,(function*(){let n=yield this.doGetGeneric(`address/${e.bech32()}/nft/${t}/nonce/${r.valueOf()}`);return g.NonFungibleTokenOfAccountOnNetwork.fromProxyHttpResponseByNonce(n.tokenData)}))}getTransaction(e,t){return n(this,void 0,void 0,(function*(){let r;!0===t&&(r=this.getTransactionStatus(e));let n=this.buildUrlWithQueryParameters(`transaction/${e}`,{withResults:"true"}),i=yield this.doGetGeneric(n);if(r){const t=yield r;return y.TransactionOnNetwork.fromProxyHttpResponse(e,i.transaction,t)}return y.TransactionOnNetwork.fromProxyHttpResponse(e,i.transaction)}))}getTransactionStatus(e){return n(this,void 0,void 0,(function*(){let t=yield this.doGetGeneric(`transaction/${e}/process-status`);return new A.TransactionStatus(t.status)}))}sendTransaction(e){return n(this,void 0,void 0,(function*(){const t=y.prepareTransactionForBroadcasting(e);return(yield this.doPostGeneric("transaction/send",t)).txHash}))}sendTransactions(e){return n(this,void 0,void 0,(function*(){const t=e.map((e=>y.prepareTransactionForBroadcasting(e))),r=yield this.doPostGeneric("transaction/send-multiple",t),n=Array(e.length).fill(null);for(let t=0;t<e.length;t++)n[t]=r.txsHashes[t.toString()]||null;return n}))}simulateTransaction(e){return n(this,void 0,void 0,(function*(){const t=y.prepareTransactionForBroadcasting(e);return yield this.doPostGeneric("transaction/simulate",t)}))}queryContract(e){return n(this,void 0,void 0,(function*(){try{let t=new c.ContractQueryRequest(e).toHttpRequest(),r=yield this.doPostGeneric("vm-values/query",t);return l.ContractQueryResponse.fromHttpResponse(r.data)}catch(e){throw new f.ErrContractQuery(e)}}))}getDefinitionOfFungibleToken(e){return n(this,void 0,void 0,(function*(){let t=yield this.getTokenProperties(e);return p.DefinitionOfFungibleTokenOnNetwork.fromResponseOfGetTokenProperties(e,t)}))}getTokenProperties(e){return n(this,void 0,void 0,(function*(){let t=Buffer.from(e).toString("hex");return(yield this.queryContract({address:u.EsdtContractAddress,func:"getTokenProperties",getEncodedArguments:()=>[t]})).getReturnDataParts()}))}getDefinitionOfTokenCollection(e){return n(this,void 0,void 0,(function*(){let t=yield this.getTokenProperties(e);return p.DefinitionOfTokenCollectionOnNetwork.fromResponseOfGetTokenProperties(e,t)}))}getNonFungibleToken(e,t){return n(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}doGetGeneric(e){return n(this,void 0,void 0,(function*(){return yield this.doGet(e)}))}doPostGeneric(e,t){return n(this,void 0,void 0,(function*(){return yield this.doPost(e,t)}))}doGet(e){return n(this,void 0,void 0,(function*(){let t=`${this.url}/${e}`;try{return(yield s.default.get(t,this.config)).data.data}catch(t){this.handleApiError(t,e)}}))}doPost(e,t){return n(this,void 0,void 0,(function*(){let r=`${this.url}/${e}`;try{return(yield s.default.post(r,t,Object.assign(Object.assign({},this.config),{headers:Object.assign({"Content-Type":"application/json"},this.config.headers)}))).data.data}catch(t){this.handleApiError(t,e)}}))}buildUrlWithQueryParameters(e,t){let r=new URLSearchParams;for(let[e,n]of Object.entries(t))n&&r.append(e,n);return`${e}?${r.toString()}`}handleApiError(e,t){if(!e.response)throw new f.ErrNetworkProvider(t,e.toString(),e);const r=e.response.data,n=r.message||r.error||JSON.stringify(r);throw new f.ErrNetworkProvider(t,n,e)}}},8721:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DefinitionOfTokenCollectionOnNetwork=t.DefinitionOfFungibleTokenOnNetwork=void 0;const i=n(r(1594)),s=r(1466);class o{constructor(){this.identifier="",this.name="",this.ticker="",this.owner=new s.Address(""),this.decimals=0,this.supply=new i.default(0),this.isPaused=!1,this.canUpgrade=!1,this.canMint=!1,this.canBurn=!1,this.canChangeOwner=!1,this.canPause=!1,this.canFreeze=!1,this.canWipe=!1,this.canAddSpecialRoles=!1,this.assets={}}static fromApiHttpResponse(e){let t=new o;return t.identifier=e.identifier||"",t.name=e.name||"",t.ticker=e.ticker||"",t.owner=new s.Address(e.owner||""),t.decimals=e.decimals||0,t.supply=new i.default(e.supply||"0"),t.isPaused=e.isPaused||!1,t.canUpgrade=e.canUpgrade||!1,t.canMint=e.canMint||!1,t.canBurn=e.canBurn||!1,t.canChangeOwner=e.canChangeOwner||!1,t.canPause=e.canPause||!1,t.canFreeze=e.canFreeze||!1,t.canWipe=e.canWipe||!1,t.assets=e.assets||{},t}static fromResponseOfGetTokenProperties(e,t){let r=new o,[n,a,c,l,...f]=t,h=u(f);return r.identifier=e,r.name=n.toString(),r.ticker=e,r.owner=s.Address.fromPubkey(c),r.decimals=h.NumDecimals.toNumber(),r.supply=new i.default(l.toString()).shiftedBy(-r.decimals),r.isPaused=h.IsPaused,r.canUpgrade=h.CanUpgrade,r.canMint=h.CanMint,r.canBurn=h.CanBurn,r.canChangeOwner=h.CanChangeOwner,r.canPause=h.CanPause,r.canFreeze=h.CanFreeze,r.canWipe=h.CanWipe,r}}t.DefinitionOfFungibleTokenOnNetwork=o;class a{constructor(){this.collection="",this.type="",this.name="",this.ticker="",this.owner=new s.Address(""),this.decimals=0,this.canPause=!1,this.canFreeze=!1,this.canWipe=!1,this.canUpgrade=!1,this.canChangeOwner=!1,this.canAddSpecialRoles=!1,this.canTransferNftCreateRole=!1,this.canCreateMultiShard=!1}static fromApiHttpResponse(e){let t=new a;return t.collection=e.collection||"",t.type=e.type||"",t.name=e.name||"",t.ticker=e.ticker||"",t.owner=new s.Address(e.owner||""),t.decimals=e.decimals||0,t.canPause=e.canPause||!1,t.canFreeze=e.canFreeze||!1,t.canWipe=e.canWipe||!1,t.canUpgrade=e.canUpgrade||!1,t.canAddSpecialRoles=e.canAddSpecialRoles||!1,t.canTransferNftCreateRole=e.canTransferNftCreateRole||!1,t}static fromResponseOfGetTokenProperties(e,t){var r;let n=new a,[i,o,c,l,f,...h]=t,d=u(h);return n.collection=e,n.type=o.toString(),n.name=i.toString(),n.ticker=e,n.owner=s.Address.fromPubkey(c),n.decimals=null!==(r=d.NumDecimals.toNumber())&&void 0!==r?r:0,n.canPause=d.CanPause||!1,n.canFreeze=d.CanFreeze||!1,n.canWipe=d.CanWipe||!1,n.canUpgrade=d.CanUpgrade||!1,n.canChangeOwner=d.CanChangeOwner||!1,n.canAddSpecialRoles=d.CanAddSpecialRoles||!1,n.canTransferNftCreateRole=d.CanTransferNFTCreateRole||!1,n.canCreateMultiShard=d.CanCreateMultiShard||!1,n}}function u(e){let t={};for(let r of e){let[e,n]=r.toString().split("-");t[e]=c(n)}return t}function c(e){switch(e){case"true":return!0;case"false":return!1;default:return new i.default(e)}}t.DefinitionOfTokenCollectionOnNetwork=a},3962:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NonFungibleTokenOfAccountOnNetwork=t.FungibleTokenOfAccountOnNetwork=void 0;const n=r(1594),i=r(1466);class s{constructor(){this.identifier="",this.balance=new n.BigNumber(0),this.rawResponse={}}static fromHttpResponse(e){let t=new s;return t.identifier=e.tokenIdentifier||e.identifier||"",t.balance=new n.BigNumber(e.balance||0),t.rawResponse=e,t}}t.FungibleTokenOfAccountOnNetwork=s;class o{constructor(e){this.identifier="",this.collection="",this.timestamp=0,this.attributes=Buffer.from([]),this.nonce=0,this.type="",this.name="",this.creator=new i.Address(""),this.supply=new n.BigNumber(0),this.decimals=0,this.royalties=new n.BigNumber(0),this.assets=[],this.balance=new n.BigNumber(0),Object.assign(this,e)}static fromProxyHttpResponse(e){let t=o.fromHttpResponse(e);return t.identifier=e.tokenIdentifier||"",t.collection=o.parseCollectionFromIdentifier(t.identifier),t.royalties=new n.BigNumber(e.royalties||0).div(100),t}static fromProxyHttpResponseByNonce(e){let t=o.fromHttpResponse(e),r=new i.Nonce(t.nonce).hex();return t.identifier=`${e.tokenIdentifier}-${r}`,t.collection=e.tokenIdentifier||"",t.royalties=new n.BigNumber(e.royalties||0).div(100),t}static fromApiHttpResponse(e){let t=o.fromHttpResponse(e);return t.identifier=e.identifier||"",t.collection=e.collection||"",t}static fromHttpResponse(e){let t=new o;return t.timestamp=Number(e.timestamp||0),t.attributes=Buffer.from(e.attributes||"","base64"),t.nonce=e.nonce||0,t.type=e.type||"",t.name=e.name||"",t.creator=new i.Address(e.creator||""),t.decimals=Number(e.decimals||0),t.supply=new n.BigNumber(e.balance||1),t.royalties=new n.BigNumber(e.royalties||0),t.assets=e.assets||[],t.balance=new n.BigNumber(e.balance||1),t}static parseCollectionFromIdentifier(e){return e.split("-").slice(0,2).join("-")}}t.NonFungibleTokenOfAccountOnNetwork=o},8427:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionEventTopic=t.TransactionEventData=t.TransactionEvent=void 0;const n=r(1466);class i{constructor(e){this.address=new n.Address(""),this.identifier="",this.topics=[],this.data="",this.dataPayload=new s(Buffer.from("","utf8")),this.additionalData=[],Object.assign(this,e)}static fromHttpResponse(e){let t=new i;return t.address=new n.Address(e.address),t.identifier=e.identifier||"",t.topics=(e.topics||[]).map((e=>new o(e))),t.dataPayload=s.fromBase64(e.data),t.additionalData=(e.additionalData||[]).map(s.fromBase64),t.data=t.dataPayload.toString(),t}findFirstOrNoneTopic(e){return this.topics.filter((t=>e(t)))[0]}getLastTopic(){return this.topics[this.topics.length-1]}}t.TransactionEvent=i;class s{constructor(e){this.raw=e}static fromBase64(e){return new s(Buffer.from(e||"","base64"))}toString(){return this.raw.toString("utf8")}hex(){return this.raw.toString("hex")}valueOf(){return this.raw}}t.TransactionEventData=s;class o{constructor(e){this.raw=Buffer.from(e||"","base64")}toString(){return this.raw.toString("utf8")}hex(){return this.raw.toString("hex")}valueOf(){return this.raw}}t.TransactionEventTopic=o},9857:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionLogs=void 0;const n=r(2591),i=r(1466),s=r(8427);class o{constructor(e){this.address=new i.Address(""),this.events=[],Object.assign(this,e)}static fromHttpResponse(e){let t=new o;return t.address=new i.Address(e.address),t.events=(e.events||[]).map((e=>s.TransactionEvent.fromHttpResponse(e))),t}findSingleOrNoneEvent(e,t){let r=this.findEvents(e,t);if(r.length>1)throw new n.ErrUnexpectedCondition(`more than one event of type ${e}`);return r[0]}findFirstOrNoneEvent(e,t){return this.findEvents(e,t)[0]}findEvents(e,t){let r=this.events.filter((t=>t.identifier==e));return t&&(r=r.filter((e=>t(e)))),r}}t.TransactionLogs=o},496:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionReceipt=void 0;const n=r(1466);class i{constructor(){this.value="",this.sender=new n.Address(""),this.data="",this.hash=""}static fromHttpResponse(e){let t=new i;return t.value=(e.value||0).toString(),t.sender=new n.Address(e.sender),t.data=e.data,t.hash=e.txHash,t}}t.TransactionReceipt=i},6188:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionStatus=void 0;class r{constructor(e){this.status=(e||"").toLowerCase()}static createUnknown(){return new r("unknown")}isPending(){return"received"==this.status||"pending"==this.status}isExecuted(){return this.isSuccessful()||this.isFailed()||this.isInvalid()}isSuccessful(){return"executed"==this.status||"success"==this.status||"successful"==this.status}isFailed(){return"fail"==this.status||"failed"==this.status||"unsuccessful"==this.status||this.isInvalid()}isInvalid(){return"invalid"==this.status}toString(){return this.status}valueOf(){return this.status}equals(e){return!!e&&this.status==e.status}}t.TransactionStatus=r},6389:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionOnNetwork=t.prepareTransactionForBroadcasting=void 0;const n=r(6188),i=r(2286),s=r(1466),o=r(9857),a=r(496);t.prepareTransactionForBroadcasting=function(e){return"toSendable"in e?e.toSendable():{nonce:Number(e.nonce),value:e.value.toString(),receiver:e.receiver,sender:e.sender,senderUsername:e.senderUsername?Buffer.from(e.senderUsername).toString("base64"):void 0,receiverUsername:e.receiverUsername?Buffer.from(e.receiverUsername).toString("base64"):void 0,gasPrice:Number(e.gasPrice),gasLimit:Number(e.gasLimit),data:0===e.data.length?void 0:Buffer.from(e.data).toString("base64"),chainID:e.chainID,version:e.version,options:e.options,guardian:e.guardian||void 0,signature:Buffer.from(e.signature).toString("hex"),guardianSignature:0===e.guardianSignature.length?void 0:Buffer.from(e.guardianSignature).toString("hex")}};class u{constructor(e){this.hash="",this.type="",this.nonce=0,this.round=0,this.epoch=0,this.value="",this.receiver=new s.Address(""),this.sender=new s.Address(""),this.gasLimit=0,this.gasPrice=0,this.data=Buffer.from([]),this.signature="",this.status=n.TransactionStatus.createUnknown(),this.timestamp=0,this.blockNonce=0,this.hyperblockNonce=0,this.hyperblockHash="",this.receipt=new a.TransactionReceipt,this.contractResults=new i.ContractResults([]),this.logs=new o.TransactionLogs,Object.assign(this,e)}static fromProxyHttpResponse(e,t,r){let n=u.fromHttpResponse(e,t);return n.contractResults=i.ContractResults.fromProxyHttpResponse(t.smartContractResults||[]),r&&(n.status=r,n.isCompleted=n.status.isSuccessful()||n.status.isFailed()),n}static fromApiHttpResponse(e,t){let r=u.fromHttpResponse(e,t);return r.contractResults=i.ContractResults.fromApiHttpResponse(t.results||[]),r.isCompleted=!r.status.isPending(),r}static fromHttpResponse(e,t){let r=new u;return r.hash=e,r.type=t.type||"",r.nonce=t.nonce||0,r.round=t.round,r.epoch=t.epoch||0,r.value=(t.value||0).toString(),r.sender=new s.Address(t.sender),r.receiver=new s.Address(t.receiver),r.gasPrice=t.gasPrice||0,r.gasLimit=t.gasLimit||0,r.data=Buffer.from(t.data||"","base64"),r.status=new n.TransactionStatus(t.status),r.timestamp=t.timestamp||0,r.blockNonce=t.blockNonce||0,r.hyperblockNonce=t.hyperblockNonce||0,r.hyperblockHash=t.hyperblockHash||"",r.receipt=a.TransactionReceipt.fromHttpResponse(t.receipt||{}),r.logs=o.TransactionLogs.fromHttpResponse(t.logs||{}),r}getDateTime(){return new Date(1e3*this.timestamp)}}t.TransactionOnNetwork=u},2866:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenTransferProperties=t.TransactionMetadataTransfer=t.TransactionMetadata=t.TransactionToDecode=t.TransactionDecoder=void 0;const n=r(8603);t.TransactionDecoder=class{getTransactionMetadata(e){const t=this.getNormalTransactionMetadata(e),r=this.getEsdtTransactionMetadata(t);if(r)return r;const n=this.getNftTransferMetadata(t);if(n)return n;const i=this.getMultiTransferMetadata(t);return i||t}getNormalTransactionMetadata(e){const t=new s;if(t.sender=e.sender,t.receiver=e.receiver,t.value=BigInt(e.value),e.data){const r=this.base64Decode(e.data).split("@"),n=r.slice(1);if(n.every((e=>this.isSmartContractArgument(e)))&&(t.functionName=r[0],t.functionArgs=n),"relayedTx"===t.functionName&&t.functionArgs&&1===t.functionArgs.length)try{const e=JSON.parse(this.hexToString(t.functionArgs[0]));return e.value=e.value.toString(),e.sender=this.bech32Encode(this.base64ToHex(e.sender)),e.receiver=this.bech32Encode(this.base64ToHex(e.receiver)),this.getNormalTransactionMetadata(e)}catch(e){}if("relayedTxV2"===t.functionName&&t.functionArgs&&4===t.functionArgs.length)try{const r=new i;return r.sender=e.receiver,r.receiver=this.bech32Encode(t.functionArgs[0]),r.data=this.base64Encode(this.hexToString(t.functionArgs[2])),r.value="0",this.getNormalTransactionMetadata(r)}catch(e){}}return t}getMultiTransferMetadata(e){if(e.sender!==e.receiver)return;if("MultiESDTNFTTransfer"!==e.functionName)return;const t=e.functionArgs;if(!t)return;if(t.length<3)return;if(!this.isAddressValid(t[0]))return;const r=this.bech32Encode(t[0]),n=this.hexToNumber(t[1]),i=new s;i.transfers||(i.transfers=[]);let o=2;for(let e=0;e<n;e++){const e=this.hexToString(t[o++]),r=t[o++],n=this.hexToBigInt(t[o++]);r?i.transfers.push({value:n,properties:{collection:e,identifier:`${e}-${r}`}}):i.transfers.push({value:n,properties:{token:e}})}return i.sender=e.sender,i.receiver=r,t.length>o&&(i.functionName=this.hexToString(t[o++]),i.functionArgs=t.slice(o++)),i}getNftTransferMetadata(e){if(e.sender!==e.receiver)return;if("ESDTNFTTransfer"!==e.functionName)return;const t=e.functionArgs;if(!t)return;if(t.length<4)return;if(!this.isAddressValid(t[3]))return;const r=this.hexToString(t[0]),n=t[1],i=this.hexToBigInt(t[2]),o=this.bech32Encode(t[3]),a=new s;return a.sender=e.sender,a.receiver=o,a.value=i,t.length>4&&(a.functionName=this.hexToString(t[4]),a.functionArgs=t.slice(5)),a.transfers=[{value:i,properties:{collection:r,identifier:`${r}-${n}`}}],a}base64Encode(e){return Buffer.from(e).toString("base64")}base64Decode(e){return Buffer.from(e,"base64").toString("binary")}hexToNumber(e){return parseInt(e,16)}getEsdtTransactionMetadata(e){if("ESDTTransfer"!==e.functionName)return;const t=e.functionArgs;if(!t)return;if(t.length<2)return;const r=this.hexToString(t[0]),n=this.hexToBigInt(t[1]),i=new s;return i.sender=e.sender,i.receiver=e.receiver,t.length>2&&(i.functionName=this.hexToString(t[2]),i.functionArgs=t.slice(3)),i.transfers=[{value:n,properties:{identifier:r}}],i.value=n,i}bech32Encode(e){const t=Buffer.from(e,"hex"),r=n.bech32.toWords(t);return n.bech32.encode("erd",r)}isAddressValid(e){return 32==Buffer.from(e,"hex").length}isSmartContractArgument(e){return!!this.isHex(e)&&e.length%2==0}isHex(e){return!1===new RegExp(/[^a-f0-9]/gi).test(e)}base64ToHex(e){return Buffer.from(e,"base64").toString("hex")}hexToString(e){return Buffer.from(e,"hex").toString("ascii")}hexToBigInt(e){return e?BigInt("0x"+e):BigInt(0)}};class i{constructor(){this.sender="",this.receiver="",this.data="",this.value="0"}}t.TransactionToDecode=i;class s{constructor(){this.sender="",this.receiver="",this.value=BigInt(0)}}t.TransactionMetadata=s;t.TransactionMetadataTransfer=class{constructor(){this.value=BigInt(0)}};t.TokenTransferProperties=class{}},8603:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bech32m=t.bech32=void 0;const r="qpzry9x8gf2tvdw0s3jn54khce6mua7l",n={};for(let e=0;e<32;e++){const t=r.charAt(e);n[t]=e}function i(e){const t=e>>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function s(e){let t=1;for(let r=0;r<e.length;++r){const n=e.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+e+")";t=i(t)^n>>5}t=i(t);for(let r=0;r<e.length;++r){const n=e.charCodeAt(r);t=i(t)^31&n}return t}function o(e,t,r,n){let i=0,s=0;const o=(1<<r)-1,a=[];for(let n=0;n<e.length;++n)for(i=i<<t|e[n],s+=t;s>=r;)s-=r,a.push(i>>s&o);if(n)s>0&&a.push(i<<r-s&o);else{if(s>=t)return"Excess padding";if(i<<r-s&o)return"Non-zero padding"}return a}function a(e){return o(e,8,5,!0)}function u(e){const t=o(e,5,8,!1);if(Array.isArray(t))return t}function c(e){const t=o(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}function l(e){let t;function o(e,r){if(r=r||90,e.length<8)return e+" too short";if(e.length>r)return"Exceeds length limit";const o=e.toLowerCase(),a=e.toUpperCase();if(e!==o&&e!==a)return"Mixed-case string "+e;const u=(e=o).lastIndexOf("1");if(-1===u)return"No separator character for "+e;if(0===u)return"Missing prefix for "+e;const c=e.slice(0,u),l=e.slice(u+1);if(l.length<6)return"Data too short";let f=s(c);if("string"==typeof f)return f;const h=[];for(let e=0;e<l.length;++e){const t=l.charAt(e),r=n[t];if(void 0===r)return"Unknown character "+t;f=i(f)^r,e+6>=l.length||h.push(r)}return f!==t?"Invalid checksum for "+e:{prefix:c,words:h}}return t="bech32"===e?1:734539939,{decodeUnsafe:function(e,t){const r=o(e,t);if("object"==typeof r)return r},decode:function(e,t){const r=o(e,t);if("object"==typeof r)return r;throw new Error(r)},encode:function(e,n,o){if(o=o||90,e.length+7+n.length>o)throw new TypeError("Exceeds length limit");let a=s(e=e.toLowerCase());if("string"==typeof a)throw new Error(a);let u=e+"1";for(let e=0;e<n.length;++e){const t=n[e];if(t>>5!=0)throw new Error("Non 5-bit word");a=i(a)^t,u+=r.charAt(t)}for(let e=0;e<6;++e)a=i(a);a^=t;for(let e=0;e<6;++e){u+=r.charAt(a>>5*(5-e)&31)}return u},toWords:a,fromWordsUnsafe:u,fromWords:c}}t.bech32=l("bech32"),t.bech32m=l("bech32m")},8045:e=>{"use strict";e.exports=function(e,t){var r=new Array(arguments.length-1),n=0,i=2,s=!0;for(;i<arguments.length;)r[n++]=arguments[i++];return new Promise((function(i,o){r[n]=function(e){if(s)if(s=!1,e)o(e);else{for(var t=new Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];i.apply(null,t)}};try{e.apply(t||null,r)}catch(e){s&&(s=!1,o(e))}}))}},8839:(e,t)=>{"use strict";var r=t;r.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var n=new Array(64),i=new Array(123),s=0;s<64;)i[n[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;r.encode=function(e,t,r){for(var i,s=null,o=[],a=0,u=0;t<r;){var c=e[t++];switch(u){case 0:o[a++]=n[c>>2],i=(3&c)<<4,u=1;break;case 1:o[a++]=n[i|c>>4],i=(15&c)<<2,u=2;break;case 2:o[a++]=n[i|c>>6],o[a++]=n[63&c],u=0}a>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,o)),a=0)}return u&&(o[a++]=n[i],o[a++]=61,1===u&&(o[a++]=61)),s?(a&&s.push(String.fromCharCode.apply(String,o.slice(0,a))),s.join("")):String.fromCharCode.apply(String,o.slice(0,a))};var o="invalid encoding";r.decode=function(e,t,r){for(var n,s=r,a=0,u=0;u<e.length;){var c=e.charCodeAt(u++);if(61===c&&a>1)break;if(void 0===(c=i[c]))throw Error(o);switch(a){case 0:n=c,a=1;break;case 1:t[r++]=n<<2|(48&c)>>4,n=c,a=2;break;case 2:t[r++]=(15&n)<<4|(60&c)>>2,n=c,a=3;break;case 3:t[r++]=(3&n)<<6|c,a=0}}if(1===a)throw Error(o);return r-s},r.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},4358:e=>{"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],n=0;n<r.length;)r[n].fn===t?r.splice(n,1):++n;return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],n=1;n<arguments.length;)r.push(arguments[n++]);for(n=0;n<t.length;)t[n].fn.apply(t[n++].ctx,r)}return this}},9410:e=>{"use strict";function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=128===r[3];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3]}function s(e,n,i){t[0]=e,n[i]=r[3],n[i+1]=r[2],n[i+2]=r[1],n[i+3]=r[0]}function o(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],t[0]}function a(e,n){return r[3]=e[n],r[2]=e[n+1],r[1]=e[n+2],r[0]=e[n+3],t[0]}e.writeFloatLE=n?i:s,e.writeFloatBE=n?s:i,e.readFloatLE=n?o:a,e.readFloatBE=n?a:o}():function(){function t(e,t,r,n){var i=t<0?1:0;if(i&&(t=-t),0===t)e(1/t>0?0:2147483648,r,n);else if(isNaN(t))e(2143289344,r,n);else if(t>34028234663852886e22)e((i<<31|2139095040)>>>0,r,n);else if(t<11754943508222875e-54)e((i<<31|Math.round(t/1401298464324817e-60))>>>0,r,n);else{var s=Math.floor(Math.log(t)/Math.LN2);e((i<<31|s+127<<23|8388607&Math.round(t*Math.pow(2,-s)*8388608))>>>0,r,n)}}function o(e,t,r){var n=e(t,r),i=2*(n>>31)+1,s=n>>>23&255,o=8388607&n;return 255===s?o?NaN:i*(1/0):0===s?1401298464324817e-60*i*o:i*Math.pow(2,s-150)*(o+8388608)}e.writeFloatLE=t.bind(null,r),e.writeFloatBE=t.bind(null,n),e.readFloatLE=o.bind(null,i),e.readFloatBE=o.bind(null,s)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=128===r[7];function i(e,n,i){t[0]=e,n[i]=r[0],n[i+1]=r[1],n[i+2]=r[2],n[i+3]=r[3],n[i+4]=r[4],n[i+5]=r[5],n[i+6]=r[6],n[i+7]=r[7]}function s(e,n,i){t[0]=e,n[i]=r[7],n[i+1]=r[6],n[i+2]=r[5],n[i+3]=r[4],n[i+4]=r[3],n[i+5]=r[2],n[i+6]=r[1],n[i+7]=r[0]}function o(e,n){return r[0]=e[n],r[1]=e[n+1],r[2]=e[n+2],r[3]=e[n+3],r[4]=e[n+4],r[5]=e[n+5],r[6]=e[n+6],r[7]=e[n+7],t[0]}function a(e,n){return r[7]=e[n],r[6]=e[n+1],r[5]=e[n+2],r[4]=e[n+3],r[3]=e[n+4],r[2]=e[n+5],r[1]=e[n+6],r[0]=e[n+7],t[0]}e.writeDoubleLE=n?i:s,e.writeDoubleBE=n?s:i,e.readDoubleLE=n?o:a,e.readDoubleBE=n?a:o}():function(){function t(e,t,r,n,i,s){var o=n<0?1:0;if(o&&(n=-n),0===n)e(0,i,s+t),e(1/n>0?0:2147483648,i,s+r);else if(isNaN(n))e(0,i,s+t),e(2146959360,i,s+r);else if(n>17976931348623157e292)e(0,i,s+t),e((o<<31|2146435072)>>>0,i,s+r);else{var a;if(n<22250738585072014e-324)e((a=n/5e-324)>>>0,i,s+t),e((o<<31|a/4294967296)>>>0,i,s+r);else{var u=Math.floor(Math.log(n)/Math.LN2);1024===u&&(u=1023),e(4503599627370496*(a=n*Math.pow(2,-u))>>>0,i,s+t),e((o<<31|u+1023<<20|1048576*a&1048575)>>>0,i,s+r)}}}function o(e,t,r,n,i){var s=e(n,i+t),o=e(n,i+r),a=2*(o>>31)+1,u=o>>>20&2047,c=4294967296*(1048575&o)+s;return 2047===u?c?NaN:a*(1/0):0===u?5e-324*a*c:a*Math.pow(2,u-1075)*(c+4503599627370496)}e.writeDoubleLE=t.bind(null,r,0,4),e.writeDoubleBE=t.bind(null,n,4,0),e.readDoubleLE=o.bind(null,i,0,4),e.readDoubleBE=o.bind(null,s,4,0)}(),e}function r(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function n(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function i(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function s(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},4153:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},9390:e=>{"use strict";e.exports=function(e,t,r){var n=r||8192,i=n>>>1,s=null,o=n;return function(r){if(r<1||r>i)return e(r);o+r>n&&(s=e(n),o=0);var a=t.call(s,o,o+=r);return 7&o&&(o=1+(7|o)),a}}},1447:(e,t)=>{"use strict";var r=t;r.length=function(e){for(var t=0,r=0,n=0;n<e.length;++n)(r=e.charCodeAt(n))<128?t+=1:r<2048?t+=2:55296==(64512&r)&&56320==(64512&e.charCodeAt(n+1))?(++n,t+=4):t+=3;return t},r.read=function(e,t,r){if(r-t<1)return"";for(var n,i=null,s=[],o=0;t<r;)(n=e[t++])<128?s[o++]=n:n>191&&n<224?s[o++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,s[o++]=55296+(n>>10),s[o++]=56320+(1023&n)):s[o++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],o>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),o=0);return i?(o&&i.push(String.fromCharCode.apply(String,s.slice(0,o))),i.join("")):String.fromCharCode.apply(String,s.slice(0,o))},r.write=function(e,t,r){for(var n,i,s=r,o=0;o<e.length;++o)(n=e.charCodeAt(o))<128?t[r++]=n:n<2048?(t[r++]=n>>6|192,t[r++]=63&n|128):55296==(64512&n)&&56320==(64512&(i=e.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&i),++o,t[r++]=n>>18|240,t[r++]=n>>12&63|128,t[r++]=n>>6&63|128,t[r++]=63&n|128):(t[r++]=n>>12|224,t[r++]=n>>6&63|128,t[r++]=63&n|128);return r-s}},9587:(e,t,r)=>{"use strict";var n=r(8379);function i(e,t){this.__proto__=new Error(t),this.__proto__.name="BackslashError",this.offset=e}function s(e){return e>="0"&&e<="7"}function o(e){return e=parseInt(e,16),n.ucs2.encode([e])}function a(e,t,r){var a=!1,u=[];function c(t){var r=e[t];if(!function(e){return e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F"}(r))throw new i(t,"Unexpected token ILLEGAL");return r}for(;t<e.length;){var l=e[t];if(t++,a){switch(a=!1,l){case"n":u.push("\n");continue;case"r":u.push("\r");continue;case"f":u.push("\f");continue;case"b":u.push("\b");continue;case"t":u.push("\t");continue;case"v":u.push("\v");continue;case"\\":u.push("\\");continue}if("x"===l){u.push(o(c(t)+c(t+1))),t+=2;continue}if("u"===l){u.push(o(c(t)+c(t+1)+c(t+2)+c(t+3))),t+=4;continue}if(s(l)){var f;s(f=e[t])&&(t++,l+=f,s(f=e[t])&&l[0]<="3"&&(t++,l+=f)),u.push(n.ucs2.encode([parseInt(l,8)]));continue}u.push(l)}else if("\\"===l)a=!0;else{if(l===r){t--;break}u.push(l)}}return 3===arguments.length?{end:t,value:u.join("")}:u.join("")}e.exports=function(e){return a(e,0)},e.exports.parseUntil=function(e,t,r){return a(e,t,r)}},7526:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,s=a(e),o=s[0],u=s[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,o,u)),l=0,f=u>0?o-4:o;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t);1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t);return c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,s=[],o=16383,a=0,c=n-i;a<c;a+=o)s.push(u(e,a,a+o>c?c:a+o));1===i?(t=e[n-1],s.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],s.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return s.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[o]=s[o],n[s.charCodeAt(o)]=o;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var i,s,o=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(r[(s=i)>>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},1594:function(e,t,r){var n;!function(i){"use strict";var s,o=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,u=Math.floor,c="[BigNumber Error] ",l=c+"Number primitive has more than 15 significant digits: ",f=1e14,h=14,d=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,y=1e9;function A(e){var t=0|e;return e>0||e===t?t:t-1}function m(e){for(var t,r,n=1,i=e.length,s=e[0]+"";n<i;){for(t=e[n++]+"",r=h-t.length;r--;t="0"+t);s+=t}for(i=s.length;48===s.charCodeAt(--i););return s.slice(0,i+1||1)}function b(e,t){var r,n,i=e.c,s=t.c,o=e.s,a=t.s,u=e.e,c=t.e;if(!o||!a)return null;if(r=i&&!i[0],n=s&&!s[0],r||n)return r?n?0:-a:o;if(o!=a)return o;if(r=o<0,n=u==c,!i||!s)return n?0:!i^r?1:-1;if(!n)return u>c^r?1:-1;for(a=(u=i.length)<(c=s.length)?u:c,o=0;o<a;o++)if(i[o]!=s[o])return i[o]>s[o]^r?1:-1;return u==c?0:u>c^r?1:-1}function w(e,t,r,n){if(e<t||e>r||e!==u(e))throw Error(c+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function v(e){var t=e.c.length-1;return A(e.e/h)==t&&e.c[t]%2!=0}function I(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function C(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}s=function e(t){var r,n,i,s,E,S,T,B,N,O,_=G.prototype={constructor:G,toString:null,valueOf:null},P=new G(1),D=20,x=4,R=-7,U=21,L=-1e7,M=1e7,F=!1,Q=1,k=0,V={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},j="0123456789abcdefghijklmnopqrstuvwxyz";function G(e,t){var r,s,a,c,f,p,g,y,A=this;if(!(A instanceof G))return new G(e,t);if(null==t){if(e&&!0===e._isBigNumber)return A.s=e.s,void(!e.c||e.e>M?A.c=A.e=null:e.e<L?A.c=[A.e=0]:(A.e=e.e,A.c=e.c.slice()));if((p="number"==typeof e)&&0*e==0){if(A.s=1/e<0?(e=-e,-1):1,e===~~e){for(c=0,f=e;f>=10;f/=10,c++);return void(c>M?A.c=A.e=null:(A.e=c,A.c=[e]))}y=String(e)}else{if(!o.test(y=String(e)))return i(A,y,p);A.s=45==y.charCodeAt(0)?(y=y.slice(1),-1):1}(c=y.indexOf("."))>-1&&(y=y.replace(".","")),(f=y.search(/e/i))>0?(c<0&&(c=f),c+=+y.slice(f+1),y=y.substring(0,f)):c<0&&(c=y.length)}else{if(w(t,2,j.length,"Base"),10==t)return z(A=new G(e),D+A.e+1,x);if(y=String(e),p="number"==typeof e){if(0*e!=0)return i(A,y,p,t);if(A.s=1/e<0?(y=y.slice(1),-1):1,G.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(l+e)}else A.s=45===y.charCodeAt(0)?(y=y.slice(1),-1):1;for(r=j.slice(0,t),c=f=0,g=y.length;f<g;f++)if(r.indexOf(s=y.charAt(f))<0){if("."==s){if(f>c){c=g;continue}}else if(!a&&(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase()))){a=!0,f=-1,c=0;continue}return i(A,String(e),p,t)}p=!1,(c=(y=n(y,t,10,A.s)).indexOf("."))>-1?y=y.replace(".",""):c=y.length}for(f=0;48===y.charCodeAt(f);f++);for(g=y.length;48===y.charCodeAt(--g););if(y=y.slice(f,++g)){if(g-=f,p&&G.DEBUG&&g>15&&(e>d||e!==u(e)))throw Error(l+A.s*e);if((c=c-f-1)>M)A.c=A.e=null;else if(c<L)A.c=[A.e=0];else{if(A.e=c,A.c=[],f=(c+1)%h,c<0&&(f+=h),f<g){for(f&&A.c.push(+y.slice(0,f)),g-=h;f<g;)A.c.push(+y.slice(f,f+=h));f=h-(y=y.slice(f)).length}else f-=g;for(;f--;y+="0");A.c.push(+y)}}else A.c=[A.e=0]}function H(e,t,r,n){var i,s,o,a,u;if(null==r?r=x:w(r,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)u=m(e.c),u=1==n||2==n&&(o<=R||o>=U)?I(u,o):C(u,o,"0");else if(s=(e=z(new G(e),t,r)).e,a=(u=m(e.c)).length,1==n||2==n&&(t<=s||s<=R)){for(;a<t;u+="0",a++);u=I(u,s)}else if(t-=o,u=C(u,s,"0"),s+1>a){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=s-a)>0)for(s+1==a&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function q(e,t){for(var r,n=1,i=new G(e[0]);n<e.length;n++){if(!(r=new G(e[n])).s){i=r;break}t.call(i,r)&&(i=r)}return i}function K(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*h-1)>M?e.c=e.e=null:r<L?e.c=[e.e=0]:(e.e=r,e.c=t),e}function z(e,t,r,n){var i,s,o,c,l,d,g,y=e.c,A=p;if(y){e:{for(i=1,c=y[0];c>=10;c/=10,i++);if((s=t-i)<0)s+=h,o=t,g=(l=y[d=0])/A[i-o-1]%10|0;else if((d=a((s+1)/h))>=y.length){if(!n)break e;for(;y.length<=d;y.push(0));l=g=0,i=1,o=(s%=h)-h+1}else{for(l=c=y[d],i=1;c>=10;c/=10,i++);g=(o=(s%=h)-h+i)<0?0:l/A[i-o-1]%10|0}if(n=n||t<0||null!=y[d+1]||(o<0?l:l%A[i-o-1]),n=r<4?(g||n)&&(0==r||r==(e.s<0?3:2)):g>5||5==g&&(4==r||n||6==r&&(s>0?o>0?l/A[i-o]:0:y[d-1])%10&1||r==(e.s<0?8:7)),t<1||!y[0])return y.length=0,n?(t-=e.e+1,y[0]=A[(h-t%h)%h],e.e=-t||0):y[0]=e.e=0,e;if(0==s?(y.length=d,c=1,d--):(y.length=d+1,c=A[h-s],y[d]=o>0?u(l/A[i-o]%A[o])*c:0),n)for(;;){if(0==d){for(s=1,o=y[0];o>=10;o/=10,s++);for(o=y[0]+=c,c=1;o>=10;o/=10,c++);s!=c&&(e.e++,y[0]==f&&(y[0]=1));break}if(y[d]+=c,y[d]!=f)break;y[d--]=0,c=1}for(s=y.length;0===y[--s];y.pop());}e.e>M?e.c=e.e=null:e.e<L&&(e.c=[e.e=0])}return e}function Y(e){var t,r=e.e;return null===r?e.toString():(t=m(e.c),t=r<=R||r>=U?I(t,r):C(t,r,"0"),e.s<0?"-"+t:t)}return G.clone=e,G.ROUND_UP=0,G.ROUND_DOWN=1,G.ROUND_CEIL=2,G.ROUND_FLOOR=3,G.ROUND_HALF_UP=4,G.ROUND_HALF_DOWN=5,G.ROUND_HALF_EVEN=6,G.ROUND_HALF_CEIL=7,G.ROUND_HALF_FLOOR=8,G.EUCLID=9,G.config=G.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(w(r=e[t],0,y,t),D=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(w(r=e[t],0,8,t),x=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(w(r[0],-y,0,t),w(r[1],0,y,t),R=r[0],U=r[1]):(w(r,-y,y,t),R=-(U=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)w(r[0],-y,-1,t),w(r[1],1,y,t),L=r[0],M=r[1];else{if(w(r,-y,y,t),!r)throw Error(c+t+" cannot be zero: "+r);L=-(M=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(c+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw F=!r,Error(c+"crypto unavailable");F=r}else F=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(w(r=e[t],0,9,t),Q=r),e.hasOwnProperty(t="POW_PRECISION")&&(w(r=e[t],0,y,t),k=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(c+t+" not an object: "+r);V=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(c+t+" invalid: "+r);j=r}}return{DECIMAL_PLACES:D,ROUNDING_MODE:x,EXPONENTIAL_AT:[R,U],RANGE:[L,M],CRYPTO:F,MODULO_MODE:Q,POW_PRECISION:k,FORMAT:V,ALPHABET:j}},G.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!G.DEBUG)return!0;var t,r,n=e.c,i=e.e,s=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===s||-1===s)&&i>=-y&&i<=y&&i===u(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%h)<1&&(t+=h),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=f||r!==u(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===s||1===s||-1===s))return!0;throw Error(c+"Invalid BigNumber: "+e)},G.maximum=G.max=function(){return q(arguments,_.lt)},G.minimum=G.min=function(){return q(arguments,_.gt)},G.random=(s=9007199254740992,E=Math.random()*s&2097151?function(){return u(Math.random()*s)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,s,o=0,l=[],f=new G(P);if(null==e?e=D:w(e,0,y),i=a(e/h),F)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));o<i;)(s=131072*t[o]+(t[o+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[o]=r[0],t[o+1]=r[1]):(l.push(s%1e14),o+=2);o=i/2}else{if(!crypto.randomBytes)throw F=!1,Error(c+"crypto unavailable");for(t=crypto.randomBytes(i*=7);o<i;)(s=281474976710656*(31&t[o])+1099511627776*t[o+1]+4294967296*t[o+2]+16777216*t[o+3]+(t[o+4]<<16)+(t[o+5]<<8)+t[o+6])>=9e15?crypto.randomBytes(7).copy(t,o):(l.push(s%1e14),o+=7);o=i/7}if(!F)for(;o<i;)(s=E())<9e15&&(l[o++]=s%1e14);for(i=l[--o],e%=h,i&&e&&(s=p[h-e],l[o]=u(i/s)*s);0===l[o];l.pop(),o--);if(o<0)l=[n=0];else{for(n=-1;0===l[0];l.splice(0,1),n-=h);for(o=1,s=l[0];s>=10;s/=10,o++);o<h&&(n-=h-o)}return f.e=n,f.c=l,f}),G.sum=function(){for(var e=1,t=arguments,r=new G(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e="0123456789";function t(e,t,r,n){for(var i,s,o=[0],a=0,u=e.length;a<u;){for(s=o.length;s--;o[s]*=t);for(o[0]+=n.indexOf(e.charAt(a++)),i=0;i<o.length;i++)o[i]>r-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/r|0,o[i]%=r)}return o.reverse()}return function(n,i,s,o,a){var u,c,l,f,h,d,p,g,y=n.indexOf("."),A=D,b=x;for(y>=0&&(f=k,k=0,n=n.replace(".",""),d=(g=new G(i)).pow(n.length-y),k=f,g.c=t(C(m(d.c),d.e,"0"),10,s,e),g.e=g.c.length),l=f=(p=t(n,i,s,a?(u=j,e):(u=e,j))).length;0==p[--f];p.pop());if(!p[0])return u.charAt(0);if(y<0?--l:(d.c=p,d.e=l,d.s=o,p=(d=r(d,g,A,b,s)).c,h=d.r,l=d.e),y=p[c=l+A+1],f=s/2,h=h||c<0||null!=p[c+1],h=b<4?(null!=y||h)&&(0==b||b==(d.s<0?3:2)):y>f||y==f&&(4==b||h||6==b&&1&p[c-1]||b==(d.s<0?8:7)),c<1||!p[0])n=h?C(u.charAt(1),-A,u.charAt(0)):u.charAt(0);else{if(p.length=c,h)for(--s;++p[--c]>s;)p[c]=0,c||(++l,p=[1].concat(p));for(f=p.length;!p[--f];);for(y=0,n="";y<=f;n+=u.charAt(p[y++]));n=C(n,l,u.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,s,o,a=0,u=e.length,c=t%g,l=t/g|0;for(e=e.slice();u--;)a=((i=c*(s=e[u]%g)+(n=l*s+(o=e[u]/g|0)*c)%g*g+a)/r|0)+(n/g|0)+l*o,e[u]=i%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var i,s;if(r!=n)s=r>n?1:-1;else for(i=s=0;i<r;i++)if(e[i]!=t[i]){s=e[i]>t[i]?1:-1;break}return s}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,s,o,a){var c,l,d,p,g,y,m,b,w,v,I,C,E,S,T,B,N,O=n.s==i.s?1:-1,_=n.c,P=i.c;if(!(_&&_[0]&&P&&P[0]))return new G(n.s&&i.s&&(_?!P||_[0]!=P[0]:P)?_&&0==_[0]||!P?0*O:O/0:NaN);for(w=(b=new G(O)).c=[],O=s+(l=n.e-i.e)+1,a||(a=f,l=A(n.e/h)-A(i.e/h),O=O/h|0),d=0;P[d]==(_[d]||0);d++);if(P[d]>(_[d]||0)&&l--,O<0)w.push(1),p=!0;else{for(S=_.length,B=P.length,d=0,O+=2,(g=u(a/(P[0]+1)))>1&&(P=e(P,g,a),_=e(_,g,a),B=P.length,S=_.length),E=B,I=(v=_.slice(0,B)).length;I<B;v[I++]=0);N=P.slice(),N=[0].concat(N),T=P[0],P[1]>=a/2&&T++;do{if(g=0,(c=t(P,v,B,I))<0){if(C=v[0],B!=I&&(C=C*a+(v[1]||0)),(g=u(C/T))>1)for(g>=a&&(g=a-1),m=(y=e(P,g,a)).length,I=v.length;1==t(y,v,m,I);)g--,r(y,B<m?N:P,m,a),m=y.length,c=1;else 0==g&&(c=g=1),m=(y=P.slice()).length;if(m<I&&(y=[0].concat(y)),r(v,y,I,a),I=v.length,-1==c)for(;t(P,v,B,I)<1;)g++,r(v,B<I?N:P,I,a),I=v.length}else 0===c&&(g++,v=[0]);w[d++]=g,v[0]?v[I++]=_[E]||0:(v=[_[E]],I=1)}while((E++<S||null!=v[0])&&O--);p=null!=v[0],w[0]||w.splice(0,1)}if(a==f){for(d=1,O=w[0];O>=10;O/=10,d++);z(b,s+(b.e=d+l*h-1)+1,o,p)}else b.e=l,b.r=+p;return b}}(),S=/^(-?)0([xbo])(?=\w[\w.]*$)/i,T=/^([^.]+)\.$/,B=/^\.([^.]+)$/,N=/^-?(Infinity|NaN)$/,O=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,s=r?t:t.replace(O,"");if(N.test(s))e.s=isNaN(s)?null:s<0?-1:1;else{if(!r&&(s=s.replace(S,(function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,s=s.replace(T,"$1").replace(B,"0.$1")),t!=s))return new G(s,i);if(G.DEBUG)throw Error(c+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},_.absoluteValue=_.abs=function(){var e=new G(this);return e.s<0&&(e.s=1),e},_.comparedTo=function(e,t){return b(this,new G(e,t))},_.decimalPlaces=_.dp=function(e,t){var r,n,i,s=this;if(null!=e)return w(e,0,y),null==t?t=x:w(t,0,8),z(new G(s),e+s.e+1,t);if(!(r=s.c))return null;if(n=((i=r.length-1)-A(this.e/h))*h,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},_.dividedBy=_.div=function(e,t){return r(this,new G(e,t),D,x)},_.dividedToIntegerBy=_.idiv=function(e,t){return r(this,new G(e,t),0,1)},_.exponentiatedBy=_.pow=function(e,t){var r,n,i,s,o,l,f,d,p=this;if((e=new G(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+Y(e));if(null!=t&&(t=new G(t)),o=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return d=new G(Math.pow(+Y(p),o?2-v(e):+Y(e))),t?d.mod(t):d;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new G(NaN);(n=!l&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||o&&p.c[1]>=24e7:p.c[0]<8e13||o&&p.c[0]<=9999975e7)))return s=p.s<0&&v(e)?-0:0,p.e>-1&&(s=1/s),new G(l?1/s:s);k&&(s=a(k/h+2))}for(o?(r=new G(.5),l&&(e.s=1),f=v(e)):f=(i=Math.abs(+Y(e)))%2,d=new G(P);;){if(f){if(!(d=d.times(p)).c)break;s?d.c.length>s&&(d.c.length=s):n&&(d=d.mod(t))}if(i){if(0===(i=u(i/2)))break;f=i%2}else if(z(e=e.times(r),e.e+1,1),e.e>14)f=v(e);else{if(0===(i=+Y(e)))break;f=i%2}p=p.times(p),s?p.c&&p.c.length>s&&(p.c.length=s):n&&(p=p.mod(t))}return n?d:(l&&(d=P.div(d)),t?d.mod(t):s?z(d,k,x,undefined):d)},_.integerValue=function(e){var t=new G(this);return null==e?e=x:w(e,0,8),z(t,t.e+1,e)},_.isEqualTo=_.eq=function(e,t){return 0===b(this,new G(e,t))},_.isFinite=function(){return!!this.c},_.isGreaterThan=_.gt=function(e,t){return b(this,new G(e,t))>0},_.isGreaterThanOrEqualTo=_.gte=function(e,t){return 1===(t=b(this,new G(e,t)))||0===t},_.isInteger=function(){return!!this.c&&A(this.e/h)>this.c.length-2},_.isLessThan=_.lt=function(e,t){return b(this,new G(e,t))<0},_.isLessThanOrEqualTo=_.lte=function(e,t){return-1===(t=b(this,new G(e,t)))||0===t},_.isNaN=function(){return!this.s},_.isNegative=function(){return this.s<0},_.isPositive=function(){return this.s>0},_.isZero=function(){return!!this.c&&0==this.c[0]},_.minus=function(e,t){var r,n,i,s,o=this,a=o.s;if(t=(e=new G(e,t)).s,!a||!t)return new G(NaN);if(a!=t)return e.s=-t,o.plus(e);var u=o.e/h,c=e.e/h,l=o.c,d=e.c;if(!u||!c){if(!l||!d)return l?(e.s=-t,e):new G(d?o:NaN);if(!l[0]||!d[0])return d[0]?(e.s=-t,e):new G(l[0]?o:3==x?-0:0)}if(u=A(u),c=A(c),l=l.slice(),a=u-c){for((s=a<0)?(a=-a,i=l):(c=u,i=d),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(n=(s=(a=l.length)<(t=d.length))?a:t,a=t=0;t<n;t++)if(l[t]!=d[t]){s=l[t]<d[t];break}if(s&&(i=l,l=d,d=i,e.s=-e.s),(t=(n=d.length)-(r=l.length))>0)for(;t--;l[r++]=0);for(t=f-1;n>a;){if(l[--n]<d[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=f}l[n]-=d[n]}for(;0==l[0];l.splice(0,1),--c);return l[0]?K(e,l,c):(e.s=3==x?-1:1,e.c=[e.e=0],e)},_.modulo=_.mod=function(e,t){var n,i,s=this;return e=new G(e,t),!s.c||!e.s||e.c&&!e.c[0]?new G(NaN):!e.c||s.c&&!s.c[0]?new G(s):(9==Q?(i=e.s,e.s=1,n=r(s,e,0,3),e.s=i,n.s*=i):n=r(s,e,0,Q),(e=s.minus(n.times(e))).c[0]||1!=Q||(e.s=s.s),e)},_.multipliedBy=_.times=function(e,t){var r,n,i,s,o,a,u,c,l,d,p,y,m,b,w,v=this,I=v.c,C=(e=new G(e,t)).c;if(!(I&&C&&I[0]&&C[0]))return!v.s||!e.s||I&&!I[0]&&!C||C&&!C[0]&&!I?e.c=e.e=e.s=null:(e.s*=v.s,I&&C?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=A(v.e/h)+A(e.e/h),e.s*=v.s,(u=I.length)<(d=C.length)&&(m=I,I=C,C=m,i=u,u=d,d=i),i=u+d,m=[];i--;m.push(0));for(b=f,w=g,i=d;--i>=0;){for(r=0,p=C[i]%w,y=C[i]/w|0,s=i+(o=u);s>i;)r=((c=p*(c=I[--o]%w)+(a=y*c+(l=I[o]/w|0)*p)%w*w+m[s]+r)/b|0)+(a/w|0)+y*l,m[s--]=c%b;m[s]=r}return r?++n:m.splice(0,1),K(e,m,n)},_.negated=function(){var e=new G(this);return e.s=-e.s||null,e},_.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new G(e,t)).s,!i||!t)return new G(NaN);if(i!=t)return e.s=-t,n.minus(e);var s=n.e/h,o=e.e/h,a=n.c,u=e.c;if(!s||!o){if(!a||!u)return new G(i/0);if(!a[0]||!u[0])return u[0]?e:new G(a[0]?n:0*i)}if(s=A(s),o=A(o),a=a.slice(),i=s-o){for(i>0?(o=s,r=u):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(t=u.length)<0&&(r=u,u=a,a=r,t=i),i=0;t;)i=(a[--t]=a[t]+u[t]+i)/f|0,a[t]=f===a[t]?0:a[t]%f;return i&&(a=[i].concat(a),++o),K(e,a,o)},_.precision=_.sd=function(e,t){var r,n,i,s=this;if(null!=e&&e!==!!e)return w(e,1,y),null==t?t=x:w(t,0,8),z(new G(s),e,t);if(!(r=s.c))return null;if(n=(i=r.length-1)*h+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&s.e+1>n&&(n=s.e+1),n},_.shiftedBy=function(e){return w(e,-9007199254740991,d),this.times("1e"+e)},_.squareRoot=_.sqrt=function(){var e,t,n,i,s,o=this,a=o.c,u=o.s,c=o.e,l=D+4,f=new G("0.5");if(1!==u||!a||!a[0])return new G(!u||u<0&&(!a||a[0])?NaN:a?o:1/0);if(0==(u=Math.sqrt(+Y(o)))||u==1/0?(((t=m(a)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=A((c+1)/2)-(c<0||c%2),n=new G(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new G(u+""),n.c[0])for((u=(c=n.e)+l)<3&&(u=0);;)if(s=n,n=f.times(s.plus(r(o,s,l,1))),m(s.c).slice(0,u)===(t=m(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(z(n,n.e+D+2,1),e=!n.times(n).eq(o));break}if(!i&&(z(s,s.e+D+2,0),s.times(s).eq(o))){n=s;break}l+=4,u+=4,i=1}return z(n,n.e+D+1,x,e)},_.toExponential=function(e,t){return null!=e&&(w(e,0,y),e++),H(this,e,t,1)},_.toFixed=function(e,t){return null!=e&&(w(e,0,y),e=e+this.e+1),H(this,e,t)},_.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=V;else if("object"!=typeof r)throw Error(c+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var s,o=n.split("."),a=+r.groupSize,u=+r.secondaryGroupSize,l=r.groupSeparator||"",f=o[0],h=o[1],d=i.s<0,p=d?f.slice(1):f,g=p.length;if(u&&(s=a,a=u,u=s,g-=s),a>0&&g>0){for(s=g%a||a,f=p.substr(0,s);s<g;s+=a)f+=l+p.substr(s,a);u>0&&(f+=l+p.slice(s)),d&&(f="-"+f)}n=h?f+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?h.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):h):f}return(r.prefix||"")+n+(r.suffix||"")},_.toFraction=function(e){var t,n,i,s,o,a,u,l,f,d,g,y,A=this,b=A.c;if(null!=e&&(!(u=new G(e)).isInteger()&&(u.c||1!==u.s)||u.lt(P)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+Y(u));if(!b)return new G(A);for(t=new G(P),f=n=new G(P),i=l=new G(P),y=m(b),o=t.e=y.length-A.e-1,t.c[0]=p[(a=o%h)<0?h+a:a],e=!e||u.comparedTo(t)>0?o>0?t:f:u,a=M,M=1/0,u=new G(y),l.c[0]=0;d=r(u,t,0,1),1!=(s=n.plus(d.times(i))).comparedTo(e);)n=i,i=s,f=l.plus(d.times(s=f)),l=s,t=u.minus(d.times(s=t)),u=s;return s=r(e.minus(n),i,0,1),l=l.plus(s.times(f)),n=n.plus(s.times(i)),l.s=f.s=A.s,g=r(f,i,o*=2,x).minus(A).abs().comparedTo(r(l,n,o,x).minus(A).abs())<1?[f,i]:[l,n],M=a,g},_.toNumber=function(){return+Y(this)},_.toPrecision=function(e,t){return null!=e&&w(e,1,y),H(this,e,t,2)},_.toString=function(e){var t,r=this,i=r.s,s=r.e;return null===s?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=s<=R||s>=U?I(m(r.c),s):C(m(r.c),s,"0"):10===e?t=C(m((r=z(new G(r),D+s+1,x)).c),r.e,"0"):(w(e,2,j.length,"Base"),t=n(C(m(r.c),s,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},_.valueOf=_.toJSON=function(){return Y(this)},_._isBigNumber=!0,null!=t&&G.set(t),G}(),s.default=s.BigNumber=s,void 0===(n=function(){return s}.call(t,r,t,e))||(e.exports=n)}()},1892:(e,t,r)=>{function n(e){if(!n.supported)return null;var t,s=e&&e.imports,o=(t="AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMK00AElgMAIABCADcDACAAQQhqQgA3AwAgAEEQakIANwMAIABBGGpCADcDACAAQSBqQgA3AwAgAEEoakIANwMAIABBMGpCADcDACAAQThqQgA3AwAgAEHAAGpCADcDACAAQcgAakIANwMAIABB0ABqQgA3AwAgAEHYAGpCADcDACAAQeAAakIANwMAIABB6ABqQgA3AwAgAEHwAGpCADcDACAAQfgAakIANwMAIABBgAFqQoiS853/zPmE6gBBACkDAIU3AwAgAEGIAWpCu86qptjQ67O7f0EIKQMAhTcDACAAQZABakKr8NP0r+68tzxBECkDAIU3AwAgAEGYAWpC8e30+KWn/aelf0EYKQMAhTcDACAAQaABakLRhZrv+s+Uh9EAQSApAwCFNwMAIABBqAFqQp/Y+dnCkdqCm39BKCkDAIU3AwAgAEGwAWpC6/qG2r+19sEfQTApAwCFNwMAIABBuAFqQvnC+JuRo7Pw2wBBOCkDAIU3AwAgAEHAAWpCADcDACAAQcgBakIANwMAIABB0AFqQgA3AwALbQEDfyAAQcABaiEDIABByAFqIQQgBCkDAKchBQJAA0AgASACRg0BIAVBgAFGBEAgAyADKQMAIAWtfDcDAEEAIQUgABADCyAAIAVqIAEtAAA6AAAgBUEBaiEFIAFBAWohAQwACwsgBCAFrTcDAAtkAQN/IABBwAFqIQEgAEHIAWohAiABIAEpAwAgAikDAHw3AwAgAEHQAWpCfzcDACACKQMApyEDAkADQCADQYABRg0BIAAgA2pBADoAACADQQFqIQMMAAsLIAIgA603AwAgABADC+U7AiB+CX8gAEGAAWohISAAQYgBaiEiIABBkAFqISMgAEGYAWohJCAAQaABaiElIABBqAFqISYgAEGwAWohJyAAQbgBaiEoICEpAwAhASAiKQMAIQIgIykDACEDICQpAwAhBCAlKQMAIQUgJikDACEGICcpAwAhByAoKQMAIQhCiJLznf/M+YTqACEJQrvOqqbY0Ouzu38hCkKr8NP0r+68tzwhC0Lx7fT4paf9p6V/IQxC0YWa7/rPlIfRACENQp/Y+dnCkdqCm38hDkLr+obav7X2wR8hD0L5wvibkaOz8NsAIRAgACkDACERIABBCGopAwAhEiAAQRBqKQMAIRMgAEEYaikDACEUIABBIGopAwAhFSAAQShqKQMAIRYgAEEwaikDACEXIABBOGopAwAhGCAAQcAAaikDACEZIABByABqKQMAIRogAEHQAGopAwAhGyAAQdgAaikDACEcIABB4ABqKQMAIR0gAEHoAGopAwAhHiAAQfAAaikDACEfIABB+ABqKQMAISAgDSAAQcABaikDAIUhDSAPIABB0AFqKQMAhSEPIAEgBSARfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgEnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBN8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAUfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgFXx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBZ8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAXfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggGHx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBl8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAafHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgG3x8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBx8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAdfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggHnx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIB98fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAgfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgH3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBt8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAVfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGXx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBp8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAgfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggHnx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBd8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiASfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgHXx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBF8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByATfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggHHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBh8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAWfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFHx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBx8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAZfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgHXx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBF8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAWfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgE3x8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIICB8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAefHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgG3x8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIB98fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAUfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgF3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBh8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCASfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgGnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBV8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAYfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgGnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBR8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiASfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgHnx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIB18fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAcfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggH3x8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBN8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAXfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgFnx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBt8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAVfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggEXx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFICB8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAZfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgGnx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBF8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAWfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGHx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBN8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAVfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggG3x8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIICB8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAffHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgEnx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBx8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAdfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggF3x8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBl8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAUfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgHnx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBN8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAdfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgF3x8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBt8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByARfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgHHx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBl8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAUfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgFXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIB58fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAYfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgFnx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIICB8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAffHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgEnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBp8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAdfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgFnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBJ8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAgfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgH3x8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIB58fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAVfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggG3x8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBF8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAYfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgF3x8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBR8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAafHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggE3x8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBl8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAcfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgHnx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBx8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAYfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgH3x8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIB18fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByASfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggFHx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBp8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAWfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgEXx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHICB8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAVfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggGXx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBd8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSATfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgG3x8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBd8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAgfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgH3x8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBp8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAcfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgFHx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBF8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAZfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgHXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBN8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAefHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgGHx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBJ8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAVfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgG3x8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBZ8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAbfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgE3x8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBl8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAVfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgGHx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBd8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCASfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggFnx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGICB8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAcfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgGnx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIB98fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAUfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggHXx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIB58fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSARfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgEXx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBJ8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiATfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgFHx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBV8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAWfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggF3x8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBh8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAZfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgGnx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBt8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAcfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggHXx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIB58fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAffHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgIHx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIB98fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAbfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgFXx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBl8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAafHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgIHx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIB58fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAXfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgEnx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIB18fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByARfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgE3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBx8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAYfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgFnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBR8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFICEgISkDACABIAmFhTcDACAiICIpAwAgAiAKhYU3AwAgIyAjKQMAIAMgC4WFNwMAICQgJCkDACAEIAyFhTcDACAlICUpAwAgBSANhYU3AwAgJiAmKQMAIAYgDoWFNwMAICcgJykDACAHIA+FhTcDACAoICgpAwAgCCAQhYU3AwAL","function"==typeof atob?new Uint8Array(atob(t).split("").map(i)):new(r(8287).Buffer)(t,"base64")),a=null,u={buffer:o,memory:null,exports:null,realloc:function(e){u.exports.memory.grow(Math.ceil(Math.abs(e-u.memory.length)/65536)),u.memory=new Uint8Array(u.exports.memory.buffer)},onload:c};return c((function(){})),u;function c(t){if(u.exports)return t();if(a)a.then(t.bind(null,null)).catch(t);else{try{if(e&&e.async)throw new Error("async");l({instance:new WebAssembly.Instance(new WebAssembly.Module(o),s)})}catch(e){a=WebAssembly.instantiate(o,s).then(l)}c(t)}}function l(e){u.exports=e.instance.exports,u.memory=u.exports.memory&&u.exports.memory.buffer&&new Uint8Array(u.exports.memory.buffer)}}function i(e){return e.charCodeAt(0)}e.exports=n,n.supported="undefined"!=typeof WebAssembly},1685:(e,t,r)=>{var n=r(6889),i=r(1892)(),s=64,o=[];e.exports=d;var a=e.exports.BYTES_MIN=16,u=e.exports.BYTES_MAX=64,c=(e.exports.BYTES=32,e.exports.KEYBYTES_MIN=16),l=e.exports.KEYBYTES_MAX=64,f=(e.exports.KEYBYTES=32,e.exports.SALTBYTES=16),h=e.exports.PERSONALBYTES=16;function d(e,t,r,p,g){if(!(this instanceof d))return new d(e,t,r,p,g);if(!i||!i.exports)throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");e||(e=32),!0!==g&&(n(e>=a,"digestLength must be at least "+a+", was given "+e),n(e<=u,"digestLength must be at most "+u+", was given "+e),null!=t&&n(t.length>=c,"key must be at least "+c+", was given "+t.length),null!=t&&n(t.length<=l,"key must be at least "+l+", was given "+t.length),null!=r&&n(r.length===f,"salt must be exactly "+f+", was given "+r.length),null!=p&&n(p.length===h,"personal must be exactly "+h+", was given "+p.length)),o.length||(o.push(s),s+=216),this.digestLength=e,this.finalized=!1,this.pointer=o.pop(),i.memory.fill(0,0,64),i.memory[0]=this.digestLength,i.memory[1]=t?t.length:0,i.memory[2]=1,i.memory[3]=1,r&&i.memory.set(r,32),p&&i.memory.set(p,48),this.pointer+216>i.memory.length&&i.realloc(this.pointer+216),i.exports.blake2b_init(this.pointer,this.digestLength),t&&(this.update(t),i.memory.fill(0,s,s+t.length),i.memory[this.pointer+200]=128)}function p(){}function g(e){return e<16?"0"+e.toString(16):e.toString(16)}d.prototype.update=function(e){return n(!1===this.finalized,"Hash instance finalized"),n(e,"input must be TypedArray or Buffer"),s+e.length>i.memory.length&&i.realloc(s+e.length),i.memory.set(e,s),i.exports.blake2b_update(this.pointer,s,s+e.length),this},d.prototype.digest=function(e){if(n(!1===this.finalized,"Hash instance finalized"),this.finalized=!0,o.push(this.pointer),i.exports.blake2b_final(this.pointer),!e||"binary"===e)return i.memory.slice(this.pointer+128,this.pointer+128+this.digestLength);if("hex"===e)return function(e,t,r){for(var n="",i=0;i<r;i++)n+=g(e[t+i]);return n}(i.memory,this.pointer+128,this.digestLength);n(e.length>=this.digestLength,"input must be TypedArray or Buffer");for(var t=0;t<this.digestLength;t++)e[t]=i.memory[this.pointer+128+t];return e},d.prototype.final=d.prototype.digest,d.WASM=i&&i.buffer,d.SUPPORTED="undefined"!=typeof WebAssembly,d.ready=function(e){return e||(e=p),i?new Promise((function(t,r){i.onload((function(n){n?r():t(),e(n)}))})):e(new Error("WebAssembly not supported"))},d.prototype.ready=d.ready},2206:(e,t,r)=>{var n=r(6889),i=r(1685);function s(e,t,r){var n=e[t]+e[r],i=e[t+1]+e[r+1];n>=4294967296&&i++,e[t]=n,e[t+1]=i}function o(e,t,r,n){var i=e[t]+r;r<0&&(i+=4294967296);var s=e[t+1]+n;i>=4294967296&&s++,e[t]=i,e[t+1]=s}function a(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function u(e,t,r,n,i,a){var u=h[i],c=h[i+1],l=h[a],d=h[a+1];s(f,e,t),o(f,e,u,c);var p=f[n]^f[e],g=f[n+1]^f[e+1];f[n]=g,f[n+1]=p,s(f,r,n),p=f[t]^f[r],g=f[t+1]^f[r+1],f[t]=p>>>24^g<<8,f[t+1]=g>>>24^p<<8,s(f,e,t),o(f,e,l,d),p=f[n]^f[e],g=f[n+1]^f[e+1],f[n]=p>>>16^g<<16,f[n+1]=g>>>16^p<<16,s(f,r,n),p=f[t]^f[r],g=f[t+1]^f[r+1],f[t]=g>>>31^p<<1,f[t+1]=p>>>31^g<<1}var c=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),l=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map((function(e){return 2*e}))),f=new Uint32Array(32),h=new Uint32Array(32);function d(e,t){var r=0;for(r=0;r<16;r++)f[r]=e.h[r],f[r+16]=c[r];for(f[24]=f[24]^e.t,f[25]=f[25]^e.t/4294967296,t&&(f[28]=~f[28],f[29]=~f[29]),r=0;r<32;r++)h[r]=a(e.b,4*r);for(r=0;r<12;r++)u(0,8,16,24,l[16*r+0],l[16*r+1]),u(2,10,18,26,l[16*r+2],l[16*r+3]),u(4,12,20,28,l[16*r+4],l[16*r+5]),u(6,14,22,30,l[16*r+6],l[16*r+7]),u(0,10,20,30,l[16*r+8],l[16*r+9]),u(2,12,22,24,l[16*r+10],l[16*r+11]),u(4,14,16,26,l[16*r+12],l[16*r+13]),u(6,8,18,28,l[16*r+14],l[16*r+15]);for(r=0;r<16;r++)e.h[r]=e.h[r]^f[r]^f[r+16]}var p=new Uint8Array([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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function g(e,t,r,n){p.fill(0),this.b=new Uint8Array(128),this.h=new Uint32Array(16),this.t=0,this.c=0,this.outlen=e,p[0]=e,t&&(p[1]=t.length),p[2]=1,p[3]=1,r&&p.set(r,32),n&&p.set(n,48);for(var i=0;i<16;i++)this.h[i]=c[i]^a(p,4*i);t&&(y(this,t),this.c=128)}function y(e,t){for(var r=0;r<t.length;r++)128===e.c&&(e.t+=e.c,d(e,!1),e.c=0),e.b[e.c++]=t[r]}function A(e){return e<16?"0"+e.toString(16):e.toString(16)}g.prototype.update=function(e){return n(null!=e,"input must be Uint8Array or Buffer"),y(this,e),this},g.prototype.digest=function(e){var t=e&&"binary"!==e&&"hex"!==e?e:new Uint8Array(this.outlen);return n(t.length>=this.outlen,"out must have at least outlen bytes of space"),function(e,t){e.t+=e.c;for(;e.c<128;)e.b[e.c++]=0;d(e,!0);for(var r=0;r<e.outlen;r++)t[r]=e.h[r>>2]>>8*(3&r)}(this,t),"hex"===e?function(e){for(var t="",r=0;r<e.length;r++)t+=A(e[r]);return t}(t):t},g.prototype.final=g.prototype.digest,g.ready=function(e){i.ready((function(){e()}))};var m=g;e.exports=function(e,t,r,i,s){return!0!==s&&(n(e>=b,"outlen must be at least "+b+", was given "+e),n(e<=w,"outlen must be at most "+w+", was given "+e),null!=t&&n(t.length>=v,"key must be at least "+v+", was given "+t.length),null!=t&&n(t.length<=I,"key must be at most "+I+", was given "+t.length),null!=r&&n(r.length===C,"salt must be exactly "+C+", was given "+r.length),null!=i&&n(i.length===E,"personal must be exactly "+E+", was given "+i.length)),new m(e,t,r,i)},e.exports.ready=function(e){i.ready((function(){e()}))},e.exports.WASM_SUPPORTED=i.SUPPORTED,e.exports.WASM_LOADED=!1;var b=e.exports.BYTES_MIN=16,w=e.exports.BYTES_MAX=64,v=(e.exports.BYTES=32,e.exports.KEYBYTES_MIN=16),I=e.exports.KEYBYTES_MAX=64,C=(e.exports.KEYBYTES=32,e.exports.SALTBYTES=16),E=e.exports.PERSONALBYTES=16;i.ready((function(t){t||(e.exports.WASM_LOADED=!0,m=i)}))},8287:(e,t,r)=>{"use strict";const n=r(7526),i=r(251),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const o=2147483647;function a(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=a(r);const i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(W(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(W(e,ArrayBuffer)||e&&W(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(W(e,SharedArrayBuffer)||e&&W(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||$(e.length)?a(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return l(e),a(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function g(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||W(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(i)return n?-1:K(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return _(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return N(this,t,r);case"latin1":case"binary":return O(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function A(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),$(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){let s,o=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,a/=2,u/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let n=-1;for(s=r;s<a;s++)if(c(e,s)===c(t,-1===n?0:s-n)){if(-1===n&&(n=s),s-n+1===u)return n*o}else-1!==n&&(s-=s-n),n=-1}else for(r+u>a&&(r=a-u),s=r;s>=0;s--){let r=!0;for(let n=0;n<u;n++)if(c(e,s+n)!==c(t,n)){r=!1;break}if(r)return s}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const s=t.length;let o;for(n>s/2&&(n=s/2),o=0;o<n;++o){const n=parseInt(t.substr(2*o,2),16);if($(n))return o;e[r+o]=n}return o}function v(e,t,r,n){return Y(K(t,e.length-r),e,r,n)}function I(e,t,r,n){return Y(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function C(e,t,r,n){return Y(z(t),e,r,n)}function E(e,t,r,n){return Y(function(e,t){let r,n,i;const s=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,i=r%256,s.push(i),s.push(n);return s}(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let s=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=r){let r,n,a,u;switch(o){case 1:t<128&&(s=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(s=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(s=u));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(s=u))}}null===s?(s=65533,o=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=o}return function(e){const t=e.length;if(t<=B)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=B));return r}(n)}t.kMaxLength=o,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},u.allocUnsafe=function(e){return f(e)},u.allocUnsafeSlow=function(e){return f(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(W(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),W(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(W(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)A(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)A(this,t,t+3),A(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)A(this,t,t+7),A(this,t+1,t+6),A(this,t+2,t+5),A(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},s&&(u.prototype[s]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(W(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let s=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0);const a=Math.min(s,o),c=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<a;++e)if(c[e]!==l[e]){s=c[e],o=l[e];break}return s<o?-1:o<s?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let s=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":case"latin1":case"binary":return I(this,e,t,r);case"base64":return C(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const B=4096;function N(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function O(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function _(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=J[e[n]];return i}function P(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function D(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,r,n,i,s){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function R(e,t,r,n,i){j(t,n,i,e,r,7);let s=Number(t&BigInt(4294967295));e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function U(e,t,r,n,i){j(t,n,i,e,r,7);let s=Number(t&BigInt(4294967295));e[r+7]=s,s>>=8,e[r+6]=s,s>>=8,e[r+5]=s,s>>=8,e[r+4]=s;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function L(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(e,t,r,n,s){return t=+t,r>>>=0,s||L(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,s){return t=+t,r>>>=0,s||L(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e],i=1,s=0;for(;++s<t&&(i*=256);)n+=this[e+s]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=X((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=X((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e],i=1,s=0;for(;++s<t&&(i*=256);)n+=this[e+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let n=t,i=1,s=this[e+--n];for(;n>0&&(i*=256);)s+=this[e+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},u.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=X((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),u.prototype.readBigInt64BE=X((function(e){G(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||H(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||D(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){x(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=1,s=0;for(this[t]=255&e;++s<r&&(i*=256);)this[t+s]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){x(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=X((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=X((function(e,t=0){return U(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);x(this,e,t,r,n-1,-n)}let i=0,s=1,o=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/s>>0)-o&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);x(this,e,t,r,n-1,-n)}let i=r-1,s=1,o=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/s>>0)-o&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=X((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=X((function(e,t=0){return U(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return M(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return M(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const s=u.isBuffer(e)?e:u.from(e,n),o=s.length;if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%o]}return this};const Q={};function k(e,t,r){Q[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function V(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function j(e,t,r,n,i,s){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=s>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(s+1)}${n}`:`>= -(2${n} ** ${8*(s+1)-1}${n}) and < 2 ** ${8*(s+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new Q.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){G(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||H(t,e.length-(r+1))}(n,i,s)}function G(e,t){if("number"!=typeof e)throw new Q.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,r){if(Math.floor(e)!==e)throw G(e,r),new Q.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new Q.ERR_BUFFER_OUT_OF_BOUNDS;throw new Q.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}k("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),k("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),k("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=V(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=V(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const q=/[^+/0-9A-Za-z-_]/g;function K(e,t){let r;t=t||1/0;const n=e.length;let i=null;const s=[];for(let o=0;o<n;++o){if(r=e.charCodeAt(o),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function z(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function W(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function $(e){return e!=e}const J=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},7007:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,s),n(r)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,s,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&g(e,"error",t,r)}(e,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var i,s,o,c;if(a(r),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),o=s[t]),void 0===o)o=s[t]=r,++e._eventsCount;else if("function"==typeof o?o=s[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=u(e))>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,c=l,console&&console.warn&&console.warn(c)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function g(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(s){n.once&&e.removeEventListener(t,i),r(s)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,s=this._events;if(void 0!==s)i=i&&void 0===s.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var u=s[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var c=u.length,l=p(u,c);for(r=0;r<c;++r)n(l[r],this,t)}return!0},s.prototype.addListener=function(e,t){return c(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return c(this,e,t,!0)},s.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,n,i,s,o;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,s=r.length-1;s>=0;s--)if(r[s]===t||r[s].listener===t){o=r[s].listener,i=s;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,s=Object.keys(r);for(n=0;n<s.length;++n)"removeListener"!==(i=s[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},s.prototype.listenerCount=d,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},251:(e,t)=>{t.read=function(e,t,r,n,i){var s,o,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,s=d&(1<<-l)-1,d>>=-l,l+=a;l>0;s=256*s+e[t+f],f+=h,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=n;l>0;o=256*o+e[t+f],f+=h,l-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),s-=c}return(d?-1:1)*o*Math.pow(2,s-n)},t.write=function(e,t,r,n,i,s){var o,a,u,c=8*s-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:s-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=l?(a=0,o=l):o+f>=1?(a=(t*u-1)*Math.pow(2,i),o+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=255&a,d+=p,a/=256,i-=8);for(o=o<<i|a,c+=i;c>0;e[r+d]=255&o,d+=p,o/=256,c-=8);e[r+d-p]|=128*g}},6698:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},1013:(e,t,r)=>{var n=r(7372).stringify,i=r(8146);e.exports=function(e){return{parse:i(e),stringify:n}},e.exports.parse=i(),e.exports.stringify=n},8146:(e,t,r)=>{var n=null;const i=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,s=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;e.exports=function(e){"use strict";var t={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(null!=e){if(!0===e.strict&&(t.strict=!0),!0===e.storeAsString&&(t.storeAsString=!0),t.alwaysParseAsBig=!0===e.alwaysParseAsBig&&e.alwaysParseAsBig,t.useNativeBigInt=!0===e.useNativeBigInt&&e.useNativeBigInt,void 0!==e.constructorAction){if("error"!==e.constructorAction&&"ignore"!==e.constructorAction&&"preserve"!==e.constructorAction)throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${e.constructorAction}`);t.constructorAction=e.constructorAction}if(void 0!==e.protoAction){if("error"!==e.protoAction&&"ignore"!==e.protoAction&&"preserve"!==e.protoAction)throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${e.protoAction}`);t.protoAction=e.protoAction}}var o,a,u,c,l={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},f=function(e){throw{name:"SyntaxError",message:e,at:o,text:u}},h=function(e){return e&&e!==a&&f("Expected '"+e+"' instead of '"+a+"'"),a=u.charAt(o),o+=1,a},d=function(){var e,i="";for("-"===a&&(i="-",h("-"));a>="0"&&a<="9";)i+=a,h();if("."===a)for(i+=".";h()&&a>="0"&&a<="9";)i+=a;if("e"===a||"E"===a)for(i+=a,h(),"-"!==a&&"+"!==a||(i+=a,h());a>="0"&&a<="9";)i+=a,h();if(e=+i,isFinite(e))return null==n&&(n=r(1594)),i.length>15?t.storeAsString?i:t.useNativeBigInt?BigInt(i):new n(i):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(e):new n(e):e;f("Bad number")},p=function(){var e,t,r,n="";if('"'===a)for(var i=o;h();){if('"'===a)return o-1>i&&(n+=u.substring(i,o-1)),h(),n;if("\\"===a){if(o-1>i&&(n+=u.substring(i,o-1)),h(),"u"===a){for(r=0,t=0;t<4&&(e=parseInt(h(),16),isFinite(e));t+=1)r=16*r+e;n+=String.fromCharCode(r)}else{if("string"!=typeof l[a])break;n+=l[a]}i=o}}f("Bad string")},g=function(){for(;a&&a<=" ";)h()};return c=function(){switch(g(),a){case"{":return function(){var e,r=Object.create(null);if("{"===a){if(h("{"),g(),"}"===a)return h("}"),r;for(;a;){if(e=p(),g(),h(":"),!0===t.strict&&Object.hasOwnProperty.call(r,e)&&f('Duplicate key "'+e+'"'),!0===i.test(e)?"error"===t.protoAction?f("Object contains forbidden prototype property"):"ignore"===t.protoAction?c():r[e]=c():!0===s.test(e)?"error"===t.constructorAction?f("Object contains forbidden constructor property"):"ignore"===t.constructorAction?c():r[e]=c():r[e]=c(),g(),"}"===a)return h("}"),r;h(","),g()}}f("Bad object")}();case"[":return function(){var e=[];if("["===a){if(h("["),g(),"]"===a)return h("]"),e;for(;a;){if(e.push(c()),g(),"]"===a)return h("]"),e;h(","),g()}}f("Bad array")}();case'"':return p();case"-":return d();default:return a>="0"&&a<="9"?d():function(){switch(a){case"t":return h("t"),h("r"),h("u"),h("e"),!0;case"f":return h("f"),h("a"),h("l"),h("s"),h("e"),!1;case"n":return h("n"),h("u"),h("l"),h("l"),null}f("Unexpected '"+a+"'")}()}},function(e,t){var r;return u=e+"",o=0,a=" ",r=c(),g(),a&&f("Syntax error"),"function"==typeof t?function e(r,n){var i,s=r[n];return s&&"object"==typeof s&&Object.keys(s).forEach((function(t){void 0!==(i=e(s,t))?s[t]=i:delete s[t]})),t.call(r,n,s)}({"":r},""):r}}},7372:(e,t,r)=>{var n=r(1594),i=e.exports;!function(){"use strict";var e,t,r,s=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function a(e){return s.lastIndex=0,s.test(e)?'"'+e.replace(s,(function(e){var t=o[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function u(i,s){var o,c,l,f,h,d=e,p=s[i],g=null!=p&&(p instanceof n||n.isBigNumber(p));switch(p&&"object"==typeof p&&"function"==typeof p.toJSON&&(p=p.toJSON(i)),"function"==typeof r&&(p=r.call(s,i,p)),typeof p){case"string":return g?p:a(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":case"bigint":return String(p);case"object":if(!p)return"null";if(e+=t,h=[],"[object Array]"===Object.prototype.toString.apply(p)){for(f=p.length,o=0;o<f;o+=1)h[o]=u(o,p)||"null";return l=0===h.length?"[]":e?"[\n"+e+h.join(",\n"+e)+"\n"+d+"]":"["+h.join(",")+"]",e=d,l}if(r&&"object"==typeof r)for(f=r.length,o=0;o<f;o+=1)"string"==typeof r[o]&&(l=u(c=r[o],p))&&h.push(a(c)+(e?": ":":")+l);else Object.keys(p).forEach((function(t){var r=u(t,p);r&&h.push(a(t)+(e?": ":":")+r)}));return l=0===h.length?"{}":e?"{\n"+e+h.join(",\n"+e)+"\n"+d+"}":"{"+h.join(",")+"}",e=d,l}}"function"!=typeof i.stringify&&(i.stringify=function(n,i,s){var o;if(e="",t="","number"==typeof s)for(o=0;o<s;o+=1)t+=" ";else"string"==typeof s&&(t=s);if(r=i,i&&"function"!=typeof i&&("object"!=typeof i||"number"!=typeof i.length))throw new Error("JSON.stringify");return u("",{"":n})})}()},6598:(e,t,r)=>{var n=r(9587);function i(e,t){for(var r,n,i=e.length,s=t,o=t;o<i;o++){var a=e[o];if(","===a){r=o;break}if("]"===a||"}"===a){r=o-1;break}if(!g(a))throw m(e,o,"expecting end of expression or separator")}return void 0===r?n=e[r=i]:(n=e[r],r++),{start:s,end:r,value:n}}function s(e,t){for(var r,n=e.length,i=t,s=t;s<n;s++){var o=e[s];if(":"===o){r=s;break}if(!g(o))throw m(e,s,"expecting ':'")}if(void 0===r)throw m(e,s,"expecting ':'");return{start:i,end:++r}}function o(e,t,r,i){for(var s,o,a,p=e.length,y=!1,b=!1,w=!1,v=!1,I=!1,C=!1,E=t;E<p;E++){var S=e[E];if(void 0===s){if(!g(S)){if("["===S)y=!0;else if("{"===S)b=!0;else if('"'===S)w=!0;else{if(f(e,E)){s=E,o=E+=3,a=!0;break}if(h(e,E)){s=E,o=E+=4,a=!1;break}if(d(e,E)){s=E,o=E+=3,a=null;break}if(A(S))v=!0;else{if("-"!==S)throw m(e,E,"");v=!0}}s=E}}else{if(y){var T=l(e,E,r,i);o=T.end,a=T.value;break}if(b){var B=u(e,E,r,i);o=B.end,a=B.value;break}if(w&&'"'===S&&c(e,E-1)){o=E,a=n(e.substring(s+1,o));break}if(v)if(g(S))C=!0;else{if(","===S||"]"===S||"}"===S){a=parseFloat(e.substring(s,o),10),o=E-1;break}if(A(S)&&!C)continue;if("."!==S||I||C)throw m(e,E,"expecting number");I=!0}}}if(void 0===o){if(!v)throw m(e,E,"unclosed statement");a=parseFloat(e.substring(s,E),10),o=E-1}return{value:a,start:s,end:++o}}function a(e,t){for(var r,i,s=e.length,o=t;o<s;o++){var a=e[o];if(void 0===r){if(!g(a)){if('"'!==a)throw m(e,o,"expecting String");r=o}}else if('"'===a&&c(e,o-1)){i=o;break}}if(void 0===i)throw m(e,s,"expecting String");var u=n(e.substring(r+1,i));if(""===u)throw m(e,r,"empty string");return{start:r,end:++i,value:u}}function u(e,t,r,n){for(var u=t,c=",",l={},f=[],h=[],d=t;g(e[d]);)d++;if("}"===e[d])return{start:t,end:d,value:l};for(;","===c;){var p=a(e,u),y=o(e,s(e,p.end).end,r,n),A=i(e,y.end);r||-1!==f.indexOf(p.value)&&(p.value=p.value+"1"),f.push(p.value),h.push(y.value),u=A.end,c=A.value}if(n){var m=0;for(m=0;m<f.length;m++)l[f[m]]=h[m]}return{start:t,end:u,value:l}}function c(e,t){for(var r=t,n=0;r>-1&&"\\"===e[r];)n++,r--;return n%2==0}function l(e,t,r,n){for(var s=t,a=",",u=[],c=t;g(e[c]);)c++;if("]"===e[c])return{start:t,end:c,value:u};for(;","===a;){var l=o(e,s,r,n),f=i(e,l.end);n&&u.push(l.value),s=f.end,a=f.value}return{start:t,end:s,value:u}}function f(e,t){return"true"===e.substr(t,4)}function h(e,t){return"false"===e.substr(t,5)}function d(e,t){return"null"===e.substr(t,4)}e.exports={validate:function(e,t){var r;if(t=t||!1,"string"!=typeof e)r="Input must be a string";else try{o(e,0,t,!1)}catch(e){r=e.message}return r},parse:function(e,t){if("string"!=typeof e)throw new Error("Input must be a string");return o(e,0,t=t||!1,!0).value}};var p=new RegExp(/^\s$/);function g(e){return p.test(e)}var y=new RegExp(/^\d$/);function A(e){return y.test(e)}function m(e,t,r){var n,i,s=10;return n=e.length<t+s?e.substr(b(e.length-s),e.length):t-5<0?e.substr(0,s):e.substr(b(t-5),s),i=r?"Syntax error: "+r+" near "+n:"Syntax error near "+n,new Error(i)}function b(e){return e<0?0:e}},5508:(e,t,r)=>{e.exports=r(9792)(r(4817))},9792:(e,t,r)=>{const n=r(212),i=r(4614);e.exports=function(e){const t=n(e),r=i(e);return function(e,n){switch("string"==typeof e?e.toLowerCase():e){case"keccak224":return new t(1152,448,null,224,n);case"keccak256":return new t(1088,512,null,256,n);case"keccak384":return new t(832,768,null,384,n);case"keccak512":return new t(576,1024,null,512,n);case"sha3-224":return new t(1152,448,6,224,n);case"sha3-256":return new t(1088,512,6,256,n);case"sha3-384":return new t(832,768,6,384,n);case"sha3-512":return new t(576,1024,6,512,n);case"shake128":return new r(1344,256,31,n);case"shake256":return new r(1088,512,31,n);default:throw new Error("Invald algorithm: "+e)}}}},212:(e,t,r)=>{const{Transform:n}=r(8399);e.exports=e=>class t extends n{constructor(t,r,n,i,s){super(s),this._rate=t,this._capacity=r,this._delimitedSuffix=n,this._hashBitLength=i,this._options=s,this._state=new e,this._state.initialize(t,r),this._finalized=!1}_transform(e,t,r){let n=null;try{this.update(e,t)}catch(e){n=e}r(n)}_flush(e){let t=null;try{this.push(this.digest())}catch(e){t=e}e(t)}update(e,t){if(!Buffer.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(e)||(e=Buffer.from(e,t)),this._state.absorb(e),this}digest(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let t=this._state.squeeze(this._hashBitLength/8);return void 0!==e&&(t=t.toString(e)),this._resetState(),t}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new t(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}},4614:(e,t,r)=>{const{Transform:n}=r(8399);e.exports=e=>class t extends n{constructor(t,r,n,i){super(i),this._rate=t,this._capacity=r,this._delimitedSuffix=n,this._options=i,this._state=new e,this._state.initialize(t,r),this._finalized=!1}_transform(e,t,r){let n=null;try{this.update(e,t)}catch(e){n=e}r(n)}_flush(){}_read(e){this.push(this.squeeze(e))}update(e,t){if(!Buffer.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(e)||(e=Buffer.from(e,t)),this._state.absorb(e),this}squeeze(e,t){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let r=this._state.squeeze(e);return void 0!==t&&(r=r.toString(t)),r}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const e=new t(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(e._state),e._finalized=this._finalized,e}}},9078:(e,t)=>{const r=[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];t.p1600=function(e){for(let t=0;t<24;++t){const n=e[0]^e[10]^e[20]^e[30]^e[40],i=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],o=e[3]^e[13]^e[23]^e[33]^e[43],a=e[4]^e[14]^e[24]^e[34]^e[44],u=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],f=e[8]^e[18]^e[28]^e[38]^e[48],h=e[9]^e[19]^e[29]^e[39]^e[49];let d=f^(s<<1|o>>>31),p=h^(o<<1|s>>>31);const g=e[0]^d,y=e[1]^p,A=e[10]^d,m=e[11]^p,b=e[20]^d,w=e[21]^p,v=e[30]^d,I=e[31]^p,C=e[40]^d,E=e[41]^p;d=n^(a<<1|u>>>31),p=i^(u<<1|a>>>31);const S=e[2]^d,T=e[3]^p,B=e[12]^d,N=e[13]^p,O=e[22]^d,_=e[23]^p,P=e[32]^d,D=e[33]^p,x=e[42]^d,R=e[43]^p;d=s^(c<<1|l>>>31),p=o^(l<<1|c>>>31);const U=e[4]^d,L=e[5]^p,M=e[14]^d,F=e[15]^p,Q=e[24]^d,k=e[25]^p,V=e[34]^d,j=e[35]^p,G=e[44]^d,H=e[45]^p;d=a^(f<<1|h>>>31),p=u^(h<<1|f>>>31);const q=e[6]^d,K=e[7]^p,z=e[16]^d,Y=e[17]^p,W=e[26]^d,$=e[27]^p,J=e[36]^d,X=e[37]^p,Z=e[46]^d,ee=e[47]^p;d=c^(n<<1|i>>>31),p=l^(i<<1|n>>>31);const te=e[8]^d,re=e[9]^p,ne=e[18]^d,ie=e[19]^p,se=e[28]^d,oe=e[29]^p,ae=e[38]^d,ue=e[39]^p,ce=e[48]^d,le=e[49]^p,fe=g,he=y,de=m<<4|A>>>28,pe=A<<4|m>>>28,ge=b<<3|w>>>29,ye=w<<3|b>>>29,Ae=I<<9|v>>>23,me=v<<9|I>>>23,be=C<<18|E>>>14,we=E<<18|C>>>14,ve=S<<1|T>>>31,Ie=T<<1|S>>>31,Ce=N<<12|B>>>20,Ee=B<<12|N>>>20,Se=O<<10|_>>>22,Te=_<<10|O>>>22,Be=D<<13|P>>>19,Ne=P<<13|D>>>19,Oe=x<<2|R>>>30,_e=R<<2|x>>>30,Pe=L<<30|U>>>2,De=U<<30|L>>>2,xe=M<<6|F>>>26,Re=F<<6|M>>>26,Ue=k<<11|Q>>>21,Le=Q<<11|k>>>21,Me=V<<15|j>>>17,Fe=j<<15|V>>>17,Qe=H<<29|G>>>3,ke=G<<29|H>>>3,Ve=q<<28|K>>>4,je=K<<28|q>>>4,Ge=Y<<23|z>>>9,He=z<<23|Y>>>9,qe=W<<25|$>>>7,Ke=$<<25|W>>>7,ze=J<<21|X>>>11,Ye=X<<21|J>>>11,We=ee<<24|Z>>>8,$e=Z<<24|ee>>>8,Je=te<<27|re>>>5,Xe=re<<27|te>>>5,Ze=ne<<20|ie>>>12,et=ie<<20|ne>>>12,tt=oe<<7|se>>>25,rt=se<<7|oe>>>25,nt=ae<<8|ue>>>24,it=ue<<8|ae>>>24,st=ce<<14|le>>>18,ot=le<<14|ce>>>18;e[0]=fe^~Ce&Ue,e[1]=he^~Ee&Le,e[10]=Ve^~Ze&ge,e[11]=je^~et&ye,e[20]=ve^~xe&qe,e[21]=Ie^~Re&Ke,e[30]=Je^~de&Se,e[31]=Xe^~pe&Te,e[40]=Pe^~Ge&tt,e[41]=De^~He&rt,e[2]=Ce^~Ue&ze,e[3]=Ee^~Le&Ye,e[12]=Ze^~ge&Be,e[13]=et^~ye&Ne,e[22]=xe^~qe&nt,e[23]=Re^~Ke&it,e[32]=de^~Se&Me,e[33]=pe^~Te&Fe,e[42]=Ge^~tt&Ae,e[43]=He^~rt&me,e[4]=Ue^~ze&st,e[5]=Le^~Ye&ot,e[14]=ge^~Be&Qe,e[15]=ye^~Ne&ke,e[24]=qe^~nt&be,e[25]=Ke^~it&we,e[34]=Se^~Me&We,e[35]=Te^~Fe&$e,e[44]=tt^~Ae&Oe,e[45]=rt^~me&_e,e[6]=ze^~st&fe,e[7]=Ye^~ot&he,e[16]=Be^~Qe&Ve,e[17]=Ne^~ke&je,e[26]=nt^~be&ve,e[27]=it^~we&Ie,e[36]=Me^~We&Je,e[37]=Fe^~$e&Xe,e[46]=Ae^~Oe&Pe,e[47]=me^~_e&De,e[8]=st^~fe&Ce,e[9]=ot^~he&Ee,e[18]=Qe^~Ve&Ze,e[19]=ke^~je&et,e[28]=be^~ve&xe,e[29]=we^~Ie&Re,e[38]=We^~Je&de,e[39]=$e^~Xe&pe,e[48]=Oe^~Pe&Ge,e[49]=_e^~De&He,e[0]^=r[2*t],e[1]^=r[2*t+1]}}},4817:(e,t,r)=>{const n=r(9078);function i(){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}i.prototype.initialize=function(e,t){for(let e=0;e<50;++e)this.state[e]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},i.prototype.absorb=function(e){for(let t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<this.count%4*8,this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0)},i.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<this.count%4*8,0!=(128&e)&&this.count===this.blockSize-1&&n.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<(this.blockSize-1)%4*8,n.p1600(this.state),this.count=0,this.squeezing=!0},i.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const t=Buffer.alloc(e);for(let r=0;r<e;++r)t[r]=this.state[~~(this.count/4)]>>>this.count%4*8&255,this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0);return t},i.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},e.exports=i},6889:e=>{function t(e,t){if(!e)throw new Error(t||"AssertionError")}t.notEqual=function(e,r,n){t(e!=r,n)},t.notOk=function(e,r){t(!e,r)},t.equal=function(e,r,n){t(e==r,n)},t.ok=t,e.exports=t},6946:(e,t,r)=>{"use strict";e.exports=r(4394)},4394:(e,t,r)=>{"use strict";var n=t;function i(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}n.build="minimal",n.Writer=r(3449),n.BufferWriter=r(818),n.Reader=r(6237),n.BufferReader=r(3158),n.util=r(3610),n.rpc=r(5047),n.roots=r(4529),n.configure=i,i()},6237:(e,t,r)=>{"use strict";e.exports=u;var n,i=r(3610),s=i.LongBits,o=i.utf8;function a(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function u(e){this.buf=e,this.pos=0,this.len=e.length}var c,l="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new u(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new u(e);throw Error("illegal buffer")},f=function(){return i.Buffer?function(e){return(u.create=function(e){return i.Buffer.isBuffer(e)?new n(e):l(e)})(e)}:l};function h(){var e=new s(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw a(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw a(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function d(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw a(this,8);return new s(d(this.buf,this.pos+=4),d(this.buf,this.pos+=4))}u.create=f(),u.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,u.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return c;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return c}),u.prototype.int32=function(){return 0|this.uint32()},u.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},u.prototype.bool=function(){return 0!==this.uint32()},u.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return d(this.buf,this.pos+=4)},u.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return 0|d(this.buf,this.pos+=4)},u.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var e=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},u.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var e=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},u.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw a(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,r):t===r?new this.buf.constructor(0):this._slice.call(this.buf,t,r)},u.prototype.string=function(){var e=this.bytes();return o.read(e,0,e.length)},u.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw a(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw a(this)}while(128&this.buf[this.pos++]);return this},u.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},u._configure=function(e){n=e,u.create=f(),n._configure();var t=i.Long?"toLong":"toNumber";i.merge(u.prototype,{int64:function(){return h.call(this)[t](!1)},uint64:function(){return h.call(this)[t](!0)},sint64:function(){return h.call(this).zzDecode()[t](!1)},fixed64:function(){return p.call(this)[t](!0)},sfixed64:function(){return p.call(this)[t](!1)}})}},3158:(e,t,r)=>{"use strict";e.exports=s;var n=r(6237);(s.prototype=Object.create(n.prototype)).constructor=s;var i=r(3610);function s(e){n.call(this,e)}s._configure=function(){i.Buffer&&(s.prototype._slice=i.Buffer.prototype.slice)},s.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},s._configure()},4529:e=>{"use strict";e.exports={}},5047:(e,t,r)=>{"use strict";t.Service=r(7595)},7595:(e,t,r)=>{"use strict";e.exports=i;var n=r(3610);function i(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}(i.prototype=Object.create(n.EventEmitter.prototype)).constructor=i,i.prototype.rpcCall=function e(t,r,i,s,o){if(!s)throw TypeError("request must be specified");var a=this;if(!o)return n.asPromise(e,a,t,r,i,s);if(a.rpcImpl)try{return a.rpcImpl(t,r[a.requestDelimited?"encodeDelimited":"encode"](s).finish(),(function(e,r){if(e)return a.emit("error",e,t),o(e);if(null!==r){if(!(r instanceof i))try{r=i[a.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return a.emit("error",e,t),o(e)}return a.emit("data",r,t),o(null,r)}a.end(!0)}))}catch(e){return a.emit("error",e,t),void setTimeout((function(){o(e)}),0)}else setTimeout((function(){o(Error("already ended"))}),0)},i.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},2239:(e,t,r)=>{"use strict";e.exports=i;var n=r(3610);function i(e,t){this.lo=e>>>0,this.hi=t>>>0}var s=i.zero=new i(0,0);s.toNumber=function(){return 0},s.zzEncode=s.zzDecode=function(){return this},s.length=function(){return 1};var o=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(e){if(0===e)return s;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new i(r,n)},i.from=function(e){if("number"==typeof e)return i.fromNumber(e);if(n.isString(e)){if(!n.Long)return i.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new i(e.low>>>0,e.high>>>0):s},i.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},i.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;i.fromHash=function(e){return e===o?s:new i((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},i.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},i.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},3610:function(e,t,r){"use strict";var n=t;function i(e,t,r){for(var n=Object.keys(t),i=0;i<n.length;++i)void 0!==e[n[i]]&&r||(e[n[i]]=t[n[i]]);return e}function s(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&i(this,r)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}n.asPromise=r(8045),n.base64=r(8839),n.EventEmitter=r(4358),n.float=r(9410),n.inquire=r(4153),n.utf8=r(1447),n.pool=r(9390),n.LongBits=r(2239),n.isNode=Boolean(void 0!==r.g&&r.g&&r.g.process&&r.g.process.versions&&r.g.process.versions.node),n.global=n.isNode&&r.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.isset=n.isSet=function(e,t){var r=e[t];return!(null==r||!e.hasOwnProperty(t))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.merge=i,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=s,n.ProtocolError=s("ProtocolError"),n.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},n.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}},3449:(e,t,r)=>{"use strict";e.exports=f;var n,i=r(3610),s=i.LongBits,o=i.base64,a=i.utf8;function u(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function c(){}function l(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function f(){this.len=0,this.head=new u(c,0,0),this.tail=this.head,this.states=null}var h=function(){return i.Buffer?function(){return(f.create=function(){return new n})()}:function(){return new f}};function d(e,t,r){t[r]=255&e}function p(e,t){this.len=e,this.next=void 0,this.val=t}function g(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function y(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}f.create=h(),f.alloc=function(e){return new i.Array(e)},i.Array!==Array&&(f.alloc=i.pool(f.alloc,i.Array.prototype.subarray)),f.prototype._push=function(e,t,r){return this.tail=this.tail.next=new u(e,t,r),this.len+=t,this},p.prototype=Object.create(u.prototype),p.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},f.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},f.prototype.int32=function(e){return e<0?this._push(g,10,s.fromNumber(e)):this.uint32(e)},f.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},f.prototype.uint64=function(e){var t=s.from(e);return this._push(g,t.length(),t)},f.prototype.int64=f.prototype.uint64,f.prototype.sint64=function(e){var t=s.from(e).zzEncode();return this._push(g,t.length(),t)},f.prototype.bool=function(e){return this._push(d,1,e?1:0)},f.prototype.fixed32=function(e){return this._push(y,4,e>>>0)},f.prototype.sfixed32=f.prototype.fixed32,f.prototype.fixed64=function(e){var t=s.from(e);return this._push(y,4,t.lo)._push(y,4,t.hi)},f.prototype.sfixed64=f.prototype.fixed64,f.prototype.float=function(e){return this._push(i.float.writeFloatLE,4,e)},f.prototype.double=function(e){return this._push(i.float.writeDoubleLE,8,e)};var A=i.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var n=0;n<e.length;++n)t[r+n]=e[n]};f.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(d,1,0);if(i.isString(e)){var r=f.alloc(t=o.length(e));o.decode(e,r,0),e=r}return this.uint32(t)._push(A,t,e)},f.prototype.string=function(e){var t=a.length(e);return t?this.uint32(t)._push(a.write,t,e):this._push(d,1,0)},f.prototype.fork=function(){return this.states=new l(this),this.head=this.tail=new u(c,0,0),this.len=0,this},f.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new u(c,0,0),this.len=0),this},f.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},f.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},f._configure=function(e){n=e,f.create=h(),n._configure()}},818:(e,t,r)=>{"use strict";e.exports=s;var n=r(3449);(s.prototype=Object.create(n.prototype)).constructor=s;var i=r(3610);function s(){n.call(this)}function o(e,t,r){e.length<40?i.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}s._configure=function(){s.alloc=i._Buffer_allocUnsafe,s.writeBytesBuffer=i.Buffer&&i.Buffer.prototype instanceof Uint8Array&&"set"===i.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var n=0;n<e.length;)t[r++]=e[n++]}},s.prototype.bytes=function(e){i.isString(e)&&(e=i._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(s.writeBytesBuffer,t,e),this},s.prototype.string=function(e){var t=i.Buffer.byteLength(e);return this.uint32(t),t&&this._push(o,t,e),this},s._configure()},8379:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>A,default:()=>v,encode:()=>m,toASCII:()=>w,toUnicode:()=>b,ucs2decode:()=>d,ucs2encode:()=>p});const n=2147483647,i=36,s=/^xn--/,o=/[^\0-\x7F]/,a=/[\x2E\u3002\uFF0E\uFF61]/g,u={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=Math.floor,l=String.fromCharCode;function f(e){throw new RangeError(u[e])}function h(e,t){const r=e.split("@");let n="";r.length>1&&(n=r[0]+"@",e=r[1]);const i=function(e,t){const r=[];let n=e.length;for(;n--;)r[n]=t(e[n]);return r}((e=e.replace(a,".")).split("."),t).join(".");return n+i}function d(e){const t=[];let r=0;const n=e.length;for(;r<n;){const i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){const n=e.charCodeAt(r++);56320==(64512&n)?t.push(((1023&i)<<10)+(1023&n)+65536):(t.push(i),r--)}else t.push(i)}return t}const p=e=>String.fromCodePoint(...e),g=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},y=function(e,t,r){let n=0;for(e=r?c(e/700):e>>1,e+=c(e/t);e>455;n+=i)e=c(e/35);return c(n+36*e/(e+38))},A=function(e){const t=[],r=e.length;let s=0,o=128,a=72,u=e.lastIndexOf("-");u<0&&(u=0);for(let r=0;r<u;++r)e.charCodeAt(r)>=128&&f("not-basic"),t.push(e.charCodeAt(r));for(let h=u>0?u+1:0;h<r;){const u=s;for(let t=1,o=i;;o+=i){h>=r&&f("invalid-input");const u=(l=e.charCodeAt(h++))>=48&&l<58?l-48+26:l>=65&&l<91?l-65:l>=97&&l<123?l-97:i;u>=i&&f("invalid-input"),u>c((n-s)/t)&&f("overflow"),s+=u*t;const d=o<=a?1:o>=a+26?26:o-a;if(u<d)break;const p=i-d;t>c(n/p)&&f("overflow"),t*=p}const d=t.length+1;a=y(s-u,d,0==u),c(s/d)>n-o&&f("overflow"),o+=c(s/d),s%=d,t.splice(s++,0,o)}var l;return String.fromCodePoint(...t)},m=function(e){const t=[],r=(e=d(e)).length;let s=128,o=0,a=72;for(const r of e)r<128&&t.push(l(r));const u=t.length;let h=u;for(u&&t.push("-");h<r;){let r=n;for(const t of e)t>=s&&t<r&&(r=t);const d=h+1;r-s>c((n-o)/d)&&f("overflow"),o+=(r-s)*d,s=r;for(const r of e)if(r<s&&++o>n&&f("overflow"),r===s){let e=o;for(let r=i;;r+=i){const n=r<=a?1:r>=a+26?26:r-a;if(e<n)break;const s=e-n,o=i-n;t.push(l(g(n+s%o,0))),e=c(s/o)}t.push(l(g(e,0))),a=y(o,d,h===u),o=0,++h}++o,++s}return t.join("")},b=function(e){return h(e,(function(e){return s.test(e)?A(e.slice(4).toLowerCase()):e}))},w=function(e){return h(e,(function(e){return o.test(e)?"xn--"+m(e):e}))},v={version:"2.3.1",ucs2:{decode:d,encode:p},decode:A,encode:m,toASCII:w,toUnicode:b}},6048:e=>{"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){var t,n;function i(t,n,i){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,i))||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,s,o,a;if("string"==typeof t&&(s="not ",t.substr(!o||o<0?0:+o,s.length)===s)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))a="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(n(t,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},5382:(e,t,r)=>{"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var i=r(5412),s=r(6708);r(6698)(c,i);for(var o=n(s.prototype),a=0;a<o.length;a++){var u=o[a];c.prototype[u]||(c.prototype[u]=s.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||process.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},3600:(e,t,r)=>{"use strict";e.exports=i;var n=r(4610);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(6698)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},5412:(e,t,r)=>{"use strict";var n;e.exports=E,E.ReadableState=C;r(7007).EventEmitter;var i=function(e,t){return e.listeners(t).length},s=r(345),o=r(8287).Buffer,a=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var u,c=r(9838);u=c&&c.debuglog?c.debuglog("stream"):function(){};var l,f,h,d=r(2726),p=r(5896),g=r(5291).getHighWaterMark,y=r(6048).F,A=y.ERR_INVALID_ARG_TYPE,m=y.ERR_STREAM_PUSH_AFTER_EOF,b=y.ERR_METHOD_NOT_IMPLEMENTED,w=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(6698)(E,s);var v=p.errorOrDestroy,I=["error","close","destroy","pause","resume"];function C(e,t,i){n=n||r(5382),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",i),this.buffer=new d,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=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(l||(l=r(3141).I),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function E(e){if(n=n||r(5382),!(this instanceof E))return new E(e);var t=this instanceof n;this._readableState=new C(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function S(e,t,r,n,i){u("readableAddChunk",t);var s,c=e._readableState;if(null===t)c.reading=!1,function(e,t){if(u("onEofChunk"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,_(e)))}(e,c);else if(i||(s=function(e,t){var r;n=t,o.isBuffer(n)||n instanceof a||"string"==typeof t||void 0===t||e.objectMode||(r=new A("chunk",["string","Buffer","Uint8Array"],t));var n;return r}(c,t)),s)v(e,s);else if(c.objectMode||t&&t.length>0)if("string"==typeof t||c.objectMode||Object.getPrototypeOf(t)===o.prototype||(t=function(e){return o.from(e)}(t)),n)c.endEmitted?v(e,new w):T(e,c,t,!0);else if(c.ended)v(e,new m);else{if(c.destroyed)return!1;c.reading=!1,c.decoder&&!r?(t=c.decoder.write(t),c.objectMode||0!==t.length?T(e,c,t,!1):P(e,c)):T(e,c,t,!1)}else n||(c.reading=!1,P(e,c));return!c.ended&&(c.length<c.highWaterMark||0===c.length)}function T(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&O(e)),P(e,t)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=p.destroy,E.prototype._undestroy=p.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=o.from(e,t),t=""),r=!0),S(this,e,t,!1,r)},E.prototype.unshift=function(e){return S(this,e,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(e){l||(l=r(3141).I);var t=new l(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var B=1073741824;function N(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=B?e=B:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(_,e))}function _(e){var t=e._readableState;u("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function P(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(D,e,t))}function D(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(u("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function x(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function R(e){u("readable nexttick read 0"),e.read(0)}function U(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function M(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function F(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(Q,t,e))}function Q(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function k(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}E.prototype.read=function(e){u("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):O(this),null;if(0===(e=N(e,t))&&t.ended)return 0===t.length&&F(this),null;var n,i=t.needReadable;return u("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&u("length less than watermark",i=!0),t.ended||t.reading?u("reading or ended",i=!1):i&&(u("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=N(r,t))),null===(n=e>0?M(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&F(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){v(this,new b("_read()"))},E.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,u("pipe count=%d opts=%j",n.pipesCount,t);var s=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?a:g;function o(t,i){u("onunpipe"),t===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,u("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",g),r.removeListener("data",f),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function a(){u("onend"),e.end()}n.endEmitted?process.nextTick(s):r.once("end",s),e.on("unpipe",o);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,L(e))}}(r);e.on("drain",c);var l=!1;function f(t){u("ondata");var i=e.write(t);u("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==k(n.pipes,e))&&!l&&(u("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){u("onerror",t),g(),e.removeListener("error",h),0===i(e,"error")&&v(e,t)}function d(){e.removeListener("finish",p),g()}function p(){u("onfinish"),e.removeListener("close",d),g()}function g(){u("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",d),e.once("finish",p),e.emit("pipe",r),n.flowing||(u("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<i;s++)n[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=k(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},E.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,u("on readable",n.length,n.reading),n.length?O(this):n.reading||process.nextTick(R,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(x,this),r},E.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(x,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(U,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(u("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<I.length;s++)e.on(I[s],this.emit.bind(this,I[s]));return this._read=function(t){u("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(2955)),f(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=M,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(e,t){return void 0===h&&(h=r(5157)),h(E,e,t)})},4610:(e,t,r)=>{"use strict";e.exports=l;var n=r(6048).F,i=n.ERR_METHOD_NOT_IMPLEMENTED,s=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(5382);function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new s);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);u.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,r){h(e,t,r)}))}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new o;return e.push(null)}r(6698)(l,u),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new i("_transform()"))},l.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},6708:(e,t,r)=>{"use strict";function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry;e.entry=null;for(;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var i;e.exports=E,E.WritableState=C;var s={deprecate:r(4643)},o=r(345),a=r(8287).Buffer,u=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var c,l=r(5896),f=r(5291).getHighWaterMark,h=r(6048).F,d=h.ERR_INVALID_ARG_TYPE,p=h.ERR_METHOD_NOT_IMPLEMENTED,g=h.ERR_MULTIPLE_CALLBACK,y=h.ERR_STREAM_CANNOT_PIPE,A=h.ERR_STREAM_DESTROYED,m=h.ERR_STREAM_NULL_VALUES,b=h.ERR_STREAM_WRITE_AFTER_END,w=h.ERR_UNKNOWN_ENCODING,v=l.errorOrDestroy;function I(){}function C(e,t,s){i=i||r(5382),e=e||{},"boolean"!=typeof s&&(s=t instanceof i),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=f(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(process.nextTick(i,n),process.nextTick(_,e,t),e._writableState.errorEmitted=!0,v(e,n)):(i(n),e._writableState.errorEmitted=!0,v(e,n),_(e,t))}(e,r,n,t,i);else{var s=N(r)||e.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||B(e,r),n?process.nextTick(T,e,r,s,i):T(e,r,s,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function E(e){var t=this instanceof(i=i||r(5382));if(!t&&!c.call(E,this))return new E(e);this._writableState=new C(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function S(e,t,r,n,i,s,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new A("write")):r?e._writev(i,t.onwrite):e._write(i,s,t.onwrite),t.sync=!1}function T(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),_(e,t)}function B(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,s=new Array(i),o=t.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)s[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;s.allBuffers=u,S(e,t,!0,t.length,s,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback;if(S(e,t,!1,t.objectMode?1:c.length,c,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function N(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final((function(r){t.pendingcb--,r&&v(e,r),t.prefinished=!0,e.emit("prefinish"),_(e,t)}))}function _(e,t){var r=N(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(O,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(6698)(E,o),C.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(C.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===E&&(e&&e._writableState instanceof C)}})):c=function(e){return e instanceof this},E.prototype.pipe=function(){v(this,new y)},E.prototype.write=function(e,t,r){var n,i=this._writableState,s=!1,o=!i.objectMode&&(n=e,a.isBuffer(n)||n instanceof u);return o&&!a.isBuffer(e)&&(e=function(e){return a.from(e)}(e)),"function"==typeof t&&(r=t,t=null),o?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=I),i.ending?function(e,t){var r=new b;v(e,r),process.nextTick(t,r)}(this,r):(o||function(e,t,r,n){var i;return null===r?i=new m:"string"==typeof r||t.objectMode||(i=new d("chunk",["string","Buffer"],r)),!i||(v(e,i),process.nextTick(n,i),!1)}(this,i,e,r))&&(i.pendingcb++,s=function(e,t,r,n,i,s){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=a.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var u=t.objectMode?1:n.length;t.length+=u;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:s,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else S(e,t,!1,u,n,i,s);return c}(this,i,o,e,t,r)),s},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||B(this,e))},E.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new p("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,_(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=l.destroy,E.prototype._undestroy=l.undestroy,E.prototype._destroy=function(e,t){t(e)}},2955:(e,t,r)=>{"use strict";var n;function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=r(6238),o=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),f=Symbol("handlePromise"),h=Symbol("stream");function d(e,t){return{value:e,done:t}}function p(e){var t=e[o];if(null!==t){var r=e[h].read();null!==r&&(e[l]=null,e[o]=null,e[a]=null,t(d(r,!1)))}}function g(e){process.nextTick(p,e)}var y=Object.getPrototypeOf((function(){})),A=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise((function(t,r){process.nextTick((function(){e[u]?r(e[u]):t(d(void 0,!0))}))}));var r,n=this[l];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[c]?r(d(void 0,!0)):t[f](r,n)}),n)}}(n,this));else{var i=this[h].read();if(null!==i)return Promise.resolve(d(i,!1));r=new Promise(this[f])}return this[l]=r,r}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[h].destroy(null,(function(e){e?r(e):t(d(void 0,!0))}))}))})),n),y);e.exports=function(e){var t,r=Object.create(A,(i(t={},h,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,f,{value:function(e,t){var n=r[h].read();n?(r[l]=null,r[o]=null,r[a]=null,e(d(n,!1))):(r[o]=e,r[a]=t)},writable:!0}),t));return r[l]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[a];return null!==t&&(r[l]=null,r[o]=null,r[a]=null,t(e)),void(r[u]=e)}var n=r[o];null!==n&&(r[l]=null,r[o]=null,r[a]=null,n(d(void 0,!0))),r[c]=!0})),e.on("readable",g.bind(null,r)),r}},2726:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){s(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function s(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var u=r(8287).Buffer,c=r(5340).inspect,l=c&&c.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r,n;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t,r,n,i=u.allocUnsafe(e>>>0),s=this.head,o=0;s;)t=s.data,r=i,n=o,u.prototype.copy.call(t,r,n),o+=s.data.length,s=s.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,s=e>i.length?i.length:e;if(s===i.length?n+=i:n+=i.slice(0,e),0==(e-=s)){s===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(s));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,s=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,s),0==(e-=s)){s===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(s));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return c(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}()},5896:e=>{"use strict";function t(e,t){n(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var s=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,e)):process.nextTick(n,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!i&&e?s._writableState?s._writableState.errorEmitted?process.nextTick(r,s):(s._writableState.errorEmitted=!0,process.nextTick(t,s,e)):process.nextTick(t,s,e):i?(process.nextTick(r,s),i(e)):process.nextTick(r,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},6238:(e,t,r)=>{"use strict";var n=r(6048).F.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,s){if("function"==typeof r)return e(t,null,r);r||(r={}),s=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(s||i);var o=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||l()},c=t._writableState&&t._writableState.finished,l=function(){a=!1,c=!0,o||s.call(t)},f=t._readableState&&t._readableState.endEmitted,h=function(){o=!1,f=!0,a||s.call(t)},d=function(e){s.call(t,e)},p=function(){var e;return o&&!f?(t._readableState&&t._readableState.ended||(e=new n),s.call(t,e)):a&&!c?(t._writableState&&t._writableState.ended||(e=new n),s.call(t,e)):void 0},g=function(){t.req.on("finish",l)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?a&&!t._writableState&&(t.on("end",u),t.on("close",u)):(t.on("complete",l),t.on("abort",p),t.req?g():t.on("request",g)),t.on("end",h),t.on("finish",l),!1!==r.error&&t.on("error",d),t.on("close",p),function(){t.removeListener("complete",l),t.removeListener("abort",p),t.removeListener("request",g),t.req&&t.req.removeListener("finish",l),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",l),t.removeListener("end",h),t.removeListener("error",d),t.removeListener("close",p)}}},5157:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},7758:(e,t,r)=>{"use strict";var n;var i=r(6048).F,s=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function u(e){e()}function c(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var l,f=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new s("streams");var h=t.map((function(e,i){var s=i<t.length-1;return function(e,t,i,s){s=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(s);var a=!1;e.on("close",(function(){a=!0})),void 0===n&&(n=r(6238)),n(e,{readable:t,writable:i},(function(e){if(e)return s(e);a=!0,s()}));var u=!1;return function(t){if(!a&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void s(t||new o("pipe"))}}(e,s,i>0,(function(e){l||(l=e),e&&h.forEach(u),s||(h.forEach(u),f(l))}))}));return t.reduce(c)}},5291:(e,t,r)=>{"use strict";var n=r(6048).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var s=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new n(i?r:"highWaterMark",s);return Math.floor(s)}return e.objectMode?16:16384}}},345:(e,t,r)=>{e.exports=r(7007).EventEmitter},8399:(e,t,r)=>{(t=e.exports=r(5412)).Stream=t,t.Readable=t,t.Writable=r(6708),t.Duplex=r(5382),t.Transform=r(4610),t.PassThrough=r(3600),t.finished=r(6238),t.pipeline=r(7758)},2861:(e,t,r)=>{var n=r(8287),i=n.Buffer;function s(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(s(n,t),t.Buffer=o),o.prototype=Object.create(i.prototype),s(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},3141:(e,t,r)=>{"use strict";var n=r(2861).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.I=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=o(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=o(t[n]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},4643:(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},6425:(e,t,r)=>{"use strict";function n(e,t){return function(){return e.apply(t,arguments)}}const{toString:i}=Object.prototype,{getPrototypeOf:s}=Object,o=(a=Object.create(null),e=>{const t=i.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});var a;const u=e=>(e=e.toLowerCase(),t=>o(t)===e),c=e=>t=>typeof t===e,{isArray:l}=Array,f=c("undefined");const h=u("ArrayBuffer");const d=c("string"),p=c("function"),g=c("number"),y=e=>null!==e&&"object"==typeof e,A=e=>{if("object"!==o(e))return!1;const t=s(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},m=u("Date"),b=u("File"),w=u("Blob"),v=u("FileList"),I=u("URLSearchParams");function C(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),l(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;let o;for(n=0;n<s;n++)o=i[n],t.call(null,e[o],o,e)}}function E(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,i=r.length;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}const S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:r.g,T=e=>!f(e)&&e!==S;const B=(N="undefined"!=typeof Uint8Array&&s(Uint8Array),e=>N&&e instanceof N);var N;const O=u("HTMLFormElement"),_=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),P=u("RegExp"),D=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};C(r,((r,i)=>{let s;!1!==(s=t(r,i,e))&&(n[i]=s||r)})),Object.defineProperties(e,n)},x="abcdefghijklmnopqrstuvwxyz",R="0123456789",U={DIGIT:R,ALPHA:x,ALPHA_DIGIT:x+x.toUpperCase()+R};const L=u("AsyncFunction");var M={isArray:l,isArrayBuffer:h,isBuffer:function(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&p(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||p(e.append)&&("formdata"===(t=o(e))||"object"===t&&p(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&h(e.buffer),t},isString:d,isNumber:g,isBoolean:e=>!0===e||!1===e,isObject:y,isPlainObject:A,isUndefined:f,isDate:m,isFile:b,isBlob:w,isRegExp:P,isFunction:p,isStream:e=>y(e)&&p(e.pipe),isURLSearchParams:I,isTypedArray:B,isFileList:v,forEach:C,merge:function e(){const{caseless:t}=T(this)&&this||{},r={},n=(n,i)=>{const s=t&&E(r,i)||i;A(r[s])&&A(n)?r[s]=e(r[s],n):A(n)?r[s]=e({},n):l(n)?r[s]=n.slice():r[s]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&C(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:i}={})=>(C(t,((t,i)=>{r&&p(t)?e[i]=n(t,r):e[i]=t}),{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,o,a;const u={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],n&&!n(a,e,t)||u[a]||(t[a]=e[a],u[a]=!0);e=!1!==r&&s(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:o,kindOfTest:u,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(l(e))return e;let t=e.length;if(!g(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:O,hasOwnProperty:_,hasOwnProp:_,reduceDescriptors:D,freezeMethods:e=>{D(e,((t,r)=>{if(p(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];p(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return l(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:E,global:S,isContextDefined:T,ALPHABET:U,generateString:(e=16,t=U.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&p(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(y(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const i=l(e)?[]:{};return C(e,((e,t)=>{const s=r(e,n+1);!f(s)&&(i[t]=s)})),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:L,isThenable:e=>e&&(y(e)||p(e))&&p(e.then)&&p(e.catch)};function F(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}M.inherits(F,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:M.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Q=F.prototype,k={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{k[e]={value:e}})),Object.defineProperties(F,k),Object.defineProperty(Q,"isAxiosError",{value:!0}),F.from=(e,t,r,n,i,s)=>{const o=Object.create(Q);return M.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),F.call(o,e.message,t,r,n,i),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};function V(e){return M.isPlainObject(e)||M.isArray(e)}function j(e){return M.endsWith(e,"[]")?e.slice(0,-2):e}function G(e,t,r){return e?e.concat(t).map((function(e,t){return e=j(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const H=M.toFlatObject(M,{},null,(function(e){return/^is[A-Z]/.test(e)}));function q(e,t,r){if(!M.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=M.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!M.isUndefined(t[e])}))).metaTokens,i=r.visitor||c,s=r.dots,o=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&M.isSpecCompliantForm(t);if(!M.isFunction(i))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(M.isDate(e))return e.toISOString();if(!a&&M.isBlob(e))throw new F("Blob is not supported. Use a Buffer instead.");return M.isArrayBuffer(e)||M.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,i){let a=e;if(e&&!i&&"object"==typeof e)if(M.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(M.isArray(e)&&function(e){return M.isArray(e)&&!e.some(V)}(e)||(M.isFileList(e)||M.endsWith(r,"[]"))&&(a=M.toArray(e)))return r=j(r),a.forEach((function(e,n){!M.isUndefined(e)&&null!==e&&t.append(!0===o?G([r],n,s):null===o?r:r+"[]",u(e))})),!1;return!!V(e)||(t.append(G(i,r,s),u(e)),!1)}const l=[],f=Object.assign(H,{defaultVisitor:c,convertValue:u,isVisitable:V});if(!M.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!M.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),M.forEach(r,(function(r,s){!0===(!(M.isUndefined(r)||null===r)&&i.call(t,r,M.isString(s)?s.trim():s,n,f))&&e(r,n?n.concat(s):[s])})),l.pop()}}(e),t}function K(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function z(e,t){this._pairs=[],e&&q(e,this,t)}const Y=z.prototype;function W(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function $(e,t,r){if(!t)return e;const n=r&&r.encode||W,i=r&&r.serialize;let s;if(s=i?i(t,r):M.isURLSearchParams(t)?t.toString():new z(t,r).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}Y.append=function(e,t){this._pairs.push([e,t])},Y.toString=function(e){const t=e?function(t){return e.call(this,t,K)}:K;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var J=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){M.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},X={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:z,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ee="undefined"!=typeof window&&"undefined"!=typeof document,te=(re="undefined"!=typeof navigator&&navigator.product,ee&&["ReactNative","NativeScript","NS"].indexOf(re)<0);var re;const ne="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var ie={...Object.freeze({__proto__:null,hasBrowserEnv:ee,hasStandardBrowserWebWorkerEnv:ne,hasStandardBrowserEnv:te}),...Z};function se(e){function t(e,r,n,i){let s=e[i++];if("__proto__"===s)return!0;const o=Number.isFinite(+s),a=i>=e.length;if(s=!s&&M.isArray(n)?n.length:s,a)return M.hasOwnProp(n,s)?n[s]=[n[s],r]:n[s]=r,!o;n[s]&&M.isObject(n[s])||(n[s]=[]);return t(e,r,n[s],i)&&M.isArray(n[s])&&(n[s]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let s;for(n=0;n<i;n++)s=r[n],t[s]=e[s];return t}(n[s])),!o}if(M.isFormData(e)&&M.isFunction(e.entries)){const r={};return M.forEachEntry(e,((e,n)=>{t(function(e){return M.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const oe={transitional:X,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=M.isObject(e);i&&M.isHTMLForm(e)&&(e=new FormData(e));if(M.isFormData(e))return n&&n?JSON.stringify(se(e)):e;if(M.isArrayBuffer(e)||M.isBuffer(e)||M.isStream(e)||M.isFile(e)||M.isBlob(e))return e;if(M.isArrayBufferView(e))return e.buffer;if(M.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return q(e,new ie.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return ie.isNode&&M.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=M.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return q(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(M.isString(e))try{return(t||JSON.parse)(e),M.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||oe.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&M.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw F.from(e,F.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ie.classes.FormData,Blob:ie.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};M.forEach(["delete","get","head","post","put","patch"],(e=>{oe.headers[e]={}}));var ae=oe;const ue=M.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const ce=Symbol("internals");function le(e){return e&&String(e).trim().toLowerCase()}function fe(e){return!1===e||null==e?e:M.isArray(e)?e.map(fe):String(e)}function he(e,t,r,n,i){return M.isFunction(n)?n.call(this,t,r):(i&&(t=r),M.isString(t)?M.isString(n)?-1!==t.indexOf(n):M.isRegExp(n)?n.test(t):void 0:void 0)}class de{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=le(t);if(!i)throw new Error("header name must be a non-empty string");const s=M.findKey(n,i);(!s||void 0===n[s]||!0===r||void 0===r&&!1!==n[s])&&(n[s||t]=fe(e))}const s=(e,t)=>M.forEach(e,((e,r)=>i(e,r,t)));return M.isPlainObject(e)||e instanceof this.constructor?s(e,t):M.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?s((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&ue[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&i(t,e,r),this}get(e,t){if(e=le(e)){const r=M.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(M.isFunction(t))return t.call(this,e,r);if(M.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=le(e)){const r=M.findKey(this,e);return!(!r||void 0===this[r]||t&&!he(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=le(e)){const i=M.findKey(r,e);!i||t&&!he(0,r[i],i,t)||(delete r[i],n=!0)}}return M.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!he(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return M.forEach(this,((n,i)=>{const s=M.findKey(r,i);if(s)return t[s]=fe(n),void delete t[i];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(i):String(i).trim();o!==i&&delete t[i],t[o]=fe(n),r[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return M.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&M.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[ce]=this[ce]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=le(e);t[n]||(!function(e,t){const r=M.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})}))}(r,e),t[n]=!0)}return M.isArray(e)?e.forEach(n):n(e),this}}de.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),M.reduceDescriptors(de.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),M.freezeMethods(de);var pe=de;function ge(e,t){const r=this||ae,n=t||r,i=pe.from(n.headers);let s=n.data;return M.forEach(e,(function(e){s=e.call(r,s,i.normalize(),t?t.status:void 0)})),i.normalize(),s}function ye(e){return!(!e||!e.__CANCEL__)}function Ae(e,t,r){F.call(this,null==e?"canceled":e,F.ERR_CANCELED,t,r),this.name="CanceledError"}M.inherits(Ae,F,{__CANCEL__:!0});var me=ie.hasStandardBrowserEnv?{write(e,t,r,n,i,s){const o=[e+"="+encodeURIComponent(t)];M.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),M.isString(n)&&o.push("path="+n),M.isString(i)&&o.push("domain="+i),!0===s&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function be(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var we=ie.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=M.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function ve(e,t){let r=0;const n=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,s=0,o=0;return t=void 0!==t?t:1e3,function(a){const u=Date.now(),c=n[o];i||(i=u),r[s]=a,n[s]=u;let l=o,f=0;for(;l!==s;)f+=r[l++],l%=e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),u-i<t)return;const h=c&&u-c;return h?Math.round(1e3*f/h):void 0}}(50,250);return i=>{const s=i.loaded,o=i.lengthComputable?i.total:void 0,a=s-r,u=n(a);r=s;const c={loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:u||void 0,estimated:u&&o&&s<=o?(o-s)/u:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}const Ie={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const i=pe.from(e.headers).normalize();let s,o,{responseType:a,withXSRFToken:u}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}if(M.isFormData(n))if(ie.hasStandardBrowserEnv||ie.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if(!1!==(o=i.getContentType())){const[e,...t]=o?o.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+r))}const f=be(e.baseURL,e.url);function h(){if(!l)return;const n=pe.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new F("Request failed with status code "+r.status,[F.ERR_BAD_REQUEST,F.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),c()}),(function(e){r(e),c()}),{data:a&&"text"!==a&&"json"!==a?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:n,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),$(f,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(h)},l.onabort=function(){l&&(r(new F("Request aborted",F.ECONNABORTED,e,l)),l=null)},l.onerror=function(){r(new F("Network Error",F.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||X;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new F(t,n.clarifyTimeoutError?F.ETIMEDOUT:F.ECONNABORTED,e,l)),l=null},ie.hasStandardBrowserEnv&&(u&&M.isFunction(u)&&(u=u(e)),u||!1!==u&&we(f))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&me.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===n&&i.setContentType(null),"setRequestHeader"in l&&M.forEach(i.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),M.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&"json"!==a&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",ve(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",ve(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=t=>{l&&(r(!t||t.type?new Ae(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const d=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(f);d&&-1===ie.protocols.indexOf(d)?r(new F("Unsupported protocol "+d+":",F.ERR_BAD_REQUEST,e)):l.send(n||null)}))}};M.forEach(Ie,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ce=e=>`- ${e}`,Ee=e=>M.isFunction(e)||null===e||!1===e;var Se=e=>{e=M.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let s=0;s<t;s++){let t;if(r=e[s],n=r,!Ee(r)&&(n=Ie[(t=String(r)).toLowerCase()],void 0===n))throw new F(`Unknown adapter '${t}'`);if(n)break;i[t||"#"+s]=n}if(!n){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new F("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Ce).join("\n"):" "+Ce(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function Te(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ae(null,e)}function Be(e){Te(e),e.headers=pe.from(e.headers),e.data=ge.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Se(e.adapter||ae.adapter)(e).then((function(t){return Te(e),t.data=ge.call(e,e.transformResponse,t),t.headers=pe.from(t.headers),t}),(function(t){return ye(t)||(Te(e),t&&t.response&&(t.response.data=ge.call(e,e.transformResponse,t.response),t.response.headers=pe.from(t.response.headers))),Promise.reject(t)}))}const Ne=e=>e instanceof pe?e.toJSON():e;function Oe(e,t){t=t||{};const r={};function n(e,t,r){return M.isPlainObject(e)&&M.isPlainObject(t)?M.merge.call({caseless:r},e,t):M.isPlainObject(t)?M.merge({},t):M.isArray(t)?t.slice():t}function i(e,t,r){return M.isUndefined(t)?M.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function s(e,t){if(!M.isUndefined(t))return n(void 0,t)}function o(e,t){return M.isUndefined(t)?M.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,i,s){return s in t?n(r,i):s in e?n(void 0,r):void 0}const u={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(e,t)=>i(Ne(e),Ne(t),!0)};return M.forEach(Object.keys(Object.assign({},e,t)),(function(n){const s=u[n]||i,o=s(e[n],t[n],n);M.isUndefined(o)&&s!==a||(r[n]=o)})),r}const _e="1.6.5",Pe={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Pe[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const De={};Pe.transitional=function(e,t,r){function n(e,t){return"[Axios v1.6.5] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,s)=>{if(!1===e)throw new F(n(i," has been removed"+(t?" in "+t:"")),F.ERR_DEPRECATED);return t&&!De[i]&&(De[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,s)}};var xe={assertOptions:function(e,t,r){if("object"!=typeof e)throw new F("options must be an object",F.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const s=n[i],o=t[s];if(o){const t=e[s],r=void 0===t||o(t,s,e);if(!0!==r)throw new F("option "+s+" must be "+r,F.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new F("Unknown option "+s,F.ERR_BAD_OPTION)}},validators:Pe};const Re=xe.validators;class Ue{constructor(e){this.defaults=e,this.interceptors={request:new J,response:new J}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Oe(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&xe.assertOptions(r,{silentJSONParsing:Re.transitional(Re.boolean),forcedJSONParsing:Re.transitional(Re.boolean),clarifyTimeoutError:Re.transitional(Re.boolean)},!1),null!=n&&(M.isFunction(n)?t.paramsSerializer={serialize:n}:xe.assertOptions(n,{encode:Re.function,serialize:Re.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=i&&M.merge(i.common,i[t.method]);i&&M.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=pe.concat(s,i);const o=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)}));let l,f=0;if(!a){const e=[Be.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,u),l=e.length,c=Promise.resolve(t);f<l;)c=c.then(e[f++],e[f++]);return c}l=o.length;let h=t;for(f=0;f<l;){const e=o[f++],t=o[f++];try{h=e(h)}catch(e){t.call(this,e);break}}try{c=Be.call(this,h)}catch(e){return Promise.reject(e)}for(f=0,l=u.length;f<l;)c=c.then(u[f++],u[f++]);return c}getUri(e){return $(be((e=Oe(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}M.forEach(["delete","get","head","options"],(function(e){Ue.prototype[e]=function(t,r){return this.request(Oe(r||{},{method:e,url:t,data:(r||{}).data}))}})),M.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,i){return this.request(Oe(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Ue.prototype[e]=t(),Ue.prototype[e+"Form"]=t(!0)}));var Le=Ue;class Me{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,i){r.reason||(r.reason=new Ae(e,n,i),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Me((function(t){e=t})),cancel:e}}}var Fe=Me;const Qe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Qe).forEach((([e,t])=>{Qe[t]=e}));var ke=Qe;const Ve=function e(t){const r=new Le(t),i=n(Le.prototype.request,r);return M.extend(i,Le.prototype,r,{allOwnKeys:!0}),M.extend(i,r,null,{allOwnKeys:!0}),i.create=function(r){return e(Oe(t,r))},i}(ae);Ve.Axios=Le,Ve.CanceledError=Ae,Ve.CancelToken=Fe,Ve.isCancel=ye,Ve.VERSION=_e,Ve.toFormData=q,Ve.AxiosError=F,Ve.Cancel=Ve.CanceledError,Ve.all=function(e){return Promise.all(e)},Ve.spread=function(e){return function(t){return e.apply(null,t)}},Ve.isAxiosError=function(e){return M.isObject(e)&&!0===e.isAxiosError},Ve.mergeConfig=Oe,Ve.AxiosHeaders=pe,Ve.formToJSON=e=>se(M.isHTMLForm(e)?new FormData(e):e),Ve.getAdapter=Se,Ve.HttpStatusCode=ke,Ve.default=Ve,e.exports=Ve}}]);