@metamask-previews/tron-wallet-snap 1.20.0-preview-3141b7e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.js ADDED
@@ -0,0 +1 @@
1
+ (()=>{var e={54:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),t in i)return i[t](e);if("any"===t){for(var r in i){if(i.hasOwnProperty(r))if((0,i[r])(e))return!0}return!1}throw new Error("Invalid locale '".concat(t,"'"))};var n=a(r(8354)),o=a(r(567)),s=a(r(3353));function a(e){return e&&e.__esModule?e:{default:e}}var i={PL:function(e){(0,n.default)(e);var t={1:1,2:3,3:7,4:9,5:1,6:3,7:7,8:9,9:1,10:3,11:0};if(null!=e&&11===e.length&&(0,s.default)(e,{allow_leading_zeroes:!0})){var r=e.split("").slice(0,-1).reduce((function(e,r,n){return e+Number(r)*t[n+1]}),0)%10,o=Number(e.charAt(e.length-1));if(0===r&&0===o||o===10-r)return!0}return!1},ES:function(e){(0,n.default)(e);var t={X:0,Y:1,Z:2},r=e.trim().toUpperCase();if(!/^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/.test(r))return!1;var o=r.slice(0,-1).replace(/[X,Y,Z]/g,(function(e){return t[e]}));return r.endsWith(["T","R","W","A","G","M","Y","F","P","D","X","B","N","J","Z","S","Q","V","H","L","C","K","E"][o%23])},FI:function(e){if((0,n.default)(e),11!==e.length)return!1;if(!e.match(/^\d{6}[\-A\+]\d{3}[0-9ABCDEFHJKLMNPRSTUVWXY]{1}$/))return!1;return"0123456789ABCDEFHJKLMNPRSTUVWXY"[(1e3*parseInt(e.slice(0,6),10)+parseInt(e.slice(7,10),10))%31]===e.slice(10,11)},IN:function(e){var t=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],r=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],n=e.trim();if(!/^[1-9]\d{3}\s?\d{4}\s?\d{4}$/.test(n))return!1;var o=0;return n.replace(/\s/g,"").split("").map(Number).reverse().forEach((function(e,n){o=t[o][r[n%8][e]]})),0===o},IR:function(e){if(!e.match(/^\d{10}$/))return!1;if(e="0000".concat(e).slice(e.length-6),0===parseInt(e.slice(3,9),10))return!1;for(var t=parseInt(e.slice(9,10),10),r=0,n=0;n<9;n++)r+=parseInt(e.slice(n,n+1),10)*(10-n);return(r%=11)<2&&t===r||r>=2&&t===11-r},IT:function(e){return 9===e.length&&("CA00000AA"!==e&&e.search(/C[A-Z]\d{5}[A-Z]{2}/i)>-1)},NO:function(e){var t=e.trim();if(isNaN(Number(t)))return!1;if(11!==t.length)return!1;if("00000000000"===t)return!1;var r=t.split("").map(Number),n=(11-(3*r[0]+7*r[1]+6*r[2]+1*r[3]+8*r[4]+9*r[5]+4*r[6]+5*r[7]+2*r[8])%11)%11,o=(11-(5*r[0]+4*r[1]+3*r[2]+2*r[3]+7*r[4]+6*r[5]+5*r[6]+4*r[7]+3*r[8]+2*n)%11)%11;return n===r[9]&&o===r[10]},TH:function(e){if(!e.match(/^[1-8]\d{12}$/))return!1;for(var t=0,r=0;r<12;r++)t+=parseInt(e[r],10)*(13-r);return e[12]===((11-t%11)%10).toString()},LK:function(e){return!(10!==e.length||!/^[1-9]\d{8}[vx]$/i.test(e))||!(12!==e.length||!/^[1-9]\d{11}$/i.test(e))},"he-IL":function(e){var t=e.trim();if(!/^\d{9}$/.test(t))return!1;for(var r,n=t,o=0,s=0;s<n.length;s++)o+=(r=Number(n[s])*(s%2+1))>9?r-9:r;return o%10==0},"ar-LY":function(e){var t=e.trim();return!!/^(1|2)\d{11}$/.test(t)},"ar-TN":function(e){var t=e.trim();return!!/^\d{8}$/.test(t)},"zh-CN":function(e){var t,r=["11","12","13","14","15","21","22","23","31","32","33","34","35","36","37","41","42","43","44","45","46","50","51","52","53","54","61","62","63","64","65","71","81","82","91"],n=["7","9","10","5","8","4","2","1","6","3","7","9","10","5","8","4","2"],s=["1","0","X","9","8","7","6","5","4","3","2"],a=function(e){return(0,o.default)(r,e)},i=function(e){var t=parseInt(e.substring(0,4),10),r=parseInt(e.substring(4,6),10),n=parseInt(e.substring(6),10),o=new Date(t,r-1,n);return!(o>new Date)&&(o.getFullYear()===t&&o.getMonth()===r-1&&o.getDate()===n)},c=function(e){return function(e){for(var t=e.substring(0,17),r=0,o=0;o<17;o++)r+=parseInt(t.charAt(o),10)*parseInt(n[o],10);return s[r%11]}(e)===e.charAt(17).toUpperCase()};return!!/^\d{15}|(\d{17}(\d|x|X))$/.test(t=e)&&(15===t.length?function(e){var t=/^[1-9]\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}$/.test(e);if(!t)return!1;var r=e.substring(0,2);if(!(t=a(r)))return!1;var n="19".concat(e.substring(6,12));return!!(t=i(n))}(t):function(e){var t=/^[1-9]\d{5}[1-9]\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}(\d|x|X)$/.test(e);if(!t)return!1;var r=e.substring(0,2);if(!(t=a(r)))return!1;var n=e.substring(6,14);return!!(t=i(n))&&c(e)}(t))},"zh-HK":function(e){var t=/^[0-9]$/;if(e=(e=e.trim()).toUpperCase(),!/^[A-Z]{1,2}[0-9]{6}((\([0-9A]\))|(\[[0-9A]\])|([0-9A]))$/.test(e))return!1;8===(e=e.replace(/\[|\]|\(|\)/g,"")).length&&(e="3".concat(e));for(var r=0,n=0;n<=7;n++){r+=(t.test(e[n])?e[n]:(e[n].charCodeAt(0)-55)%11)*(9-n)}return(0===(r%=11)?"0":1===r?"A":String(11-r))===e[e.length-1]},"zh-TW":function(e){var t={A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:34,J:18,K:19,L:20,M:21,N:22,O:35,P:23,Q:24,R:25,S:26,T:27,U:28,V:29,W:32,X:30,Y:31,Z:33},r=e.trim().toUpperCase();return!!/^[A-Z][0-9]{9}$/.test(r)&&Array.from(r).reduce((function(e,r,n){if(0===n){var o=t[r];return o%10*9+Math.floor(o/10)}return 9===n?(10-e%10-Number(r))%10==0:e+Number(r)*(9-n)}),0)},PK:function(e){var t=e.trim();return/^[1-7][0-9]{4}-[0-9]{7}-[1-9]$/.test(t)}};e.exports=t.default,e.exports.default=t.default},62:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,n.default)(e),(0,o.default)(e)%parseInt(t,10)===0};var n=s(r(8354)),o=s(r(2177));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default},139:(e,t,r)=>{var n=r(7186),o=n,s="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==s&&s||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")();o.exportSymbol("TronWebProto.AssetIssueContract",null,s),o.exportSymbol("TronWebProto.AssetIssueContract.FrozenSupply",null,s),o.exportSymbol("TronWebProto.ParticipateAssetIssueContract",null,s),o.exportSymbol("TronWebProto.TransferAssetContract",null,s),o.exportSymbol("TronWebProto.UnfreezeAssetContract",null,s),o.exportSymbol("TronWebProto.UpdateAssetContract",null,s),TronWebProto.AssetIssueContract=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.AssetIssueContract.repeatedFields_,null)},o.inherits(TronWebProto.AssetIssueContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AssetIssueContract.displayName="TronWebProto.AssetIssueContract"),TronWebProto.AssetIssueContract.FrozenSupply=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AssetIssueContract.FrozenSupply,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AssetIssueContract.FrozenSupply.displayName="TronWebProto.AssetIssueContract.FrozenSupply"),TronWebProto.TransferAssetContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.TransferAssetContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.TransferAssetContract.displayName="TronWebProto.TransferAssetContract"),TronWebProto.UnfreezeAssetContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UnfreezeAssetContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UnfreezeAssetContract.displayName="TronWebProto.UnfreezeAssetContract"),TronWebProto.UpdateAssetContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UpdateAssetContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UpdateAssetContract.displayName="TronWebProto.UpdateAssetContract"),TronWebProto.ParticipateAssetIssueContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ParticipateAssetIssueContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ParticipateAssetIssueContract.displayName="TronWebProto.ParticipateAssetIssueContract"),TronWebProto.AssetIssueContract.repeatedFields_=[5],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AssetIssueContract.prototype.toObject=function(e){return TronWebProto.AssetIssueContract.toObject(e,this)},TronWebProto.AssetIssueContract.toObject=function(e,t){var r={id:n.Message.getFieldWithDefault(t,41,""),ownerAddress:t.getOwnerAddress_asB64(),name:t.getName_asB64(),abbr:t.getAbbr_asB64(),totalSupply:n.Message.getFieldWithDefault(t,4,0),frozenSupplyList:n.Message.toObjectList(t.getFrozenSupplyList(),TronWebProto.AssetIssueContract.FrozenSupply.toObject,e),trxNum:n.Message.getFieldWithDefault(t,6,0),precision:n.Message.getFieldWithDefault(t,7,0),num:n.Message.getFieldWithDefault(t,8,0),startTime:n.Message.getFieldWithDefault(t,9,0),endTime:n.Message.getFieldWithDefault(t,10,0),order:n.Message.getFieldWithDefault(t,11,0),voteScore:n.Message.getFieldWithDefault(t,16,0),description:t.getDescription_asB64(),url:t.getUrl_asB64(),freeAssetNetLimit:n.Message.getFieldWithDefault(t,22,0),publicFreeAssetNetLimit:n.Message.getFieldWithDefault(t,23,0),publicFreeAssetNetUsage:n.Message.getFieldWithDefault(t,24,0),publicLatestFreeNetTime:n.Message.getFieldWithDefault(t,25,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AssetIssueContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AssetIssueContract;return TronWebProto.AssetIssueContract.deserializeBinaryFromReader(r,t)},TronWebProto.AssetIssueContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 41:var r=t.readString();e.setId(r);break;case 1:r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setName(r);break;case 3:r=t.readBytes();e.setAbbr(r);break;case 4:r=t.readInt64();e.setTotalSupply(r);break;case 5:r=new TronWebProto.AssetIssueContract.FrozenSupply;t.readMessage(r,TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader),e.addFrozenSupply(r);break;case 6:r=t.readInt32();e.setTrxNum(r);break;case 7:r=t.readInt32();e.setPrecision(r);break;case 8:r=t.readInt32();e.setNum(r);break;case 9:r=t.readInt64();e.setStartTime(r);break;case 10:r=t.readInt64();e.setEndTime(r);break;case 11:r=t.readInt64();e.setOrder(r);break;case 16:r=t.readInt32();e.setVoteScore(r);break;case 20:r=t.readBytes();e.setDescription(r);break;case 21:r=t.readBytes();e.setUrl(r);break;case 22:r=t.readInt64();e.setFreeAssetNetLimit(r);break;case 23:r=t.readInt64();e.setPublicFreeAssetNetLimit(r);break;case 24:r=t.readInt64();e.setPublicFreeAssetNetUsage(r);break;case 25:r=t.readInt64();e.setPublicLatestFreeNetTime(r);break;default:t.skipField()}}return e},TronWebProto.AssetIssueContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AssetIssueContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AssetIssueContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getId()).length>0&&t.writeString(41,r),(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getName_asU8()).length>0&&t.writeBytes(2,r),(r=e.getAbbr_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getTotalSupply())&&t.writeInt64(4,r),(r=e.getFrozenSupplyList()).length>0&&t.writeRepeatedMessage(5,r,TronWebProto.AssetIssueContract.FrozenSupply.serializeBinaryToWriter),0!==(r=e.getTrxNum())&&t.writeInt32(6,r),0!==(r=e.getPrecision())&&t.writeInt32(7,r),0!==(r=e.getNum())&&t.writeInt32(8,r),0!==(r=e.getStartTime())&&t.writeInt64(9,r),0!==(r=e.getEndTime())&&t.writeInt64(10,r),0!==(r=e.getOrder())&&t.writeInt64(11,r),0!==(r=e.getVoteScore())&&t.writeInt32(16,r),(r=e.getDescription_asU8()).length>0&&t.writeBytes(20,r),(r=e.getUrl_asU8()).length>0&&t.writeBytes(21,r),0!==(r=e.getFreeAssetNetLimit())&&t.writeInt64(22,r),0!==(r=e.getPublicFreeAssetNetLimit())&&t.writeInt64(23,r),0!==(r=e.getPublicFreeAssetNetUsage())&&t.writeInt64(24,r),0!==(r=e.getPublicLatestFreeNetTime())&&t.writeInt64(25,r)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AssetIssueContract.FrozenSupply.prototype.toObject=function(e){return TronWebProto.AssetIssueContract.FrozenSupply.toObject(e,this)},TronWebProto.AssetIssueContract.FrozenSupply.toObject=function(e,t){var r={frozenAmount:n.Message.getFieldWithDefault(t,1,0),frozenDays:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AssetIssueContract.FrozenSupply;return TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader(r,t)},TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setFrozenAmount(r);break;case 2:r=t.readInt64();e.setFrozenDays(r);break;default:t.skipField()}}return e},TronWebProto.AssetIssueContract.FrozenSupply.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AssetIssueContract.FrozenSupply.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AssetIssueContract.FrozenSupply.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getFrozenAmount())&&t.writeInt64(1,r),0!==(r=e.getFrozenDays())&&t.writeInt64(2,r)},TronWebProto.AssetIssueContract.FrozenSupply.prototype.getFrozenAmount=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.AssetIssueContract.FrozenSupply.prototype.setFrozenAmount=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.AssetIssueContract.FrozenSupply.prototype.getFrozenDays=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.AssetIssueContract.FrozenSupply.prototype.setFrozenDays=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.AssetIssueContract.prototype.getId=function(){return n.Message.getFieldWithDefault(this,41,"")},TronWebProto.AssetIssueContract.prototype.setId=function(e){return n.Message.setProto3StringField(this,41,e)},TronWebProto.AssetIssueContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.AssetIssueContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.AssetIssueContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.AssetIssueContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.AssetIssueContract.prototype.getName=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.AssetIssueContract.prototype.getName_asB64=function(){return n.Message.bytesAsB64(this.getName())},TronWebProto.AssetIssueContract.prototype.getName_asU8=function(){return n.Message.bytesAsU8(this.getName())},TronWebProto.AssetIssueContract.prototype.setName=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.AssetIssueContract.prototype.getAbbr=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.AssetIssueContract.prototype.getAbbr_asB64=function(){return n.Message.bytesAsB64(this.getAbbr())},TronWebProto.AssetIssueContract.prototype.getAbbr_asU8=function(){return n.Message.bytesAsU8(this.getAbbr())},TronWebProto.AssetIssueContract.prototype.setAbbr=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.AssetIssueContract.prototype.getTotalSupply=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.AssetIssueContract.prototype.setTotalSupply=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.AssetIssueContract.prototype.getFrozenSupplyList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.AssetIssueContract.FrozenSupply,5)},TronWebProto.AssetIssueContract.prototype.setFrozenSupplyList=function(e){return n.Message.setRepeatedWrapperField(this,5,e)},TronWebProto.AssetIssueContract.prototype.addFrozenSupply=function(e,t){return n.Message.addToRepeatedWrapperField(this,5,e,TronWebProto.AssetIssueContract.FrozenSupply,t)},TronWebProto.AssetIssueContract.prototype.clearFrozenSupplyList=function(){return this.setFrozenSupplyList([])},TronWebProto.AssetIssueContract.prototype.getTrxNum=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.AssetIssueContract.prototype.setTrxNum=function(e){return n.Message.setProto3IntField(this,6,e)},TronWebProto.AssetIssueContract.prototype.getPrecision=function(){return n.Message.getFieldWithDefault(this,7,0)},TronWebProto.AssetIssueContract.prototype.setPrecision=function(e){return n.Message.setProto3IntField(this,7,e)},TronWebProto.AssetIssueContract.prototype.getNum=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.AssetIssueContract.prototype.setNum=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.AssetIssueContract.prototype.getStartTime=function(){return n.Message.getFieldWithDefault(this,9,0)},TronWebProto.AssetIssueContract.prototype.setStartTime=function(e){return n.Message.setProto3IntField(this,9,e)},TronWebProto.AssetIssueContract.prototype.getEndTime=function(){return n.Message.getFieldWithDefault(this,10,0)},TronWebProto.AssetIssueContract.prototype.setEndTime=function(e){return n.Message.setProto3IntField(this,10,e)},TronWebProto.AssetIssueContract.prototype.getOrder=function(){return n.Message.getFieldWithDefault(this,11,0)},TronWebProto.AssetIssueContract.prototype.setOrder=function(e){return n.Message.setProto3IntField(this,11,e)},TronWebProto.AssetIssueContract.prototype.getVoteScore=function(){return n.Message.getFieldWithDefault(this,16,0)},TronWebProto.AssetIssueContract.prototype.setVoteScore=function(e){return n.Message.setProto3IntField(this,16,e)},TronWebProto.AssetIssueContract.prototype.getDescription=function(){return n.Message.getFieldWithDefault(this,20,"")},TronWebProto.AssetIssueContract.prototype.getDescription_asB64=function(){return n.Message.bytesAsB64(this.getDescription())},TronWebProto.AssetIssueContract.prototype.getDescription_asU8=function(){return n.Message.bytesAsU8(this.getDescription())},TronWebProto.AssetIssueContract.prototype.setDescription=function(e){return n.Message.setProto3BytesField(this,20,e)},TronWebProto.AssetIssueContract.prototype.getUrl=function(){return n.Message.getFieldWithDefault(this,21,"")},TronWebProto.AssetIssueContract.prototype.getUrl_asB64=function(){return n.Message.bytesAsB64(this.getUrl())},TronWebProto.AssetIssueContract.prototype.getUrl_asU8=function(){return n.Message.bytesAsU8(this.getUrl())},TronWebProto.AssetIssueContract.prototype.setUrl=function(e){return n.Message.setProto3BytesField(this,21,e)},TronWebProto.AssetIssueContract.prototype.getFreeAssetNetLimit=function(){return n.Message.getFieldWithDefault(this,22,0)},TronWebProto.AssetIssueContract.prototype.setFreeAssetNetLimit=function(e){return n.Message.setProto3IntField(this,22,e)},TronWebProto.AssetIssueContract.prototype.getPublicFreeAssetNetLimit=function(){return n.Message.getFieldWithDefault(this,23,0)},TronWebProto.AssetIssueContract.prototype.setPublicFreeAssetNetLimit=function(e){return n.Message.setProto3IntField(this,23,e)},TronWebProto.AssetIssueContract.prototype.getPublicFreeAssetNetUsage=function(){return n.Message.getFieldWithDefault(this,24,0)},TronWebProto.AssetIssueContract.prototype.setPublicFreeAssetNetUsage=function(e){return n.Message.setProto3IntField(this,24,e)},TronWebProto.AssetIssueContract.prototype.getPublicLatestFreeNetTime=function(){return n.Message.getFieldWithDefault(this,25,0)},TronWebProto.AssetIssueContract.prototype.setPublicLatestFreeNetTime=function(e){return n.Message.setProto3IntField(this,25,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.TransferAssetContract.prototype.toObject=function(e){return TronWebProto.TransferAssetContract.toObject(e,this)},TronWebProto.TransferAssetContract.toObject=function(e,t){var r={assetName:t.getAssetName_asB64(),ownerAddress:t.getOwnerAddress_asB64(),toAddress:t.getToAddress_asB64(),amount:n.Message.getFieldWithDefault(t,4,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.TransferAssetContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.TransferAssetContract;return TronWebProto.TransferAssetContract.deserializeBinaryFromReader(r,t)},TronWebProto.TransferAssetContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAssetName(r);break;case 2:r=t.readBytes();e.setOwnerAddress(r);break;case 3:r=t.readBytes();e.setToAddress(r);break;case 4:r=t.readInt64();e.setAmount(r);break;default:t.skipField()}}return e},TronWebProto.TransferAssetContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.TransferAssetContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TransferAssetContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAssetName_asU8()).length>0&&t.writeBytes(1,r),(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(2,r),(r=e.getToAddress_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getAmount())&&t.writeInt64(4,r)},TronWebProto.TransferAssetContract.prototype.getAssetName=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.TransferAssetContract.prototype.getAssetName_asB64=function(){return n.Message.bytesAsB64(this.getAssetName())},TronWebProto.TransferAssetContract.prototype.getAssetName_asU8=function(){return n.Message.bytesAsU8(this.getAssetName())},TronWebProto.TransferAssetContract.prototype.setAssetName=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.TransferAssetContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.TransferAssetContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.TransferAssetContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.TransferAssetContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.TransferAssetContract.prototype.getToAddress=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.TransferAssetContract.prototype.getToAddress_asB64=function(){return n.Message.bytesAsB64(this.getToAddress())},TronWebProto.TransferAssetContract.prototype.getToAddress_asU8=function(){return n.Message.bytesAsU8(this.getToAddress())},TronWebProto.TransferAssetContract.prototype.setToAddress=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.TransferAssetContract.prototype.getAmount=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.TransferAssetContract.prototype.setAmount=function(e){return n.Message.setProto3IntField(this,4,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UnfreezeAssetContract.prototype.toObject=function(e){return TronWebProto.UnfreezeAssetContract.toObject(e,this)},TronWebProto.UnfreezeAssetContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UnfreezeAssetContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UnfreezeAssetContract;return TronWebProto.UnfreezeAssetContract.deserializeBinaryFromReader(r,t)},TronWebProto.UnfreezeAssetContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){if(1===t.getFieldNumber()){var r=t.readBytes();e.setOwnerAddress(r)}else t.skipField()}return e},TronWebProto.UnfreezeAssetContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UnfreezeAssetContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UnfreezeAssetContract.serializeBinaryToWriter=function(e,t){var r;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r)},TronWebProto.UnfreezeAssetContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.UnfreezeAssetContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UnfreezeAssetContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UnfreezeAssetContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UpdateAssetContract.prototype.toObject=function(e){return TronWebProto.UpdateAssetContract.toObject(e,this)},TronWebProto.UpdateAssetContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),description:t.getDescription_asB64(),url:t.getUrl_asB64(),newLimit:n.Message.getFieldWithDefault(t,4,0),newPublicLimit:n.Message.getFieldWithDefault(t,5,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UpdateAssetContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UpdateAssetContract;return TronWebProto.UpdateAssetContract.deserializeBinaryFromReader(r,t)},TronWebProto.UpdateAssetContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setDescription(r);break;case 3:r=t.readBytes();e.setUrl(r);break;case 4:r=t.readInt64();e.setNewLimit(r);break;case 5:r=t.readInt64();e.setNewPublicLimit(r);break;default:t.skipField()}}return e},TronWebProto.UpdateAssetContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UpdateAssetContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UpdateAssetContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getDescription_asU8()).length>0&&t.writeBytes(2,r),(r=e.getUrl_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getNewLimit())&&t.writeInt64(4,r),0!==(r=e.getNewPublicLimit())&&t.writeInt64(5,r)},TronWebProto.UpdateAssetContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.UpdateAssetContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UpdateAssetContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UpdateAssetContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UpdateAssetContract.prototype.getDescription=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.UpdateAssetContract.prototype.getDescription_asB64=function(){return n.Message.bytesAsB64(this.getDescription())},TronWebProto.UpdateAssetContract.prototype.getDescription_asU8=function(){return n.Message.bytesAsU8(this.getDescription())},TronWebProto.UpdateAssetContract.prototype.setDescription=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.UpdateAssetContract.prototype.getUrl=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.UpdateAssetContract.prototype.getUrl_asB64=function(){return n.Message.bytesAsB64(this.getUrl())},TronWebProto.UpdateAssetContract.prototype.getUrl_asU8=function(){return n.Message.bytesAsU8(this.getUrl())},TronWebProto.UpdateAssetContract.prototype.setUrl=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.UpdateAssetContract.prototype.getNewLimit=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.UpdateAssetContract.prototype.setNewLimit=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.UpdateAssetContract.prototype.getNewPublicLimit=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.UpdateAssetContract.prototype.setNewPublicLimit=function(e){return n.Message.setProto3IntField(this,5,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ParticipateAssetIssueContract.prototype.toObject=function(e){return TronWebProto.ParticipateAssetIssueContract.toObject(e,this)},TronWebProto.ParticipateAssetIssueContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),toAddress:t.getToAddress_asB64(),assetName:t.getAssetName_asB64(),amount:n.Message.getFieldWithDefault(t,4,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ParticipateAssetIssueContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ParticipateAssetIssueContract;return TronWebProto.ParticipateAssetIssueContract.deserializeBinaryFromReader(r,t)},TronWebProto.ParticipateAssetIssueContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setToAddress(r);break;case 3:r=t.readBytes();e.setAssetName(r);break;case 4:r=t.readInt64();e.setAmount(r);break;default:t.skipField()}}return e},TronWebProto.ParticipateAssetIssueContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ParticipateAssetIssueContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ParticipateAssetIssueContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getToAddress_asU8()).length>0&&t.writeBytes(2,r),(r=e.getAssetName_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getAmount())&&t.writeInt64(4,r)},TronWebProto.ParticipateAssetIssueContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.ParticipateAssetIssueContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ParticipateAssetIssueContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ParticipateAssetIssueContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ParticipateAssetIssueContract.prototype.getToAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.ParticipateAssetIssueContract.prototype.getToAddress_asB64=function(){return n.Message.bytesAsB64(this.getToAddress())},TronWebProto.ParticipateAssetIssueContract.prototype.getToAddress_asU8=function(){return n.Message.bytesAsU8(this.getToAddress())},TronWebProto.ParticipateAssetIssueContract.prototype.setToAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.ParticipateAssetIssueContract.prototype.getAssetName=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.ParticipateAssetIssueContract.prototype.getAssetName_asB64=function(){return n.Message.bytesAsB64(this.getAssetName())},TronWebProto.ParticipateAssetIssueContract.prototype.getAssetName_asU8=function(){return n.Message.bytesAsU8(this.getAssetName())},TronWebProto.ParticipateAssetIssueContract.prototype.setAssetName=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.ParticipateAssetIssueContract.prototype.getAmount=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.ParticipateAssetIssueContract.prototype.setAmount=function(e){return n.Message.setProto3IntField(this,4,e)},o.object.extend(t,TronWebProto)},282:e=>{e.exports=a,a.default=a,a.stable=l,a.stableStringify=l;var t="[...]",r="[Circular]",n=[],o=[];function s(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function a(e,t,r,a){var i;void 0===a&&(a=s()),c(e,"",0,[],void 0,0,a);try{i=0===o.length?JSON.stringify(e,t,r):JSON.stringify(e,f(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return i}function i(e,t,r,s){var a=Object.getOwnPropertyDescriptor(s,r);void 0!==a.get?a.configurable?(Object.defineProperty(s,r,{value:e}),n.push([s,r,t,a])):o.push([t,r,e]):(s[r]=e,n.push([s,r,t]))}function c(e,n,o,s,a,u,l){var d;if(u+=1,"object"==typeof e&&null!==e){for(d=0;d<s.length;d++)if(s[d]===e)return void i(r,e,n,a);if(void 0!==l.depthLimit&&u>l.depthLimit)return void i(t,e,n,a);if(void 0!==l.edgesLimit&&o+1>l.edgesLimit)return void i(t,e,n,a);if(s.push(e),Array.isArray(e))for(d=0;d<e.length;d++)c(e[d],d,d,s,e,u,l);else{var f=Object.keys(e);for(d=0;d<f.length;d++){var p=f[d];c(e[p],p,d,s,e,u,l)}}s.pop()}}function u(e,t){return e<t?-1:e>t?1:0}function l(e,t,r,a){void 0===a&&(a=s());var i,c=d(e,"",0,[],void 0,0,a)||e;try{i=0===o.length?JSON.stringify(c,t,r):JSON.stringify(c,f(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return i}function d(e,o,s,a,c,l,f){var p;if(l+=1,"object"==typeof e&&null!==e){for(p=0;p<a.length;p++)if(a[p]===e)return void i(r,e,o,c);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==f.depthLimit&&l>f.depthLimit)return void i(t,e,o,c);if(void 0!==f.edgesLimit&&s+1>f.edgesLimit)return void i(t,e,o,c);if(a.push(e),Array.isArray(e))for(p=0;p<e.length;p++)d(e[p],p,p,a,e,l,f);else{var h={},g=Object.keys(e).sort(u);for(p=0;p<g.length;p++){var y=g[p];d(e[y],y,p,a,e,l,f),h[y]=e[y]}if(void 0===c)return h;n.push([c,o,e]),c[o]=h}a.pop()}}function f(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(o.length>0)for(var n=0;n<o.length;n++){var s=o[n];if(s[1]===t&&s[0]===r){r=s[2],o.splice(n,1);break}}return e.call(this,t,r)}}},329:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,o.default)(e),!s.test(e))return!1;for(var t=!0,r=0,n=e.length-2;n>=0;n--)if(e[n]>="A"&&e[n]<="Z")for(var a=e[n].charCodeAt(0)-55,i=0,c=[a%10,Math.trunc(a/10)];i<c.length;i++){var u=c[i];r+=t?u>=5?1+2*(u-5):2*u:u,t=!t}else{var l=e[n].charCodeAt(0)-"0".charCodeAt(0);r+=t?l>=5?1+2*(l-5):2*l:l,t=!t}var d=10*Math.trunc((r+9)/10)-r;return+e[e.length-1]===d};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;e.exports=t.default,e.exports.default=t.default},331:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.default)(e);var r=s;if(r=t.require_hyphen?r.replace("?",""):r,!(r=t.case_sensitive?new RegExp(r):new RegExp(r,"i")).test(e))return!1;for(var n=e.replace("-","").toUpperCase(),a=0,i=0;i<n.length;i++){var c=n[i];a+=("X"===c?10:+c)*(8-i)}return a%11==0};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s="^\\d{4}-?\\d{3}[\\dX]$";e.exports=t.default,e.exports.default=t.default},335:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){if((0,n.default)(e),(r=(0,s.default)(r,i)).ignoreCase)return e.toLowerCase().split((0,o.default)(t).toLowerCase()).length>r.minOccurrences;return e.split((0,o.default)(t)).length>r.minOccurrences};var n=a(r(8354)),o=a(r(1069)),s=a(r(2533));function a(e){return e&&e.__esModule?e:{default:e}}var i={ignoreCase:!1,minOccurrences:1};e.exports=t.default,e.exports.default=t.default},385:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=("object"===s(t)?t.comparisonDate:t)||Date().toString(),n=(0,o.default)(r),a=(0,o.default)(e);return!!(a&&n&&a<n)};var n,o=(n=r(5071))&&n.__esModule?n:{default:n};function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}e.exports=t.default,e.exports.default=t.default},427:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return t=(0,o.default)(t,s),"string"==typeof e&&a[t.hourFormat][t.mode].test(e)};var n,o=(n=r(2533))&&n.__esModule?n:{default:n};var s={hourFormat:"hour24",mode:"default"},a={hour24:{default:/^([01]?[0-9]|2[0-3]):([0-5][0-9])$/,withSeconds:/^([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/,withOptionalSeconds:/^([01]?[0-9]|2[0-3]):([0-5][0-9])(?::([0-5][0-9]))?$/},hour12:{default:/^(0?[1-9]|1[0-2]):([0-5][0-9]) (A|P)M$/,withSeconds:/^(0?[1-9]|1[0-2]):([0-5][0-9]):([0-5][0-9]) (A|P)M$/,withOptionalSeconds:/^(0?[1-9]|1[0-2]):([0-5][0-9])(?::([0-5][0-9]))? (A|P)M$/}};e.exports=t.default,e.exports.default=t.default},448:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(e);var r=t?new RegExp("^[".concat(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"]+"),"g"):/^\s+/g;return e.replace(r,"")};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},499:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iso7064Check=function(e){for(var t=10,r=0;r<e.length-1;r++)t=(parseInt(e[r],10)+t)%10==0?9:(parseInt(e[r],10)+t)%10*2%11;return(t=1===t?0:11-t)===parseInt(e[10],10)},t.luhnCheck=function(e){for(var t=0,r=!1,n=e.length-1;n>=0;n--){if(r){var o=2*parseInt(e[n],10);t+=o>9?o.toString().split("").map((function(e){return parseInt(e,10)})).reduce((function(e,t){return e+t}),0):o}else t+=parseInt(e[n],10);r=!r}return t%10==0},t.reverseMultiplyAndSum=function(e,t){for(var r=0,n=0;n<e.length;n++)r+=e[n]*(t-n);return r},t.verhoeffCheck=function(e){for(var t=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],r=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],n=e.split("").reverse().join(""),o=0,s=0;s<n.length;s++)o=t[o][r[s%8][parseInt(n[s],10)]];return 0===o}},504:(e,t,r)=>{var n=r(7186),o=n,s="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==s&&s||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")(),a=r(4856);o.object.extend(proto,a),o.exportSymbol("TronWebProto.ClearABIContract",null,s),o.exportSymbol("TronWebProto.ContractState",null,s),o.exportSymbol("TronWebProto.CreateSmartContract",null,s),o.exportSymbol("TronWebProto.SmartContract",null,s),o.exportSymbol("TronWebProto.SmartContract.ABI",null,s),o.exportSymbol("TronWebProto.SmartContract.ABI.Entry",null,s),o.exportSymbol("TronWebProto.SmartContract.ABI.Entry.EntryType",null,s),o.exportSymbol("TronWebProto.SmartContract.ABI.Entry.Param",null,s),o.exportSymbol("TronWebProto.SmartContract.ABI.Entry.StateMutabilityType",null,s),o.exportSymbol("TronWebProto.SmartContractDataWrapper",null,s),o.exportSymbol("TronWebProto.TriggerSmartContract",null,s),o.exportSymbol("TronWebProto.UpdateEnergyLimitContract",null,s),o.exportSymbol("TronWebProto.UpdateSettingContract",null,s),TronWebProto.SmartContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.SmartContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SmartContract.displayName="TronWebProto.SmartContract"),TronWebProto.SmartContract.ABI=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.SmartContract.ABI.repeatedFields_,null)},o.inherits(TronWebProto.SmartContract.ABI,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SmartContract.ABI.displayName="TronWebProto.SmartContract.ABI"),TronWebProto.SmartContract.ABI.Entry=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.SmartContract.ABI.Entry.repeatedFields_,null)},o.inherits(TronWebProto.SmartContract.ABI.Entry,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SmartContract.ABI.Entry.displayName="TronWebProto.SmartContract.ABI.Entry"),TronWebProto.SmartContract.ABI.Entry.Param=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.SmartContract.ABI.Entry.Param,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SmartContract.ABI.Entry.Param.displayName="TronWebProto.SmartContract.ABI.Entry.Param"),TronWebProto.ContractState=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ContractState,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ContractState.displayName="TronWebProto.ContractState"),TronWebProto.CreateSmartContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.CreateSmartContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.CreateSmartContract.displayName="TronWebProto.CreateSmartContract"),TronWebProto.TriggerSmartContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.TriggerSmartContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.TriggerSmartContract.displayName="TronWebProto.TriggerSmartContract"),TronWebProto.ClearABIContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ClearABIContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ClearABIContract.displayName="TronWebProto.ClearABIContract"),TronWebProto.UpdateSettingContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UpdateSettingContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UpdateSettingContract.displayName="TronWebProto.UpdateSettingContract"),TronWebProto.UpdateEnergyLimitContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UpdateEnergyLimitContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UpdateEnergyLimitContract.displayName="TronWebProto.UpdateEnergyLimitContract"),TronWebProto.SmartContractDataWrapper=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.SmartContractDataWrapper,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SmartContractDataWrapper.displayName="TronWebProto.SmartContractDataWrapper"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContract.prototype.toObject=function(e){return TronWebProto.SmartContract.toObject(e,this)},TronWebProto.SmartContract.toObject=function(e,t){var r,o={originAddress:t.getOriginAddress_asB64(),contractAddress:t.getContractAddress_asB64(),abi:(r=t.getAbi())&&TronWebProto.SmartContract.ABI.toObject(e,r),bytecode:t.getBytecode_asB64(),callValue:n.Message.getFieldWithDefault(t,5,0),consumeUserResourcePercent:n.Message.getFieldWithDefault(t,6,0),name:n.Message.getFieldWithDefault(t,7,""),originEnergyLimit:n.Message.getFieldWithDefault(t,8,0),codeHash:t.getCodeHash_asB64(),trxHash:t.getTrxHash_asB64(),version:n.Message.getFieldWithDefault(t,11,0)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.SmartContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SmartContract;return TronWebProto.SmartContract.deserializeBinaryFromReader(r,t)},TronWebProto.SmartContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOriginAddress(r);break;case 2:r=t.readBytes();e.setContractAddress(r);break;case 3:r=new TronWebProto.SmartContract.ABI;t.readMessage(r,TronWebProto.SmartContract.ABI.deserializeBinaryFromReader),e.setAbi(r);break;case 4:r=t.readBytes();e.setBytecode(r);break;case 5:r=t.readInt64();e.setCallValue(r);break;case 6:r=t.readInt64();e.setConsumeUserResourcePercent(r);break;case 7:r=t.readString();e.setName(r);break;case 8:r=t.readInt64();e.setOriginEnergyLimit(r);break;case 9:r=t.readBytes();e.setCodeHash(r);break;case 10:r=t.readBytes();e.setTrxHash(r);break;case 11:r=t.readInt32();e.setVersion(r);break;default:t.skipField()}}return e},TronWebProto.SmartContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SmartContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOriginAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getContractAddress_asU8()).length>0&&t.writeBytes(2,r),null!=(r=e.getAbi())&&t.writeMessage(3,r,TronWebProto.SmartContract.ABI.serializeBinaryToWriter),(r=e.getBytecode_asU8()).length>0&&t.writeBytes(4,r),0!==(r=e.getCallValue())&&t.writeInt64(5,r),0!==(r=e.getConsumeUserResourcePercent())&&t.writeInt64(6,r),(r=e.getName()).length>0&&t.writeString(7,r),0!==(r=e.getOriginEnergyLimit())&&t.writeInt64(8,r),(r=e.getCodeHash_asU8()).length>0&&t.writeBytes(9,r),(r=e.getTrxHash_asU8()).length>0&&t.writeBytes(10,r),0!==(r=e.getVersion())&&t.writeInt32(11,r)},TronWebProto.SmartContract.ABI.repeatedFields_=[1],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContract.ABI.prototype.toObject=function(e){return TronWebProto.SmartContract.ABI.toObject(e,this)},TronWebProto.SmartContract.ABI.toObject=function(e,t){var r={entrysList:n.Message.toObjectList(t.getEntrysList(),TronWebProto.SmartContract.ABI.Entry.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SmartContract.ABI.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SmartContract.ABI;return TronWebProto.SmartContract.ABI.deserializeBinaryFromReader(r,t)},TronWebProto.SmartContract.ABI.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){if(1===t.getFieldNumber()){var r=new TronWebProto.SmartContract.ABI.Entry;t.readMessage(r,TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader),e.addEntrys(r)}else t.skipField()}return e},TronWebProto.SmartContract.ABI.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SmartContract.ABI.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContract.ABI.serializeBinaryToWriter=function(e,t){var r;(r=e.getEntrysList()).length>0&&t.writeRepeatedMessage(1,r,TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter)},TronWebProto.SmartContract.ABI.Entry.repeatedFields_=[4,5],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContract.ABI.Entry.prototype.toObject=function(e){return TronWebProto.SmartContract.ABI.Entry.toObject(e,this)},TronWebProto.SmartContract.ABI.Entry.toObject=function(e,t){var r={anonymous:n.Message.getBooleanFieldWithDefault(t,1,!1),constant:n.Message.getBooleanFieldWithDefault(t,2,!1),name:n.Message.getFieldWithDefault(t,3,""),inputsList:n.Message.toObjectList(t.getInputsList(),TronWebProto.SmartContract.ABI.Entry.Param.toObject,e),outputsList:n.Message.toObjectList(t.getOutputsList(),TronWebProto.SmartContract.ABI.Entry.Param.toObject,e),type:n.Message.getFieldWithDefault(t,6,0),payable:n.Message.getBooleanFieldWithDefault(t,7,!1),statemutability:n.Message.getFieldWithDefault(t,8,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SmartContract.ABI.Entry.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SmartContract.ABI.Entry;return TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader(r,t)},TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBool();e.setAnonymous(r);break;case 2:r=t.readBool();e.setConstant(r);break;case 3:r=t.readString();e.setName(r);break;case 4:r=new TronWebProto.SmartContract.ABI.Entry.Param;t.readMessage(r,TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader),e.addInputs(r);break;case 5:r=new TronWebProto.SmartContract.ABI.Entry.Param;t.readMessage(r,TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader),e.addOutputs(r);break;case 6:r=t.readEnum();e.setType(r);break;case 7:r=t.readBool();e.setPayable(r);break;case 8:r=t.readEnum();e.setStatemutability(r);break;default:t.skipField()}}return e},TronWebProto.SmartContract.ABI.Entry.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAnonymous())&&t.writeBool(1,r),(r=e.getConstant())&&t.writeBool(2,r),(r=e.getName()).length>0&&t.writeString(3,r),(r=e.getInputsList()).length>0&&t.writeRepeatedMessage(4,r,TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter),(r=e.getOutputsList()).length>0&&t.writeRepeatedMessage(5,r,TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter),0!==(r=e.getType())&&t.writeEnum(6,r),(r=e.getPayable())&&t.writeBool(7,r),0!==(r=e.getStatemutability())&&t.writeEnum(8,r)},TronWebProto.SmartContract.ABI.Entry.EntryType={UNKNOWNENTRYTYPE:0,CONSTRUCTOR:1,FUNCTION:2,EVENT:3,FALLBACK:4,RECEIVE:5,ERROR:6},TronWebProto.SmartContract.ABI.Entry.StateMutabilityType={UNKNOWNMUTABILITYTYPE:0,PURE:1,VIEW:2,NONPAYABLE:3,PAYABLE:4},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContract.ABI.Entry.Param.prototype.toObject=function(e){return TronWebProto.SmartContract.ABI.Entry.Param.toObject(e,this)},TronWebProto.SmartContract.ABI.Entry.Param.toObject=function(e,t){var r={indexed:n.Message.getBooleanFieldWithDefault(t,1,!1),name:n.Message.getFieldWithDefault(t,2,""),type:n.Message.getFieldWithDefault(t,3,"")};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SmartContract.ABI.Entry.Param;return TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader(r,t)},TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBool();e.setIndexed(r);break;case 2:r=t.readString();e.setName(r);break;case 3:r=t.readString();e.setType(r);break;default:t.skipField()}}return e},TronWebProto.SmartContract.ABI.Entry.Param.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getIndexed())&&t.writeBool(1,r),(r=e.getName()).length>0&&t.writeString(2,r),(r=e.getType()).length>0&&t.writeString(3,r)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.getIndexed=function(){return n.Message.getBooleanFieldWithDefault(this,1,!1)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.setIndexed=function(e){return n.Message.setProto3BooleanField(this,1,e)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.getName=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.SmartContract.ABI.Entry.Param.prototype.setName=function(e){return n.Message.setProto3StringField(this,2,e)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.getType=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.SmartContract.ABI.Entry.Param.prototype.setType=function(e){return n.Message.setProto3StringField(this,3,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getAnonymous=function(){return n.Message.getBooleanFieldWithDefault(this,1,!1)},TronWebProto.SmartContract.ABI.Entry.prototype.setAnonymous=function(e){return n.Message.setProto3BooleanField(this,1,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getConstant=function(){return n.Message.getBooleanFieldWithDefault(this,2,!1)},TronWebProto.SmartContract.ABI.Entry.prototype.setConstant=function(e){return n.Message.setProto3BooleanField(this,2,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getName=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.SmartContract.ABI.Entry.prototype.setName=function(e){return n.Message.setProto3StringField(this,3,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getInputsList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.SmartContract.ABI.Entry.Param,4)},TronWebProto.SmartContract.ABI.Entry.prototype.setInputsList=function(e){return n.Message.setRepeatedWrapperField(this,4,e)},TronWebProto.SmartContract.ABI.Entry.prototype.addInputs=function(e,t){return n.Message.addToRepeatedWrapperField(this,4,e,TronWebProto.SmartContract.ABI.Entry.Param,t)},TronWebProto.SmartContract.ABI.Entry.prototype.clearInputsList=function(){return this.setInputsList([])},TronWebProto.SmartContract.ABI.Entry.prototype.getOutputsList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.SmartContract.ABI.Entry.Param,5)},TronWebProto.SmartContract.ABI.Entry.prototype.setOutputsList=function(e){return n.Message.setRepeatedWrapperField(this,5,e)},TronWebProto.SmartContract.ABI.Entry.prototype.addOutputs=function(e,t){return n.Message.addToRepeatedWrapperField(this,5,e,TronWebProto.SmartContract.ABI.Entry.Param,t)},TronWebProto.SmartContract.ABI.Entry.prototype.clearOutputsList=function(){return this.setOutputsList([])},TronWebProto.SmartContract.ABI.Entry.prototype.getType=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.SmartContract.ABI.Entry.prototype.setType=function(e){return n.Message.setProto3EnumField(this,6,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getPayable=function(){return n.Message.getBooleanFieldWithDefault(this,7,!1)},TronWebProto.SmartContract.ABI.Entry.prototype.setPayable=function(e){return n.Message.setProto3BooleanField(this,7,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getStatemutability=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.SmartContract.ABI.Entry.prototype.setStatemutability=function(e){return n.Message.setProto3EnumField(this,8,e)},TronWebProto.SmartContract.ABI.prototype.getEntrysList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.SmartContract.ABI.Entry,1)},TronWebProto.SmartContract.ABI.prototype.setEntrysList=function(e){return n.Message.setRepeatedWrapperField(this,1,e)},TronWebProto.SmartContract.ABI.prototype.addEntrys=function(e,t){return n.Message.addToRepeatedWrapperField(this,1,e,TronWebProto.SmartContract.ABI.Entry,t)},TronWebProto.SmartContract.ABI.prototype.clearEntrysList=function(){return this.setEntrysList([])},TronWebProto.SmartContract.prototype.getOriginAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.SmartContract.prototype.getOriginAddress_asB64=function(){return n.Message.bytesAsB64(this.getOriginAddress())},TronWebProto.SmartContract.prototype.getOriginAddress_asU8=function(){return n.Message.bytesAsU8(this.getOriginAddress())},TronWebProto.SmartContract.prototype.setOriginAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.SmartContract.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.SmartContract.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},TronWebProto.SmartContract.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},TronWebProto.SmartContract.prototype.setContractAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.SmartContract.prototype.getAbi=function(){return n.Message.getWrapperField(this,TronWebProto.SmartContract.ABI,3)},TronWebProto.SmartContract.prototype.setAbi=function(e){return n.Message.setWrapperField(this,3,e)},TronWebProto.SmartContract.prototype.clearAbi=function(){return this.setAbi(void 0)},TronWebProto.SmartContract.prototype.hasAbi=function(){return null!=n.Message.getField(this,3)},TronWebProto.SmartContract.prototype.getBytecode=function(){return n.Message.getFieldWithDefault(this,4,"")},TronWebProto.SmartContract.prototype.getBytecode_asB64=function(){return n.Message.bytesAsB64(this.getBytecode())},TronWebProto.SmartContract.prototype.getBytecode_asU8=function(){return n.Message.bytesAsU8(this.getBytecode())},TronWebProto.SmartContract.prototype.setBytecode=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.SmartContract.prototype.getCallValue=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.SmartContract.prototype.setCallValue=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.SmartContract.prototype.getConsumeUserResourcePercent=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.SmartContract.prototype.setConsumeUserResourcePercent=function(e){return n.Message.setProto3IntField(this,6,e)},TronWebProto.SmartContract.prototype.getName=function(){return n.Message.getFieldWithDefault(this,7,"")},TronWebProto.SmartContract.prototype.setName=function(e){return n.Message.setProto3StringField(this,7,e)},TronWebProto.SmartContract.prototype.getOriginEnergyLimit=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.SmartContract.prototype.setOriginEnergyLimit=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.SmartContract.prototype.getCodeHash=function(){return n.Message.getFieldWithDefault(this,9,"")},TronWebProto.SmartContract.prototype.getCodeHash_asB64=function(){return n.Message.bytesAsB64(this.getCodeHash())},TronWebProto.SmartContract.prototype.getCodeHash_asU8=function(){return n.Message.bytesAsU8(this.getCodeHash())},TronWebProto.SmartContract.prototype.setCodeHash=function(e){return n.Message.setProto3BytesField(this,9,e)},TronWebProto.SmartContract.prototype.getTrxHash=function(){return n.Message.getFieldWithDefault(this,10,"")},TronWebProto.SmartContract.prototype.getTrxHash_asB64=function(){return n.Message.bytesAsB64(this.getTrxHash())},TronWebProto.SmartContract.prototype.getTrxHash_asU8=function(){return n.Message.bytesAsU8(this.getTrxHash())},TronWebProto.SmartContract.prototype.setTrxHash=function(e){return n.Message.setProto3BytesField(this,10,e)},TronWebProto.SmartContract.prototype.getVersion=function(){return n.Message.getFieldWithDefault(this,11,0)},TronWebProto.SmartContract.prototype.setVersion=function(e){return n.Message.setProto3IntField(this,11,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ContractState.prototype.toObject=function(e){return TronWebProto.ContractState.toObject(e,this)},TronWebProto.ContractState.toObject=function(e,t){var r={energyUsage:n.Message.getFieldWithDefault(t,1,0),energyFactor:n.Message.getFieldWithDefault(t,2,0),updateCycle:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ContractState.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ContractState;return TronWebProto.ContractState.deserializeBinaryFromReader(r,t)},TronWebProto.ContractState.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setEnergyUsage(r);break;case 2:r=t.readInt64();e.setEnergyFactor(r);break;case 3:r=t.readInt64();e.setUpdateCycle(r);break;default:t.skipField()}}return e},TronWebProto.ContractState.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ContractState.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ContractState.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getEnergyUsage())&&t.writeInt64(1,r),0!==(r=e.getEnergyFactor())&&t.writeInt64(2,r),0!==(r=e.getUpdateCycle())&&t.writeInt64(3,r)},TronWebProto.ContractState.prototype.getEnergyUsage=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.ContractState.prototype.setEnergyUsage=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.ContractState.prototype.getEnergyFactor=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ContractState.prototype.setEnergyFactor=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.ContractState.prototype.getUpdateCycle=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.ContractState.prototype.setUpdateCycle=function(e){return n.Message.setProto3IntField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.CreateSmartContract.prototype.toObject=function(e){return TronWebProto.CreateSmartContract.toObject(e,this)},TronWebProto.CreateSmartContract.toObject=function(e,t){var r,o={ownerAddress:t.getOwnerAddress_asB64(),newContract:(r=t.getNewContract())&&TronWebProto.SmartContract.toObject(e,r),callTokenValue:n.Message.getFieldWithDefault(t,3,0),tokenId:n.Message.getFieldWithDefault(t,4,0)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.CreateSmartContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.CreateSmartContract;return TronWebProto.CreateSmartContract.deserializeBinaryFromReader(r,t)},TronWebProto.CreateSmartContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=new TronWebProto.SmartContract;t.readMessage(r,TronWebProto.SmartContract.deserializeBinaryFromReader),e.setNewContract(r);break;case 3:r=t.readInt64();e.setCallTokenValue(r);break;case 4:r=t.readInt64();e.setTokenId(r);break;default:t.skipField()}}return e},TronWebProto.CreateSmartContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.CreateSmartContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.CreateSmartContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),null!=(r=e.getNewContract())&&t.writeMessage(2,r,TronWebProto.SmartContract.serializeBinaryToWriter),0!==(r=e.getCallTokenValue())&&t.writeInt64(3,r),0!==(r=e.getTokenId())&&t.writeInt64(4,r)},TronWebProto.CreateSmartContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.CreateSmartContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.CreateSmartContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.CreateSmartContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.CreateSmartContract.prototype.getNewContract=function(){return n.Message.getWrapperField(this,TronWebProto.SmartContract,2)},TronWebProto.CreateSmartContract.prototype.setNewContract=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.CreateSmartContract.prototype.clearNewContract=function(){return this.setNewContract(void 0)},TronWebProto.CreateSmartContract.prototype.hasNewContract=function(){return null!=n.Message.getField(this,2)},TronWebProto.CreateSmartContract.prototype.getCallTokenValue=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.CreateSmartContract.prototype.setCallTokenValue=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.CreateSmartContract.prototype.getTokenId=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.CreateSmartContract.prototype.setTokenId=function(e){return n.Message.setProto3IntField(this,4,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.TriggerSmartContract.prototype.toObject=function(e){return TronWebProto.TriggerSmartContract.toObject(e,this)},TronWebProto.TriggerSmartContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),contractAddress:t.getContractAddress_asB64(),callValue:n.Message.getFieldWithDefault(t,3,0),data:t.getData_asB64(),callTokenValue:n.Message.getFieldWithDefault(t,5,0),tokenId:n.Message.getFieldWithDefault(t,6,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.TriggerSmartContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.TriggerSmartContract;return TronWebProto.TriggerSmartContract.deserializeBinaryFromReader(r,t)},TronWebProto.TriggerSmartContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setContractAddress(r);break;case 3:r=t.readInt64();e.setCallValue(r);break;case 4:r=t.readBytes();e.setData(r);break;case 5:r=t.readInt64();e.setCallTokenValue(r);break;case 6:r=t.readInt64();e.setTokenId(r);break;default:t.skipField()}}return e},TronWebProto.TriggerSmartContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.TriggerSmartContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TriggerSmartContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getContractAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getCallValue())&&t.writeInt64(3,r),(r=e.getData_asU8()).length>0&&t.writeBytes(4,r),0!==(r=e.getCallTokenValue())&&t.writeInt64(5,r),0!==(r=e.getTokenId())&&t.writeInt64(6,r)},TronWebProto.TriggerSmartContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.TriggerSmartContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.TriggerSmartContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.TriggerSmartContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.TriggerSmartContract.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.TriggerSmartContract.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},TronWebProto.TriggerSmartContract.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},TronWebProto.TriggerSmartContract.prototype.setContractAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.TriggerSmartContract.prototype.getCallValue=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.TriggerSmartContract.prototype.setCallValue=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.TriggerSmartContract.prototype.getData=function(){return n.Message.getFieldWithDefault(this,4,"")},TronWebProto.TriggerSmartContract.prototype.getData_asB64=function(){return n.Message.bytesAsB64(this.getData())},TronWebProto.TriggerSmartContract.prototype.getData_asU8=function(){return n.Message.bytesAsU8(this.getData())},TronWebProto.TriggerSmartContract.prototype.setData=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.TriggerSmartContract.prototype.getCallTokenValue=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.TriggerSmartContract.prototype.setCallTokenValue=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.TriggerSmartContract.prototype.getTokenId=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.TriggerSmartContract.prototype.setTokenId=function(e){return n.Message.setProto3IntField(this,6,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ClearABIContract.prototype.toObject=function(e){return TronWebProto.ClearABIContract.toObject(e,this)},TronWebProto.ClearABIContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),contractAddress:t.getContractAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ClearABIContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ClearABIContract;return TronWebProto.ClearABIContract.deserializeBinaryFromReader(r,t)},TronWebProto.ClearABIContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setContractAddress(r);break;default:t.skipField()}}return e},TronWebProto.ClearABIContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ClearABIContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ClearABIContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getContractAddress_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.ClearABIContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.ClearABIContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ClearABIContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ClearABIContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ClearABIContract.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.ClearABIContract.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},TronWebProto.ClearABIContract.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},TronWebProto.ClearABIContract.prototype.setContractAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UpdateSettingContract.prototype.toObject=function(e){return TronWebProto.UpdateSettingContract.toObject(e,this)},TronWebProto.UpdateSettingContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),contractAddress:t.getContractAddress_asB64(),consumeUserResourcePercent:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UpdateSettingContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UpdateSettingContract;return TronWebProto.UpdateSettingContract.deserializeBinaryFromReader(r,t)},TronWebProto.UpdateSettingContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setContractAddress(r);break;case 3:r=t.readInt64();e.setConsumeUserResourcePercent(r);break;default:t.skipField()}}return e},TronWebProto.UpdateSettingContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UpdateSettingContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UpdateSettingContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getContractAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getConsumeUserResourcePercent())&&t.writeInt64(3,r)},TronWebProto.UpdateSettingContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.UpdateSettingContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UpdateSettingContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UpdateSettingContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UpdateSettingContract.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.UpdateSettingContract.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},TronWebProto.UpdateSettingContract.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},TronWebProto.UpdateSettingContract.prototype.setContractAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.UpdateSettingContract.prototype.getConsumeUserResourcePercent=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.UpdateSettingContract.prototype.setConsumeUserResourcePercent=function(e){return n.Message.setProto3IntField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UpdateEnergyLimitContract.prototype.toObject=function(e){return TronWebProto.UpdateEnergyLimitContract.toObject(e,this)},TronWebProto.UpdateEnergyLimitContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),contractAddress:t.getContractAddress_asB64(),originEnergyLimit:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UpdateEnergyLimitContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UpdateEnergyLimitContract;return TronWebProto.UpdateEnergyLimitContract.deserializeBinaryFromReader(r,t)},TronWebProto.UpdateEnergyLimitContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setContractAddress(r);break;case 3:r=t.readInt64();e.setOriginEnergyLimit(r);break;default:t.skipField()}}return e},TronWebProto.UpdateEnergyLimitContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UpdateEnergyLimitContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UpdateEnergyLimitContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getContractAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getOriginEnergyLimit())&&t.writeInt64(3,r)},TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UpdateEnergyLimitContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},TronWebProto.UpdateEnergyLimitContract.prototype.setContractAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.UpdateEnergyLimitContract.prototype.getOriginEnergyLimit=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.UpdateEnergyLimitContract.prototype.setOriginEnergyLimit=function(e){return n.Message.setProto3IntField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContractDataWrapper.prototype.toObject=function(e){return TronWebProto.SmartContractDataWrapper.toObject(e,this)},TronWebProto.SmartContractDataWrapper.toObject=function(e,t){var r,n={smartContract:(r=t.getSmartContract())&&TronWebProto.SmartContract.toObject(e,r),runtimecode:t.getRuntimecode_asB64(),contractState:(r=t.getContractState())&&TronWebProto.ContractState.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.SmartContractDataWrapper.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SmartContractDataWrapper;return TronWebProto.SmartContractDataWrapper.deserializeBinaryFromReader(r,t)},TronWebProto.SmartContractDataWrapper.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=new TronWebProto.SmartContract;t.readMessage(r,TronWebProto.SmartContract.deserializeBinaryFromReader),e.setSmartContract(r);break;case 2:r=t.readBytes();e.setRuntimecode(r);break;case 3:r=new TronWebProto.ContractState;t.readMessage(r,TronWebProto.ContractState.deserializeBinaryFromReader),e.setContractState(r);break;default:t.skipField()}}return e},TronWebProto.SmartContractDataWrapper.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SmartContractDataWrapper.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContractDataWrapper.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getSmartContract())&&t.writeMessage(1,r,TronWebProto.SmartContract.serializeBinaryToWriter),(r=e.getRuntimecode_asU8()).length>0&&t.writeBytes(2,r),null!=(r=e.getContractState())&&t.writeMessage(3,r,TronWebProto.ContractState.serializeBinaryToWriter)},TronWebProto.SmartContractDataWrapper.prototype.getSmartContract=function(){return n.Message.getWrapperField(this,TronWebProto.SmartContract,1)},TronWebProto.SmartContractDataWrapper.prototype.setSmartContract=function(e){return n.Message.setWrapperField(this,1,e)},TronWebProto.SmartContractDataWrapper.prototype.clearSmartContract=function(){return this.setSmartContract(void 0)},TronWebProto.SmartContractDataWrapper.prototype.hasSmartContract=function(){return null!=n.Message.getField(this,1)},TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode_asB64=function(){return n.Message.bytesAsB64(this.getRuntimecode())},TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode_asU8=function(){return n.Message.bytesAsU8(this.getRuntimecode())},TronWebProto.SmartContractDataWrapper.prototype.setRuntimecode=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.SmartContractDataWrapper.prototype.getContractState=function(){return n.Message.getWrapperField(this,TronWebProto.ContractState,3)},TronWebProto.SmartContractDataWrapper.prototype.setContractState=function(e){return n.Message.setWrapperField(this,3,e)},TronWebProto.SmartContractDataWrapper.prototype.clearContractState=function(){return this.setContractState(void 0)},TronWebProto.SmartContractDataWrapper.prototype.hasContractState=function(){return null!=n.Message.getField(this,3)},o.object.extend(t,TronWebProto)},532:(e,t,r)=>{const n=r(7784);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},567:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e,t){return e.some((function(e){return t===e}))};e.exports=t.default,e.exports.default=t.default},835:(e,t,r)=>{const n=r(8925),o=r(3579),s=r(5456),a=r(5933),i=r(2615),c=r(2436);e.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,u);case"!=":return o(e,r,u);case">":return s(e,r,u);case">=":return a(e,r,u);case"<":return i(e,r,u);case"<=":return c(e,r,u);default:throw new TypeError(`Invalid operator: ${t}`)}}},924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,o.default)(e),t in u)return u[t].test(e);if("any"===t){for(var r in u){if(u.hasOwnProperty(r))if(u[r].test(e))return!0}return!1}throw new Error("Invalid locale '".concat(t,"'"))},t.locales=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^\d{3}$/,a=/^\d{4}$/,i=/^\d{5}$/,c=/^\d{6}$/,u={AD:/^AD\d{3}$/,AT:a,AU:a,AZ:/^AZ\d{4}$/,BA:/^([7-8]\d{4}$)/,BD:/^([1-8][0-9]{3}|9[0-4][0-9]{2})$/,BE:a,BG:a,BR:/^\d{5}-?\d{3}$/,BY:/^2[1-4]\d{4}$/,CA:/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,CH:a,CN:/^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/,CO:/^(05|08|11|13|15|17|18|19|20|23|25|27|41|44|47|50|52|54|63|66|68|70|73|76|81|85|86|88|91|94|95|97|99)(\d{4})$/,CZ:/^\d{3}\s?\d{2}$/,DE:i,DK:a,DO:i,DZ:i,EE:i,ES:/^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/,FI:i,FR:/^(?:(?:0[1-9]|[1-8]\d|9[0-5])\d{3}|97[1-46]\d{2})$/,GB:/^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,GR:/^\d{3}\s?\d{2}$/,HR:/^([1-5]\d{4}$)/,HT:/^HT\d{4}$/,HU:a,ID:i,IE:/^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i,IL:/^(\d{5}|\d{7})$/,IN:/^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,IR:/^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/,IS:s,IT:i,JP:/^\d{3}\-\d{4}$/,KE:i,KR:/^(\d{5}|\d{6})$/,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\-\d{5}$/,LU:a,LV:/^LV\-\d{4}$/,LK:i,MG:s,MX:i,MT:/^[A-Za-z]{3}\s{0,1}\d{4}$/,MY:i,NL:/^[1-9]\d{3}\s?(?!sa|sd|ss)[a-z]{2}$/i,NO:a,NP:/^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i,NZ:a,PK:i,PL:/^\d{2}\-\d{3}$/,PR:/^00[679]\d{2}([ -]\d{4})?$/,PT:/^\d{4}\-\d{3}?$/,RO:c,RU:c,SA:i,SE:/^[1-9]\d{2}\s?\d{2}$/,SG:c,SI:a,SK:/^\d{3}\s?\d{2}$/,TH:i,TN:a,TW:/^\d{3}(\d{2,3})?$/,UA:i,US:/^\d{5}(-\d{4})?$/,ZA:a,ZM:i};t.locales=Object.keys(u)},939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)(e),e===t};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},946:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:s}=r(4830),a=r(6820),i=(t=e.exports={}).re=[],c=t.safeRe=[],u=t.src=[],l=t.safeSrc=[],d=t.t={};let f=0;const p="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",s],[p,o]],g=(e,t,r)=>{const n=(e=>{for(const[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=f++;a(e,o,t),d[e]=o,u[o]=t,l[o]=n,i[o]=new RegExp(t,r?"g":void 0),c[o]=new RegExp(n,r?"g":void 0)};g("NUMERICIDENTIFIER","0|[1-9]\\d*"),g("NUMERICIDENTIFIERLOOSE","\\d+"),g("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),g("MAINVERSION",`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),g("MAINVERSIONLOOSE",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASEIDENTIFIER",`(?:${u[d.NUMERICIDENTIFIER]}|${u[d.NONNUMERICIDENTIFIER]})`),g("PRERELEASEIDENTIFIERLOOSE",`(?:${u[d.NUMERICIDENTIFIERLOOSE]}|${u[d.NONNUMERICIDENTIFIER]})`),g("PRERELEASE",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),g("PRERELEASELOOSE",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),g("BUILDIDENTIFIER",`${p}+`),g("BUILD",`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),g("FULLPLAIN",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),g("FULL",`^${u[d.FULLPLAIN]}$`),g("LOOSEPLAIN",`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),g("LOOSE",`^${u[d.LOOSEPLAIN]}$`),g("GTLT","((?:<|>)?=?)"),g("XRANGEIDENTIFIERLOOSE",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),g("XRANGEIDENTIFIER",`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),g("XRANGEPLAIN",`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),g("XRANGEPLAINLOOSE",`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),g("XRANGE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),g("XRANGELOOSE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),g("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),g("COERCE",`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),g("COERCEFULL",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?(?:$|[^\\d])`),g("COERCERTL",u[d.COERCE],!0),g("COERCERTLFULL",u[d.COERCEFULL],!0),g("LONETILDE","(?:~>?)"),g("TILDETRIM",`(\\s*)${u[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",g("TILDE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),g("TILDELOOSE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),g("LONECARET","(?:\\^)"),g("CARETTRIM",`(\\s*)${u[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",g("CARET",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),g("CARETLOOSE",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),g("COMPARATORLOOSE",`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),g("COMPARATOR",`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),g("COMPARATORTRIM",`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",g("HYPHENRANGE",`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),g("HYPHENRANGELOOSE",`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[d.XRANGEPLAINLOOSE]})\\s*$`),g("STAR","(<|>)?=?\\s*\\*"),g("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),g("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},978:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),/^[0-7][0-9A-HJKMNP-TV-Z]{25}$/i.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},1048:(e,t,r)=>{"use strict";const n=r(7991),o=r(9318),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=c,t.IS=50;const a=2147483647;function i(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(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 d(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=i(r);const o=n.write(e,t);o!==r&&(n=n.slice(0,o));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(q(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return f(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(q(e,ArrayBuffer)||e&&q(e.buffer,ArrayBuffer))return p(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(q(e,SharedArrayBuffer)||e&&q(e.buffer,SharedArrayBuffer)))return p(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 c.from(n,t,r);const o=function(e){if(c.isBuffer(e)){const t=0|h(e.length),r=i(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||J(e.length)?i(0):f(e);if("Buffer"===e.type&&Array.isArray(e.data))return f(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.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 d(e){return l(e),i(e<0?0:0|h(e))}function f(e){const t=e.length<0?0:0|h(e.length),r=i(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function p(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,c.prototype),n}function h(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function g(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||q(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 o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(o)return n?-1:H(e).length;t=(""+t).toLowerCase(),o=!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 B(this,t,r);case"ascii":return S(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return C(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:w(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):w(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function w(e,t,r,n,o){let s,a=1,i=e.length,c=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;a=2,i/=2,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let n=-1;for(s=r;s<i;s++)if(u(e,s)===u(t,-1===n?0:s-n)){if(-1===n&&(n=s),s-n+1===c)return n*a}else-1!==n&&(s-=s-n),n=-1}else for(r+c>i&&(r=i-c),s=r;s>=0;s--){let r=!0;for(let n=0;n<c;n++)if(u(e,s+n)!==u(t,n)){r=!1;break}if(r)return s}return-1}function T(e,t,r,n){r=Number(r)||0;const o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;const s=t.length;let a;for(n>s/2&&(n=s/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(J(n))return a;e[r+a]=n}return a}function A(e,t,r,n){return Z(H(t,e.length-r),e,r,n)}function v(e,t,r,n){return Z(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 P(e,t,r,n){return Z(K(t),e,r,n)}function E(e,t,r,n){return Z(function(e,t){let r,n,o;const s=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,o=r%256,s.push(o),s.push(n);return s}(t,e.length-r),e,r,n)}function C(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function B(e,t,r){r=Math.min(e.length,r);const n=[];let o=t;for(;o<r;){const t=e[o];let s=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=r){let r,n,i,c;switch(a){case 1:t<128&&(s=t);break;case 2:r=e[o+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(s=c));break;case 3:r=e[o+1],n=e[o+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(s=c));break;case 4:r=e[o+1],n=e[o+2],i=e[o+3],128==(192&r)&&128==(192&n)&&128==(192&i)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&i,c>65535&&c<1114112&&(s=c))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),o+=a}return function(e){const t=e.length;if(t<=W)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=W));return r}(n)}c.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}}(),c.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(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?i(e):void 0!==t?"string"==typeof r?i(e).fill(t,r):i(e).fill(t):i(e)}(e,t,r)},c.allocUnsafe=function(e){return d(e)},c.allocUnsafeSlow=function(e){return d(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(q(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),q(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.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 o=0,s=Math.min(r,n);o<s;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},c.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}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let o=0;for(r=0;r<e.length;++r){let t=e[r];if(q(t,Uint8Array))o+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,o)}o+=t.length}return n},c.byteLength=g,c.prototype._isBuffer=!0,c.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)m(this,t,t+1);return this},c.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)m(this,t,t+3),m(this,t+1,t+2);return this},c.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)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?B(this,0,e):y.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.IS;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},s&&(c.prototype[s]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,o){if(q(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.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===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;let s=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const i=Math.min(s,a),u=this.slice(n,o),l=e.slice(t,r);for(let e=0;e<i;++e)if(u[e]!==l[e]){s=u[e],a=l[e];break}return s<a?-1:a<s?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return b(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return b(this,e,t,r,!1)},c.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 o=this.length-t;if((void 0===r||r>o)&&(r=o),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 T(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":case"latin1":case"binary":return v(this,e,t,r);case"base64":return P(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}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const W=4096;function S(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function I(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function _(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n<r;++n)o+=Y[e[n]];return o}function O(e,t,r){const n=e.slice(t,r);let o="";for(let e=0;e<n.length-1;e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}function R(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 M(e,t,r,n,o,s){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function x(e,t,r,n,o){z(t,n,o,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 a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function F(e,t,r,n,o){z(t,n,o,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 a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function k(e,t,r,n,o,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,n,s){return t=+t,r>>>=0,s||k(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function U(e,t,r,n,s){return t=+t,r>>>=0,s||k(e,0,r,8),o.write(e,t,r,n,52,8),r+8}c.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,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e],o=1,s=0;for(;++s<t&&(o*=256);)n+=this[e+s]*o;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||R(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=X((function(e){j(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(o)<<BigInt(32))})),c.prototype.readBigUInt64BE=X((function(e){j(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=this[e],o=1,s=0;for(;++s<t&&(o*=256);)n+=this[e+s]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||R(e,t,this.length);let n=t,o=1,s=this[e+--n];for(;n>0&&(o*=256);)s+=this[e+--n]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*t)),s},c.prototype.readInt8=function(e,t){return e>>>=0,t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||R(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||R(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=X((function(e){j(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(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)})),c.prototype.readBigInt64BE=X((function(e){j(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(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)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||R(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||R(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||R(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||R(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){M(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=1,s=0;for(this[t]=255&e;++s<r&&(o*=256);)this[t+s]=e/o&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){M(this,e,t,r,Math.pow(2,8*r)-1,0)}let o=r-1,s=1;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(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},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(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},c.prototype.writeBigUInt64LE=X((function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=X((function(e,t=0){return F(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);M(this,e,t,r,n-1,-n)}let o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(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},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(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},c.prototype.writeBigInt64LE=X((function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=X((function(e,t=0){return F(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.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 o=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),o},c.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&&!c.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 o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{const s=c.isBuffer(e)?e:c.from(e,n),a=s.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=s[o%a]}return this};const D={};function L(e,t,r){D[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 $(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 z(e,t,r,n,o,s){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let o;throw o=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 D.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,r){j(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||V(t,e.length-(r+1))}(n,o,s)}function j(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function V(e,t,r){if(Math.floor(e)!==e)throw j(e,r),new D.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}L("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),L("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),L("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=$(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=$(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n}),RangeError);const G=/[^+/0-9A-Za-z-_]/g;function H(e,t){let r;t=t||1/0;const n=e.length;let o=null;const s=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&s.push(239,191,189);if(o=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 K(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Z(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function X(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},1049:(e,t,r)=>{const n=r(8346),o=r(532);e.exports=(e,t,r)=>{const s=[];let a=null,i=null;const c=e.sort(((e,t)=>o(e,t,r)));for(const e of c){n(e,t,r)?(i=e,a||(a=e)):(i&&s.push([a,i]),i=null,a=null)}a&&s.push([a,null]);const u=[];for(const[e,t]of s)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");const l=u.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return l.length<d.length?l:t}},1069:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){"object"===r(e)&&null!==e?e="function"==typeof e.toString?e.toString():"[object Object]":(null==e||isNaN(e)&&!e.length)&&(e="");return String(e)},e.exports=t.default,e.exports.default=t.default},1092:(e,t,r)=>{const n=r(1636);e.exports=(e,t)=>{const r=n(e,null,!0),o=n(t,null,!0),s=r.compare(o);if(0===s)return null;const a=s>0,i=a?r:o,c=a?o:r,u=!!i.prerelease.length;if(!!c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(0===c.compareMain(i))return c.minor&&!c.patch?"minor":"patch"}const l=u?"pre":"";return r.major!==o.major?l+"major":r.minor!==o.minor?l+"minor":r.patch!==o.patch?l+"patch":"prerelease"}},1282:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),(t=(0,o.default)(t,c)).crockford)return i.test(e);if(e.length%8==0&&a.test(e))return!0;return!1};var n=s(r(8354)),o=s(r(2533));function s(e){return e&&e.__esModule?e:{default:e}}var a=/^[A-Z2-7]+=*$/,i=/^[A-HJKMNP-TV-Z0-9]+$/,c={crockford:!1};e.exports=t.default,e.exports.default=t.default},1328:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[a-f0-9]{32}$/;e.exports=t.default,e.exports.default=t.default},1406:(e,t,r)=>{const n=r(532);e.exports=(e,t,r)=>n(t,e,r)},1426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){t="string"==typeof t?(0,o.default)({format:t},i):(0,o.default)(t,i);if("string"==typeof e&&(T=t.format,/(^(y{4}|y{2})[.\/-](m{1,2})[.\/-](d{1,2})$)|(^(m{1,2})[.\/-](d{1,2})[.\/-]((y{4}|y{2})$))|(^(d{1,2})[.\/-](m{1,2})[.\/-]((y{4}|y{2})$))/gi.test(T))){if(t.strictMode&&e.length!==t.format.length)return!1;var r,n=t.delimiters.find((function(e){return-1!==t.format.indexOf(e)})),a=t.strictMode?n:t.delimiters.find((function(t){return-1!==e.indexOf(t)})),c=function(e,t){for(var r=[],n=Math.max(e.length,t.length),o=0;o<n;o++)r.push([e[o],t[o]]);return r}(e.split(a),t.format.toLowerCase().split(n)),u={},l=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}(c);try{for(l.s();!(r=l.n()).done;){var d=(b=r.value,w=2,function(e){if(Array.isArray(e))return e}(b)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,s,a,i=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=s.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return i}}(b,w)||s(b,w)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),f=d[0],p=d[1];if(!f||!p||f.length!==p.length)return!1;u[p.charAt(0)]=f}}catch(e){l.e(e)}finally{l.f()}var h=u.y;if(h.startsWith("-"))return!1;if(2===u.y.length){var g=parseInt(u.y,10);if(isNaN(g))return!1;h=g<(new Date).getFullYear()%100?"20".concat(u.y):"19".concat(u.y)}var y=u.m;1===u.m.length&&(y="0".concat(u.m));var m=u.d;return 1===u.d.length&&(m="0".concat(u.d)),new Date("".concat(h,"-").concat(y,"-").concat(m,"T00:00:00.000Z")).getUTCDate()===+u.d}var b,w;var T;if(!t.strictMode)return"[object Date]"===Object.prototype.toString.call(e)&&isFinite(e);return!1};var n,o=(n=r(2533))&&n.__esModule?n:{default:n};function s(e,t){if(e){if("string"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var i={format:"YYYY/MM/DD",delimiters:["/","-"],strictMode:!1};e.exports=t.default,e.exports.default=t.default},1624:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,o.default)(e);var n=e,a=r.ignore;if(a)if(a instanceof RegExp)n=n.replace(a,"");else{if("string"!=typeof a)throw new Error("ignore should be instance of a String or RegExp");n=n.replace(new RegExp("[".concat(a.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"")}if(t in s.alpha)return s.alpha[t].test(n);throw new Error("Invalid locale '".concat(t,"'"))},t.locales=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n},s=r(7640);t.locales=Object.keys(s.alpha)},1636:(e,t,r)=>{const n=r(7784);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},1687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.has(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=new Set(["004","008","010","012","016","020","024","028","031","032","036","040","044","048","050","051","052","056","060","064","068","070","072","074","076","084","086","090","092","096","100","104","108","112","116","120","124","132","136","140","144","148","152","156","158","162","166","170","174","175","178","180","184","188","191","192","196","203","204","208","212","214","218","222","226","231","232","233","234","238","239","242","246","248","250","254","258","260","262","266","268","270","275","276","288","292","296","300","304","308","312","316","320","324","328","332","334","336","340","344","348","352","356","360","364","368","372","376","380","384","388","392","398","400","404","408","410","414","417","418","422","426","428","430","434","438","440","442","446","450","454","458","462","466","470","474","478","480","484","492","496","498","499","500","504","508","512","516","520","524","528","531","533","534","535","540","548","554","558","562","566","570","574","578","580","581","583","584","585","586","591","598","600","604","608","612","616","620","624","626","630","634","638","642","643","646","652","654","659","660","662","663","666","670","674","678","682","686","688","690","694","702","703","704","705","706","710","716","724","728","729","732","740","744","748","752","756","760","762","764","768","772","776","780","784","788","792","795","796","798","800","804","807","818","826","831","832","833","834","840","850","854","858","860","862","876","882","887","894"]);e.exports=t.default,e.exports.default=t.default},1881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e),(t=(0,o.default)(t,a)).allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));!0===t.allow_wildcard&&0===e.indexOf("*.")&&(e=e.substring(2));var r=e.split("."),s=r[r.length-1];if(t.require_tld){if(r.length<2)return!1;if(!t.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(s))return!1;if(/\s/.test(s))return!1}if(!t.allow_numeric_tld&&/^\d+$/.test(s))return!1;return r.every((function(e){return!(e.length>63&&!t.ignore_max_length)&&(!!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(e)&&(!/[\uff01-\uff5e]/.test(e)&&(!/^-|-$/.test(e)&&!(!t.allow_underscores&&/_/.test(e)))))}))};var n=s(r(8354)),o=s(r(2533));function s(e){return e&&e.__esModule?e:{default:e}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};e.exports=t.default,e.exports.default=t.default},1969:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)(e),function(e){var t="\\d{".concat(e.digits_after_decimal[0],"}");e.digits_after_decimal.forEach((function(e,r){0!==r&&(t="".concat(t,"|\\d{").concat(e,"}"))}));var r="(".concat(e.symbol.replace(/\W/,(function(e){return"\\".concat(e)})),")").concat(e.require_symbol?"":"?"),n="-?",o="[1-9]\\d{0,2}(\\".concat(e.thousands_separator,"\\d{3})*"),s="(".concat(["0","[1-9]\\d*",o].join("|"),")?"),a="(\\".concat(e.decimal_separator,"(").concat(t,"))").concat(e.require_decimal?"":"?"),i=s+(e.allow_decimal||e.require_decimal?a:"");e.allow_negatives&&!e.parens_for_negatives&&(e.negative_sign_after_digits?i+=n:e.negative_sign_before_digits&&(i=n+i));e.allow_negative_sign_placeholder?i="( (?!\\-))?".concat(i):e.allow_space_after_symbol?i=" ?".concat(i):e.allow_space_after_digits&&(i+="( (?!$))?");e.symbol_after_digits?i+=r:i=r+i;e.allow_negatives&&(e.parens_for_negatives?i="(\\(".concat(i,"\\)|").concat(i,")"):e.negative_sign_before_digits||e.negative_sign_after_digits||(i=n+i));return new RegExp("^(?!-? )(?=.*\\d)".concat(i,"$"))}(t=(0,n.default)(t,a)).test(e)};var n=s(r(2533)),o=s(r(8354));function s(e){return e&&e.__esModule?e:{default:e}}var a={symbol:"$",require_symbol:!1,allow_space_after_symbol:!1,symbol_after_digits:!1,allow_negatives:!0,parens_for_negatives:!1,negative_sign_before_digits:!1,negative_sign_after_digits:!1,allow_negative_sign_placeholder:!1,thousands_separator:",",decimal_separator:".",allow_decimal:!0,require_decimal:!1,digits_after_decimal:[2],allow_space_after_digits:!1};e.exports=t.default,e.exports.default=t.default},2054:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)||a.test(e)||i.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+_]{1,100}$/i,a=/^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i,i=/^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i;e.exports=t.default,e.exports.default=t.default},2167:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)},t.halfWidth=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=t.halfWidth=/[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/},2177:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e)?parseFloat(e):NaN};var n,o=(n=r(9190))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},2220:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=Qe(r(5071)),s=Qe(r(2177)),a=Qe(r(3422)),i=Qe(r(3751)),c=Qe(r(939)),u=Qe(r(335)),l=Qe(r(2929)),d=Qe(r(4156)),f=Qe(r(4121)),p=Qe(r(9711)),h=Qe(r(6331)),g=Qe(r(9026)),y=Qe(r(1881)),m=Qe(r(1426)),b=Qe(r(427)),w=Qe(r(4468)),T=Qe(r(4300)),A=Qe(r(7574)),v=Xe(r(1624)),P=Xe(r(8241)),E=Qe(r(4583)),C=Xe(r(4429)),B=Qe(r(6969)),W=Qe(r(3705)),S=Qe(r(9864)),I=Qe(r(9514)),_=Qe(r(6959)),O=Qe(r(3167)),R=Qe(r(2167)),M=Qe(r(8524)),x=Qe(r(8631)),F=Qe(r(5830)),k=Qe(r(6774)),N=Qe(r(3353)),U=Xe(r(9190)),D=Qe(r(8515)),L=Qe(r(3943)),$=Qe(r(5627)),z=Qe(r(62)),j=Qe(r(9974)),V=Qe(r(9664)),G=Qe(r(7303)),H=Qe(r(6237)),K=Xe(r(8198)),Z=Qe(r(6198)),q=Qe(r(1328)),J=Qe(r(5410)),Y=Qe(r(2937)),X=Qe(r(6528)),Q=Qe(r(8689)),ee=Qe(r(6982)),te=Qe(r(7900)),re=Qe(r(978)),ne=Qe(r(9317)),oe=Qe(r(4685)),se=Qe(r(7706)),ae=Qe(r(385)),ie=Qe(r(3673)),ce=Qe(r(8498)),ue=Qe(r(9013)),le=Qe(r(54)),de=Qe(r(3220)),fe=Qe(r(329)),pe=Qe(r(5098)),he=Qe(r(331)),ge=Qe(r(2452)),ye=Xe(r(2334)),me=Qe(r(3911)),be=Qe(r(1969)),we=Qe(r(3511)),Te=r(7616),Ae=Qe(r(4608)),ve=Qe(r(7692)),Pe=Qe(r(6299)),Ee=Qe(r(5318)),Ce=Qe(r(2736)),Be=Qe(r(6887)),We=Qe(r(1687)),Se=Qe(r(4335)),Ie=Qe(r(1282)),_e=Qe(r(4438)),Oe=Qe(r(5997)),Re=Qe(r(5030)),Me=Qe(r(8036)),xe=Qe(r(3880)),Fe=Qe(r(2054)),ke=Qe(r(6343)),Ne=Xe(r(924)),Ue=Qe(r(448)),De=Qe(r(2690)),Le=Qe(r(3146)),$e=Qe(r(8137)),ze=Qe(r(6070)),je=Qe(r(3350)),Ve=Qe(r(3181)),Ge=Qe(r(3099)),He=Qe(r(4144)),Ke=Qe(r(5635)),Ze=Qe(r(5977)),qe=Qe(r(4063)),Je=Qe(r(9300)),Ye=Qe(r(2731));function Xe(e,t){if("function"==typeof WeakMap)var r=new WeakMap,o=new WeakMap;return(Xe=function(e,t){if(!t&&e&&e.__esModule)return e;var s,a,i={__proto__:null,default:e};if(null===e||"object"!=n(e)&&"function"!=typeof e)return i;if(s=t?o:r){if(s.has(e))return s.get(e);s.set(e,i)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(s=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?s(i,c,a):i[c]=e[c]);return i})(e,t)}function Qe(e){return e&&e.__esModule?e:{default:e}}var et={version:"13.15.20",toDate:o.default,toFloat:s.default,toInt:a.default,toBoolean:i.default,equals:c.default,contains:u.default,matches:l.default,isEmail:d.default,isURL:f.default,isMACAddress:p.default,isIP:h.default,isIPRange:g.default,isFQDN:y.default,isBoolean:w.default,isIBAN:K.default,isBIC:Z.default,isAbaRouting:A.default,isAlpha:v.default,isAlphaLocales:v.locales,isAlphanumeric:P.default,isAlphanumericLocales:P.locales,isNumeric:E.default,isPassportNumber:C.default,passportNumberLocales:C.locales,isPort:B.default,isLowercase:W.default,isUppercase:S.default,isAscii:_.default,isFullWidth:O.default,isHalfWidth:R.default,isVariableWidth:M.default,isMultibyte:x.default,isSemVer:F.default,isSurrogatePair:k.default,isInt:N.default,isIMEI:I.default,isFloat:U.default,isFloatLocales:U.locales,isDecimal:D.default,isHexadecimal:L.default,isOctal:$.default,isDivisibleBy:z.default,isHexColor:j.default,isRgbColor:V.default,isHSL:G.default,isISRC:H.default,isMD5:q.default,isHash:J.default,isJWT:Y.default,isJSON:X.default,isEmpty:Q.default,isLength:ee.default,isLocale:T.default,isByteLength:te.default,isULID:re.default,isUUID:ne.default,isMongoId:oe.default,isAfter:se.default,isBefore:ae.default,isIn:ie.default,isLuhnNumber:ce.default,isCreditCard:ue.default,isIdentityCard:le.default,isEAN:de.default,isISIN:fe.default,isISBN:pe.default,isISSN:he.default,isMobilePhone:ye.default,isMobilePhoneLocales:ye.locales,isPostalCode:Ne.default,isPostalCodeLocales:Ne.locales,isEthereumAddress:me.default,isCurrency:be.default,isBtcAddress:we.default,isISO6346:Te.isISO6346,isFreightContainerID:Te.isFreightContainerID,isISO6391:Ae.default,isISO8601:ve.default,isISO15924:Ee.default,isRFC3339:Pe.default,isISO31661Alpha2:Ce.default,isISO31661Alpha3:Be.default,isISO31661Numeric:We.default,isISO4217:Se.default,isBase32:Ie.default,isBase58:_e.default,isBase64:Oe.default,isDataURI:Re.default,isMagnetURI:Me.default,isMailtoURI:xe.default,isMimeType:Fe.default,isLatLong:ke.default,ltrim:Ue.default,rtrim:De.default,trim:Le.default,escape:$e.default,unescape:ze.default,stripLow:je.default,whitelist:Ve.default,blacklist:Ge.default,isWhitelisted:He.default,normalizeEmail:Ke.default,toString,isSlug:Ze.default,isStrongPassword:Je.default,isTaxID:ge.default,isDate:m.default,isTime:b.default,isLicensePlate:qe.default,isVAT:Ye.default,ibanLocales:K.locales};t.default=et;e.exports=t.default,e.exports.default=t.default},2334:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){if((0,o.default)(e),r&&r.strictMode&&!e.startsWith("+"))return!1;if(Array.isArray(t))return t.some((function(t){if(s.hasOwnProperty(t)&&s[t].test(e))return!0;return!1}));if(t in s)return s[t].test(e);if(!t||"any"===t){for(var n in s){if(s.hasOwnProperty(n))if(s[n].test(e))return!0}return!1}throw new Error("Invalid locale '".concat(t,"'"))},t.locales=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s={"am-AM":/^(\+?374|0)(33|4[134]|55|77|88|9[13-689])\d{6}$/,"ar-AE":/^((\+?971)|0)?5[024568]\d{7}$/,"ar-BH":/^(\+?973)?(3|6)\d{7}$/,"ar-DZ":/^(\+?213|0)(5|6|7)\d{8}$/,"ar-LB":/^(\+?961)?((3|81)\d{6}|7\d{7})$/,"ar-EG":/^((\+?20)|0)?1[0125]\d{8}$/,"ar-IQ":/^(\+?964|0)?7[0-9]\d{8}$/,"ar-JO":/^(\+?962|0)?7[789]\d{7}$/,"ar-KW":/^(\+?965)([569]\d{7}|41\d{6})$/,"ar-LY":/^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/,"ar-MA":/^(?:(?:\+|00)212|0)[5-7]\d{8}$/,"ar-OM":/^((\+|00)968)?([79][1-9])\d{6}$/,"ar-PS":/^(\+?970|0)5[6|9](\d{7})$/,"ar-SA":/^(!?(\+?966)|0)?5\d{8}$/,"ar-SD":/^((\+?249)|0)?(9[012369]|1[012])\d{7}$/,"ar-SY":/^(!?(\+?963)|0)?9\d{8}$/,"ar-TN":/^(\+?216)?[2459]\d{7}$/,"az-AZ":/^(\+994|0)(10|5[015]|7[07]|99)\d{7}$/,"ar-QA":/^(\+?974|0)?([3567]\d{7})$/,"bs-BA":/^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/,"be-BY":/^(\+?375)?(24|25|29|33|44)\d{7}$/,"bg-BG":/^(\+?359|0)?8[789]\d{7}$/,"bn-BD":/^(\+?880|0)1[13456789][0-9]{8}$/,"ca-AD":/^(\+376)?[346]\d{5}$/,"cs-CZ":/^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"da-DK":/^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,"de-DE":/^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/,"de-AT":/^(\+43|0)\d{1,4}\d{3,12}$/,"de-CH":/^(\+41|0)([1-9])\d{1,9}$/,"de-LU":/^(\+352)?((6\d1)\d{6})$/,"dv-MV":/^(\+?960)?(7[2-9]|9[1-9])\d{5}$/,"el-GR":/^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/,"el-CY":/^(\+?357?)?(9(9|7|6|5|4)\d{6})$/,"en-AI":/^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-AG":/^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/,"en-BM":/^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/,"en-BS":/^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/,"en-GB":/^(\+?44|0)7[1-9]\d{8}$/,"en-GG":/^(\+?44|0)1481\d{6}$/,"en-GH":/^(\+233|0)(20|50|24|54|27|57|26|56|23|53|28|55|59)\d{7}$/,"en-GY":/^(\+592|0)6\d{6}$/,"en-HK":/^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,"en-MO":/^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,"en-IE":/^(\+?353|0)8[356789]\d{7}$/,"en-IN":/^(\+?91|0)?[6789]\d{9}$/,"en-JM":/^(\+?876)?\d{7}$/,"en-KE":/^(\+?254|0)(7|1)\d{8}$/,"fr-CF":/^(\+?236| ?)(70|75|77|72|21|22)\d{6}$/,"en-SS":/^(\+?211|0)(9[1257])\d{7}$/,"en-KI":/^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,"en-KN":/^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/,"en-LS":/^(\+?266)(22|28|57|58|59|27|52)\d{6}$/,"en-MT":/^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,"en-MU":/^(\+?230|0)?\d{8}$/,"en-MW":/^(\+?265|0)(((77|88|31|99|98|21)\d{7})|(((111)|1)\d{6})|(32000\d{4}))$/,"en-NA":/^(\+?264|0)(6|8)\d{7}$/,"en-NG":/^(\+?234|0)?[789]\d{9}$/,"en-NZ":/^(\+?64|0)[28]\d{7,9}$/,"en-PG":/^(\+?675|0)?(7\d|8[18])\d{6}$/,"en-PK":/^((00|\+)?92|0)3[0-6]\d{8}$/,"en-PH":/^(09|\+639)\d{9}$/,"en-RW":/^(\+?250|0)?[7]\d{8}$/,"en-SG":/^(\+65)?[3689]\d{7}$/,"en-SL":/^(\+?232|0)\d{8}$/,"en-TZ":/^(\+?255|0)?[67]\d{8}$/,"en-UG":/^(\+?256|0)?[7]\d{8}$/,"en-US":/^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-ZM":/^(\+?26)?0[79][567]\d{7}$/,"en-ZW":/^(\+263)[0-9]{9}$/,"en-BW":/^(\+?267)?(7[1-8]{1})\d{6}$/,"es-AR":/^\+?549(11|[2368]\d)\d{8}$/,"es-BO":/^(\+?591)?(6|7)\d{7}$/,"es-CO":/^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/,"es-CL":/^(\+?56|0)[2-9]\d{1}\d{7}$/,"es-CR":/^(\+506)?[2-8]\d{7}$/,"es-CU":/^(\+53|0053)?5\d{7}$/,"es-DO":/^(\+?1)?8[024]9\d{7}$/,"es-HN":/^(\+?504)?[9|8|3|2]\d{7}$/,"es-EC":/^(\+?593|0)([2-7]|9[2-9])\d{7}$/,"es-ES":/^(\+?34)?[6|7]\d{8}$/,"es-GT":/^(\+?502)?[2|6|7]\d{7}$/,"es-PE":/^(\+?51)?9\d{8}$/,"es-MX":/^(\+?52)?(1|01)?\d{10,11}$/,"es-NI":/^(\+?505)\d{7,8}$/,"es-PA":/^(\+?507)\d{7,8}$/,"es-PY":/^(\+?595|0)9[9876]\d{7}$/,"es-SV":/^(\+?503)?[67]\d{7}$/,"es-UY":/^(\+598|0)9[1-9][\d]{6}$/,"es-VE":/^(\+?58)?(2|4)\d{9}$/,"et-EE":/^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,"fa-IR":/^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,"fi-FI":/^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/,"fj-FJ":/^(\+?679)?\s?\d{3}\s?\d{4}$/,"fo-FO":/^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"fr-BF":/^(\+226|0)[67]\d{7}$/,"fr-BJ":/^(\+229)\d{8}$/,"fr-CD":/^(\+?243|0)?(8|9)\d{8}$/,"fr-CM":/^(\+?237)6[0-9]{8}$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"fr-GF":/^(\+?594|0|00594)[67]\d{8}$/,"fr-GP":/^(\+?590|0|00590)[67]\d{8}$/,"fr-MQ":/^(\+?596|0|00596)[67]\d{8}$/,"fr-PF":/^(\+?689)?8[789]\d{6}$/,"fr-RE":/^(\+?262|0|00262)[67]\d{8}$/,"fr-WF":/^(\+681)?\d{6}$/,"he-IL":/^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,"hu-HU":/^(\+?36|06)(20|30|31|50|70)\d{7}$/,"id-ID":/^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,"ir-IR":/^(\+98|0)?9\d{9}$/,"it-IT":/^(\+?39)?\s?3\d{2} ?\d{6,7}$/,"it-SM":/^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/,"ja-JP":/^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,"ka-GE":/^(\+?995)?(79\d{7}|5\d{8})$/,"kk-KZ":/^(\+?7|8)?7\d{9}$/,"kl-GL":/^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"ko-KR":/^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,"ky-KG":/^(\+996\s?)?(22[0-9]|50[0-9]|55[0-9]|70[0-9]|75[0-9]|77[0-9]|880|990|995|996|997|998)\s?\d{3}\s?\d{3}$/,"lt-LT":/^(\+370|8)\d{8}$/,"lv-LV":/^(\+?371)2\d{7}$/,"mg-MG":/^((\+?261|0)(2|3)\d)?\d{7}$/,"mn-MN":/^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}$/,"my-MM":/^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/,"ms-MY":/^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$/,"mz-MZ":/^(\+?258)?8[234567]\d{7}$/,"nb-NO":/^(\+?47)?[49]\d{7}$/,"ne-NP":/^(\+?977)?9[78]\d{8}$/,"nl-BE":/^(\+?32|0)4\d{8}$/,"nl-NL":/^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/,"nl-AW":/^(\+)?297(56|59|64|73|74|99)\d{5}$/,"nn-NO":/^(\+?47)?[49]\d{7}$/,"pl-PL":/^(\+?48)? ?([5-8]\d|45) ?\d{3} ?\d{2} ?\d{2}$/,"pt-BR":/^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/,"pt-PT":/^(\+?351)?9[1236]\d{7}$/,"pt-AO":/^(\+?244)?9\d{8}$/,"ro-MD":/^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/,"ro-RO":/^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/,"si-LK":/^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,"sl-SI":/^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,"sk-SK":/^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"so-SO":/^(\+?252|0)((6[0-9])\d{7}|(7[1-9])\d{7})$/,"sq-AL":/^(\+355|0)6[2-9]\d{7}$/,"sr-RS":/^(\+3816|06)[- \d]{5,9}$/,"sv-SE":/^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/,"tg-TJ":/^(\+?992)?[5][5]\d{7}$/,"th-TH":/^(\+66|66|0)\d{9}$/,"tr-TR":/^(\+?90|0)?5\d{9}$/,"tk-TM":/^(\+993|993|8)\d{8}$/,"uk-UA":/^(\+?38)?0(50|6[36-8]|7[357]|9[1-9])\d{7}$/,"uz-UZ":/^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,"vi-VN":/^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,"zh-CN":/^((\+|00)86)?(1[3-9]|9[28])\d{9}$/,"zh-TW":/^(\+?886\-?|0)?9\d{8}$/,"dz-BT":/^(\+?975|0)?(17|16|77|02)\d{6}$/,"ar-YE":/^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$/,"ar-EH":/^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/,"fa-AF":/^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/,"mk-MK":/^(\+?389|0)?((?:2[2-9]\d{6}|(?:3[1-4]|4[2-8])\d{6}|500\d{5}|5[2-9]\d{6}|7[0-9][2-9]\d{5}|8[1-9]\d{6}|800\d{5}|8009\d{4}))$/};s["en-CA"]=s["en-US"],s["fr-CA"]=s["en-CA"],s["fr-BE"]=s["nl-BE"],s["zh-HK"]=s["en-HK"],s["zh-MO"]=s["en-MO"],s["ga-IE"]=s["en-IE"],s["fr-CH"]=s["de-CH"],s["it-CH"]=s["fr-CH"];t.locales=Object.keys(s)},2429:(e,t,r)=>{const n=r(1636);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},2436:(e,t,r)=>{const n=r(532);e.exports=(e,t,r)=>n(e,t,r)<=0},2452:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US";(0,o.default)(e);var r=e.slice(0);if(t in f)return t in g&&(r=r.replace(g[t],"")),!!f[t].test(r)&&(!(t in p)||p[t](r));throw new Error("Invalid locale '".concat(t,"'"))};var o=i(r(8354)),s=function(e,t){if("function"==typeof WeakMap)var r=new WeakMap,o=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var s,a,i={__proto__:null,default:e};if(null===e||"object"!=n(e)&&"function"!=typeof e)return i;if(s=t?o:r){if(s.has(e))return s.get(e);s.set(e,i)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(s=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?s(i,c,a):i[c]=e[c]);return i}(e,t)}(r(499)),a=i(r(1426));function i(e){return e&&e.__esModule?e:{default:e}}function c(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var l={andover:["10","12"],atlanta:["60","67"],austin:["50","53"],brookhaven:["01","02","03","04","05","06","11","13","14","16","21","22","23","25","34","51","52","54","55","56","57","58","59","65"],cincinnati:["30","32","35","36","37","38","61"],fresno:["15","24"],internet:["20","26","27","45","46","47"],kansas:["40","44"],memphis:["94","95"],ogden:["80","90"],philadelphia:["33","39","41","42","43","46","48","62","63","64","66","68","71","72","73","74","75","76","77","81","82","83","84","85","86","87","88","91","92","93","98","99"],sba:["31"]};function d(e){for(var t=!1,r=!1,n=0;n<3;n++)if(!t&&/[AEIOU]/.test(e[n]))t=!0;else if(!r&&t&&"X"===e[n])r=!0;else if(n>0){if(t&&!r&&!/[AEIOU]/.test(e[n]))return!1;if(r&&!/X/.test(e[n]))return!1}return!0}var f={"bg-BG":/^\d{10}$/,"cs-CZ":/^\d{6}\/{0,1}\d{3,4}$/,"de-AT":/^\d{9}$/,"de-DE":/^[1-9]\d{10}$/,"dk-DK":/^\d{6}-{0,1}\d{4}$/,"el-CY":/^[09]\d{7}[A-Z]$/,"el-GR":/^([0-4]|[7-9])\d{8}$/,"en-CA":/^\d{9}$/,"en-GB":/^\d{10}$|^(?!GB|NK|TN|ZZ)(?![DFIQUV])[A-Z](?![DFIQUVO])[A-Z]\d{6}[ABCD ]$/i,"en-IE":/^\d{7}[A-W][A-IW]{0,1}$/i,"en-US":/^\d{2}[- ]{0,1}\d{7}$/,"es-AR":/(20|23|24|27|30|33|34)[0-9]{8}[0-9]/,"es-ES":/^(\d{0,8}|[XYZKLM]\d{7})[A-HJ-NP-TV-Z]$/i,"et-EE":/^[1-6]\d{6}(00[1-9]|0[1-9][0-9]|[1-6][0-9]{2}|70[0-9]|710)\d$/,"fi-FI":/^\d{6}[-+A]\d{3}[0-9A-FHJ-NPR-Y]$/i,"fr-BE":/^\d{11}$/,"fr-FR":/^[0-3]\d{12}$|^[0-3]\d\s\d{2}(\s\d{3}){3}$/,"fr-LU":/^\d{13}$/,"hr-HR":/^\d{11}$/,"hu-HU":/^8\d{9}$/,"it-IT":/^[A-Z]{6}[L-NP-V0-9]{2}[A-EHLMPRST][L-NP-V0-9]{2}[A-ILMZ][L-NP-V0-9]{3}[A-Z]$/i,"lv-LV":/^\d{6}-{0,1}\d{5}$/,"mt-MT":/^\d{3,7}[APMGLHBZ]$|^([1-8])\1\d{7}$/i,"nl-NL":/^\d{9}$/,"pl-PL":/^\d{10,11}$/,"pt-BR":/(?:^\d{11}$)|(?:^\d{14}$)/,"pt-PT":/^\d{9}$/,"ro-RO":/^\d{13}$/,"sk-SK":/^\d{6}\/{0,1}\d{3,4}$/,"sl-SI":/^[1-9]\d{7}$/,"sv-SE":/^(\d{6}[-+]{0,1}\d{4}|(18|19|20)\d{6}[-+]{0,1}\d{4})$/,"uk-UA":/^\d{10}$/};f["lb-LU"]=f["fr-LU"],f["lt-LT"]=f["et-EE"],f["nl-BE"]=f["fr-BE"],f["fr-CA"]=f["en-CA"];var p={"bg-BG":function(e){var t=e.slice(0,2),r=parseInt(e.slice(2,4),10);r>40?(r-=40,t="20".concat(t)):r>20?(r-=20,t="18".concat(t)):t="19".concat(t),r<10&&(r="0".concat(r));var n="".concat(t,"/").concat(r,"/").concat(e.slice(4,6));if(!(0,a.default)(n,"YYYY/MM/DD"))return!1;for(var o=e.split("").map((function(e){return parseInt(e,10)})),s=[2,4,8,5,10,9,7,3,6],i=0,c=0;c<s.length;c++)i+=o[c]*s[c];return(i=i%11==10?0:i%11)===o[9]},"cs-CZ":function(e){e=e.replace(/\W/,"");var t=parseInt(e.slice(0,2),10);if(10===e.length)t=t<54?"20".concat(t):"19".concat(t);else{if("000"===e.slice(6))return!1;if(!(t<54))return!1;t="19".concat(t)}3===t.length&&(t=[t.slice(0,2),"0",t.slice(2)].join(""));var r=parseInt(e.slice(2,4),10);if(r>50&&(r-=50),r>20){if(parseInt(t,10)<2004)return!1;r-=20}r<10&&(r="0".concat(r));var n="".concat(t,"/").concat(r,"/").concat(e.slice(4,6));if(!(0,a.default)(n,"YYYY/MM/DD"))return!1;if(10===e.length&&parseInt(e,10)%11!=0){var o=parseInt(e.slice(0,9),10)%11;if(!(parseInt(t,10)<1986&&10===o))return!1;if(0!==parseInt(e.slice(9),10))return!1}return!0},"de-AT":function(e){return s.luhnCheck(e)},"de-DE":function(e){for(var t=e.split("").map((function(e){return parseInt(e,10)})),r=[],n=0;n<t.length-1;n++){r.push("");for(var o=0;o<t.length-1;o++)t[n]===t[o]&&(r[n]+=o)}if(2!==(r=r.filter((function(e){return e.length>1}))).length&&3!==r.length)return!1;if(3===r[0].length){for(var a=r[0].split("").map((function(e){return parseInt(e,10)})),i=0,c=0;c<a.length-1;c++)a[c]+1===a[c+1]&&(i+=1);if(2===i)return!1}return s.iso7064Check(e)},"dk-DK":function(e){e=e.replace(/\W/,"");var t=parseInt(e.slice(4,6),10);switch(e.slice(6,7)){case"0":case"1":case"2":case"3":t="19".concat(t);break;case"4":case"9":t=t<37?"20".concat(t):"19".concat(t);break;default:if(t<37)t="20".concat(t);else{if(!(t>58))return!1;t="18".concat(t)}}3===t.length&&(t=[t.slice(0,2),"0",t.slice(2)].join(""));var r="".concat(t,"/").concat(e.slice(2,4),"/").concat(e.slice(0,2));if(!(0,a.default)(r,"YYYY/MM/DD"))return!1;for(var n=e.split("").map((function(e){return parseInt(e,10)})),o=0,s=4,i=0;i<9;i++)o+=n[i]*s,1===(s-=1)&&(s=7);return 1!==(o%=11)&&(0===o?0===n[9]:n[9]===11-o)},"el-CY":function(e){for(var t=e.slice(0,8).split("").map((function(e){return parseInt(e,10)})),r=0,n=1;n<t.length;n+=2)r+=t[n];for(var o=0;o<t.length;o+=2)t[o]<2?r+=1-t[o]:(r+=2*(t[o]-2)+5,t[o]>4&&(r+=2));return String.fromCharCode(r%26+65)===e.charAt(8)},"el-GR":function(e){for(var t=e.split("").map((function(e){return parseInt(e,10)})),r=0,n=0;n<8;n++)r+=t[n]*Math.pow(2,8-n);return r%11%10===t[8]},"en-CA":function(e){var t=e.split(""),r=t.filter((function(e,t){return t%2})).map((function(e){return 2*Number(e)})).join("").split("");return t.filter((function(e,t){return!(t%2)})).concat(r).map((function(e){return Number(e)})).reduce((function(e,t){return e+t}))%10==0},"en-IE":function(e){var t=s.reverseMultiplyAndSum(e.split("").slice(0,7).map((function(e){return parseInt(e,10)})),8);return 9===e.length&&"W"!==e[8]&&(t+=9*(e[8].charCodeAt(0)-64)),0===(t%=23)?"W"===e[7].toUpperCase():e[7].toUpperCase()===String.fromCharCode(64+t)},"en-US":function(e){return-1!==function(){var e=[];for(var t in l)l.hasOwnProperty(t)&&e.push.apply(e,c(l[t]));return e}().indexOf(e.slice(0,2))},"es-AR":function(e){for(var t=0,r=e.split(""),n=parseInt(r.pop(),10),o=0;o<r.length;o++)t+=r[9-o]*(2+o%6);var s=11-t%11;return 11===s?s=0:10===s&&(s=9),n===s},"es-ES":function(e){var t=e.toUpperCase().split("");if(isNaN(parseInt(t[0],10))&&t.length>1){var r=0;switch(t[0]){case"Y":r=1;break;case"Z":r=2}t.splice(0,1,r)}else for(;t.length<9;)t.unshift(0);t=t.join("");var n=parseInt(t.slice(0,8),10)%23;return t[8]===["T","R","W","A","G","M","Y","F","P","D","X","B","N","J","Z","S","Q","V","H","L","C","K","E"][n]},"et-EE":function(e){var t=e.slice(1,3);switch(e.slice(0,1)){case"1":case"2":t="18".concat(t);break;case"3":case"4":t="19".concat(t);break;default:t="20".concat(t)}var r="".concat(t,"/").concat(e.slice(3,5),"/").concat(e.slice(5,7));if(!(0,a.default)(r,"YYYY/MM/DD"))return!1;for(var n=e.split("").map((function(e){return parseInt(e,10)})),o=0,s=1,i=0;i<10;i++)o+=n[i]*s,10===(s+=1)&&(s=1);if(o%11==10){o=0,s=3;for(var c=0;c<10;c++)o+=n[c]*s,10===(s+=1)&&(s=1);if(o%11==10)return 0===n[10]}return o%11===n[10]},"fi-FI":function(e){var t=e.slice(4,6);switch(e.slice(6,7)){case"+":t="18".concat(t);break;case"-":t="19".concat(t);break;default:t="20".concat(t)}var r="".concat(t,"/").concat(e.slice(2,4),"/").concat(e.slice(0,2));if(!(0,a.default)(r,"YYYY/MM/DD"))return!1;var n=parseInt(e.slice(0,6)+e.slice(7,10),10)%31;return n<10?n===parseInt(e.slice(10),10):["A","B","C","D","E","F","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y"][n-=10]===e.slice(10)},"fr-BE":function(e){if("00"!==e.slice(2,4)||"00"!==e.slice(4,6)){var t="".concat(e.slice(0,2),"/").concat(e.slice(2,4),"/").concat(e.slice(4,6));if(!(0,a.default)(t,"YY/MM/DD"))return!1}var r=97-parseInt(e.slice(0,9),10)%97,n=parseInt(e.slice(9,11),10);return r===n||(r=97-parseInt("2".concat(e.slice(0,9)),10)%97)===n},"fr-FR":function(e){return e=e.replace(/\s/g,""),parseInt(e.slice(0,10),10)%511===parseInt(e.slice(10,13),10)},"fr-LU":function(e){var t="".concat(e.slice(0,4),"/").concat(e.slice(4,6),"/").concat(e.slice(6,8));return!!(0,a.default)(t,"YYYY/MM/DD")&&(!!s.luhnCheck(e.slice(0,12))&&s.verhoeffCheck("".concat(e.slice(0,11)).concat(e[12])))},"hr-HR":function(e){return s.iso7064Check(e)},"hu-HU":function(e){for(var t=e.split("").map((function(e){return parseInt(e,10)})),r=8,n=1;n<9;n++)r+=t[n]*(n+1);return r%11===t[9]},"it-IT":function(e){var t=e.toUpperCase().split("");if(!d(t.slice(0,3)))return!1;if(!d(t.slice(3,6)))return!1;for(var r={L:"0",M:"1",N:"2",P:"3",Q:"4",R:"5",S:"6",T:"7",U:"8",V:"9"},n=0,o=[6,7,9,10,12,13,14];n<o.length;n++){var s=o[n];t[s]in r&&t.splice(s,1,r[t[s]])}var i={A:"01",B:"02",C:"03",D:"04",E:"05",H:"06",L:"07",M:"08",P:"09",R:"10",S:"11",T:"12"}[t[8]],c=parseInt(t[9]+t[10],10);c>40&&(c-=40),c<10&&(c="0".concat(c));var u="".concat(t[6]).concat(t[7],"/").concat(i,"/").concat(c);if(!(0,a.default)(u,"YY/MM/DD"))return!1;for(var l=0,f=1;f<t.length-1;f+=2){var p=parseInt(t[f],10);isNaN(p)&&(p=t[f].charCodeAt(0)-65),l+=p}for(var h={A:1,B:0,C:5,D:7,E:9,F:13,G:15,H:17,I:19,J:21,K:2,L:4,M:18,N:20,O:11,P:3,Q:6,R:8,S:12,T:14,U:16,V:10,W:22,X:25,Y:24,Z:23,0:1,1:0},g=0;g<t.length-1;g+=2){var y=0;if(t[g]in h)y=h[t[g]];else{var m=parseInt(t[g],10);y=2*m+1,m>4&&(y+=2)}l+=y}return String.fromCharCode(65+l%26)===t[15]},"lv-LV":function(e){var t=(e=e.replace(/\W/,"")).slice(0,2);if("32"!==t){if("00"!==e.slice(2,4)){var r=e.slice(4,6);switch(e[6]){case"0":r="18".concat(r);break;case"1":r="19".concat(r);break;default:r="20".concat(r)}var n="".concat(r,"/").concat(e.slice(2,4),"/").concat(t);if(!(0,a.default)(n,"YYYY/MM/DD"))return!1}for(var o=1101,s=[1,6,3,7,9,10,5,8,4,2],i=0;i<e.length-1;i++)o-=parseInt(e[i],10)*s[i];return parseInt(e[10],10)===o%11}return!0},"mt-MT":function(e){if(9!==e.length){for(var t=e.toUpperCase().split("");t.length<8;)t.unshift(0);switch(e[7]){case"A":case"P":if(0===parseInt(t[6],10))return!1;break;default:var r=parseInt(t.join("").slice(0,5),10);if(r>32e3)return!1;if(r===parseInt(t.join("").slice(5,7),10))return!1}}return!0},"nl-NL":function(e){return s.reverseMultiplyAndSum(e.split("").slice(0,8).map((function(e){return parseInt(e,10)})),9)%11===parseInt(e[8],10)},"pl-PL":function(e){if(10===e.length){for(var t=[6,5,7,2,3,4,5,6,7],r=0,n=0;n<t.length;n++)r+=parseInt(e[n],10)*t[n];return 10!==(r%=11)&&r===parseInt(e[9],10)}var o=e.slice(0,2),s=parseInt(e.slice(2,4),10);s>80?(o="18".concat(o),s-=80):s>60?(o="22".concat(o),s-=60):s>40?(o="21".concat(o),s-=40):s>20?(o="20".concat(o),s-=20):o="19".concat(o),s<10&&(s="0".concat(s));var i="".concat(o,"/").concat(s,"/").concat(e.slice(4,6));if(!(0,a.default)(i,"YYYY/MM/DD"))return!1;for(var c=0,u=1,l=0;l<e.length-1;l++)c+=parseInt(e[l],10)*u%10,(u+=2)>10?u=1:5===u&&(u+=2);return(c=10-c%10)===parseInt(e[10],10)},"pt-BR":function(e){if(11===e.length){var t,r;if(t=0,"11111111111"===e||"22222222222"===e||"33333333333"===e||"44444444444"===e||"55555555555"===e||"66666666666"===e||"77777777777"===e||"88888888888"===e||"99999999999"===e||"00000000000"===e)return!1;for(var n=1;n<=9;n++)t+=parseInt(e.substring(n-1,n),10)*(11-n);if(10===(r=10*t%11)&&(r=0),r!==parseInt(e.substring(9,10),10))return!1;t=0;for(var o=1;o<=10;o++)t+=parseInt(e.substring(o-1,o),10)*(12-o);return 10===(r=10*t%11)&&(r=0),r===parseInt(e.substring(10,11),10)}if("00000000000000"===e||"11111111111111"===e||"22222222222222"===e||"33333333333333"===e||"44444444444444"===e||"55555555555555"===e||"66666666666666"===e||"77777777777777"===e||"88888888888888"===e||"99999999999999"===e)return!1;for(var s=e.length-2,a=e.substring(0,s),i=e.substring(s),c=0,u=s-7,l=s;l>=1;l--)c+=a.charAt(s-l)*u,(u-=1)<2&&(u=9);var d=c%11<2?0:11-c%11;if(d!==parseInt(i.charAt(0),10))return!1;s+=1,a=e.substring(0,s),c=0,u=s-7;for(var f=s;f>=1;f--)c+=a.charAt(s-f)*u,(u-=1)<2&&(u=9);return(d=c%11<2?0:11-c%11)===parseInt(i.charAt(1),10)},"pt-PT":function(e){var t=11-s.reverseMultiplyAndSum(e.split("").slice(0,8).map((function(e){return parseInt(e,10)})),9)%11;return t>9?0===parseInt(e[8],10):t===parseInt(e[8],10)},"ro-RO":function(e){if("9000"!==e.slice(0,4)){var t=e.slice(1,3);switch(e[0]){case"1":case"2":t="19".concat(t);break;case"3":case"4":t="18".concat(t);break;case"5":case"6":t="20".concat(t)}var r="".concat(t,"/").concat(e.slice(3,5),"/").concat(e.slice(5,7));if(8===r.length){if(!(0,a.default)(r,"YY/MM/DD"))return!1}else if(!(0,a.default)(r,"YYYY/MM/DD"))return!1;for(var n=e.split("").map((function(e){return parseInt(e,10)})),o=[2,7,9,1,4,6,3,5,8,2,7,9],s=0,i=0;i<o.length;i++)s+=n[i]*o[i];return s%11==10?1===n[12]:n[12]===s%11}return!0},"sk-SK":function(e){if(9===e.length){if("000"===(e=e.replace(/\W/,"")).slice(6))return!1;var t=parseInt(e.slice(0,2),10);if(t>53)return!1;t=t<10?"190".concat(t):"19".concat(t);var r=parseInt(e.slice(2,4),10);r>50&&(r-=50),r<10&&(r="0".concat(r));var n="".concat(t,"/").concat(r,"/").concat(e.slice(4,6));if(!(0,a.default)(n,"YYYY/MM/DD"))return!1}return!0},"sl-SI":function(e){var t=11-s.reverseMultiplyAndSum(e.split("").slice(0,7).map((function(e){return parseInt(e,10)})),8)%11;return 10===t?0===parseInt(e[7],10):t===parseInt(e[7],10)},"sv-SE":function(e){var t=e.slice(0);e.length>11&&(t=t.slice(2));var r="",n=t.slice(2,4),o=parseInt(t.slice(4,6),10);if(e.length>11)r=e.slice(0,4);else if(r=e.slice(0,2),11===e.length&&o<60){var i=(new Date).getFullYear().toString(),c=parseInt(i.slice(0,2),10);if(i=parseInt(i,10),"-"===e[6])r=parseInt("".concat(c).concat(r),10)>i?"".concat(c-1).concat(r):"".concat(c).concat(r);else if(r="".concat(c-1).concat(r),i-parseInt(r,10)<100)return!1}o>60&&(o-=60),o<10&&(o="0".concat(o));var u="".concat(r,"/").concat(n,"/").concat(o);if(8===u.length){if(!(0,a.default)(u,"YY/MM/DD"))return!1}else if(!(0,a.default)(u,"YYYY/MM/DD"))return!1;return s.luhnCheck(e.replace(/\W/,""))},"uk-UA":function(e){for(var t=e.split("").map((function(e){return parseInt(e,10)})),r=[-1,5,7,9,4,6,10,5,7],n=0,o=0;o<r.length;o++)n+=t[o]*r[o];return n%11==10?0===t[9]:t[9]===n%11}};p["lb-LU"]=p["fr-LU"],p["lt-LT"]=p["et-EE"],p["nl-BE"]=p["fr-BE"],p["fr-CA"]=p["en-CA"];var h=/[-\\\/!@#$%\^&\*\(\)\+\=\[\]]+/g,g={"de-AT":h,"de-DE":/[\/\\]/g,"fr-BE":h};g["nl-BE"]=g["fr-BE"],e.exports=t.default,e.exports.default=t.default},2533:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e},e.exports=t.default,e.exports.default=t.default},2615:(e,t,r)=>{const n=r(532);e.exports=(e,t,r)=>n(e,t,r)<0},2619:(e,t,r)=>{const n=r(2859);e.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},2690:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,o.default)(e),t){var r=new RegExp("[".concat(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"]+$"),"g");return e.replace(r,"")}var n=e.length-1;for(;/\s/.test(e.charAt(n));)n-=1;return e.slice(0,n+1)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},2731:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,s.default)(e),(0,s.default)(t),t in i)return i[t](e);throw new Error("Invalid country code: '".concat(t,"'"))},t.vatMatchers=void 0;var o,s=(o=r(8354))&&o.__esModule?o:{default:o},a=function(e,t){if("function"==typeof WeakMap)var r=new WeakMap,o=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var s,a,i={__proto__:null,default:e};if(null===e||"object"!=n(e)&&"function"!=typeof e)return i;if(s=t?o:r){if(s.has(e))return s.get(e);s.set(e,i)}for(var c in e)"default"!==c&&{}.hasOwnProperty.call(e,c)&&((a=(s=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,c))&&(a.get||a.set)?s(i,c,a):i[c]=e[c]);return i}(e,t)}(r(499));var i=t.vatMatchers={AT:function(e){return/^(AT)?U\d{8}$/.test(e)},BE:function(e){return/^(BE)?\d{10}$/.test(e)},BG:function(e){return/^(BG)?\d{9,10}$/.test(e)},HR:function(e){return/^(HR)?\d{11}$/.test(e)},CY:function(e){return/^(CY)?\w{9}$/.test(e)},CZ:function(e){return/^(CZ)?\d{8,10}$/.test(e)},DK:function(e){return/^(DK)?\d{8}$/.test(e)},EE:function(e){return/^(EE)?\d{9}$/.test(e)},FI:function(e){return/^(FI)?\d{8}$/.test(e)},FR:function(e){return/^(FR)([A-Z0-9]{2}\d{9})$/.test(e)},DE:function(e){return/^(DE)?\d{9}$/.test(e)},EL:function(e){return/^(EL)?\d{9}$/.test(e)},HU:function(e){return/^(HU)?\d{8}$/.test(e)},IE:function(e){return/^(IE)?\d{7}\w{1}(W)?$/.test(e)},IT:function(e){return/^(IT)?\d{11}$/.test(e)},LV:function(e){return/^(LV)?\d{11}$/.test(e)},LT:function(e){return/^(LT)?\d{9,12}$/.test(e)},LU:function(e){return/^(LU)?\d{8}$/.test(e)},MT:function(e){return/^(MT)?\d{8}$/.test(e)},NL:function(e){return/^(NL)?\d{9}B\d{2}$/.test(e)},PL:function(e){return/^(PL)?(\d{10}|(\d{3}-\d{3}-\d{2}-\d{2})|(\d{3}-\d{2}-\d{2}-\d{3}))$/.test(e)},PT:function(e){var t=e.match(/^(PT)?(\d{9})$/);if(!t)return!1;var r=t[2],n=11-a.reverseMultiplyAndSum(r.split("").slice(0,8).map((function(e){return parseInt(e,10)})),9)%11;return n>9?0===parseInt(r[8],10):n===parseInt(r[8],10)},RO:function(e){return/^(RO)?\d{2,10}$/.test(e)},SK:function(e){return/^(SK)?\d{10}$/.test(e)},SI:function(e){return/^(SI)?\d{8}$/.test(e)},ES:function(e){return/^(ES)?\w\d{7}[A-Z]$/.test(e)},SE:function(e){return/^(SE)?\d{12}$/.test(e)},AL:function(e){return/^(AL)?\w{9}[A-Z]$/.test(e)},MK:function(e){return/^(MK)?\d{13}$/.test(e)},AU:function(e){if(!e.match(/^(AU)?(\d{11})$/))return!1;var t=[10,1,3,5,7,9,11,13,15,17,19];e=e.replace(/^AU/,"");for(var r=(parseInt(e.slice(0,1),10)-1).toString()+e.slice(1),n=0,o=0;o<11;o++)n+=t[o]*r.charAt(o);return 0!==n&&n%89==0},BY:function(e){return/^(УНП )?\d{9}$/.test(e)},CA:function(e){return/^(CA)?\d{9}$/.test(e)},IS:function(e){return/^(IS)?\d{5,6}$/.test(e)},IN:function(e){return/^(IN)?\d{15}$/.test(e)},ID:function(e){return/^(ID)?(\d{15}|(\d{2}.\d{3}.\d{3}.\d{1}-\d{3}.\d{3}))$/.test(e)},IL:function(e){return/^(IL)?\d{9}$/.test(e)},KZ:function(e){return/^(KZ)?\d{12}$/.test(e)},NZ:function(e){return/^(NZ)?\d{9}$/.test(e)},NG:function(e){return/^(NG)?(\d{12}|(\d{8}-\d{4}))$/.test(e)},NO:function(e){return/^(NO)?\d{9}MVA$/.test(e)},PH:function(e){return/^(PH)?(\d{12}|\d{3} \d{3} \d{3} \d{3})$/.test(e)},RU:function(e){return/^(RU)?(\d{10}|\d{12})$/.test(e)},SM:function(e){return/^(SM)?\d{5}$/.test(e)},SA:function(e){return/^(SA)?\d{15}$/.test(e)},RS:function(e){return/^(RS)?\d{9}$/.test(e)},CH:function(e){var t,r,n;return/^(CHE[- ]?)?(\d{9}|(\d{3}\.\d{3}\.\d{3})|(\d{3} \d{3} \d{3})) ?(TVA|MWST|IVA)?$/.test(e)&&(t=e.match(/\d/g).map((function(e){return+e})),r=t.pop(),n=[5,4,3,2,7,6,5,4],r===(11-t.reduce((function(e,t,r){return e+t*n[r]}),0)%11)%11)},TR:function(e){return/^(TR)?\d{10}$/.test(e)},UA:function(e){return/^(UA)?\d{12}$/.test(e)},GB:function(e){return/^GB((\d{3} \d{4} ([0-8][0-9]|9[0-6]))|(\d{9} \d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/.test(e)},UZ:function(e){return/^(UZ)?\d{9}$/.test(e)},AR:function(e){return/^(AR)?\d{11}$/.test(e)},BO:function(e){return/^(BO)?\d{7}$/.test(e)},BR:function(e){return/^(BR)?((\d{2}.\d{3}.\d{3}\/\d{4}-\d{2})|(\d{3}.\d{3}.\d{3}-\d{2}))$/.test(e)},CL:function(e){return/^(CL)?\d{8}-\d{1}$/.test(e)},CO:function(e){return/^(CO)?\d{10}$/.test(e)},CR:function(e){return/^(CR)?\d{9,12}$/.test(e)},EC:function(e){return/^(EC)?\d{13}$/.test(e)},SV:function(e){return/^(SV)?\d{4}-\d{6}-\d{3}-\d{1}$/.test(e)},GT:function(e){return/^(GT)?\d{7}-\d{1}$/.test(e)},HN:function(e){return/^(HN)?$/.test(e)},MX:function(e){return/^(MX)?\w{3,4}\d{6}\w{3}$/.test(e)},NI:function(e){return/^(NI)?\d{3}-\d{6}-\d{4}\w{1}$/.test(e)},PA:function(e){return/^(PA)?$/.test(e)},PY:function(e){return/^(PY)?\d{6,8}-\d{1}$/.test(e)},PE:function(e){return/^(PE)?\d{11}$/.test(e)},DO:function(e){return/^(DO)?(\d{11}|(\d{3}-\d{7}-\d{1})|[1,4,5]{1}\d{8}|([1,4,5]{1})-\d{2}-\d{5}-\d{1})$/.test(e)},UY:function(e){return/^(UY)?\d{12}$/.test(e)},VE:function(e){return/^(VE)?[J,G,V,E]{1}-(\d{9}|(\d{8}-\d{1}))$/.test(e)}}},2736:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CountryCodes=void 0,t.default=function(e){return(0,o.default)(e),s.has(e.toUpperCase())};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=new Set(["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"]);t.CountryCodes=s},2767:(e,t,r)=>{const n=r(532);e.exports=(e,t)=>n(e,t,!0)},2859:(e,t,r)=>{const n=/\s+/g;class o{constructor(e,t){if(t=a(t),e instanceof o)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new o(e.raw,t);if(e instanceof i)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(n," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!m(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&b(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&g)|(this.options.loose&&y))+":"+e,r=s.get(t);if(r)return r;const n=this.options.loose,o=n?l[d.HYPHENRANGELOOSE]:l[d.HYPHENRANGE];e=e.replace(o,_(this.options.includePrerelease)),c("hyphen replace",e),e=e.replace(l[d.COMPARATORTRIM],f),c("comparator trim",e),e=e.replace(l[d.TILDETRIM],p),c("tilde trim",e),e=e.replace(l[d.CARETTRIM],h),c("caret trim",e);let a=e.split(" ").map((e=>T(e,this.options))).join(" ").split(/\s+/).map((e=>I(e,this.options)));n&&(a=a.filter((e=>(c("loose invalid filter",e,this.options),!!e.match(l[d.COMPARATORLOOSE]))))),c("range list",a);const u=new Map,b=a.map((e=>new i(e,this.options)));for(const e of b){if(m(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");const w=[...u.values()];return s.set(t,w),w}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Range is required");return this.set.some((r=>w(r,t)&&e.set.some((e=>w(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(O(this.set[t],e,this.options))return!0;return!1}}e.exports=o;const s=new(r(4390)),a=r(3607),i=r(8308),c=r(6820),u=r(7784),{safeRe:l,t:d,comparatorTrimReplace:f,tildeTrimReplace:p,caretTrimReplace:h}=r(946),{FLAG_INCLUDE_PRERELEASE:g,FLAG_LOOSE:y}=r(4830),m=e=>"<0.0.0-0"===e.value,b=e=>""===e.value,w=(e,t)=>{let r=!0;const n=e.slice();let o=n.pop();for(;r&&n.length;)r=n.every((e=>o.intersects(e,t))),o=n.pop();return r},T=(e,t)=>(c("comp",e,t),e=E(e,t),c("caret",e),e=v(e,t),c("tildes",e),e=B(e,t),c("xrange",e),e=S(e,t),c("stars",e),e),A=e=>!e||"x"===e.toLowerCase()||"*"===e,v=(e,t)=>e.trim().split(/\s+/).map((e=>P(e,t))).join(" "),P=(e,t)=>{const r=t.loose?l[d.TILDELOOSE]:l[d.TILDE];return e.replace(r,((t,r,n,o,s)=>{let a;return c("tilde",e,t,r,n,o,s),A(r)?a="":A(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:A(o)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:s?(c("replaceTilde pr",s),a=`>=${r}.${n}.${o}-${s} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,c("tilde return",a),a}))},E=(e,t)=>e.trim().split(/\s+/).map((e=>C(e,t))).join(" "),C=(e,t)=>{c("caret",e,t);const r=t.loose?l[d.CARETLOOSE]:l[d.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,o,s,a)=>{let i;return c("caret",e,t,r,o,s,a),A(r)?i="":A(o)?i=`>=${r}.0.0${n} <${+r+1}.0.0-0`:A(s)?i="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:a?(c("replaceCaret pr",a),i="0"===r?"0"===o?`>=${r}.${o}.${s}-${a} <${r}.${o}.${+s+1}-0`:`>=${r}.${o}.${s}-${a} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${s}-${a} <${+r+1}.0.0-0`):(c("no pr"),i="0"===r?"0"===o?`>=${r}.${o}.${s}${n} <${r}.${o}.${+s+1}-0`:`>=${r}.${o}.${s}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${s} <${+r+1}.0.0-0`),c("caret return",i),i}))},B=(e,t)=>(c("replaceXRanges",e,t),e.split(/\s+/).map((e=>W(e,t))).join(" ")),W=(e,t)=>{e=e.trim();const r=t.loose?l[d.XRANGELOOSE]:l[d.XRANGE];return e.replace(r,((r,n,o,s,a,i)=>{c("xRange",e,r,n,o,s,a,i);const u=A(o),l=u||A(s),d=l||A(a),f=d;return"="===n&&f&&(n=""),i=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&f?(l&&(s=0),a=0,">"===n?(n=">=",l?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):"<="===n&&(n="<",l?o=+o+1:s=+s+1),"<"===n&&(i="-0"),r=`${n+o}.${s}.${a}${i}`):l?r=`>=${o}.0.0${i} <${+o+1}.0.0-0`:d&&(r=`>=${o}.${s}.0${i} <${o}.${+s+1}.0-0`),c("xRange return",r),r}))},S=(e,t)=>(c("replaceStars",e,t),e.trim().replace(l[d.STAR],"")),I=(e,t)=>(c("replaceGTE0",e,t),e.trim().replace(l[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),_=e=>(t,r,n,o,s,a,i,c,u,l,d,f)=>`${r=A(n)?"":A(o)?`>=${n}.0.0${e?"-0":""}`:A(s)?`>=${n}.${o}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`} ${c=A(u)?"":A(l)?`<${+u+1}.0.0-0`:A(d)?`<${u}.${+l+1}.0-0`:f?`<=${u}.${l}.${d}-${f}`:e?`<${u}.${l}.${+d+1}-0`:`<=${c}`}`.trim(),O=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(c(e[r].semver),e[r].semver!==i.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},2929:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){(0,o.default)(e),"[object RegExp]"!==Object.prototype.toString.call(t)&&(t=new RegExp(t,r));return!!e.match(t)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},2937:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,n.default)(e);var t=e.split(".");if(3!==t.length)return!1;return t.reduce((function(e,t){return e&&(0,o.default)(t,{urlSafe:!0})}),!0)};var n=s(r(8354)),o=s(r(5997));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default},3099:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)(e),e.replace(new RegExp("[".concat(t,"]+"),"g"),"")};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},3146:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,n.default)((0,o.default)(e,t),t)};var n=s(r(2690)),o=s(r(448));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default},3167:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)},t.fullWidth=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=t.fullWidth=/[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/},3181:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)(e),e.replace(new RegExp("[^".concat(t,"]+"),"g"),"")};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},3220:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(e);var t=Number(e.slice(-1));return i.test(e)&&t===(r=e,n=10-r.slice(0,-1).split("").map((function(e,t){return Number(e)*function(e,t){return e===s||e===a?t%2==0?3:1:t%2==0?1:3}(r.length,t)})).reduce((function(e,t){return e+t}),0)%10,n<10?n:0);var r,n};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=8,a=14,i=/^(\d{8}|\d{13}|\d{14})$/;e.exports=t.default,e.exports.default=t.default},3224:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return null==e},e.exports=t.default,e.exports.default=t.default},3350:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e);var r=t?"\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F":"\\x00-\\x1F\\x7F";return(0,o.default)(e,r)};var n=s(r(8354)),o=s(r(3099));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default},3353:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e);var r=!1===(t=t||{}).allow_leading_zeroes?a:i,s=!t.hasOwnProperty("min")||(0,o.default)(t.min)||e>=t.min,c=!t.hasOwnProperty("max")||(0,o.default)(t.max)||e<=t.max,u=!t.hasOwnProperty("lt")||(0,o.default)(t.lt)||e<t.lt,l=!t.hasOwnProperty("gt")||(0,o.default)(t.gt)||e>t.gt;return r.test(e)&&s&&c&&u&&l};var n=s(r(8354)),o=s(r(3224));function s(e){return e&&e.__esModule?e:{default:e}}var a=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,i=/^[-+]?[0-9]+$/;e.exports=t.default,e.exports.default=t.default},3382:(e,t,r)=>{const n=r(7784);e.exports=(e,t)=>new n(e,t).major},3422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)(e),parseInt(e,t||10)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},3511:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)||a.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(bc1|tb1|bc1p|tb1p)[ac-hj-np-z02-9]{39,58}$/,a=/^(1|2|3|m)[A-HJ-NP-Za-km-z1-9]{25,39}$/;e.exports=t.default,e.exports.default=t.default},3579:(e,t,r)=>{const n=r(532);e.exports=(e,t,r)=>0!==n(e,t,r)},3607:e=>{const t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},3650:(e,t,r)=>{const n=r(7784);e.exports=(e,t)=>new n(e,t).minor},3673:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r;if((0,n.default)(e),"[object Array]"===Object.prototype.toString.call(t)){var s=[];for(r in t)({}).hasOwnProperty.call(t,r)&&(s[r]=(0,o.default)(t[r]));return s.indexOf(e)>=0}if("object"===a(t))return t.hasOwnProperty(e);if(t&&"function"==typeof t.indexOf)return t.indexOf(e)>=0;return!1};var n=s(r(8354)),o=s(r(1069));function s(e){return e&&e.__esModule?e:{default:e}}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}e.exports=t.default,e.exports.default=t.default},3705:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),e===e.toLowerCase()};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},3720:(e,t,r)=>{const n=r(2859);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},3751:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,o.default)(e),t)return"1"===e||/^true$/i.test(e);return"0"!==e&&!/^false$/i.test(e)&&""!==e};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},3880:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,s.default)(e),0!==e.indexOf("mailto:"))return!1;var r=i(e.replace("mailto:","").split("?"),2),a=r[0],u=r[1],l=void 0===u?"":u;if(!a&&!l)return!0;var d=function(e){var t=new Set(["subject","body","cc","bcc"]),r={cc:"",bcc:""},n=!1,o=e.split("&");if(o.length>4)return!1;var s,a=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,i=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,s=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw s}}}}(o);try{for(a.s();!(s=a.n()).done;){var u=i(s.value.split("="),2),l=u[0],d=u[1];if(l&&!t.has(l)){n=!0;break}!d||"cc"!==l&&"bcc"!==l||(r[l]=d),l&&t.delete(l)}}catch(e){a.e(e)}finally{a.f()}return!n&&r}(l);if(!d)return!1;return"".concat(a,",").concat(d.cc,",").concat(d.bcc).split(",").every((function(e){return!(e=(0,n.default)(e," "))||(0,o.default)(e,t)}))};var n=a(r(3146)),o=a(r(4156)),s=a(r(8354));function a(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,s,a,i=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=s.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return i}}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}e.exports=t.default,e.exports.default=t.default},3889:(e,t,r)=>{const n=r(5441);e.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))},3911:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(0x)[0-9a-f]{40}$/i;e.exports=t.default,e.exports.default=t.default},3943:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(0x|0h)?[0-9A-F]+$/i;e.exports=t.default,e.exports.default=t.default},4063:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,o.default)(e),t in s)return s[t](e);if("any"===t){for(var r in s){if((0,s[r])(e))return!0}return!1}throw new Error("Invalid locale '".concat(t,"'"))};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s={"cs-CZ":function(e){return/^(([ABCDEFHIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(e)},"de-DE":function(e){return/^((A|AA|AB|AC|AE|AH|AK|AM|AN|AÖ|AP|AS|AT|AU|AW|AZ|B|BA|BB|BC|BE|BF|BH|BI|BK|BL|BM|BN|BO|BÖ|BS|BT|BZ|C|CA|CB|CE|CO|CR|CW|D|DA|DD|DE|DH|DI|DL|DM|DN|DO|DU|DW|DZ|E|EA|EB|ED|EE|EF|EG|EH|EI|EL|EM|EN|ER|ES|EU|EW|F|FB|FD|FF|FG|FI|FL|FN|FO|FR|FS|FT|FÜ|FW|FZ|G|GA|GC|GD|GE|GF|GG|GI|GK|GL|GM|GN|GÖ|GP|GR|GS|GT|GÜ|GV|GW|GZ|H|HA|HB|HC|HD|HE|HF|HG|HH|HI|HK|HL|HM|HN|HO|HP|HR|HS|HU|HV|HX|HY|HZ|IK|IL|IN|IZ|J|JE|JL|K|KA|KB|KC|KE|KF|KG|KH|KI|KK|KL|KM|KN|KO|KR|KS|KT|KU|KW|KY|L|LA|LB|LC|LD|LF|LG|LH|LI|LL|LM|LN|LÖ|LP|LR|LU|M|MA|MB|MC|MD|ME|MG|MH|MI|MK|ML|MM|MN|MO|MQ|MR|MS|MÜ|MW|MY|MZ|N|NB|ND|NE|NF|NH|NI|NK|NM|NÖ|NP|NR|NT|NU|NW|NY|NZ|OA|OB|OC|OD|OE|OF|OG|OH|OK|OL|OP|OS|OZ|P|PA|PB|PE|PF|PI|PL|PM|PN|PR|PS|PW|PZ|R|RA|RC|RD|RE|RG|RH|RI|RL|RM|RN|RO|RP|RS|RT|RU|RV|RW|RZ|S|SB|SC|SE|SG|SI|SK|SL|SM|SN|SO|SP|SR|ST|SU|SW|SY|SZ|TE|TF|TG|TO|TP|TR|TS|TT|TÜ|ÜB|UE|UH|UL|UM|UN|V|VB|VG|VK|VR|VS|W|WA|WB|WE|WF|WI|WK|WL|WM|WN|WO|WR|WS|WT|WÜ|WW|WZ|Z|ZE|ZI|ZP|ZR|ZW|ZZ)[- ]?[A-Z]{1,2}[- ]?\d{1,4}|(ABG|ABI|AIB|AIC|ALF|ALZ|ANA|ANG|ANK|APD|ARN|ART|ASL|ASZ|AUR|AZE|BAD|BAR|BBG|BCH|BED|BER|BGD|BGL|BID|BIN|BIR|BIT|BIW|BKS|BLB|BLK|BNA|BOG|BOH|BOR|BOT|BRA|BRB|BRG|BRK|BRL|BRV|BSB|BSK|BTF|BÜD|BUL|BÜR|BÜS|BÜZ|CAS|CHA|CLP|CLZ|COC|COE|CUX|DAH|DAN|DAU|DBR|DEG|DEL|DGF|DIL|DIN|DIZ|DKB|DLG|DON|DUD|DÜW|EBE|EBN|EBS|ECK|EIC|EIL|EIN|EIS|EMD|EMS|ERB|ERH|ERK|ERZ|ESB|ESW|FDB|FDS|FEU|FFB|FKB|FLÖ|FOR|FRG|FRI|FRW|FTL|FÜS|GAN|GAP|GDB|GEL|GEO|GER|GHA|GHC|GLA|GMN|GNT|GOA|GOH|GRA|GRH|GRI|GRM|GRZ|GTH|GUB|GUN|GVM|HAB|HAL|HAM|HAS|HBN|HBS|HCH|HDH|HDL|HEB|HEF|HEI|HER|HET|HGN|HGW|HHM|HIG|HIP|HMÜ|HOG|HOH|HOL|HOM|HOR|HÖS|HOT|HRO|HSK|HST|HVL|HWI|IGB|ILL|JÜL|KEH|KEL|KEM|KIB|KLE|KLZ|KÖN|KÖT|KÖZ|KRU|KÜN|KUS|KYF|LAN|LAU|LBS|LBZ|LDK|LDS|LEO|LER|LEV|LIB|LIF|LIP|LÖB|LOS|LRO|LSZ|LÜN|LUP|LWL|MAB|MAI|MAK|MAL|MED|MEG|MEI|MEK|MEL|MER|MET|MGH|MGN|MHL|MIL|MKK|MOD|MOL|MON|MOS|MSE|MSH|MSP|MST|MTK|MTL|MÜB|MÜR|MYK|MZG|NAB|NAI|NAU|NDH|NEA|NEB|NEC|NEN|NES|NEW|NMB|NMS|NOH|NOL|NOM|NOR|NVP|NWM|OAL|OBB|OBG|OCH|OHA|ÖHR|OHV|OHZ|OPR|OSL|OVI|OVL|OVP|PAF|PAN|PAR|PCH|PEG|PIR|PLÖ|PRÜ|QFT|QLB|RDG|REG|REH|REI|RID|RIE|ROD|ROF|ROK|ROL|ROS|ROT|ROW|RSL|RÜD|RÜG|SAB|SAD|SAN|SAW|SBG|SBK|SCZ|SDH|SDL|SDT|SEB|SEE|SEF|SEL|SFB|SFT|SGH|SHA|SHG|SHK|SHL|SIG|SIM|SLE|SLF|SLK|SLN|SLS|SLÜ|SLZ|SMÜ|SOB|SOG|SOK|SÖM|SON|SPB|SPN|SRB|SRO|STA|STB|STD|STE|STL|SUL|SÜW|SWA|SZB|TBB|TDO|TET|TIR|TÖL|TUT|UEM|UER|UFF|USI|VAI|VEC|VER|VIB|VIE|VIT|VOH|WAF|WAK|WAN|WAR|WAT|WBS|WDA|WEL|WEN|WER|WES|WHV|WIL|WIS|WIT|WIZ|WLG|WMS|WND|WOB|WOH|WOL|WOR|WOS|WRN|WSF|WST|WSW|WTL|WTM|WUG|WÜM|WUN|WUR|WZL|ZEL|ZIG)[- ]?(([A-Z][- ]?\d{1,4})|([A-Z]{2}[- ]?\d{1,3})))[- ]?(E|H)?$/.test(e)},"de-LI":function(e){return/^FL[- ]?\d{1,5}[UZ]?$/.test(e)},"en-IN":function(e){return/^[A-Z]{2}[ -]?[0-9]{1,2}(?:[ -]?[A-Z])(?:[ -]?[A-Z]*)?[ -]?[0-9]{4}$/.test(e)},"en-SG":function(e){return/^[A-Z]{3}[ -]?[\d]{4}[ -]?[A-Z]{1}$/.test(e)},"es-AR":function(e){return/^(([A-Z]{2} ?[0-9]{3} ?[A-Z]{2})|([A-Z]{3} ?[0-9]{3}))$/.test(e)},"fi-FI":function(e){return/^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(e)},"hu-HU":function(e){return/^((((?!AAA)(([A-NPRSTVZWXY]{1})([A-PR-Z]{1})([A-HJ-NPR-Z]))|(A[ABC]I)|A[ABC]O|A[A-W]Q|BPI|BPO|UCO|UDO|XAO)-(?!000)\d{3})|(M\d{6})|((CK|DT|CD|HC|H[ABEFIKLMNPRSTVX]|MA|OT|R[A-Z]) \d{2}-\d{2})|(CD \d{3}-\d{3})|(C-(C|X) \d{4})|(X-(A|B|C) \d{4})|(([EPVZ]-\d{5}))|(S A[A-Z]{2} \d{2})|(SP \d{2}-\d{2}))$/.test(e)},"pt-BR":function(e){return/^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(e)},"pt-PT":function(e){return/^(([A-Z]{2}[ -·]?[0-9]{2}[ -·]?[0-9]{2})|([0-9]{2}[ -·]?[A-Z]{2}[ -·]?[0-9]{2})|([0-9]{2}[ -·]?[0-9]{2}[ -·]?[A-Z]{2})|([A-Z]{2}[ -·]?[0-9]{2}[ -·]?[A-Z]{2}))$/.test(e)},"sq-AL":function(e){return/^[A-Z]{2}[- ]?((\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\d{3}))$/.test(e)},"sv-SE":function(e){return/^[A-HJ-PR-UW-Z]{3} ?[\d]{2}[A-HJ-PR-UW-Z1-9]$|(^[A-ZÅÄÖ ]{2,7}$)/.test(e.trim())},"en-PK":function(e){return/(^[A-Z]{2}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{3}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]{4}((\s|-){0,1})[0-9]{3,4}((\s|-)[0-9]{2}){0,1}$)|(^[A-Z]((\s|-){0,1})[0-9]{4}((\s|-)[0-9]{2}){0,1}$)/.test(e.trim())}};e.exports=t.default,e.exports.default=t.default},4078:(e,t,r)=>{var n=r(7186),o=n,s="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==s&&s||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")();o.exportSymbol("TronWebProto.VoteWitnessContract",null,s),o.exportSymbol("TronWebProto.VoteWitnessContract.Vote",null,s),o.exportSymbol("TronWebProto.WitnessCreateContract",null,s),o.exportSymbol("TronWebProto.WitnessUpdateContract",null,s),TronWebProto.WitnessCreateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.WitnessCreateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.WitnessCreateContract.displayName="TronWebProto.WitnessCreateContract"),TronWebProto.WitnessUpdateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.WitnessUpdateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.WitnessUpdateContract.displayName="TronWebProto.WitnessUpdateContract"),TronWebProto.VoteWitnessContract=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.VoteWitnessContract.repeatedFields_,null)},o.inherits(TronWebProto.VoteWitnessContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.VoteWitnessContract.displayName="TronWebProto.VoteWitnessContract"),TronWebProto.VoteWitnessContract.Vote=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.VoteWitnessContract.Vote,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.VoteWitnessContract.Vote.displayName="TronWebProto.VoteWitnessContract.Vote"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.WitnessCreateContract.prototype.toObject=function(e){return TronWebProto.WitnessCreateContract.toObject(e,this)},TronWebProto.WitnessCreateContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),url:t.getUrl_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.WitnessCreateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.WitnessCreateContract;return TronWebProto.WitnessCreateContract.deserializeBinaryFromReader(r,t)},TronWebProto.WitnessCreateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setUrl(r);break;default:t.skipField()}}return e},TronWebProto.WitnessCreateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.WitnessCreateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.WitnessCreateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getUrl_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.WitnessCreateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.WitnessCreateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.WitnessCreateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.WitnessCreateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.WitnessCreateContract.prototype.getUrl=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.WitnessCreateContract.prototype.getUrl_asB64=function(){return n.Message.bytesAsB64(this.getUrl())},TronWebProto.WitnessCreateContract.prototype.getUrl_asU8=function(){return n.Message.bytesAsU8(this.getUrl())},TronWebProto.WitnessCreateContract.prototype.setUrl=function(e){return n.Message.setProto3BytesField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.WitnessUpdateContract.prototype.toObject=function(e){return TronWebProto.WitnessUpdateContract.toObject(e,this)},TronWebProto.WitnessUpdateContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),updateUrl:t.getUpdateUrl_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.WitnessUpdateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.WitnessUpdateContract;return TronWebProto.WitnessUpdateContract.deserializeBinaryFromReader(r,t)},TronWebProto.WitnessUpdateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 12:r=t.readBytes();e.setUpdateUrl(r);break;default:t.skipField()}}return e},TronWebProto.WitnessUpdateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.WitnessUpdateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.WitnessUpdateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getUpdateUrl_asU8()).length>0&&t.writeBytes(12,r)},TronWebProto.WitnessUpdateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.WitnessUpdateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.WitnessUpdateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.WitnessUpdateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.WitnessUpdateContract.prototype.getUpdateUrl=function(){return n.Message.getFieldWithDefault(this,12,"")},TronWebProto.WitnessUpdateContract.prototype.getUpdateUrl_asB64=function(){return n.Message.bytesAsB64(this.getUpdateUrl())},TronWebProto.WitnessUpdateContract.prototype.getUpdateUrl_asU8=function(){return n.Message.bytesAsU8(this.getUpdateUrl())},TronWebProto.WitnessUpdateContract.prototype.setUpdateUrl=function(e){return n.Message.setProto3BytesField(this,12,e)},TronWebProto.VoteWitnessContract.repeatedFields_=[2],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.VoteWitnessContract.prototype.toObject=function(e){return TronWebProto.VoteWitnessContract.toObject(e,this)},TronWebProto.VoteWitnessContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),votesList:n.Message.toObjectList(t.getVotesList(),TronWebProto.VoteWitnessContract.Vote.toObject,e),support:n.Message.getBooleanFieldWithDefault(t,3,!1)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.VoteWitnessContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.VoteWitnessContract;return TronWebProto.VoteWitnessContract.deserializeBinaryFromReader(r,t)},TronWebProto.VoteWitnessContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=new TronWebProto.VoteWitnessContract.Vote;t.readMessage(r,TronWebProto.VoteWitnessContract.Vote.deserializeBinaryFromReader),e.addVotes(r);break;case 3:r=t.readBool();e.setSupport(r);break;default:t.skipField()}}return e},TronWebProto.VoteWitnessContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.VoteWitnessContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.VoteWitnessContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getVotesList()).length>0&&t.writeRepeatedMessage(2,r,TronWebProto.VoteWitnessContract.Vote.serializeBinaryToWriter),(r=e.getSupport())&&t.writeBool(3,r)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.VoteWitnessContract.Vote.prototype.toObject=function(e){return TronWebProto.VoteWitnessContract.Vote.toObject(e,this)},TronWebProto.VoteWitnessContract.Vote.toObject=function(e,t){var r={voteAddress:t.getVoteAddress_asB64(),voteCount:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.VoteWitnessContract.Vote.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.VoteWitnessContract.Vote;return TronWebProto.VoteWitnessContract.Vote.deserializeBinaryFromReader(r,t)},TronWebProto.VoteWitnessContract.Vote.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setVoteAddress(r);break;case 2:r=t.readInt64();e.setVoteCount(r);break;default:t.skipField()}}return e},TronWebProto.VoteWitnessContract.Vote.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.VoteWitnessContract.Vote.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.VoteWitnessContract.Vote.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getVoteAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getVoteCount())&&t.writeInt64(2,r)},TronWebProto.VoteWitnessContract.Vote.prototype.getVoteAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.VoteWitnessContract.Vote.prototype.getVoteAddress_asB64=function(){return n.Message.bytesAsB64(this.getVoteAddress())},TronWebProto.VoteWitnessContract.Vote.prototype.getVoteAddress_asU8=function(){return n.Message.bytesAsU8(this.getVoteAddress())},TronWebProto.VoteWitnessContract.Vote.prototype.setVoteAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.VoteWitnessContract.Vote.prototype.getVoteCount=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.VoteWitnessContract.Vote.prototype.setVoteCount=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.VoteWitnessContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.VoteWitnessContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.VoteWitnessContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.VoteWitnessContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.VoteWitnessContract.prototype.getVotesList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.VoteWitnessContract.Vote,2)},TronWebProto.VoteWitnessContract.prototype.setVotesList=function(e){return n.Message.setRepeatedWrapperField(this,2,e)},TronWebProto.VoteWitnessContract.prototype.addVotes=function(e,t){return n.Message.addToRepeatedWrapperField(this,2,e,TronWebProto.VoteWitnessContract.Vote,t)},TronWebProto.VoteWitnessContract.prototype.clearVotesList=function(){return this.setVotesList([])},TronWebProto.VoteWitnessContract.prototype.getSupport=function(){return n.Message.getBooleanFieldWithDefault(this,3,!1)},TronWebProto.VoteWitnessContract.prototype.setSupport=function(e){return n.Message.setProto3BooleanField(this,3,e)},o.object.extend(t,TronWebProto)},4121:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),!e||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;if((t=(0,c.default)(t,d)).validate_length&&e.length>t.max_allowed_length)return!1;if(!t.allow_fragments&&(0,s.default)(e,"#"))return!1;if(!t.allow_query_components&&((0,s.default)(e,"?")||(0,s.default)(e,"&")))return!1;var r,u,p,h,g,y,m,b;m=e.split("#"),e=m.shift(),m=e.split("?");var w=(e=m.shift()).match(/^([a-z][a-z0-9+\-.]*):/i),T=!1,A=function(n){return T=!0,r=n.toLowerCase(),(!t.require_valid_protocol||-1!==t.protocols.indexOf(r))&&e.substring(w[0].length)};if(w){var v=w[1],P=e.substring(w[0].length);if("//"===P.slice(0,2)){if(!1===(e=A(v)))return!1}else{var E=P.indexOf("/"),C=-1===E?P:P.substring(0,E),B=C.indexOf("@");if(-1!==B){var W=C.substring(0,B);if(/^[a-zA-Z0-9\-_.%:]*$/.test(W)){if(t.require_protocol)return!1}else if(!1===(e=A(v)))return!1}else if(!1===(e=A(v)))return!1}}else if(t.require_protocol)return!1;if("//"===e.slice(0,2)){if(!T&&!t.allow_protocol_relative_urls)return!1;e=e.slice(2)}if(""===e)return!1;if(m=e.split("/"),""===(e=m.shift())&&!t.require_host)return!0;if((m=e.split("@")).length>1){if(t.disallow_auth)return!1;if(""===m[0])return!1;if((u=m.shift()).indexOf(":")>=0&&u.split(":").length>2)return!1;var S=u.split(":"),I=(M=2,function(e){if(Array.isArray(e))return e}(R=S)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,s,a,i=[],c=!0,u=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=s.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return i}}(R,M)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(R,M)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),_=I[0],O=I[1];if(""===_&&""===O)return!1}var R,M;h=m.join("@"),y=null,b=null;var x=h.match(f);x?(p="",b=x[1],y=x[2]||null):(p=(m=h.split(":")).shift(),m.length&&(y=m.join(":")));if(null!==y&&y.length>0){if(g=parseInt(y,10),!/^[0-9]+$/.test(y)||g<=0||g>65535)return!1}else if(t.require_port)return!1;if(t.host_whitelist)return(0,o.default)(p,t.host_whitelist);if(""===p&&!t.require_host)return!0;if(!((0,i.default)(p)||(0,a.default)(p,t)||b&&(0,i.default)(b,6)))return!1;if(p=p||b,t.host_blacklist&&(0,o.default)(p,t.host_blacklist))return!1;return!0};var n=u(r(8354)),o=u(r(8755)),s=u(r(4865)),a=u(r(1881)),i=u(r(6331)),c=u(r(2533));function u(e){return e&&e.__esModule?e:{default:e}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var d={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},f=/^\[([^\]]+)\](?::([0-9]+))?$/;e.exports=t.default,e.exports.default=t.default},4144:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(e);for(var r=e.length-1;r>=0;r--)if(-1===t.indexOf(e[r]))return!1;return!0};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},4156:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),(t=(0,c.default)(t,l)).require_display_name||t.allow_display_name){var r=e.match(d);if(r){var u=r[1];if(e=e.replace(u,"").replace(/(^<|>$)/g,""),u.endsWith(" ")&&(u=u.slice(0,-1)),!function(e){var t=e.replace(/^"(.+)"$/,"$1");if(!t.trim())return!1;if(/[\.";<>]/.test(t)){if(t===e)return!1;if(!(t.split('"').length===t.split('\\"').length))return!1}return!0}(u))return!1}else if(t.require_display_name)return!1}if(!t.ignore_max_length&&e.length>m)return!1;var b=e.split("@"),w=b.pop(),T=w.toLowerCase();if(t.host_blacklist.length>0&&(0,o.default)(T,t.host_blacklist))return!1;if(t.host_whitelist.length>0&&!(0,o.default)(T,t.host_whitelist))return!1;var A=b.join("@");if(t.domain_specific_validation&&("gmail.com"===T||"googlemail.com"===T)){var v=(A=A.toLowerCase()).split("+")[0];if(!(0,s.default)(v.replace(/\./g,""),{min:6,max:30}))return!1;for(var P=v.split("."),E=0;E<P.length;E++)if(!p.test(P[E]))return!1}if(!(!1!==t.ignore_max_length||(0,s.default)(A,{max:64})&&(0,s.default)(w,{max:254})))return!1;if(!(0,a.default)(w,{require_tld:t.require_tld,ignore_max_length:t.ignore_max_length,allow_underscores:t.allow_underscores})){if(!t.allow_ip_domain)return!1;if(!(0,i.default)(w)){if(!w.startsWith("[")||!w.endsWith("]"))return!1;var C=w.slice(1,-1);if(0===C.length||!(0,i.default)(C))return!1}}if(t.blacklisted_chars&&-1!==A.search(new RegExp("[".concat(t.blacklisted_chars,"]+"),"g")))return!1;if('"'===A[0]&&'"'===A[A.length-1])return A=A.slice(1,A.length-1),t.allow_utf8_local_part?y.test(A):h.test(A);for(var B=t.allow_utf8_local_part?g:f,W=A.split("."),S=0;S<W.length;S++)if(!B.test(W[S]))return!1;return!0};var n=u(r(8354)),o=u(r(8755)),s=u(r(7900)),a=u(r(1881)),i=u(r(6331)),c=u(r(2533));function u(e){return e&&e.__esModule?e:{default:e}}var l={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},d=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,f=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,p=/^[a-z\d]+$/,h=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,g=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,y=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,m=254;e.exports=t.default,e.exports.default=t.default},4269:(e,t,r)=>{const n=r(1636);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},4300:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),d.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s="(([a-zA-Z]{2,3}(-".concat("([A-Za-z]{3}(-[A-Za-z]{3}){0,2})",")?)|([a-zA-Z]{5,8}))"),a="(".concat("(\\d|[A-W]|[Y-Z]|[a-w]|[y-z])","(-[A-Za-z0-9]{2,8})+)"),i="(x(-[A-Za-z0-9]{1,8})+)",c="(".concat("((en-GB-oed)|(i-ami)|(i-bnn)|(i-default)|(i-enochian)|(i-hak)|(i-klingon)|(i-lux)|(i-mingo)|(i-navajo)|(i-pwn)|(i-tao)|(i-tay)|(i-tsu)|(sgn-BE-FR)|(sgn-BE-NL)|(sgn-CH-DE))","|").concat("((art-lojban)|(cel-gaulish)|(no-bok)|(no-nyn)|(zh-guoyu)|(zh-hakka)|(zh-min)|(zh-min-nan)|(zh-xiang))",")"),u="(-|_)",l="".concat(s,"(").concat(u).concat("([A-Za-z]{4})",")?(").concat(u).concat("([A-Za-z]{2}|\\d{3})",")?(").concat(u).concat("([A-Za-z0-9]{5,8}|(\\d[A-Z-a-z0-9]{3}))",")*(").concat(u).concat(a,")*(").concat(u).concat(i,")?"),d=new RegExp("(^".concat(i,"$)|(^").concat(c,"$)|(^").concat(l,"$)"));e.exports=t.default,e.exports.default=t.default},4335:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CurrencyCodes=void 0,t.default=function(e){return(0,o.default)(e),s.has(e.toUpperCase())};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=new Set(["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLE","SLL","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UYW","UZS","VED","VES","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"]);t.CurrencyCodes=s},4390:e=>{e.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}},4429:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(e);var r=e.replace(/\s/g,"").toUpperCase();return t.toUpperCase()in s&&s[t].test(r)},t.locales=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s={AM:/^[A-Z]{2}\d{7}$/,AR:/^[A-Z]{3}\d{6}$/,AT:/^[A-Z]\d{7}$/,AU:/^[A-Z]\d{7}$/,AZ:/^[A-Z]{1}\d{8}$/,BE:/^[A-Z]{2}\d{6}$/,BG:/^\d{9}$/,BR:/^[A-Z]{2}\d{6}$/,BY:/^[A-Z]{2}\d{7}$/,CA:/^[A-Z]{2}\d{6}$|^[A-Z]\d{6}[A-Z]{2}$/,CH:/^[A-Z]\d{7}$/,CN:/^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/,CY:/^[A-Z](\d{6}|\d{8})$/,CZ:/^\d{8}$/,DE:/^[CFGHJKLMNPRTVWXYZ0-9]{9}$/,DK:/^\d{9}$/,DZ:/^\d{9}$/,EE:/^([A-Z]\d{7}|[A-Z]{2}\d{7})$/,ES:/^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/,FI:/^[A-Z]{2}\d{7}$/,FR:/^\d{2}[A-Z]{2}\d{5}$/,GB:/^\d{9}$/,GR:/^[A-Z]{2}\d{7}$/,HR:/^\d{9}$/,HU:/^[A-Z]{2}(\d{6}|\d{7})$/,IE:/^[A-Z0-9]{2}\d{7}$/,IN:/^[A-Z]{1}-?\d{7}$/,ID:/^[A-C]\d{7}$/,IR:/^[A-Z]\d{8}$/,IS:/^(A)\d{7}$/,IT:/^[A-Z0-9]{2}\d{7}$/,JM:/^[Aa]\d{7}$/,JP:/^[A-Z]{2}\d{7}$/,KR:/^[MS]\d{8}$/,KZ:/^[a-zA-Z]\d{7}$/,LI:/^[a-zA-Z]\d{5}$/,LT:/^[A-Z0-9]{8}$/,LU:/^[A-Z0-9]{8}$/,LV:/^[A-Z0-9]{2}\d{7}$/,LY:/^[A-Z0-9]{8}$/,MT:/^\d{7}$/,MZ:/^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/,MY:/^[AHK]\d{8}$/,MX:/^\d{10,11}$/,NL:/^[A-Z]{2}[A-Z0-9]{6}\d$/,NZ:/^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\d{6}$/,PH:/^([A-Z](\d{6}|\d{7}[A-Z]))|([A-Z]{2}(\d{6}|\d{7}))$/,PK:/^[A-Z]{2}\d{7}$/,PL:/^[A-Z]{2}\d{7}$/,PT:/^[A-Z]\d{6}$/,RO:/^\d{8,9}$/,RU:/^\d{9}$/,SE:/^\d{8}$/,SL:/^(P)[A-Z]\d{7}$/,SK:/^[0-9A-Z]\d{7}$/,TH:/^[A-Z]{1,2}\d{6,7}$/,TR:/^[A-Z]\d{8}$/,UA:/^[A-Z]{2}\d{6}$/,US:/^\d{9}$|^[A-Z]\d{8}$/,ZA:/^[TAMD]\d{8}$/};t.locales=Object.keys(s)},4438:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,o.default)(e),s.test(e))return!0;return!1};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[A-HJ-NP-Za-km-z1-9]*$/;e.exports=t.default,e.exports.default=t.default},4468:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;if((0,n.default)(e),t.loose)return(0,o.default)(c,e.toLowerCase());return(0,o.default)(i,e)};var n=s(r(8354)),o=s(r(567));function s(e){return e&&e.__esModule?e:{default:e}}var a={loose:!1},i=["true","false","1","0"],c=[].concat(i,["yes","no"]);e.exports=t.default,e.exports.default=t.default},4545:(e,t,r)=>{const n=r(946),o=r(4830),s=r(7784),a=r(5647),i=r(1636),c=r(4269),u=r(5338),l=r(7651),d=r(1092),f=r(3382),p=r(3650),h=r(8993),g=r(2429),y=r(532),m=r(1406),b=r(2767),w=r(5441),T=r(4955),A=r(3889),v=r(5456),P=r(2615),E=r(8925),C=r(3579),B=r(5933),W=r(2436),S=r(835),I=r(5478),_=r(8308),O=r(2859),R=r(8346),M=r(2619),x=r(9760),F=r(5578),k=r(7217),N=r(7814),U=r(8247),D=r(6255),L=r(6298),$=r(3720),z=r(1049),j=r(5716);e.exports={parse:i,valid:c,clean:u,inc:l,diff:d,major:f,minor:p,patch:h,prerelease:g,compare:y,rcompare:m,compareLoose:b,compareBuild:w,sort:T,rsort:A,gt:v,lt:P,eq:E,neq:C,gte:B,lte:W,cmp:S,coerce:I,Comparator:_,Range:O,satisfies:R,toComparators:M,maxSatisfying:x,minSatisfying:F,minVersion:k,validRange:N,outside:U,gtr:D,ltr:L,intersects:$,simplifyRange:z,subset:j,SemVer:s,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:o.SEMVER_SPEC_VERSION,RELEASE_TYPES:o.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}},4583:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,o.default)(e),t&&t.no_symbols)return a.test(e);return new RegExp("^[+-]?([0-9]*[".concat((t||{}).locale?s.decimal[t.locale]:".","])?[0-9]+$")).test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n},s=r(7640);var a=/^[0-9]+$/;e.exports=t.default,e.exports.default=t.default},4608:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.has(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=new Set(["aa","ab","ae","af","ak","am","an","ar","as","av","ay","az","az","ba","be","bg","bh","bi","bm","bn","bo","br","bs","ca","ce","ch","co","cr","cs","cu","cv","cy","da","de","dv","dz","ee","el","en","eo","es","et","eu","fa","ff","fi","fj","fo","fr","fy","ga","gd","gl","gn","gu","gv","ha","he","hi","ho","hr","ht","hu","hy","hz","ia","id","ie","ig","ii","ik","io","is","it","iu","ja","jv","ka","kg","ki","kj","kk","kl","km","kn","ko","kr","ks","ku","kv","kw","ky","la","lb","lg","li","ln","lo","lt","lu","lv","mg","mh","mi","mk","ml","mn","mr","ms","mt","my","na","nb","nd","ne","ng","nl","nn","no","nr","nv","ny","oc","oj","om","or","os","pa","pi","pl","ps","pt","qu","rm","rn","ro","ru","rw","sa","sc","sd","se","sg","si","sk","sl","sm","sn","so","sq","sr","ss","st","su","sv","sw","ta","te","tg","th","ti","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","wo","xh","yi","yo","za","zh","zu"]);e.exports=t.default,e.exports.default=t.default},4685:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),(0,o.default)(e)&&24===e.length};var n=s(r(8354)),o=s(r(3943));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default},4781:(e,t,r)=>{var n=r(7186),o="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==o&&o||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")();n.exportSymbol("TronWebProto.ResourceCode",null,o),TronWebProto.ResourceCode={BANDWIDTH:0,ENERGY:1,TRON_POWER:2},n.object.extend(t,TronWebProto)},4830:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},4856:(e,t,r)=>{var n=r(7186),o=n,s="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==s&&s||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")(),a=r(5358);o.object.extend(proto,a),o.exportSymbol("TronWebProto.Account",null,s),o.exportSymbol("TronWebProto.Account.AccountResource",null,s),o.exportSymbol("TronWebProto.Account.Frozen",null,s),o.exportSymbol("TronWebProto.AccountId",null,s),o.exportSymbol("TronWebProto.AccountType",null,s),o.exportSymbol("TronWebProto.DelegatedResource",null,s),o.exportSymbol("TronWebProto.Exchange",null,s),o.exportSymbol("TronWebProto.Key",null,s),o.exportSymbol("TronWebProto.MarketOrderDetail",null,s),o.exportSymbol("TronWebProto.Permission",null,s),o.exportSymbol("TronWebProto.Permission.PermissionType",null,s),o.exportSymbol("TronWebProto.Proposal",null,s),o.exportSymbol("TronWebProto.Proposal.State",null,s),o.exportSymbol("TronWebProto.Transaction",null,s),o.exportSymbol("TronWebProto.Transaction.Contract",null,s),o.exportSymbol("TronWebProto.Transaction.Contract.ContractType",null,s),o.exportSymbol("TronWebProto.Transaction.Result",null,s),o.exportSymbol("TronWebProto.Transaction.Result.code",null,s),o.exportSymbol("TronWebProto.Transaction.Result.contractResult",null,s),o.exportSymbol("TronWebProto.Transaction.raw",null,s),o.exportSymbol("TronWebProto.Vote",null,s),o.exportSymbol("TronWebProto.Votes",null,s),o.exportSymbol("TronWebProto.Witness",null,s),o.exportSymbol("TronWebProto.authority",null,s),TronWebProto.AccountId=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountId,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountId.displayName="TronWebProto.AccountId"),TronWebProto.Vote=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Vote,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Vote.displayName="TronWebProto.Vote"),TronWebProto.Proposal=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Proposal.repeatedFields_,null)},o.inherits(TronWebProto.Proposal,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Proposal.displayName="TronWebProto.Proposal"),TronWebProto.Exchange=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Exchange,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Exchange.displayName="TronWebProto.Exchange"),TronWebProto.Account=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Account.repeatedFields_,null)},o.inherits(TronWebProto.Account,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Account.displayName="TronWebProto.Account"),TronWebProto.Account.Frozen=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Account.Frozen,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Account.Frozen.displayName="TronWebProto.Account.Frozen"),TronWebProto.Account.AccountResource=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Account.AccountResource,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Account.AccountResource.displayName="TronWebProto.Account.AccountResource"),TronWebProto.Key=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Key,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Key.displayName="TronWebProto.Key"),TronWebProto.DelegatedResource=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.DelegatedResource,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.DelegatedResource.displayName="TronWebProto.DelegatedResource"),TronWebProto.authority=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.authority,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.authority.displayName="TronWebProto.authority"),TronWebProto.Permission=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Permission.repeatedFields_,null)},o.inherits(TronWebProto.Permission,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Permission.displayName="TronWebProto.Permission"),TronWebProto.Witness=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Witness,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Witness.displayName="TronWebProto.Witness"),TronWebProto.Votes=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Votes.repeatedFields_,null)},o.inherits(TronWebProto.Votes,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Votes.displayName="TronWebProto.Votes"),TronWebProto.MarketOrderDetail=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.MarketOrderDetail,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.MarketOrderDetail.displayName="TronWebProto.MarketOrderDetail"),TronWebProto.Transaction=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Transaction.repeatedFields_,null)},o.inherits(TronWebProto.Transaction,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Transaction.displayName="TronWebProto.Transaction"),TronWebProto.Transaction.Contract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Transaction.Contract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Transaction.Contract.displayName="TronWebProto.Transaction.Contract"),TronWebProto.Transaction.Result=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Transaction.Result.repeatedFields_,null)},o.inherits(TronWebProto.Transaction.Result,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Transaction.Result.displayName="TronWebProto.Transaction.Result"),TronWebProto.Transaction.raw=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Transaction.raw.repeatedFields_,null)},o.inherits(TronWebProto.Transaction.raw,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Transaction.raw.displayName="TronWebProto.Transaction.raw"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountId.prototype.toObject=function(e){return TronWebProto.AccountId.toObject(e,this)},TronWebProto.AccountId.toObject=function(e,t){var r={name:t.getName_asB64(),address:t.getAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountId.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountId;return TronWebProto.AccountId.deserializeBinaryFromReader(r,t)},TronWebProto.AccountId.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setName(r);break;case 2:r=t.readBytes();e.setAddress(r);break;default:t.skipField()}}return e},TronWebProto.AccountId.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountId.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountId.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getName_asU8()).length>0&&t.writeBytes(1,r),(r=e.getAddress_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.AccountId.prototype.getName=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.AccountId.prototype.getName_asB64=function(){return n.Message.bytesAsB64(this.getName())},TronWebProto.AccountId.prototype.getName_asU8=function(){return n.Message.bytesAsU8(this.getName())},TronWebProto.AccountId.prototype.setName=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.AccountId.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.AccountId.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.AccountId.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.AccountId.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Vote.prototype.toObject=function(e){return TronWebProto.Vote.toObject(e,this)},TronWebProto.Vote.toObject=function(e,t){var r={voteAddress:t.getVoteAddress_asB64(),voteCount:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Vote.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Vote;return TronWebProto.Vote.deserializeBinaryFromReader(r,t)},TronWebProto.Vote.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setVoteAddress(r);break;case 2:r=t.readInt64();e.setVoteCount(r);break;default:t.skipField()}}return e},TronWebProto.Vote.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Vote.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Vote.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getVoteAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getVoteCount())&&t.writeInt64(2,r)},TronWebProto.Vote.prototype.getVoteAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.Vote.prototype.getVoteAddress_asB64=function(){return n.Message.bytesAsB64(this.getVoteAddress())},TronWebProto.Vote.prototype.getVoteAddress_asU8=function(){return n.Message.bytesAsU8(this.getVoteAddress())},TronWebProto.Vote.prototype.setVoteAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Vote.prototype.getVoteCount=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Vote.prototype.setVoteCount=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.Proposal.repeatedFields_=[6],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Proposal.prototype.toObject=function(e){return TronWebProto.Proposal.toObject(e,this)},TronWebProto.Proposal.toObject=function(e,t){var r,o={proposalId:n.Message.getFieldWithDefault(t,1,0),proposerAddress:t.getProposerAddress_asB64(),parametersMap:(r=t.getParametersMap())?r.toObject(e,void 0):[],expirationTime:n.Message.getFieldWithDefault(t,4,0),createTime:n.Message.getFieldWithDefault(t,5,0),approvalsList:t.getApprovalsList_asB64(),state:n.Message.getFieldWithDefault(t,7,0)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.Proposal.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Proposal;return TronWebProto.Proposal.deserializeBinaryFromReader(r,t)},TronWebProto.Proposal.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setProposalId(r);break;case 2:r=t.readBytes();e.setProposerAddress(r);break;case 3:r=e.getParametersMap();t.readMessage(r,(function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readInt64,n.BinaryReader.prototype.readInt64,null,0,0)}));break;case 4:r=t.readInt64();e.setExpirationTime(r);break;case 5:r=t.readInt64();e.setCreateTime(r);break;case 6:r=t.readBytes();e.addApprovals(r);break;case 7:r=t.readEnum();e.setState(r);break;default:t.skipField()}}return e},TronWebProto.Proposal.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Proposal.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Proposal.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getProposalId())&&t.writeInt64(1,r),(r=e.getProposerAddress_asU8()).length>0&&t.writeBytes(2,r),(r=e.getParametersMap(!0))&&r.getLength()>0&&r.serializeBinary(3,t,n.BinaryWriter.prototype.writeInt64,n.BinaryWriter.prototype.writeInt64),0!==(r=e.getExpirationTime())&&t.writeInt64(4,r),0!==(r=e.getCreateTime())&&t.writeInt64(5,r),(r=e.getApprovalsList_asU8()).length>0&&t.writeRepeatedBytes(6,r),0!==(r=e.getState())&&t.writeEnum(7,r)},TronWebProto.Proposal.State={PENDING:0,DISAPPROVED:1,APPROVED:2,CANCELED:3},TronWebProto.Proposal.prototype.getProposalId=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Proposal.prototype.setProposalId=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.Proposal.prototype.getProposerAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.Proposal.prototype.getProposerAddress_asB64=function(){return n.Message.bytesAsB64(this.getProposerAddress())},TronWebProto.Proposal.prototype.getProposerAddress_asU8=function(){return n.Message.bytesAsU8(this.getProposerAddress())},TronWebProto.Proposal.prototype.setProposerAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.Proposal.prototype.getParametersMap=function(e){return n.Message.getMapField(this,3,e,null)},TronWebProto.Proposal.prototype.clearParametersMap=function(){return this.getParametersMap().clear(),this},TronWebProto.Proposal.prototype.getExpirationTime=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.Proposal.prototype.setExpirationTime=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.Proposal.prototype.getCreateTime=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.Proposal.prototype.setCreateTime=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.Proposal.prototype.getApprovalsList=function(){return n.Message.getRepeatedField(this,6)},TronWebProto.Proposal.prototype.getApprovalsList_asB64=function(){return n.Message.bytesListAsB64(this.getApprovalsList())},TronWebProto.Proposal.prototype.getApprovalsList_asU8=function(){return n.Message.bytesListAsU8(this.getApprovalsList())},TronWebProto.Proposal.prototype.setApprovalsList=function(e){return n.Message.setField(this,6,e||[])},TronWebProto.Proposal.prototype.addApprovals=function(e,t){return n.Message.addToRepeatedField(this,6,e,t)},TronWebProto.Proposal.prototype.clearApprovalsList=function(){return this.setApprovalsList([])},TronWebProto.Proposal.prototype.getState=function(){return n.Message.getFieldWithDefault(this,7,0)},TronWebProto.Proposal.prototype.setState=function(e){return n.Message.setProto3EnumField(this,7,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Exchange.prototype.toObject=function(e){return TronWebProto.Exchange.toObject(e,this)},TronWebProto.Exchange.toObject=function(e,t){var r={exchangeId:n.Message.getFieldWithDefault(t,1,0),creatorAddress:t.getCreatorAddress_asB64(),createTime:n.Message.getFieldWithDefault(t,3,0),firstTokenId:t.getFirstTokenId_asB64(),firstTokenBalance:n.Message.getFieldWithDefault(t,7,0),secondTokenId:t.getSecondTokenId_asB64(),secondTokenBalance:n.Message.getFieldWithDefault(t,9,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Exchange.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Exchange;return TronWebProto.Exchange.deserializeBinaryFromReader(r,t)},TronWebProto.Exchange.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setExchangeId(r);break;case 2:r=t.readBytes();e.setCreatorAddress(r);break;case 3:r=t.readInt64();e.setCreateTime(r);break;case 6:r=t.readBytes();e.setFirstTokenId(r);break;case 7:r=t.readInt64();e.setFirstTokenBalance(r);break;case 8:r=t.readBytes();e.setSecondTokenId(r);break;case 9:r=t.readInt64();e.setSecondTokenBalance(r);break;default:t.skipField()}}return e},TronWebProto.Exchange.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Exchange.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Exchange.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getExchangeId())&&t.writeInt64(1,r),(r=e.getCreatorAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getCreateTime())&&t.writeInt64(3,r),(r=e.getFirstTokenId_asU8()).length>0&&t.writeBytes(6,r),0!==(r=e.getFirstTokenBalance())&&t.writeInt64(7,r),(r=e.getSecondTokenId_asU8()).length>0&&t.writeBytes(8,r),0!==(r=e.getSecondTokenBalance())&&t.writeInt64(9,r)},TronWebProto.Exchange.prototype.getExchangeId=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Exchange.prototype.setExchangeId=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.Exchange.prototype.getCreatorAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.Exchange.prototype.getCreatorAddress_asB64=function(){return n.Message.bytesAsB64(this.getCreatorAddress())},TronWebProto.Exchange.prototype.getCreatorAddress_asU8=function(){return n.Message.bytesAsU8(this.getCreatorAddress())},TronWebProto.Exchange.prototype.setCreatorAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.Exchange.prototype.getCreateTime=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.Exchange.prototype.setCreateTime=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.Exchange.prototype.getFirstTokenId=function(){return n.Message.getFieldWithDefault(this,6,"")},TronWebProto.Exchange.prototype.getFirstTokenId_asB64=function(){return n.Message.bytesAsB64(this.getFirstTokenId())},TronWebProto.Exchange.prototype.getFirstTokenId_asU8=function(){return n.Message.bytesAsU8(this.getFirstTokenId())},TronWebProto.Exchange.prototype.setFirstTokenId=function(e){return n.Message.setProto3BytesField(this,6,e)},TronWebProto.Exchange.prototype.getFirstTokenBalance=function(){return n.Message.getFieldWithDefault(this,7,0)},TronWebProto.Exchange.prototype.setFirstTokenBalance=function(e){return n.Message.setProto3IntField(this,7,e)},TronWebProto.Exchange.prototype.getSecondTokenId=function(){return n.Message.getFieldWithDefault(this,8,"")},TronWebProto.Exchange.prototype.getSecondTokenId_asB64=function(){return n.Message.bytesAsB64(this.getSecondTokenId())},TronWebProto.Exchange.prototype.getSecondTokenId_asU8=function(){return n.Message.bytesAsU8(this.getSecondTokenId())},TronWebProto.Exchange.prototype.setSecondTokenId=function(e){return n.Message.setProto3BytesField(this,8,e)},TronWebProto.Exchange.prototype.getSecondTokenBalance=function(){return n.Message.getFieldWithDefault(this,9,0)},TronWebProto.Exchange.prototype.setSecondTokenBalance=function(e){return n.Message.setProto3IntField(this,9,e)},TronWebProto.Account.repeatedFields_=[5,7,16,33],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Account.prototype.toObject=function(e){return TronWebProto.Account.toObject(e,this)},TronWebProto.Account.toObject=function(e,t){var r,o={accountName:t.getAccountName_asB64(),type:n.Message.getFieldWithDefault(t,2,0),address:t.getAddress_asB64(),balance:n.Message.getFieldWithDefault(t,4,0),votesList:n.Message.toObjectList(t.getVotesList(),TronWebProto.Vote.toObject,e),assetMap:(r=t.getAssetMap())?r.toObject(e,void 0):[],assetv2Map:(r=t.getAssetv2Map())?r.toObject(e,void 0):[],frozenList:n.Message.toObjectList(t.getFrozenList(),TronWebProto.Account.Frozen.toObject,e),netUsage:n.Message.getFieldWithDefault(t,8,0),acquiredDelegatedFrozenBalanceForBandwidth:n.Message.getFieldWithDefault(t,41,0),delegatedFrozenBalanceForBandwidth:n.Message.getFieldWithDefault(t,42,0),oldTronPower:n.Message.getFieldWithDefault(t,46,0),tronPower:(r=t.getTronPower())&&TronWebProto.Account.Frozen.toObject(e,r),assetOptimized:n.Message.getBooleanFieldWithDefault(t,60,!1),createTime:n.Message.getFieldWithDefault(t,9,0),latestOprationTime:n.Message.getFieldWithDefault(t,10,0),allowance:n.Message.getFieldWithDefault(t,11,0),latestWithdrawTime:n.Message.getFieldWithDefault(t,12,0),code:t.getCode_asB64(),isWitness:n.Message.getBooleanFieldWithDefault(t,14,!1),isCommittee:n.Message.getBooleanFieldWithDefault(t,15,!1),frozenSupplyList:n.Message.toObjectList(t.getFrozenSupplyList(),TronWebProto.Account.Frozen.toObject,e),assetIssuedName:t.getAssetIssuedName_asB64(),assetIssuedId:t.getAssetIssuedId_asB64(),latestAssetOperationTimeMap:(r=t.getLatestAssetOperationTimeMap())?r.toObject(e,void 0):[],latestAssetOperationTimev2Map:(r=t.getLatestAssetOperationTimev2Map())?r.toObject(e,void 0):[],freeNetUsage:n.Message.getFieldWithDefault(t,19,0),freeAssetNetUsageMap:(r=t.getFreeAssetNetUsageMap())?r.toObject(e,void 0):[],freeAssetNetUsagev2Map:(r=t.getFreeAssetNetUsagev2Map())?r.toObject(e,void 0):[],latestConsumeTime:n.Message.getFieldWithDefault(t,21,0),latestConsumeFreeTime:n.Message.getFieldWithDefault(t,22,0),accountId:t.getAccountId_asB64(),accountResource:(r=t.getAccountResource())&&TronWebProto.Account.AccountResource.toObject(e,r),codehash:t.getCodehash_asB64(),ownerPermission:(r=t.getOwnerPermission())&&TronWebProto.Permission.toObject(e,r),witnessPermission:(r=t.getWitnessPermission())&&TronWebProto.Permission.toObject(e,r),activePermissionList:n.Message.toObjectList(t.getActivePermissionList(),TronWebProto.Permission.toObject,e)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.Account.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Account;return TronWebProto.Account.deserializeBinaryFromReader(r,t)},TronWebProto.Account.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAccountName(r);break;case 2:r=t.readEnum();e.setType(r);break;case 3:r=t.readBytes();e.setAddress(r);break;case 4:r=t.readInt64();e.setBalance(r);break;case 5:r=new TronWebProto.Vote;t.readMessage(r,TronWebProto.Vote.deserializeBinaryFromReader),e.addVotes(r);break;case 6:r=e.getAssetMap();t.readMessage(r,(function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,"",0)}));break;case 56:r=e.getAssetv2Map();t.readMessage(r,(function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,"",0)}));break;case 7:r=new TronWebProto.Account.Frozen;t.readMessage(r,TronWebProto.Account.Frozen.deserializeBinaryFromReader),e.addFrozen(r);break;case 8:r=t.readInt64();e.setNetUsage(r);break;case 41:r=t.readInt64();e.setAcquiredDelegatedFrozenBalanceForBandwidth(r);break;case 42:r=t.readInt64();e.setDelegatedFrozenBalanceForBandwidth(r);break;case 46:r=t.readInt64();e.setOldTronPower(r);break;case 47:r=new TronWebProto.Account.Frozen;t.readMessage(r,TronWebProto.Account.Frozen.deserializeBinaryFromReader),e.setTronPower(r);break;case 60:r=t.readBool();e.setAssetOptimized(r);break;case 9:r=t.readInt64();e.setCreateTime(r);break;case 10:r=t.readInt64();e.setLatestOprationTime(r);break;case 11:r=t.readInt64();e.setAllowance(r);break;case 12:r=t.readInt64();e.setLatestWithdrawTime(r);break;case 13:r=t.readBytes();e.setCode(r);break;case 14:r=t.readBool();e.setIsWitness(r);break;case 15:r=t.readBool();e.setIsCommittee(r);break;case 16:r=new TronWebProto.Account.Frozen;t.readMessage(r,TronWebProto.Account.Frozen.deserializeBinaryFromReader),e.addFrozenSupply(r);break;case 17:r=t.readBytes();e.setAssetIssuedName(r);break;case 57:r=t.readBytes();e.setAssetIssuedId(r);break;case 18:r=e.getLatestAssetOperationTimeMap();t.readMessage(r,(function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,"",0)}));break;case 58:r=e.getLatestAssetOperationTimev2Map();t.readMessage(r,(function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,"",0)}));break;case 19:r=t.readInt64();e.setFreeNetUsage(r);break;case 20:r=e.getFreeAssetNetUsageMap();t.readMessage(r,(function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,"",0)}));break;case 59:r=e.getFreeAssetNetUsagev2Map();t.readMessage(r,(function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,"",0)}));break;case 21:r=t.readInt64();e.setLatestConsumeTime(r);break;case 22:r=t.readInt64();e.setLatestConsumeFreeTime(r);break;case 23:r=t.readBytes();e.setAccountId(r);break;case 26:r=new TronWebProto.Account.AccountResource;t.readMessage(r,TronWebProto.Account.AccountResource.deserializeBinaryFromReader),e.setAccountResource(r);break;case 30:r=t.readBytes();e.setCodehash(r);break;case 31:r=new TronWebProto.Permission;t.readMessage(r,TronWebProto.Permission.deserializeBinaryFromReader),e.setOwnerPermission(r);break;case 32:r=new TronWebProto.Permission;t.readMessage(r,TronWebProto.Permission.deserializeBinaryFromReader),e.setWitnessPermission(r);break;case 33:r=new TronWebProto.Permission;t.readMessage(r,TronWebProto.Permission.deserializeBinaryFromReader),e.addActivePermission(r);break;default:t.skipField()}}return e},TronWebProto.Account.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Account.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Account.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAccountName_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getType())&&t.writeEnum(2,r),(r=e.getAddress_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getBalance())&&t.writeInt64(4,r),(r=e.getVotesList()).length>0&&t.writeRepeatedMessage(5,r,TronWebProto.Vote.serializeBinaryToWriter),(r=e.getAssetMap(!0))&&r.getLength()>0&&r.serializeBinary(6,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),(r=e.getAssetv2Map(!0))&&r.getLength()>0&&r.serializeBinary(56,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),(r=e.getFrozenList()).length>0&&t.writeRepeatedMessage(7,r,TronWebProto.Account.Frozen.serializeBinaryToWriter),0!==(r=e.getNetUsage())&&t.writeInt64(8,r),0!==(r=e.getAcquiredDelegatedFrozenBalanceForBandwidth())&&t.writeInt64(41,r),0!==(r=e.getDelegatedFrozenBalanceForBandwidth())&&t.writeInt64(42,r),0!==(r=e.getOldTronPower())&&t.writeInt64(46,r),null!=(r=e.getTronPower())&&t.writeMessage(47,r,TronWebProto.Account.Frozen.serializeBinaryToWriter),(r=e.getAssetOptimized())&&t.writeBool(60,r),0!==(r=e.getCreateTime())&&t.writeInt64(9,r),0!==(r=e.getLatestOprationTime())&&t.writeInt64(10,r),0!==(r=e.getAllowance())&&t.writeInt64(11,r),0!==(r=e.getLatestWithdrawTime())&&t.writeInt64(12,r),(r=e.getCode_asU8()).length>0&&t.writeBytes(13,r),(r=e.getIsWitness())&&t.writeBool(14,r),(r=e.getIsCommittee())&&t.writeBool(15,r),(r=e.getFrozenSupplyList()).length>0&&t.writeRepeatedMessage(16,r,TronWebProto.Account.Frozen.serializeBinaryToWriter),(r=e.getAssetIssuedName_asU8()).length>0&&t.writeBytes(17,r),(r=e.getAssetIssuedId_asU8()).length>0&&t.writeBytes(57,r),(r=e.getLatestAssetOperationTimeMap(!0))&&r.getLength()>0&&r.serializeBinary(18,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),(r=e.getLatestAssetOperationTimev2Map(!0))&&r.getLength()>0&&r.serializeBinary(58,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),0!==(r=e.getFreeNetUsage())&&t.writeInt64(19,r),(r=e.getFreeAssetNetUsageMap(!0))&&r.getLength()>0&&r.serializeBinary(20,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),(r=e.getFreeAssetNetUsagev2Map(!0))&&r.getLength()>0&&r.serializeBinary(59,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),0!==(r=e.getLatestConsumeTime())&&t.writeInt64(21,r),0!==(r=e.getLatestConsumeFreeTime())&&t.writeInt64(22,r),(r=e.getAccountId_asU8()).length>0&&t.writeBytes(23,r),null!=(r=e.getAccountResource())&&t.writeMessage(26,r,TronWebProto.Account.AccountResource.serializeBinaryToWriter),(r=e.getCodehash_asU8()).length>0&&t.writeBytes(30,r),null!=(r=e.getOwnerPermission())&&t.writeMessage(31,r,TronWebProto.Permission.serializeBinaryToWriter),null!=(r=e.getWitnessPermission())&&t.writeMessage(32,r,TronWebProto.Permission.serializeBinaryToWriter),(r=e.getActivePermissionList()).length>0&&t.writeRepeatedMessage(33,r,TronWebProto.Permission.serializeBinaryToWriter)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Account.Frozen.prototype.toObject=function(e){return TronWebProto.Account.Frozen.toObject(e,this)},TronWebProto.Account.Frozen.toObject=function(e,t){var r={frozenBalance:n.Message.getFieldWithDefault(t,1,0),expireTime:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Account.Frozen.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Account.Frozen;return TronWebProto.Account.Frozen.deserializeBinaryFromReader(r,t)},TronWebProto.Account.Frozen.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setFrozenBalance(r);break;case 2:r=t.readInt64();e.setExpireTime(r);break;default:t.skipField()}}return e},TronWebProto.Account.Frozen.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Account.Frozen.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Account.Frozen.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getFrozenBalance())&&t.writeInt64(1,r),0!==(r=e.getExpireTime())&&t.writeInt64(2,r)},TronWebProto.Account.Frozen.prototype.getFrozenBalance=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Account.Frozen.prototype.setFrozenBalance=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.Account.Frozen.prototype.getExpireTime=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Account.Frozen.prototype.setExpireTime=function(e){return n.Message.setProto3IntField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Account.AccountResource.prototype.toObject=function(e){return TronWebProto.Account.AccountResource.toObject(e,this)},TronWebProto.Account.AccountResource.toObject=function(e,t){var r,o={energyUsage:n.Message.getFieldWithDefault(t,1,0),frozenBalanceForEnergy:(r=t.getFrozenBalanceForEnergy())&&TronWebProto.Account.Frozen.toObject(e,r),latestConsumeTimeForEnergy:n.Message.getFieldWithDefault(t,3,0),acquiredDelegatedFrozenBalanceForEnergy:n.Message.getFieldWithDefault(t,4,0),delegatedFrozenBalanceForEnergy:n.Message.getFieldWithDefault(t,5,0),storageLimit:n.Message.getFieldWithDefault(t,6,0),storageUsage:n.Message.getFieldWithDefault(t,7,0),latestExchangeStorageTime:n.Message.getFieldWithDefault(t,8,0)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.Account.AccountResource.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Account.AccountResource;return TronWebProto.Account.AccountResource.deserializeBinaryFromReader(r,t)},TronWebProto.Account.AccountResource.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setEnergyUsage(r);break;case 2:r=new TronWebProto.Account.Frozen;t.readMessage(r,TronWebProto.Account.Frozen.deserializeBinaryFromReader),e.setFrozenBalanceForEnergy(r);break;case 3:r=t.readInt64();e.setLatestConsumeTimeForEnergy(r);break;case 4:r=t.readInt64();e.setAcquiredDelegatedFrozenBalanceForEnergy(r);break;case 5:r=t.readInt64();e.setDelegatedFrozenBalanceForEnergy(r);break;case 6:r=t.readInt64();e.setStorageLimit(r);break;case 7:r=t.readInt64();e.setStorageUsage(r);break;case 8:r=t.readInt64();e.setLatestExchangeStorageTime(r);break;default:t.skipField()}}return e},TronWebProto.Account.AccountResource.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Account.AccountResource.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Account.AccountResource.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getEnergyUsage())&&t.writeInt64(1,r),null!=(r=e.getFrozenBalanceForEnergy())&&t.writeMessage(2,r,TronWebProto.Account.Frozen.serializeBinaryToWriter),0!==(r=e.getLatestConsumeTimeForEnergy())&&t.writeInt64(3,r),0!==(r=e.getAcquiredDelegatedFrozenBalanceForEnergy())&&t.writeInt64(4,r),0!==(r=e.getDelegatedFrozenBalanceForEnergy())&&t.writeInt64(5,r),0!==(r=e.getStorageLimit())&&t.writeInt64(6,r),0!==(r=e.getStorageUsage())&&t.writeInt64(7,r),0!==(r=e.getLatestExchangeStorageTime())&&t.writeInt64(8,r)},TronWebProto.Account.AccountResource.prototype.getEnergyUsage=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Account.AccountResource.prototype.setEnergyUsage=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.Account.AccountResource.prototype.getFrozenBalanceForEnergy=function(){return n.Message.getWrapperField(this,TronWebProto.Account.Frozen,2)},TronWebProto.Account.AccountResource.prototype.setFrozenBalanceForEnergy=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.Account.AccountResource.prototype.clearFrozenBalanceForEnergy=function(){return this.setFrozenBalanceForEnergy(void 0)},TronWebProto.Account.AccountResource.prototype.hasFrozenBalanceForEnergy=function(){return null!=n.Message.getField(this,2)},TronWebProto.Account.AccountResource.prototype.getLatestConsumeTimeForEnergy=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.Account.AccountResource.prototype.setLatestConsumeTimeForEnergy=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.Account.AccountResource.prototype.getAcquiredDelegatedFrozenBalanceForEnergy=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.Account.AccountResource.prototype.setAcquiredDelegatedFrozenBalanceForEnergy=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.Account.AccountResource.prototype.getDelegatedFrozenBalanceForEnergy=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.Account.AccountResource.prototype.setDelegatedFrozenBalanceForEnergy=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.Account.AccountResource.prototype.getStorageLimit=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.Account.AccountResource.prototype.setStorageLimit=function(e){return n.Message.setProto3IntField(this,6,e)},TronWebProto.Account.AccountResource.prototype.getStorageUsage=function(){return n.Message.getFieldWithDefault(this,7,0)},TronWebProto.Account.AccountResource.prototype.setStorageUsage=function(e){return n.Message.setProto3IntField(this,7,e)},TronWebProto.Account.AccountResource.prototype.getLatestExchangeStorageTime=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.Account.AccountResource.prototype.setLatestExchangeStorageTime=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.Account.prototype.getAccountName=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.Account.prototype.getAccountName_asB64=function(){return n.Message.bytesAsB64(this.getAccountName())},TronWebProto.Account.prototype.getAccountName_asU8=function(){return n.Message.bytesAsU8(this.getAccountName())},TronWebProto.Account.prototype.setAccountName=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Account.prototype.getType=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Account.prototype.setType=function(e){return n.Message.setProto3EnumField(this,2,e)},TronWebProto.Account.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.Account.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.Account.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.Account.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.Account.prototype.getBalance=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.Account.prototype.setBalance=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.Account.prototype.getVotesList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Vote,5)},TronWebProto.Account.prototype.setVotesList=function(e){return n.Message.setRepeatedWrapperField(this,5,e)},TronWebProto.Account.prototype.addVotes=function(e,t){return n.Message.addToRepeatedWrapperField(this,5,e,TronWebProto.Vote,t)},TronWebProto.Account.prototype.clearVotesList=function(){return this.setVotesList([])},TronWebProto.Account.prototype.getAssetMap=function(e){return n.Message.getMapField(this,6,e,null)},TronWebProto.Account.prototype.clearAssetMap=function(){return this.getAssetMap().clear(),this},TronWebProto.Account.prototype.getAssetv2Map=function(e){return n.Message.getMapField(this,56,e,null)},TronWebProto.Account.prototype.clearAssetv2Map=function(){return this.getAssetv2Map().clear(),this},TronWebProto.Account.prototype.getFrozenList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Account.Frozen,7)},TronWebProto.Account.prototype.setFrozenList=function(e){return n.Message.setRepeatedWrapperField(this,7,e)},TronWebProto.Account.prototype.addFrozen=function(e,t){return n.Message.addToRepeatedWrapperField(this,7,e,TronWebProto.Account.Frozen,t)},TronWebProto.Account.prototype.clearFrozenList=function(){return this.setFrozenList([])},TronWebProto.Account.prototype.getNetUsage=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.Account.prototype.setNetUsage=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.Account.prototype.getAcquiredDelegatedFrozenBalanceForBandwidth=function(){return n.Message.getFieldWithDefault(this,41,0)},TronWebProto.Account.prototype.setAcquiredDelegatedFrozenBalanceForBandwidth=function(e){return n.Message.setProto3IntField(this,41,e)},TronWebProto.Account.prototype.getDelegatedFrozenBalanceForBandwidth=function(){return n.Message.getFieldWithDefault(this,42,0)},TronWebProto.Account.prototype.setDelegatedFrozenBalanceForBandwidth=function(e){return n.Message.setProto3IntField(this,42,e)},TronWebProto.Account.prototype.getOldTronPower=function(){return n.Message.getFieldWithDefault(this,46,0)},TronWebProto.Account.prototype.setOldTronPower=function(e){return n.Message.setProto3IntField(this,46,e)},TronWebProto.Account.prototype.getTronPower=function(){return n.Message.getWrapperField(this,TronWebProto.Account.Frozen,47)},TronWebProto.Account.prototype.setTronPower=function(e){return n.Message.setWrapperField(this,47,e)},TronWebProto.Account.prototype.clearTronPower=function(){return this.setTronPower(void 0)},TronWebProto.Account.prototype.hasTronPower=function(){return null!=n.Message.getField(this,47)},TronWebProto.Account.prototype.getAssetOptimized=function(){return n.Message.getBooleanFieldWithDefault(this,60,!1)},TronWebProto.Account.prototype.setAssetOptimized=function(e){return n.Message.setProto3BooleanField(this,60,e)},TronWebProto.Account.prototype.getCreateTime=function(){return n.Message.getFieldWithDefault(this,9,0)},TronWebProto.Account.prototype.setCreateTime=function(e){return n.Message.setProto3IntField(this,9,e)},TronWebProto.Account.prototype.getLatestOprationTime=function(){return n.Message.getFieldWithDefault(this,10,0)},TronWebProto.Account.prototype.setLatestOprationTime=function(e){return n.Message.setProto3IntField(this,10,e)},TronWebProto.Account.prototype.getAllowance=function(){return n.Message.getFieldWithDefault(this,11,0)},TronWebProto.Account.prototype.setAllowance=function(e){return n.Message.setProto3IntField(this,11,e)},TronWebProto.Account.prototype.getLatestWithdrawTime=function(){return n.Message.getFieldWithDefault(this,12,0)},TronWebProto.Account.prototype.setLatestWithdrawTime=function(e){return n.Message.setProto3IntField(this,12,e)},TronWebProto.Account.prototype.getCode=function(){return n.Message.getFieldWithDefault(this,13,"")},TronWebProto.Account.prototype.getCode_asB64=function(){return n.Message.bytesAsB64(this.getCode())},TronWebProto.Account.prototype.getCode_asU8=function(){return n.Message.bytesAsU8(this.getCode())},TronWebProto.Account.prototype.setCode=function(e){return n.Message.setProto3BytesField(this,13,e)},TronWebProto.Account.prototype.getIsWitness=function(){return n.Message.getBooleanFieldWithDefault(this,14,!1)},TronWebProto.Account.prototype.setIsWitness=function(e){return n.Message.setProto3BooleanField(this,14,e)},TronWebProto.Account.prototype.getIsCommittee=function(){return n.Message.getBooleanFieldWithDefault(this,15,!1)},TronWebProto.Account.prototype.setIsCommittee=function(e){return n.Message.setProto3BooleanField(this,15,e)},TronWebProto.Account.prototype.getFrozenSupplyList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Account.Frozen,16)},TronWebProto.Account.prototype.setFrozenSupplyList=function(e){return n.Message.setRepeatedWrapperField(this,16,e)},TronWebProto.Account.prototype.addFrozenSupply=function(e,t){return n.Message.addToRepeatedWrapperField(this,16,e,TronWebProto.Account.Frozen,t)},TronWebProto.Account.prototype.clearFrozenSupplyList=function(){return this.setFrozenSupplyList([])},TronWebProto.Account.prototype.getAssetIssuedName=function(){return n.Message.getFieldWithDefault(this,17,"")},TronWebProto.Account.prototype.getAssetIssuedName_asB64=function(){return n.Message.bytesAsB64(this.getAssetIssuedName())},TronWebProto.Account.prototype.getAssetIssuedName_asU8=function(){return n.Message.bytesAsU8(this.getAssetIssuedName())},TronWebProto.Account.prototype.setAssetIssuedName=function(e){return n.Message.setProto3BytesField(this,17,e)},TronWebProto.Account.prototype.getAssetIssuedId=function(){return n.Message.getFieldWithDefault(this,57,"")},TronWebProto.Account.prototype.getAssetIssuedId_asB64=function(){return n.Message.bytesAsB64(this.getAssetIssuedId())},TronWebProto.Account.prototype.getAssetIssuedId_asU8=function(){return n.Message.bytesAsU8(this.getAssetIssuedId())},TronWebProto.Account.prototype.setAssetIssuedId=function(e){return n.Message.setProto3BytesField(this,57,e)},TronWebProto.Account.prototype.getLatestAssetOperationTimeMap=function(e){return n.Message.getMapField(this,18,e,null)},TronWebProto.Account.prototype.clearLatestAssetOperationTimeMap=function(){return this.getLatestAssetOperationTimeMap().clear(),this},TronWebProto.Account.prototype.getLatestAssetOperationTimev2Map=function(e){return n.Message.getMapField(this,58,e,null)},TronWebProto.Account.prototype.clearLatestAssetOperationTimev2Map=function(){return this.getLatestAssetOperationTimev2Map().clear(),this},TronWebProto.Account.prototype.getFreeNetUsage=function(){return n.Message.getFieldWithDefault(this,19,0)},TronWebProto.Account.prototype.setFreeNetUsage=function(e){return n.Message.setProto3IntField(this,19,e)},TronWebProto.Account.prototype.getFreeAssetNetUsageMap=function(e){return n.Message.getMapField(this,20,e,null)},TronWebProto.Account.prototype.clearFreeAssetNetUsageMap=function(){return this.getFreeAssetNetUsageMap().clear(),this},TronWebProto.Account.prototype.getFreeAssetNetUsagev2Map=function(e){return n.Message.getMapField(this,59,e,null)},TronWebProto.Account.prototype.clearFreeAssetNetUsagev2Map=function(){return this.getFreeAssetNetUsagev2Map().clear(),this},TronWebProto.Account.prototype.getLatestConsumeTime=function(){return n.Message.getFieldWithDefault(this,21,0)},TronWebProto.Account.prototype.setLatestConsumeTime=function(e){return n.Message.setProto3IntField(this,21,e)},TronWebProto.Account.prototype.getLatestConsumeFreeTime=function(){return n.Message.getFieldWithDefault(this,22,0)},TronWebProto.Account.prototype.setLatestConsumeFreeTime=function(e){return n.Message.setProto3IntField(this,22,e)},TronWebProto.Account.prototype.getAccountId=function(){return n.Message.getFieldWithDefault(this,23,"")},TronWebProto.Account.prototype.getAccountId_asB64=function(){return n.Message.bytesAsB64(this.getAccountId())},TronWebProto.Account.prototype.getAccountId_asU8=function(){return n.Message.bytesAsU8(this.getAccountId())},TronWebProto.Account.prototype.setAccountId=function(e){return n.Message.setProto3BytesField(this,23,e)},TronWebProto.Account.prototype.getAccountResource=function(){return n.Message.getWrapperField(this,TronWebProto.Account.AccountResource,26)},TronWebProto.Account.prototype.setAccountResource=function(e){return n.Message.setWrapperField(this,26,e)},TronWebProto.Account.prototype.clearAccountResource=function(){return this.setAccountResource(void 0)},TronWebProto.Account.prototype.hasAccountResource=function(){return null!=n.Message.getField(this,26)},TronWebProto.Account.prototype.getCodehash=function(){return n.Message.getFieldWithDefault(this,30,"")},TronWebProto.Account.prototype.getCodehash_asB64=function(){return n.Message.bytesAsB64(this.getCodehash())},TronWebProto.Account.prototype.getCodehash_asU8=function(){return n.Message.bytesAsU8(this.getCodehash())},TronWebProto.Account.prototype.setCodehash=function(e){return n.Message.setProto3BytesField(this,30,e)},TronWebProto.Account.prototype.getOwnerPermission=function(){return n.Message.getWrapperField(this,TronWebProto.Permission,31)},TronWebProto.Account.prototype.setOwnerPermission=function(e){return n.Message.setWrapperField(this,31,e)},TronWebProto.Account.prototype.clearOwnerPermission=function(){return this.setOwnerPermission(void 0)},TronWebProto.Account.prototype.hasOwnerPermission=function(){return null!=n.Message.getField(this,31)},TronWebProto.Account.prototype.getWitnessPermission=function(){return n.Message.getWrapperField(this,TronWebProto.Permission,32)},TronWebProto.Account.prototype.setWitnessPermission=function(e){return n.Message.setWrapperField(this,32,e)},TronWebProto.Account.prototype.clearWitnessPermission=function(){return this.setWitnessPermission(void 0)},TronWebProto.Account.prototype.hasWitnessPermission=function(){return null!=n.Message.getField(this,32)},TronWebProto.Account.prototype.getActivePermissionList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Permission,33)},TronWebProto.Account.prototype.setActivePermissionList=function(e){return n.Message.setRepeatedWrapperField(this,33,e)},TronWebProto.Account.prototype.addActivePermission=function(e,t){return n.Message.addToRepeatedWrapperField(this,33,e,TronWebProto.Permission,t)},TronWebProto.Account.prototype.clearActivePermissionList=function(){return this.setActivePermissionList([])},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Key.prototype.toObject=function(e){return TronWebProto.Key.toObject(e,this)},TronWebProto.Key.toObject=function(e,t){var r={address:t.getAddress_asB64(),weight:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Key.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Key;return TronWebProto.Key.deserializeBinaryFromReader(r,t)},TronWebProto.Key.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAddress(r);break;case 2:r=t.readInt64();e.setWeight(r);break;default:t.skipField()}}return e},TronWebProto.Key.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Key.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Key.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getWeight())&&t.writeInt64(2,r)},TronWebProto.Key.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.Key.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.Key.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.Key.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Key.prototype.getWeight=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Key.prototype.setWeight=function(e){return n.Message.setProto3IntField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.DelegatedResource.prototype.toObject=function(e){return TronWebProto.DelegatedResource.toObject(e,this)},TronWebProto.DelegatedResource.toObject=function(e,t){var r={from:t.getFrom_asB64(),to:t.getTo_asB64(),frozenBalanceForBandwidth:n.Message.getFieldWithDefault(t,3,0),frozenBalanceForEnergy:n.Message.getFieldWithDefault(t,4,0),expireTimeForBandwidth:n.Message.getFieldWithDefault(t,5,0),expireTimeForEnergy:n.Message.getFieldWithDefault(t,6,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.DelegatedResource.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.DelegatedResource;return TronWebProto.DelegatedResource.deserializeBinaryFromReader(r,t)},TronWebProto.DelegatedResource.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setFrom(r);break;case 2:r=t.readBytes();e.setTo(r);break;case 3:r=t.readInt64();e.setFrozenBalanceForBandwidth(r);break;case 4:r=t.readInt64();e.setFrozenBalanceForEnergy(r);break;case 5:r=t.readInt64();e.setExpireTimeForBandwidth(r);break;case 6:r=t.readInt64();e.setExpireTimeForEnergy(r);break;default:t.skipField()}}return e},TronWebProto.DelegatedResource.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.DelegatedResource.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.DelegatedResource.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getFrom_asU8()).length>0&&t.writeBytes(1,r),(r=e.getTo_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getFrozenBalanceForBandwidth())&&t.writeInt64(3,r),0!==(r=e.getFrozenBalanceForEnergy())&&t.writeInt64(4,r),0!==(r=e.getExpireTimeForBandwidth())&&t.writeInt64(5,r),0!==(r=e.getExpireTimeForEnergy())&&t.writeInt64(6,r)},TronWebProto.DelegatedResource.prototype.getFrom=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.DelegatedResource.prototype.getFrom_asB64=function(){return n.Message.bytesAsB64(this.getFrom())},TronWebProto.DelegatedResource.prototype.getFrom_asU8=function(){return n.Message.bytesAsU8(this.getFrom())},TronWebProto.DelegatedResource.prototype.setFrom=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.DelegatedResource.prototype.getTo=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.DelegatedResource.prototype.getTo_asB64=function(){return n.Message.bytesAsB64(this.getTo())},TronWebProto.DelegatedResource.prototype.getTo_asU8=function(){return n.Message.bytesAsU8(this.getTo())},TronWebProto.DelegatedResource.prototype.setTo=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.DelegatedResource.prototype.getFrozenBalanceForBandwidth=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.DelegatedResource.prototype.setFrozenBalanceForBandwidth=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.DelegatedResource.prototype.getFrozenBalanceForEnergy=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.DelegatedResource.prototype.setFrozenBalanceForEnergy=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.DelegatedResource.prototype.getExpireTimeForBandwidth=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.DelegatedResource.prototype.setExpireTimeForBandwidth=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.DelegatedResource.prototype.getExpireTimeForEnergy=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.DelegatedResource.prototype.setExpireTimeForEnergy=function(e){return n.Message.setProto3IntField(this,6,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.authority.prototype.toObject=function(e){return TronWebProto.authority.toObject(e,this)},TronWebProto.authority.toObject=function(e,t){var r,n={account:(r=t.getAccount())&&TronWebProto.AccountId.toObject(e,r),permissionName:t.getPermissionName_asB64()};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.authority.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.authority;return TronWebProto.authority.deserializeBinaryFromReader(r,t)},TronWebProto.authority.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=new TronWebProto.AccountId;t.readMessage(r,TronWebProto.AccountId.deserializeBinaryFromReader),e.setAccount(r);break;case 2:r=t.readBytes();e.setPermissionName(r);break;default:t.skipField()}}return e},TronWebProto.authority.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.authority.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.authority.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getAccount())&&t.writeMessage(1,r,TronWebProto.AccountId.serializeBinaryToWriter),(r=e.getPermissionName_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.authority.prototype.getAccount=function(){return n.Message.getWrapperField(this,TronWebProto.AccountId,1)},TronWebProto.authority.prototype.setAccount=function(e){return n.Message.setWrapperField(this,1,e)},TronWebProto.authority.prototype.clearAccount=function(){return this.setAccount(void 0)},TronWebProto.authority.prototype.hasAccount=function(){return null!=n.Message.getField(this,1)},TronWebProto.authority.prototype.getPermissionName=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.authority.prototype.getPermissionName_asB64=function(){return n.Message.bytesAsB64(this.getPermissionName())},TronWebProto.authority.prototype.getPermissionName_asU8=function(){return n.Message.bytesAsU8(this.getPermissionName())},TronWebProto.authority.prototype.setPermissionName=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.Permission.repeatedFields_=[7],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Permission.prototype.toObject=function(e){return TronWebProto.Permission.toObject(e,this)},TronWebProto.Permission.toObject=function(e,t){var r={type:n.Message.getFieldWithDefault(t,1,0),id:n.Message.getFieldWithDefault(t,2,0),permissionName:n.Message.getFieldWithDefault(t,3,""),threshold:n.Message.getFieldWithDefault(t,4,0),parentId:n.Message.getFieldWithDefault(t,5,0),operations:t.getOperations_asB64(),keysList:n.Message.toObjectList(t.getKeysList(),TronWebProto.Key.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Permission.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Permission;return TronWebProto.Permission.deserializeBinaryFromReader(r,t)},TronWebProto.Permission.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readEnum();e.setType(r);break;case 2:r=t.readInt32();e.setId(r);break;case 3:r=t.readString();e.setPermissionName(r);break;case 4:r=t.readInt64();e.setThreshold(r);break;case 5:r=t.readInt32();e.setParentId(r);break;case 6:r=t.readBytes();e.setOperations(r);break;case 7:r=new TronWebProto.Key;t.readMessage(r,TronWebProto.Key.deserializeBinaryFromReader),e.addKeys(r);break;default:t.skipField()}}return e},TronWebProto.Permission.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Permission.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Permission.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getType())&&t.writeEnum(1,r),0!==(r=e.getId())&&t.writeInt32(2,r),(r=e.getPermissionName()).length>0&&t.writeString(3,r),0!==(r=e.getThreshold())&&t.writeInt64(4,r),0!==(r=e.getParentId())&&t.writeInt32(5,r),(r=e.getOperations_asU8()).length>0&&t.writeBytes(6,r),(r=e.getKeysList()).length>0&&t.writeRepeatedMessage(7,r,TronWebProto.Key.serializeBinaryToWriter)},TronWebProto.Permission.PermissionType={OWNER:0,WITNESS:1,ACTIVE:2},TronWebProto.Permission.prototype.getType=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Permission.prototype.setType=function(e){return n.Message.setProto3EnumField(this,1,e)},TronWebProto.Permission.prototype.getId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Permission.prototype.setId=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.Permission.prototype.getPermissionName=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.Permission.prototype.setPermissionName=function(e){return n.Message.setProto3StringField(this,3,e)},TronWebProto.Permission.prototype.getThreshold=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.Permission.prototype.setThreshold=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.Permission.prototype.getParentId=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.Permission.prototype.setParentId=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.Permission.prototype.getOperations=function(){return n.Message.getFieldWithDefault(this,6,"")},TronWebProto.Permission.prototype.getOperations_asB64=function(){return n.Message.bytesAsB64(this.getOperations())},TronWebProto.Permission.prototype.getOperations_asU8=function(){return n.Message.bytesAsU8(this.getOperations())},TronWebProto.Permission.prototype.setOperations=function(e){return n.Message.setProto3BytesField(this,6,e)},TronWebProto.Permission.prototype.getKeysList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Key,7)},TronWebProto.Permission.prototype.setKeysList=function(e){return n.Message.setRepeatedWrapperField(this,7,e)},TronWebProto.Permission.prototype.addKeys=function(e,t){return n.Message.addToRepeatedWrapperField(this,7,e,TronWebProto.Key,t)},TronWebProto.Permission.prototype.clearKeysList=function(){return this.setKeysList([])},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Witness.prototype.toObject=function(e){return TronWebProto.Witness.toObject(e,this)},TronWebProto.Witness.toObject=function(e,t){var r={address:t.getAddress_asB64(),votecount:n.Message.getFieldWithDefault(t,2,0),pubkey:t.getPubkey_asB64(),url:n.Message.getFieldWithDefault(t,4,""),totalproduced:n.Message.getFieldWithDefault(t,5,0),totalmissed:n.Message.getFieldWithDefault(t,6,0),latestblocknum:n.Message.getFieldWithDefault(t,7,0),latestslotnum:n.Message.getFieldWithDefault(t,8,0),isjobs:n.Message.getBooleanFieldWithDefault(t,9,!1)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Witness.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Witness;return TronWebProto.Witness.deserializeBinaryFromReader(r,t)},TronWebProto.Witness.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAddress(r);break;case 2:r=t.readInt64();e.setVotecount(r);break;case 3:r=t.readBytes();e.setPubkey(r);break;case 4:r=t.readString();e.setUrl(r);break;case 5:r=t.readInt64();e.setTotalproduced(r);break;case 6:r=t.readInt64();e.setTotalmissed(r);break;case 7:r=t.readInt64();e.setLatestblocknum(r);break;case 8:r=t.readInt64();e.setLatestslotnum(r);break;case 9:r=t.readBool();e.setIsjobs(r);break;default:t.skipField()}}return e},TronWebProto.Witness.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Witness.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Witness.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getVotecount())&&t.writeInt64(2,r),(r=e.getPubkey_asU8()).length>0&&t.writeBytes(3,r),(r=e.getUrl()).length>0&&t.writeString(4,r),0!==(r=e.getTotalproduced())&&t.writeInt64(5,r),0!==(r=e.getTotalmissed())&&t.writeInt64(6,r),0!==(r=e.getLatestblocknum())&&t.writeInt64(7,r),0!==(r=e.getLatestslotnum())&&t.writeInt64(8,r),(r=e.getIsjobs())&&t.writeBool(9,r)},TronWebProto.Witness.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.Witness.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.Witness.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.Witness.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Witness.prototype.getVotecount=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Witness.prototype.setVotecount=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.Witness.prototype.getPubkey=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.Witness.prototype.getPubkey_asB64=function(){return n.Message.bytesAsB64(this.getPubkey())},TronWebProto.Witness.prototype.getPubkey_asU8=function(){return n.Message.bytesAsU8(this.getPubkey())},TronWebProto.Witness.prototype.setPubkey=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.Witness.prototype.getUrl=function(){return n.Message.getFieldWithDefault(this,4,"")},TronWebProto.Witness.prototype.setUrl=function(e){return n.Message.setProto3StringField(this,4,e)},TronWebProto.Witness.prototype.getTotalproduced=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.Witness.prototype.setTotalproduced=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.Witness.prototype.getTotalmissed=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.Witness.prototype.setTotalmissed=function(e){return n.Message.setProto3IntField(this,6,e)},TronWebProto.Witness.prototype.getLatestblocknum=function(){return n.Message.getFieldWithDefault(this,7,0)},TronWebProto.Witness.prototype.setLatestblocknum=function(e){return n.Message.setProto3IntField(this,7,e)},TronWebProto.Witness.prototype.getLatestslotnum=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.Witness.prototype.setLatestslotnum=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.Witness.prototype.getIsjobs=function(){return n.Message.getBooleanFieldWithDefault(this,9,!1)},TronWebProto.Witness.prototype.setIsjobs=function(e){return n.Message.setProto3BooleanField(this,9,e)},TronWebProto.Votes.repeatedFields_=[2,3],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Votes.prototype.toObject=function(e){return TronWebProto.Votes.toObject(e,this)},TronWebProto.Votes.toObject=function(e,t){var r={address:t.getAddress_asB64(),oldVotesList:n.Message.toObjectList(t.getOldVotesList(),TronWebProto.Vote.toObject,e),newVotesList:n.Message.toObjectList(t.getNewVotesList(),TronWebProto.Vote.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Votes.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Votes;return TronWebProto.Votes.deserializeBinaryFromReader(r,t)},TronWebProto.Votes.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAddress(r);break;case 2:r=new TronWebProto.Vote;t.readMessage(r,TronWebProto.Vote.deserializeBinaryFromReader),e.addOldVotes(r);break;case 3:r=new TronWebProto.Vote;t.readMessage(r,TronWebProto.Vote.deserializeBinaryFromReader),e.addNewVotes(r);break;default:t.skipField()}}return e},TronWebProto.Votes.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Votes.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Votes.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getOldVotesList()).length>0&&t.writeRepeatedMessage(2,r,TronWebProto.Vote.serializeBinaryToWriter),(r=e.getNewVotesList()).length>0&&t.writeRepeatedMessage(3,r,TronWebProto.Vote.serializeBinaryToWriter)},TronWebProto.Votes.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.Votes.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.Votes.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.Votes.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Votes.prototype.getOldVotesList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Vote,2)},TronWebProto.Votes.prototype.setOldVotesList=function(e){return n.Message.setRepeatedWrapperField(this,2,e)},TronWebProto.Votes.prototype.addOldVotes=function(e,t){return n.Message.addToRepeatedWrapperField(this,2,e,TronWebProto.Vote,t)},TronWebProto.Votes.prototype.clearOldVotesList=function(){return this.setOldVotesList([])},TronWebProto.Votes.prototype.getNewVotesList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Vote,3)},TronWebProto.Votes.prototype.setNewVotesList=function(e){return n.Message.setRepeatedWrapperField(this,3,e)},TronWebProto.Votes.prototype.addNewVotes=function(e,t){return n.Message.addToRepeatedWrapperField(this,3,e,TronWebProto.Vote,t)},TronWebProto.Votes.prototype.clearNewVotesList=function(){return this.setNewVotesList([])},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.MarketOrderDetail.prototype.toObject=function(e){return TronWebProto.MarketOrderDetail.toObject(e,this)},TronWebProto.MarketOrderDetail.toObject=function(e,t){var r={makerorderid:t.getMakerorderid_asB64(),takerorderid:t.getTakerorderid_asB64(),fillsellquantity:n.Message.getFieldWithDefault(t,3,0),fillbuyquantity:n.Message.getFieldWithDefault(t,4,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.MarketOrderDetail.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.MarketOrderDetail;return TronWebProto.MarketOrderDetail.deserializeBinaryFromReader(r,t)},TronWebProto.MarketOrderDetail.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setMakerorderid(r);break;case 2:r=t.readBytes();e.setTakerorderid(r);break;case 3:r=t.readInt64();e.setFillsellquantity(r);break;case 4:r=t.readInt64();e.setFillbuyquantity(r);break;default:t.skipField()}}return e},TronWebProto.MarketOrderDetail.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.MarketOrderDetail.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.MarketOrderDetail.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getMakerorderid_asU8()).length>0&&t.writeBytes(1,r),(r=e.getTakerorderid_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getFillsellquantity())&&t.writeInt64(3,r),0!==(r=e.getFillbuyquantity())&&t.writeInt64(4,r)},TronWebProto.MarketOrderDetail.prototype.getMakerorderid=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.MarketOrderDetail.prototype.getMakerorderid_asB64=function(){return n.Message.bytesAsB64(this.getMakerorderid())},TronWebProto.MarketOrderDetail.prototype.getMakerorderid_asU8=function(){return n.Message.bytesAsU8(this.getMakerorderid())},TronWebProto.MarketOrderDetail.prototype.setMakerorderid=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.MarketOrderDetail.prototype.getTakerorderid=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.MarketOrderDetail.prototype.getTakerorderid_asB64=function(){return n.Message.bytesAsB64(this.getTakerorderid())},TronWebProto.MarketOrderDetail.prototype.getTakerorderid_asU8=function(){return n.Message.bytesAsU8(this.getTakerorderid())},TronWebProto.MarketOrderDetail.prototype.setTakerorderid=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.MarketOrderDetail.prototype.getFillsellquantity=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.MarketOrderDetail.prototype.setFillsellquantity=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.MarketOrderDetail.prototype.getFillbuyquantity=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.MarketOrderDetail.prototype.setFillbuyquantity=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.Transaction.repeatedFields_=[2,5],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Transaction.prototype.toObject=function(e){return TronWebProto.Transaction.toObject(e,this)},TronWebProto.Transaction.toObject=function(e,t){var r,o={rawData:(r=t.getRawData())&&TronWebProto.Transaction.raw.toObject(e,r),signatureList:t.getSignatureList_asB64(),retList:n.Message.toObjectList(t.getRetList(),TronWebProto.Transaction.Result.toObject,e)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.Transaction.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Transaction;return TronWebProto.Transaction.deserializeBinaryFromReader(r,t)},TronWebProto.Transaction.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=new TronWebProto.Transaction.raw;t.readMessage(r,TronWebProto.Transaction.raw.deserializeBinaryFromReader),e.setRawData(r);break;case 2:r=t.readBytes();e.addSignature(r);break;case 5:r=new TronWebProto.Transaction.Result;t.readMessage(r,TronWebProto.Transaction.Result.deserializeBinaryFromReader),e.addRet(r);break;default:t.skipField()}}return e},TronWebProto.Transaction.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Transaction.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Transaction.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getRawData())&&t.writeMessage(1,r,TronWebProto.Transaction.raw.serializeBinaryToWriter),(r=e.getSignatureList_asU8()).length>0&&t.writeRepeatedBytes(2,r),(r=e.getRetList()).length>0&&t.writeRepeatedMessage(5,r,TronWebProto.Transaction.Result.serializeBinaryToWriter)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Transaction.Contract.prototype.toObject=function(e){return TronWebProto.Transaction.Contract.toObject(e,this)},TronWebProto.Transaction.Contract.toObject=function(e,t){var r,o={type:n.Message.getFieldWithDefault(t,1,0),parameter:(r=t.getParameter())&&a.Any.toObject(e,r),provider:t.getProvider_asB64(),contractname:t.getContractname_asB64(),permissionId:n.Message.getFieldWithDefault(t,5,0)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.Transaction.Contract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Transaction.Contract;return TronWebProto.Transaction.Contract.deserializeBinaryFromReader(r,t)},TronWebProto.Transaction.Contract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readEnum();e.setType(r);break;case 2:r=new a.Any;t.readMessage(r,a.Any.deserializeBinaryFromReader),e.setParameter(r);break;case 3:r=t.readBytes();e.setProvider(r);break;case 4:r=t.readBytes();e.setContractname(r);break;case 5:r=t.readInt32();e.setPermissionId(r);break;default:t.skipField()}}return e},TronWebProto.Transaction.Contract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Transaction.Contract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Transaction.Contract.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getType())&&t.writeEnum(1,r),null!=(r=e.getParameter())&&t.writeMessage(2,r,a.Any.serializeBinaryToWriter),(r=e.getProvider_asU8()).length>0&&t.writeBytes(3,r),(r=e.getContractname_asU8()).length>0&&t.writeBytes(4,r),0!==(r=e.getPermissionId())&&t.writeInt32(5,r)},TronWebProto.Transaction.Contract.ContractType={ACCOUNTCREATECONTRACT:0,TRANSFERCONTRACT:1,TRANSFERASSETCONTRACT:2,VOTEASSETCONTRACT:3,VOTEWITNESSCONTRACT:4,WITNESSCREATECONTRACT:5,ASSETISSUECONTRACT:6,WITNESSUPDATECONTRACT:8,PARTICIPATEASSETISSUECONTRACT:9,ACCOUNTUPDATECONTRACT:10,FREEZEBALANCECONTRACT:11,UNFREEZEBALANCECONTRACT:12,WITHDRAWBALANCECONTRACT:13,UNFREEZEASSETCONTRACT:14,UPDATEASSETCONTRACT:15,PROPOSALCREATECONTRACT:16,PROPOSALAPPROVECONTRACT:17,PROPOSALDELETECONTRACT:18,SETACCOUNTIDCONTRACT:19,CUSTOMCONTRACT:20,CREATESMARTCONTRACT:30,TRIGGERSMARTCONTRACT:31,GETCONTRACT:32,UPDATESETTINGCONTRACT:33,EXCHANGECREATECONTRACT:41,EXCHANGEINJECTCONTRACT:42,EXCHANGEWITHDRAWCONTRACT:43,EXCHANGETRANSACTIONCONTRACT:44,UPDATEENERGYLIMITCONTRACT:45,ACCOUNTPERMISSIONUPDATECONTRACT:46,CLEARABICONTRACT:48,UPDATEBROKERAGECONTRACT:49,SHIELDEDTRANSFERCONTRACT:51,MARKETSELLASSETCONTRACT:52,MARKETCANCELORDERCONTRACT:53,FREEZEBALANCEV2CONTRACT:54,UNFREEZEBALANCEV2CONTRACT:55,WITHDRAWEXPIREUNFREEZECONTRACT:56,DELEGATERESOURCECONTRACT:57,UNDELEGATERESOURCECONTRACT:58,CANCELALLUNFREEZEV2CONTRACT:59},TronWebProto.Transaction.Contract.prototype.getType=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Transaction.Contract.prototype.setType=function(e){return n.Message.setProto3EnumField(this,1,e)},TronWebProto.Transaction.Contract.prototype.getParameter=function(){return n.Message.getWrapperField(this,a.Any,2)},TronWebProto.Transaction.Contract.prototype.setParameter=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.Transaction.Contract.prototype.clearParameter=function(){return this.setParameter(void 0)},TronWebProto.Transaction.Contract.prototype.hasParameter=function(){return null!=n.Message.getField(this,2)},TronWebProto.Transaction.Contract.prototype.getProvider=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.Transaction.Contract.prototype.getProvider_asB64=function(){return n.Message.bytesAsB64(this.getProvider())},TronWebProto.Transaction.Contract.prototype.getProvider_asU8=function(){return n.Message.bytesAsU8(this.getProvider())},TronWebProto.Transaction.Contract.prototype.setProvider=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.Transaction.Contract.prototype.getContractname=function(){return n.Message.getFieldWithDefault(this,4,"")},TronWebProto.Transaction.Contract.prototype.getContractname_asB64=function(){return n.Message.bytesAsB64(this.getContractname())},TronWebProto.Transaction.Contract.prototype.getContractname_asU8=function(){return n.Message.bytesAsU8(this.getContractname())},TronWebProto.Transaction.Contract.prototype.setContractname=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.Transaction.Contract.prototype.getPermissionId=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.Transaction.Contract.prototype.setPermissionId=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.Transaction.Result.repeatedFields_=[26],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Transaction.Result.prototype.toObject=function(e){return TronWebProto.Transaction.Result.toObject(e,this)},TronWebProto.Transaction.Result.toObject=function(e,t){var r={fee:n.Message.getFieldWithDefault(t,1,0),ret:n.Message.getFieldWithDefault(t,2,0),contractret:n.Message.getFieldWithDefault(t,3,0),assetissueid:n.Message.getFieldWithDefault(t,14,""),withdrawAmount:n.Message.getFieldWithDefault(t,15,0),unfreezeAmount:n.Message.getFieldWithDefault(t,16,0),exchangeReceivedAmount:n.Message.getFieldWithDefault(t,18,0),exchangeInjectAnotherAmount:n.Message.getFieldWithDefault(t,19,0),exchangeWithdrawAnotherAmount:n.Message.getFieldWithDefault(t,20,0),exchangeId:n.Message.getFieldWithDefault(t,21,0),shieldedTransactionFee:n.Message.getFieldWithDefault(t,22,0),orderid:t.getOrderid_asB64(),orderdetailsList:n.Message.toObjectList(t.getOrderdetailsList(),TronWebProto.MarketOrderDetail.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Transaction.Result.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Transaction.Result;return TronWebProto.Transaction.Result.deserializeBinaryFromReader(r,t)},TronWebProto.Transaction.Result.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setFee(r);break;case 2:r=t.readEnum();e.setRet(r);break;case 3:r=t.readEnum();e.setContractret(r);break;case 14:r=t.readString();e.setAssetissueid(r);break;case 15:r=t.readInt64();e.setWithdrawAmount(r);break;case 16:r=t.readInt64();e.setUnfreezeAmount(r);break;case 18:r=t.readInt64();e.setExchangeReceivedAmount(r);break;case 19:r=t.readInt64();e.setExchangeInjectAnotherAmount(r);break;case 20:r=t.readInt64();e.setExchangeWithdrawAnotherAmount(r);break;case 21:r=t.readInt64();e.setExchangeId(r);break;case 22:r=t.readInt64();e.setShieldedTransactionFee(r);break;case 25:r=t.readBytes();e.setOrderid(r);break;case 26:r=new TronWebProto.MarketOrderDetail;t.readMessage(r,TronWebProto.MarketOrderDetail.deserializeBinaryFromReader),e.addOrderdetails(r);break;default:t.skipField()}}return e},TronWebProto.Transaction.Result.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Transaction.Result.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Transaction.Result.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getFee())&&t.writeInt64(1,r),0!==(r=e.getRet())&&t.writeEnum(2,r),0!==(r=e.getContractret())&&t.writeEnum(3,r),(r=e.getAssetissueid()).length>0&&t.writeString(14,r),0!==(r=e.getWithdrawAmount())&&t.writeInt64(15,r),0!==(r=e.getUnfreezeAmount())&&t.writeInt64(16,r),0!==(r=e.getExchangeReceivedAmount())&&t.writeInt64(18,r),0!==(r=e.getExchangeInjectAnotherAmount())&&t.writeInt64(19,r),0!==(r=e.getExchangeWithdrawAnotherAmount())&&t.writeInt64(20,r),0!==(r=e.getExchangeId())&&t.writeInt64(21,r),0!==(r=e.getShieldedTransactionFee())&&t.writeInt64(22,r),(r=e.getOrderid_asU8()).length>0&&t.writeBytes(25,r),(r=e.getOrderdetailsList()).length>0&&t.writeRepeatedMessage(26,r,TronWebProto.MarketOrderDetail.serializeBinaryToWriter)},TronWebProto.Transaction.Result.code={SUCESS:0,FAILED:1},TronWebProto.Transaction.Result.contractResult={DEFAULT:0,SUCCESS:1,REVERT:2,BAD_JUMP_DESTINATION:3,OUT_OF_MEMORY:4,PRECOMPILED_CONTRACT:5,STACK_TOO_SMALL:6,STACK_TOO_LARGE:7,ILLEGAL_OPERATION:8,STACK_OVERFLOW:9,OUT_OF_ENERGY:10,OUT_OF_TIME:11,JVM_STACK_OVER_FLOW:12,UNKNOWN:13,TRANSFER_FAILED:14,INVALID_CODE:15},TronWebProto.Transaction.Result.prototype.getFee=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Transaction.Result.prototype.setFee=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.Transaction.Result.prototype.getRet=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Transaction.Result.prototype.setRet=function(e){return n.Message.setProto3EnumField(this,2,e)},TronWebProto.Transaction.Result.prototype.getContractret=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.Transaction.Result.prototype.setContractret=function(e){return n.Message.setProto3EnumField(this,3,e)},TronWebProto.Transaction.Result.prototype.getAssetissueid=function(){return n.Message.getFieldWithDefault(this,14,"")},TronWebProto.Transaction.Result.prototype.setAssetissueid=function(e){return n.Message.setProto3StringField(this,14,e)},TronWebProto.Transaction.Result.prototype.getWithdrawAmount=function(){return n.Message.getFieldWithDefault(this,15,0)},TronWebProto.Transaction.Result.prototype.setWithdrawAmount=function(e){return n.Message.setProto3IntField(this,15,e)},TronWebProto.Transaction.Result.prototype.getUnfreezeAmount=function(){return n.Message.getFieldWithDefault(this,16,0)},TronWebProto.Transaction.Result.prototype.setUnfreezeAmount=function(e){return n.Message.setProto3IntField(this,16,e)},TronWebProto.Transaction.Result.prototype.getExchangeReceivedAmount=function(){return n.Message.getFieldWithDefault(this,18,0)},TronWebProto.Transaction.Result.prototype.setExchangeReceivedAmount=function(e){return n.Message.setProto3IntField(this,18,e)},TronWebProto.Transaction.Result.prototype.getExchangeInjectAnotherAmount=function(){return n.Message.getFieldWithDefault(this,19,0)},TronWebProto.Transaction.Result.prototype.setExchangeInjectAnotherAmount=function(e){return n.Message.setProto3IntField(this,19,e)},TronWebProto.Transaction.Result.prototype.getExchangeWithdrawAnotherAmount=function(){return n.Message.getFieldWithDefault(this,20,0)},TronWebProto.Transaction.Result.prototype.setExchangeWithdrawAnotherAmount=function(e){return n.Message.setProto3IntField(this,20,e)},TronWebProto.Transaction.Result.prototype.getExchangeId=function(){return n.Message.getFieldWithDefault(this,21,0)},TronWebProto.Transaction.Result.prototype.setExchangeId=function(e){return n.Message.setProto3IntField(this,21,e)},TronWebProto.Transaction.Result.prototype.getShieldedTransactionFee=function(){return n.Message.getFieldWithDefault(this,22,0)},TronWebProto.Transaction.Result.prototype.setShieldedTransactionFee=function(e){return n.Message.setProto3IntField(this,22,e)},TronWebProto.Transaction.Result.prototype.getOrderid=function(){return n.Message.getFieldWithDefault(this,25,"")},TronWebProto.Transaction.Result.prototype.getOrderid_asB64=function(){return n.Message.bytesAsB64(this.getOrderid())},TronWebProto.Transaction.Result.prototype.getOrderid_asU8=function(){return n.Message.bytesAsU8(this.getOrderid())},TronWebProto.Transaction.Result.prototype.setOrderid=function(e){return n.Message.setProto3BytesField(this,25,e)},TronWebProto.Transaction.Result.prototype.getOrderdetailsList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.MarketOrderDetail,26)},TronWebProto.Transaction.Result.prototype.setOrderdetailsList=function(e){return n.Message.setRepeatedWrapperField(this,26,e)},TronWebProto.Transaction.Result.prototype.addOrderdetails=function(e,t){return n.Message.addToRepeatedWrapperField(this,26,e,TronWebProto.MarketOrderDetail,t)},TronWebProto.Transaction.Result.prototype.clearOrderdetailsList=function(){return this.setOrderdetailsList([])},TronWebProto.Transaction.raw.repeatedFields_=[9,11],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Transaction.raw.prototype.toObject=function(e){return TronWebProto.Transaction.raw.toObject(e,this)},TronWebProto.Transaction.raw.toObject=function(e,t){var r={refBlockBytes:t.getRefBlockBytes_asB64(),refBlockNum:n.Message.getFieldWithDefault(t,3,0),refBlockHash:t.getRefBlockHash_asB64(),expiration:n.Message.getFieldWithDefault(t,8,0),authsList:n.Message.toObjectList(t.getAuthsList(),TronWebProto.authority.toObject,e),data:t.getData_asB64(),contractList:n.Message.toObjectList(t.getContractList(),TronWebProto.Transaction.Contract.toObject,e),scripts:t.getScripts_asB64(),timestamp:n.Message.getFieldWithDefault(t,14,0),feeLimit:n.Message.getFieldWithDefault(t,18,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Transaction.raw.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Transaction.raw;return TronWebProto.Transaction.raw.deserializeBinaryFromReader(r,t)},TronWebProto.Transaction.raw.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setRefBlockBytes(r);break;case 3:r=t.readInt64();e.setRefBlockNum(r);break;case 4:r=t.readBytes();e.setRefBlockHash(r);break;case 8:r=t.readInt64();e.setExpiration(r);break;case 9:r=new TronWebProto.authority;t.readMessage(r,TronWebProto.authority.deserializeBinaryFromReader),e.addAuths(r);break;case 10:r=t.readBytes();e.setData(r);break;case 11:r=new TronWebProto.Transaction.Contract;t.readMessage(r,TronWebProto.Transaction.Contract.deserializeBinaryFromReader),e.addContract(r);break;case 12:r=t.readBytes();e.setScripts(r);break;case 14:r=t.readInt64();e.setTimestamp(r);break;case 18:r=t.readInt64();e.setFeeLimit(r);break;default:t.skipField()}}return e},TronWebProto.Transaction.raw.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Transaction.raw.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Transaction.raw.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getRefBlockBytes_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getRefBlockNum())&&t.writeInt64(3,r),(r=e.getRefBlockHash_asU8()).length>0&&t.writeBytes(4,r),0!==(r=e.getExpiration())&&t.writeInt64(8,r),(r=e.getAuthsList()).length>0&&t.writeRepeatedMessage(9,r,TronWebProto.authority.serializeBinaryToWriter),(r=e.getData_asU8()).length>0&&t.writeBytes(10,r),(r=e.getContractList()).length>0&&t.writeRepeatedMessage(11,r,TronWebProto.Transaction.Contract.serializeBinaryToWriter),(r=e.getScripts_asU8()).length>0&&t.writeBytes(12,r),0!==(r=e.getTimestamp())&&t.writeInt64(14,r),0!==(r=e.getFeeLimit())&&t.writeInt64(18,r)},TronWebProto.Transaction.raw.prototype.getRefBlockBytes=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.Transaction.raw.prototype.getRefBlockBytes_asB64=function(){return n.Message.bytesAsB64(this.getRefBlockBytes())},TronWebProto.Transaction.raw.prototype.getRefBlockBytes_asU8=function(){return n.Message.bytesAsU8(this.getRefBlockBytes())},TronWebProto.Transaction.raw.prototype.setRefBlockBytes=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Transaction.raw.prototype.getRefBlockNum=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.Transaction.raw.prototype.setRefBlockNum=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.Transaction.raw.prototype.getRefBlockHash=function(){return n.Message.getFieldWithDefault(this,4,"")},TronWebProto.Transaction.raw.prototype.getRefBlockHash_asB64=function(){return n.Message.bytesAsB64(this.getRefBlockHash())},TronWebProto.Transaction.raw.prototype.getRefBlockHash_asU8=function(){return n.Message.bytesAsU8(this.getRefBlockHash())},TronWebProto.Transaction.raw.prototype.setRefBlockHash=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.Transaction.raw.prototype.getExpiration=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.Transaction.raw.prototype.setExpiration=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.Transaction.raw.prototype.getAuthsList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.authority,9)},TronWebProto.Transaction.raw.prototype.setAuthsList=function(e){return n.Message.setRepeatedWrapperField(this,9,e)},TronWebProto.Transaction.raw.prototype.addAuths=function(e,t){return n.Message.addToRepeatedWrapperField(this,9,e,TronWebProto.authority,t)},TronWebProto.Transaction.raw.prototype.clearAuthsList=function(){return this.setAuthsList([])},TronWebProto.Transaction.raw.prototype.getData=function(){return n.Message.getFieldWithDefault(this,10,"")},TronWebProto.Transaction.raw.prototype.getData_asB64=function(){return n.Message.bytesAsB64(this.getData())},TronWebProto.Transaction.raw.prototype.getData_asU8=function(){return n.Message.bytesAsU8(this.getData())},TronWebProto.Transaction.raw.prototype.setData=function(e){return n.Message.setProto3BytesField(this,10,e)},TronWebProto.Transaction.raw.prototype.getContractList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Transaction.Contract,11)},TronWebProto.Transaction.raw.prototype.setContractList=function(e){return n.Message.setRepeatedWrapperField(this,11,e)},TronWebProto.Transaction.raw.prototype.addContract=function(e,t){return n.Message.addToRepeatedWrapperField(this,11,e,TronWebProto.Transaction.Contract,t)},TronWebProto.Transaction.raw.prototype.clearContractList=function(){return this.setContractList([])},TronWebProto.Transaction.raw.prototype.getScripts=function(){return n.Message.getFieldWithDefault(this,12,"")},TronWebProto.Transaction.raw.prototype.getScripts_asB64=function(){return n.Message.bytesAsB64(this.getScripts())},TronWebProto.Transaction.raw.prototype.getScripts_asU8=function(){return n.Message.bytesAsU8(this.getScripts())},TronWebProto.Transaction.raw.prototype.setScripts=function(e){return n.Message.setProto3BytesField(this,12,e)},TronWebProto.Transaction.raw.prototype.getTimestamp=function(){return n.Message.getFieldWithDefault(this,14,0)},TronWebProto.Transaction.raw.prototype.setTimestamp=function(e){return n.Message.setProto3IntField(this,14,e)},TronWebProto.Transaction.raw.prototype.getFeeLimit=function(){return n.Message.getFieldWithDefault(this,18,0)},TronWebProto.Transaction.raw.prototype.setFeeLimit=function(e){return n.Message.setProto3IntField(this,18,e)},TronWebProto.Transaction.prototype.getRawData=function(){return n.Message.getWrapperField(this,TronWebProto.Transaction.raw,1)},TronWebProto.Transaction.prototype.setRawData=function(e){return n.Message.setWrapperField(this,1,e)},TronWebProto.Transaction.prototype.clearRawData=function(){return this.setRawData(void 0)},TronWebProto.Transaction.prototype.hasRawData=function(){return null!=n.Message.getField(this,1)},TronWebProto.Transaction.prototype.getSignatureList=function(){return n.Message.getRepeatedField(this,2)},TronWebProto.Transaction.prototype.getSignatureList_asB64=function(){return n.Message.bytesListAsB64(this.getSignatureList())},TronWebProto.Transaction.prototype.getSignatureList_asU8=function(){return n.Message.bytesListAsU8(this.getSignatureList())},TronWebProto.Transaction.prototype.setSignatureList=function(e){return n.Message.setField(this,2,e||[])},TronWebProto.Transaction.prototype.addSignature=function(e,t){return n.Message.addToRepeatedField(this,2,e,t)},TronWebProto.Transaction.prototype.clearSignatureList=function(){return this.setSignatureList([])},TronWebProto.Transaction.prototype.getRetList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Transaction.Result,5)},TronWebProto.Transaction.prototype.setRetList=function(e){return n.Message.setRepeatedWrapperField(this,5,e)},TronWebProto.Transaction.prototype.addRet=function(e,t){return n.Message.addToRepeatedWrapperField(this,5,e,TronWebProto.Transaction.Result,t)},TronWebProto.Transaction.prototype.clearRetList=function(){return this.setRetList([])},TronWebProto.AccountType={NORMAL:0,ASSETISSUE:1,CONTRACT:2},o.object.extend(t,TronWebProto)},4865:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e,t){return-1!==e.indexOf(t)};e.exports=t.default,e.exports.default=t.default},4955:(e,t,r)=>{const n=r(5441);e.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))},5030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(e);var t=e.split(",");if(t.length<2)return!1;var r=t.shift().trim().split(";"),n=r.shift();if("data:"!==n.slice(0,5))return!1;var c=n.slice(5);if(""!==c&&!s.test(c))return!1;for(var u=0;u<r.length;u++)if((u!==r.length-1||"base64"!==r[u].toLowerCase())&&!a.test(r[u]))return!1;for(var l=0;l<t.length;l++)if(!i.test(t[l]))return!1;return!0};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[a-z]+\/[a-z0-9\-\+\._]+$/i,a=/^[a-z\-]+=[a-z0-9\-]+$/i,i=/^[a-z0-9!\$&'\(\)\*\+,;=\-\._~:@\/\?%\s]*$/i;e.exports=t.default,e.exports.default=t.default},5071:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),e=Date.parse(e),isNaN(e)?null:new Date(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},5098:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r){(0,o.default)(t);var n=String((null==r?void 0:r.version)||r);if(!(null!=r&&r.version||r))return e(t,{version:10})||e(t,{version:13});var c=t.replace(/[\s-]+/g,""),u=0;if("10"===n){if(!s.test(c))return!1;for(var l=0;l<n-1;l++)u+=(l+1)*c.charAt(l);if("X"===c.charAt(9)?u+=100:u+=10*c.charAt(9),u%11==0)return!0}else if("13"===n){if(!a.test(c))return!1;for(var d=0;d<12;d++)u+=i[d%2]*c.charAt(d);if(c.charAt(12)-(10-u%10)%10==0)return!0}return!1};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(?:[0-9]{9}X|[0-9]{10})$/,a=/^(?:[0-9]{13})$/,i=[1,3];e.exports=t.default,e.exports.default=t.default},5226:(e,t,r)=>{var n=r(7186),o=n,s="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==s&&s||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")();o.exportSymbol("TronWebProto.ExchangeCreateContract",null,s),o.exportSymbol("TronWebProto.ExchangeInjectContract",null,s),o.exportSymbol("TronWebProto.ExchangeTransactionContract",null,s),o.exportSymbol("TronWebProto.ExchangeWithdrawContract",null,s),TronWebProto.ExchangeCreateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ExchangeCreateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ExchangeCreateContract.displayName="TronWebProto.ExchangeCreateContract"),TronWebProto.ExchangeInjectContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ExchangeInjectContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ExchangeInjectContract.displayName="TronWebProto.ExchangeInjectContract"),TronWebProto.ExchangeWithdrawContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ExchangeWithdrawContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ExchangeWithdrawContract.displayName="TronWebProto.ExchangeWithdrawContract"),TronWebProto.ExchangeTransactionContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ExchangeTransactionContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ExchangeTransactionContract.displayName="TronWebProto.ExchangeTransactionContract"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ExchangeCreateContract.prototype.toObject=function(e){return TronWebProto.ExchangeCreateContract.toObject(e,this)},TronWebProto.ExchangeCreateContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),firstTokenId:t.getFirstTokenId_asB64(),firstTokenBalance:n.Message.getFieldWithDefault(t,3,0),secondTokenId:t.getSecondTokenId_asB64(),secondTokenBalance:n.Message.getFieldWithDefault(t,5,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ExchangeCreateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ExchangeCreateContract;return TronWebProto.ExchangeCreateContract.deserializeBinaryFromReader(r,t)},TronWebProto.ExchangeCreateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setFirstTokenId(r);break;case 3:r=t.readInt64();e.setFirstTokenBalance(r);break;case 4:r=t.readBytes();e.setSecondTokenId(r);break;case 5:r=t.readInt64();e.setSecondTokenBalance(r);break;default:t.skipField()}}return e},TronWebProto.ExchangeCreateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ExchangeCreateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ExchangeCreateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getFirstTokenId_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getFirstTokenBalance())&&t.writeInt64(3,r),(r=e.getSecondTokenId_asU8()).length>0&&t.writeBytes(4,r),0!==(r=e.getSecondTokenBalance())&&t.writeInt64(5,r)},TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ExchangeCreateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId_asB64=function(){return n.Message.bytesAsB64(this.getFirstTokenId())},TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId_asU8=function(){return n.Message.bytesAsU8(this.getFirstTokenId())},TronWebProto.ExchangeCreateContract.prototype.setFirstTokenId=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.ExchangeCreateContract.prototype.getFirstTokenBalance=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.ExchangeCreateContract.prototype.setFirstTokenBalance=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId=function(){return n.Message.getFieldWithDefault(this,4,"")},TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId_asB64=function(){return n.Message.bytesAsB64(this.getSecondTokenId())},TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId_asU8=function(){return n.Message.bytesAsU8(this.getSecondTokenId())},TronWebProto.ExchangeCreateContract.prototype.setSecondTokenId=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.ExchangeCreateContract.prototype.getSecondTokenBalance=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.ExchangeCreateContract.prototype.setSecondTokenBalance=function(e){return n.Message.setProto3IntField(this,5,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ExchangeInjectContract.prototype.toObject=function(e){return TronWebProto.ExchangeInjectContract.toObject(e,this)},TronWebProto.ExchangeInjectContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),exchangeId:n.Message.getFieldWithDefault(t,2,0),tokenId:t.getTokenId_asB64(),quant:n.Message.getFieldWithDefault(t,4,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ExchangeInjectContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ExchangeInjectContract;return TronWebProto.ExchangeInjectContract.deserializeBinaryFromReader(r,t)},TronWebProto.ExchangeInjectContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setExchangeId(r);break;case 3:r=t.readBytes();e.setTokenId(r);break;case 4:r=t.readInt64();e.setQuant(r);break;default:t.skipField()}}return e},TronWebProto.ExchangeInjectContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ExchangeInjectContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ExchangeInjectContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getExchangeId())&&t.writeInt64(2,r),(r=e.getTokenId_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getQuant())&&t.writeInt64(4,r)},TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ExchangeInjectContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ExchangeInjectContract.prototype.getExchangeId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ExchangeInjectContract.prototype.setExchangeId=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.ExchangeInjectContract.prototype.getTokenId=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.ExchangeInjectContract.prototype.getTokenId_asB64=function(){return n.Message.bytesAsB64(this.getTokenId())},TronWebProto.ExchangeInjectContract.prototype.getTokenId_asU8=function(){return n.Message.bytesAsU8(this.getTokenId())},TronWebProto.ExchangeInjectContract.prototype.setTokenId=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.ExchangeInjectContract.prototype.getQuant=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.ExchangeInjectContract.prototype.setQuant=function(e){return n.Message.setProto3IntField(this,4,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ExchangeWithdrawContract.prototype.toObject=function(e){return TronWebProto.ExchangeWithdrawContract.toObject(e,this)},TronWebProto.ExchangeWithdrawContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),exchangeId:n.Message.getFieldWithDefault(t,2,0),tokenId:t.getTokenId_asB64(),quant:n.Message.getFieldWithDefault(t,4,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ExchangeWithdrawContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ExchangeWithdrawContract;return TronWebProto.ExchangeWithdrawContract.deserializeBinaryFromReader(r,t)},TronWebProto.ExchangeWithdrawContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setExchangeId(r);break;case 3:r=t.readBytes();e.setTokenId(r);break;case 4:r=t.readInt64();e.setQuant(r);break;default:t.skipField()}}return e},TronWebProto.ExchangeWithdrawContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ExchangeWithdrawContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ExchangeWithdrawContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getExchangeId())&&t.writeInt64(2,r),(r=e.getTokenId_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getQuant())&&t.writeInt64(4,r)},TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ExchangeWithdrawContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ExchangeWithdrawContract.prototype.getExchangeId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ExchangeWithdrawContract.prototype.setExchangeId=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.ExchangeWithdrawContract.prototype.getTokenId=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.ExchangeWithdrawContract.prototype.getTokenId_asB64=function(){return n.Message.bytesAsB64(this.getTokenId())},TronWebProto.ExchangeWithdrawContract.prototype.getTokenId_asU8=function(){return n.Message.bytesAsU8(this.getTokenId())},TronWebProto.ExchangeWithdrawContract.prototype.setTokenId=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.ExchangeWithdrawContract.prototype.getQuant=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.ExchangeWithdrawContract.prototype.setQuant=function(e){return n.Message.setProto3IntField(this,4,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ExchangeTransactionContract.prototype.toObject=function(e){return TronWebProto.ExchangeTransactionContract.toObject(e,this)},TronWebProto.ExchangeTransactionContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),exchangeId:n.Message.getFieldWithDefault(t,2,0),tokenId:t.getTokenId_asB64(),quant:n.Message.getFieldWithDefault(t,4,0),expected:n.Message.getFieldWithDefault(t,5,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ExchangeTransactionContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ExchangeTransactionContract;return TronWebProto.ExchangeTransactionContract.deserializeBinaryFromReader(r,t)},TronWebProto.ExchangeTransactionContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setExchangeId(r);break;case 3:r=t.readBytes();e.setTokenId(r);break;case 4:r=t.readInt64();e.setQuant(r);break;case 5:r=t.readInt64();e.setExpected(r);break;default:t.skipField()}}return e},TronWebProto.ExchangeTransactionContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ExchangeTransactionContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ExchangeTransactionContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getExchangeId())&&t.writeInt64(2,r),(r=e.getTokenId_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getQuant())&&t.writeInt64(4,r),0!==(r=e.getExpected())&&t.writeInt64(5,r)},TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ExchangeTransactionContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ExchangeTransactionContract.prototype.getExchangeId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ExchangeTransactionContract.prototype.setExchangeId=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.ExchangeTransactionContract.prototype.getTokenId=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.ExchangeTransactionContract.prototype.getTokenId_asB64=function(){return n.Message.bytesAsB64(this.getTokenId())},TronWebProto.ExchangeTransactionContract.prototype.getTokenId_asU8=function(){return n.Message.bytesAsU8(this.getTokenId())},TronWebProto.ExchangeTransactionContract.prototype.setTokenId=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.ExchangeTransactionContract.prototype.getQuant=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.ExchangeTransactionContract.prototype.setQuant=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.ExchangeTransactionContract.prototype.getExpected=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.ExchangeTransactionContract.prototype.setExpected=function(e){return n.Message.setProto3IntField(this,5,e)},o.object.extend(t,TronWebProto)},5250:function(e,t,r){var n;e=r.nmd(e),function(){var o,s="Expected a function",a="__lodash_hash_undefined__",i="__lodash_placeholder__",c=16,u=32,l=64,d=128,f=256,p=1/0,h=9007199254740991,g=NaN,y=4294967295,m=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",c],["flip",512],["partial",u],["partialRight",l],["rearg",f]],b="[object Arguments]",w="[object Array]",T="[object Boolean]",A="[object Date]",v="[object Error]",P="[object Function]",E="[object GeneratorFunction]",C="[object Map]",B="[object Number]",W="[object Object]",S="[object Promise]",I="[object RegExp]",_="[object Set]",O="[object String]",R="[object Symbol]",M="[object WeakMap]",x="[object ArrayBuffer]",F="[object DataView]",k="[object Float32Array]",N="[object Float64Array]",U="[object Int8Array]",D="[object Int16Array]",L="[object Int32Array]",$="[object Uint8Array]",z="[object Uint8ClampedArray]",j="[object Uint16Array]",V="[object Uint32Array]",G=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,K=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Z=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,J=RegExp(Z.source),Y=RegExp(q.source),X=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,re=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oe=/[\\^$.*+?()[\]{}|]/g,se=RegExp(oe.source),ae=/^\s+/,ie=/\s/,ce=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ue=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ge=/\w*$/,ye=/^[-+]0x[0-9a-f]+$/i,me=/^0b[01]+$/i,be=/^\[object .+?Constructor\]$/,we=/^0o[0-7]+$/i,Te=/^(?:0|[1-9]\d*)$/,Ae=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ve=/($^)/,Pe=/['\n\r\u2028\u2029\\]/g,Ee="\\ud800-\\udfff",Ce="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Be="\\u2700-\\u27bf",We="a-z\\xdf-\\xf6\\xf8-\\xff",Se="A-Z\\xc0-\\xd6\\xd8-\\xde",Ie="\\ufe0e\\ufe0f",_e="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oe="['’]",Re="["+Ee+"]",Me="["+_e+"]",xe="["+Ce+"]",Fe="\\d+",ke="["+Be+"]",Ne="["+We+"]",Ue="[^"+Ee+_e+Fe+Be+We+Se+"]",De="\\ud83c[\\udffb-\\udfff]",Le="[^"+Ee+"]",$e="(?:\\ud83c[\\udde6-\\uddff]){2}",ze="[\\ud800-\\udbff][\\udc00-\\udfff]",je="["+Se+"]",Ve="\\u200d",Ge="(?:"+Ne+"|"+Ue+")",He="(?:"+je+"|"+Ue+")",Ke="(?:['’](?:d|ll|m|re|s|t|ve))?",Ze="(?:['’](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+xe+"|"+De+")"+"?",Je="["+Ie+"]?",Ye=Je+qe+("(?:"+Ve+"(?:"+[Le,$e,ze].join("|")+")"+Je+qe+")*"),Xe="(?:"+[ke,$e,ze].join("|")+")"+Ye,Qe="(?:"+[Le+xe+"?",xe,$e,ze,Re].join("|")+")",et=RegExp(Oe,"g"),tt=RegExp(xe,"g"),rt=RegExp(De+"(?="+De+")|"+Qe+Ye,"g"),nt=RegExp([je+"?"+Ne+"+"+Ke+"(?="+[Me,je,"$"].join("|")+")",He+"+"+Ze+"(?="+[Me,je+Ge,"$"].join("|")+")",je+"?"+Ge+"+"+Ke,je+"+"+Ze,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fe,Xe].join("|"),"g"),ot=RegExp("["+Ve+Ee+Ce+Ie+"]"),st=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,at=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],it=-1,ct={};ct[k]=ct[N]=ct[U]=ct[D]=ct[L]=ct[$]=ct[z]=ct[j]=ct[V]=!0,ct[b]=ct[w]=ct[x]=ct[T]=ct[F]=ct[A]=ct[v]=ct[P]=ct[C]=ct[B]=ct[W]=ct[I]=ct[_]=ct[O]=ct[M]=!1;var ut={};ut[b]=ut[w]=ut[x]=ut[F]=ut[T]=ut[A]=ut[k]=ut[N]=ut[U]=ut[D]=ut[L]=ut[C]=ut[B]=ut[W]=ut[I]=ut[_]=ut[O]=ut[R]=ut[$]=ut[z]=ut[j]=ut[V]=!0,ut[v]=ut[P]=ut[M]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dt=parseFloat,ft=parseInt,pt="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,ht="object"==typeof self&&self&&self.Object===Object&&self,gt=pt||ht||Function("return this")(),yt=t&&!t.nodeType&&t,mt=yt&&e&&!e.nodeType&&e,bt=mt&&mt.exports===yt,wt=bt&&pt.process,Tt=function(){try{var e=mt&&mt.require&&mt.require("util").types;return e||wt&&wt.binding&&wt.binding("util")}catch(e){}}(),At=Tt&&Tt.isArrayBuffer,vt=Tt&&Tt.isDate,Pt=Tt&&Tt.isMap,Et=Tt&&Tt.isRegExp,Ct=Tt&&Tt.isSet,Bt=Tt&&Tt.isTypedArray;function Wt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function St(e,t,r,n){for(var o=-1,s=null==e?0:e.length;++o<s;){var a=e[o];t(n,a,r(a),e)}return n}function It(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function _t(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Ot(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function Rt(e,t){for(var r=-1,n=null==e?0:e.length,o=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[o++]=a)}return s}function Mt(e,t){return!!(null==e?0:e.length)&&jt(e,t,0)>-1}function xt(e,t,r){for(var n=-1,o=null==e?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}function Ft(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function kt(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function Nt(e,t,r,n){var o=-1,s=null==e?0:e.length;for(n&&s&&(r=e[++o]);++o<s;)r=t(r,e[o],o,e);return r}function Ut(e,t,r,n){var o=null==e?0:e.length;for(n&&o&&(r=e[--o]);o--;)r=t(r,e[o],o,e);return r}function Dt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Lt=Kt("length");function $t(e,t,r){var n;return r(e,(function(e,r,o){if(t(e,r,o))return n=r,!1})),n}function zt(e,t,r,n){for(var o=e.length,s=r+(n?1:-1);n?s--:++s<o;)if(t(e[s],s,e))return s;return-1}function jt(e,t,r){return t==t?function(e,t,r){var n=r-1,o=e.length;for(;++n<o;)if(e[n]===t)return n;return-1}(e,t,r):zt(e,Gt,r)}function Vt(e,t,r,n){for(var o=r-1,s=e.length;++o<s;)if(n(e[o],t))return o;return-1}function Gt(e){return e!=e}function Ht(e,t){var r=null==e?0:e.length;return r?Jt(e,t)/r:g}function Kt(e){return function(t){return null==t?o:t[e]}}function Zt(e){return function(t){return null==e?o:e[t]}}function qt(e,t,r,n,o){return o(e,(function(e,o,s){r=n?(n=!1,e):t(r,e,o,s)})),r}function Jt(e,t){for(var r,n=-1,s=e.length;++n<s;){var a=t(e[n]);a!==o&&(r=r===o?a:r+a)}return r}function Yt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Xt(e){return e?e.slice(0,gr(e)+1).replace(ae,""):e}function Qt(e){return function(t){return e(t)}}function er(e,t){return Ft(t,(function(t){return e[t]}))}function tr(e,t){return e.has(t)}function rr(e,t){for(var r=-1,n=e.length;++r<n&&jt(t,e[r],0)>-1;);return r}function nr(e,t){for(var r=e.length;r--&&jt(t,e[r],0)>-1;);return r}var or=Zt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),sr=Zt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function ar(e){return"\\"+lt[e]}function ir(e){return ot.test(e)}function cr(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function ur(e,t){return function(r){return e(t(r))}}function lr(e,t){for(var r=-1,n=e.length,o=0,s=[];++r<n;){var a=e[r];a!==t&&a!==i||(e[r]=i,s[o++]=r)}return s}function dr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function fr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function pr(e){return ir(e)?function(e){var t=rt.lastIndex=0;for(;rt.test(e);)++t;return t}(e):Lt(e)}function hr(e){return ir(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.split("")}(e)}function gr(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var yr=Zt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var mr=function e(t){var r,n=(t=null==t?gt:mr.defaults(gt.Object(),t,mr.pick(gt,at))).Array,ie=t.Date,Ee=t.Error,Ce=t.Function,Be=t.Math,We=t.Object,Se=t.RegExp,Ie=t.String,_e=t.TypeError,Oe=n.prototype,Re=Ce.prototype,Me=We.prototype,xe=t["__core-js_shared__"],Fe=Re.toString,ke=Me.hasOwnProperty,Ne=0,Ue=(r=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",De=Me.toString,Le=Fe.call(We),$e=gt._,ze=Se("^"+Fe.call(ke).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),je=bt?t.Buffer:o,Ve=t.Symbol,Ge=t.Uint8Array,He=je?je.allocUnsafe:o,Ke=ur(We.getPrototypeOf,We),Ze=We.create,qe=Me.propertyIsEnumerable,Je=Oe.splice,Ye=Ve?Ve.isConcatSpreadable:o,Xe=Ve?Ve.iterator:o,Qe=Ve?Ve.toStringTag:o,rt=function(){try{var e=ps(We,"defineProperty");return e({},"",{}),e}catch(e){}}(),ot=t.clearTimeout!==gt.clearTimeout&&t.clearTimeout,lt=ie&&ie.now!==gt.Date.now&&ie.now,pt=t.setTimeout!==gt.setTimeout&&t.setTimeout,ht=Be.ceil,yt=Be.floor,mt=We.getOwnPropertySymbols,wt=je?je.isBuffer:o,Tt=t.isFinite,Lt=Oe.join,Zt=ur(We.keys,We),br=Be.max,wr=Be.min,Tr=ie.now,Ar=t.parseInt,vr=Be.random,Pr=Oe.reverse,Er=ps(t,"DataView"),Cr=ps(t,"Map"),Br=ps(t,"Promise"),Wr=ps(t,"Set"),Sr=ps(t,"WeakMap"),Ir=ps(We,"create"),_r=Sr&&new Sr,Or={},Rr=Ds(Er),Mr=Ds(Cr),xr=Ds(Br),Fr=Ds(Wr),kr=Ds(Sr),Nr=Ve?Ve.prototype:o,Ur=Nr?Nr.valueOf:o,Dr=Nr?Nr.toString:o;function Lr(e){if(ri(e)&&!Ga(e)&&!(e instanceof Vr)){if(e instanceof jr)return e;if(ke.call(e,"__wrapped__"))return Ls(e)}return new jr(e)}var $r=function(){function e(){}return function(t){if(!ti(t))return{};if(Ze)return Ze(t);e.prototype=t;var r=new e;return e.prototype=o,r}}();function zr(){}function jr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Vr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=y,this.__views__=[]}function Gr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Hr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Kr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Zr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Kr;++t<r;)this.add(e[t])}function qr(e){var t=this.__data__=new Hr(e);this.size=t.size}function Jr(e,t){var r=Ga(e),n=!r&&Va(e),o=!r&&!n&&qa(e),s=!r&&!n&&!o&&li(e),a=r||n||o||s,i=a?Yt(e.length,Ie):[],c=i.length;for(var u in e)!t&&!ke.call(e,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||s&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ts(u,c))||i.push(u);return i}function Yr(e){var t=e.length;return t?e[qn(0,t-1)]:o}function Xr(e,t){return ks(Oo(e),cn(t,0,e.length))}function Qr(e){return ks(Oo(e))}function en(e,t,r){(r!==o&&!$a(e[t],r)||r===o&&!(t in e))&&sn(e,t,r)}function tn(e,t,r){var n=e[t];ke.call(e,t)&&$a(n,r)&&(r!==o||t in e)||sn(e,t,r)}function rn(e,t){for(var r=e.length;r--;)if($a(e[r][0],t))return r;return-1}function nn(e,t,r,n){return pn(e,(function(e,o,s){t(n,e,r(e),s)})),n}function on(e,t){return e&&Ro(t,Ri(t),e)}function sn(e,t,r){"__proto__"==t&&rt?rt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function an(e,t){for(var r=-1,s=t.length,a=n(s),i=null==e;++r<s;)a[r]=i?o:Wi(e,t[r]);return a}function cn(e,t,r){return e==e&&(r!==o&&(e=e<=r?e:r),t!==o&&(e=e>=t?e:t)),e}function un(e,t,r,n,s,a){var i,c=1&t,u=2&t,l=4&t;if(r&&(i=s?r(e,n,s,a):r(e)),i!==o)return i;if(!ti(e))return e;var d=Ga(e);if(d){if(i=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&ke.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!c)return Oo(e,i)}else{var f=ys(e),p=f==P||f==E;if(qa(e))return Co(e,c);if(f==W||f==b||p&&!s){if(i=u||p?{}:bs(e),!c)return u?function(e,t){return Ro(e,gs(e),t)}(e,function(e,t){return e&&Ro(t,Mi(t),e)}(i,e)):function(e,t){return Ro(e,hs(e),t)}(e,on(i,e))}else{if(!ut[f])return s?e:{};i=function(e,t,r){var n=e.constructor;switch(t){case x:return Bo(e);case T:case A:return new n(+e);case F:return function(e,t){var r=t?Bo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case k:case N:case U:case D:case L:case $:case z:case j:case V:return Wo(e,r);case C:return new n;case B:case O:return new n(e);case I:return function(e){var t=new e.constructor(e.source,ge.exec(e));return t.lastIndex=e.lastIndex,t}(e);case _:return new n;case R:return o=e,Ur?We(Ur.call(o)):{}}var o}(e,f,c)}}a||(a=new qr);var h=a.get(e);if(h)return h;a.set(e,i),ii(e)?e.forEach((function(n){i.add(un(n,t,r,n,e,a))})):ni(e)&&e.forEach((function(n,o){i.set(o,un(n,t,r,o,e,a))}));var g=d?o:(l?u?as:ss:u?Mi:Ri)(e);return It(g||e,(function(n,o){g&&(n=e[o=n]),tn(i,o,un(n,t,r,o,e,a))})),i}function ln(e,t,r){var n=r.length;if(null==e)return!n;for(e=We(e);n--;){var s=r[n],a=t[s],i=e[s];if(i===o&&!(s in e)||!a(i))return!1}return!0}function dn(e,t,r){if("function"!=typeof e)throw new _e(s);return Rs((function(){e.apply(o,r)}),t)}function fn(e,t,r,n){var o=-1,s=Mt,a=!0,i=e.length,c=[],u=t.length;if(!i)return c;r&&(t=Ft(t,Qt(r))),n?(s=xt,a=!1):t.length>=200&&(s=tr,a=!1,t=new Zr(t));e:for(;++o<i;){var l=e[o],d=null==r?l:r(l);if(l=n||0!==l?l:0,a&&d==d){for(var f=u;f--;)if(t[f]===d)continue e;c.push(l)}else s(t,d,n)||c.push(l)}return c}Lr.templateSettings={escape:X,evaluate:Q,interpolate:ee,variable:"",imports:{_:Lr}},Lr.prototype=zr.prototype,Lr.prototype.constructor=Lr,jr.prototype=$r(zr.prototype),jr.prototype.constructor=jr,Vr.prototype=$r(zr.prototype),Vr.prototype.constructor=Vr,Gr.prototype.clear=function(){this.__data__=Ir?Ir(null):{},this.size=0},Gr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Gr.prototype.get=function(e){var t=this.__data__;if(Ir){var r=t[e];return r===a?o:r}return ke.call(t,e)?t[e]:o},Gr.prototype.has=function(e){var t=this.__data__;return Ir?t[e]!==o:ke.call(t,e)},Gr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ir&&t===o?a:t,this},Hr.prototype.clear=function(){this.__data__=[],this.size=0},Hr.prototype.delete=function(e){var t=this.__data__,r=rn(t,e);return!(r<0)&&(r==t.length-1?t.pop():Je.call(t,r,1),--this.size,!0)},Hr.prototype.get=function(e){var t=this.__data__,r=rn(t,e);return r<0?o:t[r][1]},Hr.prototype.has=function(e){return rn(this.__data__,e)>-1},Hr.prototype.set=function(e,t){var r=this.__data__,n=rn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Kr.prototype.clear=function(){this.size=0,this.__data__={hash:new Gr,map:new(Cr||Hr),string:new Gr}},Kr.prototype.delete=function(e){var t=ds(this,e).delete(e);return this.size-=t?1:0,t},Kr.prototype.get=function(e){return ds(this,e).get(e)},Kr.prototype.has=function(e){return ds(this,e).has(e)},Kr.prototype.set=function(e,t){var r=ds(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Zr.prototype.add=Zr.prototype.push=function(e){return this.__data__.set(e,a),this},Zr.prototype.has=function(e){return this.__data__.has(e)},qr.prototype.clear=function(){this.__data__=new Hr,this.size=0},qr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},qr.prototype.get=function(e){return this.__data__.get(e)},qr.prototype.has=function(e){return this.__data__.has(e)},qr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Hr){var n=r.__data__;if(!Cr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Kr(n)}return r.set(e,t),this.size=r.size,this};var pn=Fo(An),hn=Fo(vn,!0);function gn(e,t){var r=!0;return pn(e,(function(e,n,o){return r=!!t(e,n,o)})),r}function yn(e,t,r){for(var n=-1,s=e.length;++n<s;){var a=e[n],i=t(a);if(null!=i&&(c===o?i==i&&!ui(i):r(i,c)))var c=i,u=a}return u}function mn(e,t){var r=[];return pn(e,(function(e,n,o){t(e,n,o)&&r.push(e)})),r}function bn(e,t,r,n,o){var s=-1,a=e.length;for(r||(r=ws),o||(o=[]);++s<a;){var i=e[s];t>0&&r(i)?t>1?bn(i,t-1,r,n,o):kt(o,i):n||(o[o.length]=i)}return o}var wn=ko(),Tn=ko(!0);function An(e,t){return e&&wn(e,t,Ri)}function vn(e,t){return e&&Tn(e,t,Ri)}function Pn(e,t){return Rt(t,(function(t){return Xa(e[t])}))}function En(e,t){for(var r=0,n=(t=Ao(t,e)).length;null!=e&&r<n;)e=e[Us(t[r++])];return r&&r==n?e:o}function Cn(e,t,r){var n=t(e);return Ga(e)?n:kt(n,r(e))}function Bn(e){return null==e?e===o?"[object Undefined]":"[object Null]":Qe&&Qe in We(e)?function(e){var t=ke.call(e,Qe),r=e[Qe];try{e[Qe]=o;var n=!0}catch(e){}var s=De.call(e);n&&(t?e[Qe]=r:delete e[Qe]);return s}(e):function(e){return De.call(e)}(e)}function Wn(e,t){return e>t}function Sn(e,t){return null!=e&&ke.call(e,t)}function In(e,t){return null!=e&&t in We(e)}function _n(e,t,r){for(var s=r?xt:Mt,a=e[0].length,i=e.length,c=i,u=n(i),l=1/0,d=[];c--;){var f=e[c];c&&t&&(f=Ft(f,Qt(t))),l=wr(f.length,l),u[c]=!r&&(t||a>=120&&f.length>=120)?new Zr(c&&f):o}f=e[0];var p=-1,h=u[0];e:for(;++p<a&&d.length<l;){var g=f[p],y=t?t(g):g;if(g=r||0!==g?g:0,!(h?tr(h,y):s(d,y,r))){for(c=i;--c;){var m=u[c];if(!(m?tr(m,y):s(e[c],y,r)))continue e}h&&h.push(y),d.push(g)}}return d}function On(e,t,r){var n=null==(e=Is(e,t=Ao(t,e)))?e:e[Us(Ys(t))];return null==n?o:Wt(n,e,r)}function Rn(e){return ri(e)&&Bn(e)==b}function Mn(e,t,r,n,s){return e===t||(null==e||null==t||!ri(e)&&!ri(t)?e!=e&&t!=t:function(e,t,r,n,s,a){var i=Ga(e),c=Ga(t),u=i?w:ys(e),l=c?w:ys(t),d=(u=u==b?W:u)==W,f=(l=l==b?W:l)==W,p=u==l;if(p&&qa(e)){if(!qa(t))return!1;i=!0,d=!1}if(p&&!d)return a||(a=new qr),i||li(e)?ns(e,t,r,n,s,a):function(e,t,r,n,o,s,a){switch(r){case F:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case x:return!(e.byteLength!=t.byteLength||!s(new Ge(e),new Ge(t)));case T:case A:case B:return $a(+e,+t);case v:return e.name==t.name&&e.message==t.message;case I:case O:return e==t+"";case C:var i=cr;case _:var c=1&n;if(i||(i=dr),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;n|=2,a.set(e,t);var l=ns(i(e),i(t),n,o,s,a);return a.delete(e),l;case R:if(Ur)return Ur.call(e)==Ur.call(t)}return!1}(e,t,u,r,n,s,a);if(!(1&r)){var h=d&&ke.call(e,"__wrapped__"),g=f&&ke.call(t,"__wrapped__");if(h||g){var y=h?e.value():e,m=g?t.value():t;return a||(a=new qr),s(y,m,r,n,a)}}if(!p)return!1;return a||(a=new qr),function(e,t,r,n,s,a){var i=1&r,c=ss(e),u=c.length,l=ss(t),d=l.length;if(u!=d&&!i)return!1;var f=u;for(;f--;){var p=c[f];if(!(i?p in t:ke.call(t,p)))return!1}var h=a.get(e),g=a.get(t);if(h&&g)return h==t&&g==e;var y=!0;a.set(e,t),a.set(t,e);var m=i;for(;++f<u;){var b=e[p=c[f]],w=t[p];if(n)var T=i?n(w,b,p,t,e,a):n(b,w,p,e,t,a);if(!(T===o?b===w||s(b,w,r,n,a):T)){y=!1;break}m||(m="constructor"==p)}if(y&&!m){var A=e.constructor,v=t.constructor;A==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof A&&A instanceof A&&"function"==typeof v&&v instanceof v||(y=!1)}return a.delete(e),a.delete(t),y}(e,t,r,n,s,a)}(e,t,r,n,Mn,s))}function xn(e,t,r,n){var s=r.length,a=s,i=!n;if(null==e)return!a;for(e=We(e);s--;){var c=r[s];if(i&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<a;){var u=(c=r[s])[0],l=e[u],d=c[1];if(i&&c[2]){if(l===o&&!(u in e))return!1}else{var f=new qr;if(n)var p=n(l,d,u,e,t,f);if(!(p===o?Mn(d,l,3,n,f):p))return!1}}return!0}function Fn(e){return!(!ti(e)||(t=e,Ue&&Ue in t))&&(Xa(e)?ze:be).test(Ds(e));var t}function kn(e){return"function"==typeof e?e:null==e?oc:"object"==typeof e?Ga(e)?zn(e[0],e[1]):$n(e):pc(e)}function Nn(e){if(!Cs(e))return Zt(e);var t=[];for(var r in We(e))ke.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Un(e){if(!ti(e))return function(e){var t=[];if(null!=e)for(var r in We(e))t.push(r);return t}(e);var t=Cs(e),r=[];for(var n in e)("constructor"!=n||!t&&ke.call(e,n))&&r.push(n);return r}function Dn(e,t){return e<t}function Ln(e,t){var r=-1,o=Ka(e)?n(e.length):[];return pn(e,(function(e,n,s){o[++r]=t(e,n,s)})),o}function $n(e){var t=fs(e);return 1==t.length&&t[0][2]?Ws(t[0][0],t[0][1]):function(r){return r===e||xn(r,e,t)}}function zn(e,t){return vs(e)&&Bs(t)?Ws(Us(e),t):function(r){var n=Wi(r,e);return n===o&&n===t?Si(r,e):Mn(t,n,3)}}function jn(e,t,r,n,s){e!==t&&wn(t,(function(a,i){if(s||(s=new qr),ti(a))!function(e,t,r,n,s,a,i){var c=_s(e,r),u=_s(t,r),l=i.get(u);if(l)return void en(e,r,l);var d=a?a(c,u,r+"",e,t,i):o,f=d===o;if(f){var p=Ga(u),h=!p&&qa(u),g=!p&&!h&&li(u);d=u,p||h||g?Ga(c)?d=c:Za(c)?d=Oo(c):h?(f=!1,d=Co(u,!0)):g?(f=!1,d=Wo(u,!0)):d=[]:si(u)||Va(u)?(d=c,Va(c)?d=bi(c):ti(c)&&!Xa(c)||(d=bs(u))):f=!1}f&&(i.set(u,d),s(d,u,n,a,i),i.delete(u));en(e,r,d)}(e,t,i,r,jn,n,s);else{var c=n?n(_s(e,i),a,i+"",e,t,s):o;c===o&&(c=a),en(e,i,c)}}),Mi)}function Vn(e,t){var r=e.length;if(r)return Ts(t+=t<0?r:0,r)?e[t]:o}function Gn(e,t,r){t=t.length?Ft(t,(function(e){return Ga(e)?function(t){return En(t,1===e.length?e[0]:e)}:e})):[oc];var n=-1;t=Ft(t,Qt(ls()));var o=Ln(e,(function(e,r,o){var s=Ft(t,(function(t){return t(e)}));return{criteria:s,index:++n,value:e}}));return function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(o,(function(e,t){return function(e,t,r){var n=-1,o=e.criteria,s=t.criteria,a=o.length,i=r.length;for(;++n<a;){var c=So(o[n],s[n]);if(c)return n>=i?c:c*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}))}function Hn(e,t,r){for(var n=-1,o=t.length,s={};++n<o;){var a=t[n],i=En(e,a);r(i,a)&&eo(s,Ao(a,e),i)}return s}function Kn(e,t,r,n){var o=n?Vt:jt,s=-1,a=t.length,i=e;for(e===t&&(t=Oo(t)),r&&(i=Ft(e,Qt(r)));++s<a;)for(var c=0,u=t[s],l=r?r(u):u;(c=o(i,l,c,n))>-1;)i!==e&&Je.call(i,c,1),Je.call(e,c,1);return e}function Zn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var o=t[r];if(r==n||o!==s){var s=o;Ts(o)?Je.call(e,o,1):po(e,o)}}return e}function qn(e,t){return e+yt(vr()*(t-e+1))}function Jn(e,t){var r="";if(!e||t<1||t>h)return r;do{t%2&&(r+=e),(t=yt(t/2))&&(e+=e)}while(t);return r}function Yn(e,t){return Ms(Ss(e,t,oc),e+"")}function Xn(e){return Yr($i(e))}function Qn(e,t){var r=$i(e);return ks(r,cn(t,0,r.length))}function eo(e,t,r,n){if(!ti(e))return e;for(var s=-1,a=(t=Ao(t,e)).length,i=a-1,c=e;null!=c&&++s<a;){var u=Us(t[s]),l=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(s!=i){var d=c[u];(l=n?n(d,u,c):o)===o&&(l=ti(d)?d:Ts(t[s+1])?[]:{})}tn(c,u,l),c=c[u]}return e}var to=_r?function(e,t){return _r.set(e,t),e}:oc,ro=rt?function(e,t){return rt(e,"toString",{configurable:!0,enumerable:!1,value:tc(t),writable:!0})}:oc;function no(e){return ks($i(e))}function oo(e,t,r){var o=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(r=r>s?s:r)<0&&(r+=s),s=t>r?0:r-t>>>0,t>>>=0;for(var a=n(s);++o<s;)a[o]=e[o+t];return a}function so(e,t){var r;return pn(e,(function(e,n,o){return!(r=t(e,n,o))})),!!r}function ao(e,t,r){var n=0,o=null==e?n:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;n<o;){var s=n+o>>>1,a=e[s];null!==a&&!ui(a)&&(r?a<=t:a<t)?n=s+1:o=s}return o}return io(e,t,oc,r)}function io(e,t,r,n){var s=0,a=null==e?0:e.length;if(0===a)return 0;for(var i=(t=r(t))!=t,c=null===t,u=ui(t),l=t===o;s<a;){var d=yt((s+a)/2),f=r(e[d]),p=f!==o,h=null===f,g=f==f,y=ui(f);if(i)var m=n||g;else m=l?g&&(n||p):c?g&&p&&(n||!h):u?g&&p&&!h&&(n||!y):!h&&!y&&(n?f<=t:f<t);m?s=d+1:a=d}return wr(a,4294967294)}function co(e,t){for(var r=-1,n=e.length,o=0,s=[];++r<n;){var a=e[r],i=t?t(a):a;if(!r||!$a(i,c)){var c=i;s[o++]=0===a?0:a}}return s}function uo(e){return"number"==typeof e?e:ui(e)?g:+e}function lo(e){if("string"==typeof e)return e;if(Ga(e))return Ft(e,lo)+"";if(ui(e))return Dr?Dr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function fo(e,t,r){var n=-1,o=Mt,s=e.length,a=!0,i=[],c=i;if(r)a=!1,o=xt;else if(s>=200){var u=t?null:Yo(e);if(u)return dr(u);a=!1,o=tr,c=new Zr}else c=t?[]:i;e:for(;++n<s;){var l=e[n],d=t?t(l):l;if(l=r||0!==l?l:0,a&&d==d){for(var f=c.length;f--;)if(c[f]===d)continue e;t&&c.push(d),i.push(l)}else o(c,d,r)||(c!==i&&c.push(d),i.push(l))}return i}function po(e,t){return null==(e=Is(e,t=Ao(t,e)))||delete e[Us(Ys(t))]}function ho(e,t,r,n){return eo(e,t,r(En(e,t)),n)}function go(e,t,r,n){for(var o=e.length,s=n?o:-1;(n?s--:++s<o)&&t(e[s],s,e););return r?oo(e,n?0:s,n?s+1:o):oo(e,n?s+1:0,n?o:s)}function yo(e,t){var r=e;return r instanceof Vr&&(r=r.value()),Nt(t,(function(e,t){return t.func.apply(t.thisArg,kt([e],t.args))}),r)}function mo(e,t,r){var o=e.length;if(o<2)return o?fo(e[0]):[];for(var s=-1,a=n(o);++s<o;)for(var i=e[s],c=-1;++c<o;)c!=s&&(a[s]=fn(a[s]||i,e[c],t,r));return fo(bn(a,1),t,r)}function bo(e,t,r){for(var n=-1,s=e.length,a=t.length,i={};++n<s;){var c=n<a?t[n]:o;r(i,e[n],c)}return i}function wo(e){return Za(e)?e:[]}function To(e){return"function"==typeof e?e:oc}function Ao(e,t){return Ga(e)?e:vs(e,t)?[e]:Ns(wi(e))}var vo=Yn;function Po(e,t,r){var n=e.length;return r=r===o?n:r,!t&&r>=n?e:oo(e,t,r)}var Eo=ot||function(e){return gt.clearTimeout(e)};function Co(e,t){if(t)return e.slice();var r=e.length,n=He?He(r):new e.constructor(r);return e.copy(n),n}function Bo(e){var t=new e.constructor(e.byteLength);return new Ge(t).set(new Ge(e)),t}function Wo(e,t){var r=t?Bo(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function So(e,t){if(e!==t){var r=e!==o,n=null===e,s=e==e,a=ui(e),i=t!==o,c=null===t,u=t==t,l=ui(t);if(!c&&!l&&!a&&e>t||a&&i&&u&&!c&&!l||n&&i&&u||!r&&u||!s)return 1;if(!n&&!a&&!l&&e<t||l&&r&&s&&!n&&!a||c&&r&&s||!i&&s||!u)return-1}return 0}function Io(e,t,r,o){for(var s=-1,a=e.length,i=r.length,c=-1,u=t.length,l=br(a-i,0),d=n(u+l),f=!o;++c<u;)d[c]=t[c];for(;++s<i;)(f||s<a)&&(d[r[s]]=e[s]);for(;l--;)d[c++]=e[s++];return d}function _o(e,t,r,o){for(var s=-1,a=e.length,i=-1,c=r.length,u=-1,l=t.length,d=br(a-c,0),f=n(d+l),p=!o;++s<d;)f[s]=e[s];for(var h=s;++u<l;)f[h+u]=t[u];for(;++i<c;)(p||s<a)&&(f[h+r[i]]=e[s++]);return f}function Oo(e,t){var r=-1,o=e.length;for(t||(t=n(o));++r<o;)t[r]=e[r];return t}function Ro(e,t,r,n){var s=!r;r||(r={});for(var a=-1,i=t.length;++a<i;){var c=t[a],u=n?n(r[c],e[c],c,r,e):o;u===o&&(u=e[c]),s?sn(r,c,u):tn(r,c,u)}return r}function Mo(e,t){return function(r,n){var o=Ga(r)?St:nn,s=t?t():{};return o(r,e,ls(n,2),s)}}function xo(e){return Yn((function(t,r){var n=-1,s=r.length,a=s>1?r[s-1]:o,i=s>2?r[2]:o;for(a=e.length>3&&"function"==typeof a?(s--,a):o,i&&As(r[0],r[1],i)&&(a=s<3?o:a,s=1),t=We(t);++n<s;){var c=r[n];c&&e(t,c,n,a)}return t}))}function Fo(e,t){return function(r,n){if(null==r)return r;if(!Ka(r))return e(r,n);for(var o=r.length,s=t?o:-1,a=We(r);(t?s--:++s<o)&&!1!==n(a[s],s,a););return r}}function ko(e){return function(t,r,n){for(var o=-1,s=We(t),a=n(t),i=a.length;i--;){var c=a[e?i:++o];if(!1===r(s[c],c,s))break}return t}}function No(e){return function(t){var r=ir(t=wi(t))?hr(t):o,n=r?r[0]:t.charAt(0),s=r?Po(r,1).join(""):t.slice(1);return n[e]()+s}}function Uo(e){return function(t){return Nt(Xi(Vi(t).replace(et,"")),e,"")}}function Do(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=$r(e.prototype),n=e.apply(r,t);return ti(n)?n:r}}function Lo(e){return function(t,r,n){var s=We(t);if(!Ka(t)){var a=ls(r,3);t=Ri(t),r=function(e){return a(s[e],e,s)}}var i=e(t,r,n);return i>-1?s[a?t[i]:i]:o}}function $o(e){return os((function(t){var r=t.length,n=r,a=jr.prototype.thru;for(e&&t.reverse();n--;){var i=t[n];if("function"!=typeof i)throw new _e(s);if(a&&!c&&"wrapper"==cs(i))var c=new jr([],!0)}for(n=c?n:r;++n<r;){var u=cs(i=t[n]),l="wrapper"==u?is(i):o;c=l&&Ps(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[cs(l[0])].apply(c,l[3]):1==i.length&&Ps(i)?c[u]():c.thru(i)}return function(){var e=arguments,n=e[0];if(c&&1==e.length&&Ga(n))return c.plant(n).value();for(var o=0,s=r?t[o].apply(this,e):n;++o<r;)s=t[o].call(this,s);return s}}))}function zo(e,t,r,s,a,i,c,u,l,f){var p=t&d,h=1&t,g=2&t,y=24&t,m=512&t,b=g?o:Do(e);return function d(){for(var w=arguments.length,T=n(w),A=w;A--;)T[A]=arguments[A];if(y)var v=us(d),P=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(T,v);if(s&&(T=Io(T,s,a,y)),i&&(T=_o(T,i,c,y)),w-=P,y&&w<f){var E=lr(T,v);return qo(e,t,zo,d.placeholder,r,T,E,u,l,f-w)}var C=h?r:this,B=g?C[e]:e;return w=T.length,u?T=function(e,t){var r=e.length,n=wr(t.length,r),s=Oo(e);for(;n--;){var a=t[n];e[n]=Ts(a,r)?s[a]:o}return e}(T,u):m&&w>1&&T.reverse(),p&&l<w&&(T.length=l),this&&this!==gt&&this instanceof d&&(B=b||Do(B)),B.apply(C,T)}}function jo(e,t){return function(r,n){return function(e,t,r,n){return An(e,(function(e,o,s){t(n,r(e),o,s)})),n}(r,e,t(n),{})}}function Vo(e,t){return function(r,n){var s;if(r===o&&n===o)return t;if(r!==o&&(s=r),n!==o){if(s===o)return n;"string"==typeof r||"string"==typeof n?(r=lo(r),n=lo(n)):(r=uo(r),n=uo(n)),s=e(r,n)}return s}}function Go(e){return os((function(t){return t=Ft(t,Qt(ls())),Yn((function(r){var n=this;return e(t,(function(e){return Wt(e,n,r)}))}))}))}function Ho(e,t){var r=(t=t===o?" ":lo(t)).length;if(r<2)return r?Jn(t,e):t;var n=Jn(t,ht(e/pr(t)));return ir(t)?Po(hr(n),0,e).join(""):n.slice(0,e)}function Ko(e){return function(t,r,s){return s&&"number"!=typeof s&&As(t,r,s)&&(r=s=o),t=hi(t),r===o?(r=t,t=0):r=hi(r),function(e,t,r,o){for(var s=-1,a=br(ht((t-e)/(r||1)),0),i=n(a);a--;)i[o?a:++s]=e,e+=r;return i}(t,r,s=s===o?t<r?1:-1:hi(s),e)}}function Zo(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=mi(t),r=mi(r)),e(t,r)}}function qo(e,t,r,n,s,a,i,c,d,f){var p=8&t;t|=p?u:l,4&(t&=~(p?l:u))||(t&=-4);var h=[e,t,s,p?a:o,p?i:o,p?o:a,p?o:i,c,d,f],g=r.apply(o,h);return Ps(e)&&Os(g,h),g.placeholder=n,xs(g,e,t)}function Jo(e){var t=Be[e];return function(e,r){if(e=mi(e),(r=null==r?0:wr(gi(r),292))&&Tt(e)){var n=(wi(e)+"e").split("e");return+((n=(wi(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Yo=Wr&&1/dr(new Wr([,-0]))[1]==p?function(e){return new Wr(e)}:uc;function Xo(e){return function(t){var r=ys(t);return r==C?cr(t):r==_?fr(t):function(e,t){return Ft(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Qo(e,t,r,a,p,h,g,y){var m=2&t;if(!m&&"function"!=typeof e)throw new _e(s);var b=a?a.length:0;if(b||(t&=-97,a=p=o),g=g===o?g:br(gi(g),0),y=y===o?y:gi(y),b-=p?p.length:0,t&l){var w=a,T=p;a=p=o}var A=m?o:is(e),v=[e,t,r,a,p,w,T,h,g,y];if(A&&function(e,t){var r=e[1],n=t[1],o=r|n,s=o<131,a=n==d&&8==r||n==d&&r==f&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!s&&!a)return e;1&n&&(e[2]=t[2],o|=1&r?0:4);var c=t[3];if(c){var u=e[3];e[3]=u?Io(u,c,t[4]):c,e[4]=u?lr(e[3],i):t[4]}(c=t[5])&&(u=e[5],e[5]=u?_o(u,c,t[6]):c,e[6]=u?lr(e[5],i):t[6]);(c=t[7])&&(e[7]=c);n&d&&(e[8]=null==e[8]?t[8]:wr(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(v,A),e=v[0],t=v[1],r=v[2],a=v[3],p=v[4],!(y=v[9]=v[9]===o?m?0:e.length:br(v[9]-b,0))&&24&t&&(t&=-25),t&&1!=t)P=8==t||t==c?function(e,t,r){var s=Do(e);return function a(){for(var i=arguments.length,c=n(i),u=i,l=us(a);u--;)c[u]=arguments[u];var d=i<3&&c[0]!==l&&c[i-1]!==l?[]:lr(c,l);return(i-=d.length)<r?qo(e,t,zo,a.placeholder,o,c,d,o,o,r-i):Wt(this&&this!==gt&&this instanceof a?s:e,this,c)}}(e,t,y):t!=u&&33!=t||p.length?zo.apply(o,v):function(e,t,r,o){var s=1&t,a=Do(e);return function t(){for(var i=-1,c=arguments.length,u=-1,l=o.length,d=n(l+c),f=this&&this!==gt&&this instanceof t?a:e;++u<l;)d[u]=o[u];for(;c--;)d[u++]=arguments[++i];return Wt(f,s?r:this,d)}}(e,t,r,a);else var P=function(e,t,r){var n=1&t,o=Do(e);return function t(){return(this&&this!==gt&&this instanceof t?o:e).apply(n?r:this,arguments)}}(e,t,r);return xs((A?to:Os)(P,v),e,t)}function es(e,t,r,n){return e===o||$a(e,Me[r])&&!ke.call(n,r)?t:e}function ts(e,t,r,n,s,a){return ti(e)&&ti(t)&&(a.set(t,e),jn(e,t,o,ts,a),a.delete(t)),e}function rs(e){return si(e)?o:e}function ns(e,t,r,n,s,a){var i=1&r,c=e.length,u=t.length;if(c!=u&&!(i&&u>c))return!1;var l=a.get(e),d=a.get(t);if(l&&d)return l==t&&d==e;var f=-1,p=!0,h=2&r?new Zr:o;for(a.set(e,t),a.set(t,e);++f<c;){var g=e[f],y=t[f];if(n)var m=i?n(y,g,f,t,e,a):n(g,y,f,e,t,a);if(m!==o){if(m)continue;p=!1;break}if(h){if(!Dt(t,(function(e,t){if(!tr(h,t)&&(g===e||s(g,e,r,n,a)))return h.push(t)}))){p=!1;break}}else if(g!==y&&!s(g,y,r,n,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function os(e){return Ms(Ss(e,o,Hs),e+"")}function ss(e){return Cn(e,Ri,hs)}function as(e){return Cn(e,Mi,gs)}var is=_r?function(e){return _r.get(e)}:uc;function cs(e){for(var t=e.name+"",r=Or[t],n=ke.call(Or,t)?r.length:0;n--;){var o=r[n],s=o.func;if(null==s||s==e)return o.name}return t}function us(e){return(ke.call(Lr,"placeholder")?Lr:e).placeholder}function ls(){var e=Lr.iteratee||sc;return e=e===sc?kn:e,arguments.length?e(arguments[0],arguments[1]):e}function ds(e,t){var r=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function fs(e){for(var t=Ri(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Bs(o)]}return t}function ps(e,t){var r=function(e,t){return null==e?o:e[t]}(e,t);return Fn(r)?r:o}var hs=mt?function(e){return null==e?[]:(e=We(e),Rt(mt(e),(function(t){return qe.call(e,t)})))}:yc,gs=mt?function(e){for(var t=[];e;)kt(t,hs(e)),e=Ke(e);return t}:yc,ys=Bn;function ms(e,t,r){for(var n=-1,o=(t=Ao(t,e)).length,s=!1;++n<o;){var a=Us(t[n]);if(!(s=null!=e&&r(e,a)))break;e=e[a]}return s||++n!=o?s:!!(o=null==e?0:e.length)&&ei(o)&&Ts(a,o)&&(Ga(e)||Va(e))}function bs(e){return"function"!=typeof e.constructor||Cs(e)?{}:$r(Ke(e))}function ws(e){return Ga(e)||Va(e)||!!(Ye&&e&&e[Ye])}function Ts(e,t){var r=typeof e;return!!(t=null==t?h:t)&&("number"==r||"symbol"!=r&&Te.test(e))&&e>-1&&e%1==0&&e<t}function As(e,t,r){if(!ti(r))return!1;var n=typeof t;return!!("number"==n?Ka(r)&&Ts(t,r.length):"string"==n&&t in r)&&$a(r[t],e)}function vs(e,t){if(Ga(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!ui(e))||(re.test(e)||!te.test(e)||null!=t&&e in We(t))}function Ps(e){var t=cs(e),r=Lr[t];if("function"!=typeof r||!(t in Vr.prototype))return!1;if(e===r)return!0;var n=is(r);return!!n&&e===n[0]}(Er&&ys(new Er(new ArrayBuffer(1)))!=F||Cr&&ys(new Cr)!=C||Br&&ys(Br.resolve())!=S||Wr&&ys(new Wr)!=_||Sr&&ys(new Sr)!=M)&&(ys=function(e){var t=Bn(e),r=t==W?e.constructor:o,n=r?Ds(r):"";if(n)switch(n){case Rr:return F;case Mr:return C;case xr:return S;case Fr:return _;case kr:return M}return t});var Es=xe?Xa:mc;function Cs(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Me)}function Bs(e){return e==e&&!ti(e)}function Ws(e,t){return function(r){return null!=r&&(r[e]===t&&(t!==o||e in We(r)))}}function Ss(e,t,r){return t=br(t===o?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=br(o.length-t,0),i=n(a);++s<a;)i[s]=o[t+s];s=-1;for(var c=n(t+1);++s<t;)c[s]=o[s];return c[t]=r(i),Wt(e,this,c)}}function Is(e,t){return t.length<2?e:En(e,oo(t,0,-1))}function _s(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Os=Fs(to),Rs=pt||function(e,t){return gt.setTimeout(e,t)},Ms=Fs(ro);function xs(e,t,r){var n=t+"";return Ms(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ce,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return It(m,(function(r){var n="_."+r[0];t&r[1]&&!Mt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ue);return t?t[1].split(le):[]}(n),r)))}function Fs(e){var t=0,r=0;return function(){var n=Tr(),s=16-(n-r);if(r=n,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function ks(e,t){var r=-1,n=e.length,s=n-1;for(t=t===o?n:t;++r<t;){var a=qn(r,s),i=e[a];e[a]=e[r],e[r]=i}return e.length=t,e}var Ns=function(e){var t=Fa(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ne,(function(e,r,n,o){t.push(n?o.replace(pe,"$1"):r||e)})),t}));function Us(e){if("string"==typeof e||ui(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ds(e){if(null!=e){try{return Fe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ls(e){if(e instanceof Vr)return e.clone();var t=new jr(e.__wrapped__,e.__chain__);return t.__actions__=Oo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var $s=Yn((function(e,t){return Za(e)?fn(e,bn(t,1,Za,!0)):[]})),zs=Yn((function(e,t){var r=Ys(t);return Za(r)&&(r=o),Za(e)?fn(e,bn(t,1,Za,!0),ls(r,2)):[]})),js=Yn((function(e,t){var r=Ys(t);return Za(r)&&(r=o),Za(e)?fn(e,bn(t,1,Za,!0),o,r):[]}));function Vs(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:gi(r);return o<0&&(o=br(n+o,0)),zt(e,ls(t,3),o)}function Gs(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var s=n-1;return r!==o&&(s=gi(r),s=r<0?br(n+s,0):wr(s,n-1)),zt(e,ls(t,3),s,!0)}function Hs(e){return(null==e?0:e.length)?bn(e,1):[]}function Ks(e){return e&&e.length?e[0]:o}var Zs=Yn((function(e){var t=Ft(e,wo);return t.length&&t[0]===e[0]?_n(t):[]})),qs=Yn((function(e){var t=Ys(e),r=Ft(e,wo);return t===Ys(r)?t=o:r.pop(),r.length&&r[0]===e[0]?_n(r,ls(t,2)):[]})),Js=Yn((function(e){var t=Ys(e),r=Ft(e,wo);return(t="function"==typeof t?t:o)&&r.pop(),r.length&&r[0]===e[0]?_n(r,o,t):[]}));function Ys(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Xs=Yn(Qs);function Qs(e,t){return e&&e.length&&t&&t.length?Kn(e,t):e}var ea=os((function(e,t){var r=null==e?0:e.length,n=an(e,t);return Zn(e,Ft(t,(function(e){return Ts(e,r)?+e:e})).sort(So)),n}));function ta(e){return null==e?e:Pr.call(e)}var ra=Yn((function(e){return fo(bn(e,1,Za,!0))})),na=Yn((function(e){var t=Ys(e);return Za(t)&&(t=o),fo(bn(e,1,Za,!0),ls(t,2))})),oa=Yn((function(e){var t=Ys(e);return t="function"==typeof t?t:o,fo(bn(e,1,Za,!0),o,t)}));function sa(e){if(!e||!e.length)return[];var t=0;return e=Rt(e,(function(e){if(Za(e))return t=br(e.length,t),!0})),Yt(t,(function(t){return Ft(e,Kt(t))}))}function aa(e,t){if(!e||!e.length)return[];var r=sa(e);return null==t?r:Ft(r,(function(e){return Wt(t,o,e)}))}var ia=Yn((function(e,t){return Za(e)?fn(e,t):[]})),ca=Yn((function(e){return mo(Rt(e,Za))})),ua=Yn((function(e){var t=Ys(e);return Za(t)&&(t=o),mo(Rt(e,Za),ls(t,2))})),la=Yn((function(e){var t=Ys(e);return t="function"==typeof t?t:o,mo(Rt(e,Za),o,t)})),da=Yn(sa);var fa=Yn((function(e){var t=e.length,r=t>1?e[t-1]:o;return r="function"==typeof r?(e.pop(),r):o,aa(e,r)}));function pa(e){var t=Lr(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var ga=os((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,s=function(t){return an(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Vr&&Ts(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:ha,args:[s],thisArg:o}),new jr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(s)}));var ya=Mo((function(e,t,r){ke.call(e,r)?++e[r]:sn(e,r,1)}));var ma=Lo(Vs),ba=Lo(Gs);function wa(e,t){return(Ga(e)?It:pn)(e,ls(t,3))}function Ta(e,t){return(Ga(e)?_t:hn)(e,ls(t,3))}var Aa=Mo((function(e,t,r){ke.call(e,r)?e[r].push(t):sn(e,r,[t])}));var va=Yn((function(e,t,r){var o=-1,s="function"==typeof t,a=Ka(e)?n(e.length):[];return pn(e,(function(e){a[++o]=s?Wt(t,e,r):On(e,t,r)})),a})),Pa=Mo((function(e,t,r){sn(e,r,t)}));function Ea(e,t){return(Ga(e)?Ft:Ln)(e,ls(t,3))}var Ca=Mo((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var Ba=Yn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&As(e,t[0],t[1])?t=[]:r>2&&As(t[0],t[1],t[2])&&(t=[t[0]]),Gn(e,bn(t,1),[])})),Wa=lt||function(){return gt.Date.now()};function Sa(e,t,r){return t=r?o:t,t=e&&null==t?e.length:t,Qo(e,d,o,o,o,o,t)}function Ia(e,t){var r;if("function"!=typeof t)throw new _e(s);return e=gi(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=o),r}}var _a=Yn((function(e,t,r){var n=1;if(r.length){var o=lr(r,us(_a));n|=u}return Qo(e,n,t,r,o)})),Oa=Yn((function(e,t,r){var n=3;if(r.length){var o=lr(r,us(Oa));n|=u}return Qo(t,n,e,r,o)}));function Ra(e,t,r){var n,a,i,c,u,l,d=0,f=!1,p=!1,h=!0;if("function"!=typeof e)throw new _e(s);function g(t){var r=n,s=a;return n=a=o,d=t,c=e.apply(s,r)}function y(e){var r=e-l;return l===o||r>=t||r<0||p&&e-d>=i}function m(){var e=Wa();if(y(e))return b(e);u=Rs(m,function(e){var r=t-(e-l);return p?wr(r,i-(e-d)):r}(e))}function b(e){return u=o,h&&n?g(e):(n=a=o,c)}function w(){var e=Wa(),r=y(e);if(n=arguments,a=this,l=e,r){if(u===o)return function(e){return d=e,u=Rs(m,t),f?g(e):c}(l);if(p)return Eo(u),u=Rs(m,t),g(l)}return u===o&&(u=Rs(m,t)),c}return t=mi(t)||0,ti(r)&&(f=!!r.leading,i=(p="maxWait"in r)?br(mi(r.maxWait)||0,t):i,h="trailing"in r?!!r.trailing:h),w.cancel=function(){u!==o&&Eo(u),d=0,n=l=a=u=o},w.flush=function(){return u===o?c:b(Wa())},w}var Ma=Yn((function(e,t){return dn(e,1,t)})),xa=Yn((function(e,t,r){return dn(e,mi(t)||0,r)}));function Fa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new _e(s);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],s=r.cache;if(s.has(o))return s.get(o);var a=e.apply(this,n);return r.cache=s.set(o,a)||s,a};return r.cache=new(Fa.Cache||Kr),r}function ka(e){if("function"!=typeof e)throw new _e(s);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Fa.Cache=Kr;var Na=vo((function(e,t){var r=(t=1==t.length&&Ga(t[0])?Ft(t[0],Qt(ls())):Ft(bn(t,1),Qt(ls()))).length;return Yn((function(n){for(var o=-1,s=wr(n.length,r);++o<s;)n[o]=t[o].call(this,n[o]);return Wt(e,this,n)}))})),Ua=Yn((function(e,t){var r=lr(t,us(Ua));return Qo(e,u,o,t,r)})),Da=Yn((function(e,t){var r=lr(t,us(Da));return Qo(e,l,o,t,r)})),La=os((function(e,t){return Qo(e,f,o,o,o,t)}));function $a(e,t){return e===t||e!=e&&t!=t}var za=Zo(Wn),ja=Zo((function(e,t){return e>=t})),Va=Rn(function(){return arguments}())?Rn:function(e){return ri(e)&&ke.call(e,"callee")&&!qe.call(e,"callee")},Ga=n.isArray,Ha=At?Qt(At):function(e){return ri(e)&&Bn(e)==x};function Ka(e){return null!=e&&ei(e.length)&&!Xa(e)}function Za(e){return ri(e)&&Ka(e)}var qa=wt||mc,Ja=vt?Qt(vt):function(e){return ri(e)&&Bn(e)==A};function Ya(e){if(!ri(e))return!1;var t=Bn(e);return t==v||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!si(e)}function Xa(e){if(!ti(e))return!1;var t=Bn(e);return t==P||t==E||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Qa(e){return"number"==typeof e&&e==gi(e)}function ei(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function ti(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ri(e){return null!=e&&"object"==typeof e}var ni=Pt?Qt(Pt):function(e){return ri(e)&&ys(e)==C};function oi(e){return"number"==typeof e||ri(e)&&Bn(e)==B}function si(e){if(!ri(e)||Bn(e)!=W)return!1;var t=Ke(e);if(null===t)return!0;var r=ke.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Fe.call(r)==Le}var ai=Et?Qt(Et):function(e){return ri(e)&&Bn(e)==I};var ii=Ct?Qt(Ct):function(e){return ri(e)&&ys(e)==_};function ci(e){return"string"==typeof e||!Ga(e)&&ri(e)&&Bn(e)==O}function ui(e){return"symbol"==typeof e||ri(e)&&Bn(e)==R}var li=Bt?Qt(Bt):function(e){return ri(e)&&ei(e.length)&&!!ct[Bn(e)]};var di=Zo(Dn),fi=Zo((function(e,t){return e<=t}));function pi(e){if(!e)return[];if(Ka(e))return ci(e)?hr(e):Oo(e);if(Xe&&e[Xe])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Xe]());var t=ys(e);return(t==C?cr:t==_?dr:$i)(e)}function hi(e){return e?(e=mi(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function gi(e){var t=hi(e),r=t%1;return t==t?r?t-r:t:0}function yi(e){return e?cn(gi(e),0,y):0}function mi(e){if("number"==typeof e)return e;if(ui(e))return g;if(ti(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ti(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var r=me.test(e);return r||we.test(e)?ft(e.slice(2),r?2:8):ye.test(e)?g:+e}function bi(e){return Ro(e,Mi(e))}function wi(e){return null==e?"":lo(e)}var Ti=xo((function(e,t){if(Cs(t)||Ka(t))Ro(t,Ri(t),e);else for(var r in t)ke.call(t,r)&&tn(e,r,t[r])})),Ai=xo((function(e,t){Ro(t,Mi(t),e)})),vi=xo((function(e,t,r,n){Ro(t,Mi(t),e,n)})),Pi=xo((function(e,t,r,n){Ro(t,Ri(t),e,n)})),Ei=os(an);var Ci=Yn((function(e,t){e=We(e);var r=-1,n=t.length,s=n>2?t[2]:o;for(s&&As(t[0],t[1],s)&&(n=1);++r<n;)for(var a=t[r],i=Mi(a),c=-1,u=i.length;++c<u;){var l=i[c],d=e[l];(d===o||$a(d,Me[l])&&!ke.call(e,l))&&(e[l]=a[l])}return e})),Bi=Yn((function(e){return e.push(o,ts),Wt(Fi,o,e)}));function Wi(e,t,r){var n=null==e?o:En(e,t);return n===o?r:n}function Si(e,t){return null!=e&&ms(e,t,In)}var Ii=jo((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),e[t]=r}),tc(oc)),_i=jo((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),ke.call(e,t)?e[t].push(r):e[t]=[r]}),ls),Oi=Yn(On);function Ri(e){return Ka(e)?Jr(e):Nn(e)}function Mi(e){return Ka(e)?Jr(e,!0):Un(e)}var xi=xo((function(e,t,r){jn(e,t,r)})),Fi=xo((function(e,t,r,n){jn(e,t,r,n)})),ki=os((function(e,t){var r={};if(null==e)return r;var n=!1;t=Ft(t,(function(t){return t=Ao(t,e),n||(n=t.length>1),t})),Ro(e,as(e),r),n&&(r=un(r,7,rs));for(var o=t.length;o--;)po(r,t[o]);return r}));var Ni=os((function(e,t){return null==e?{}:function(e,t){return Hn(e,t,(function(t,r){return Si(e,r)}))}(e,t)}));function Ui(e,t){if(null==e)return{};var r=Ft(as(e),(function(e){return[e]}));return t=ls(t),Hn(e,r,(function(e,r){return t(e,r[0])}))}var Di=Xo(Ri),Li=Xo(Mi);function $i(e){return null==e?[]:er(e,Ri(e))}var zi=Uo((function(e,t,r){return t=t.toLowerCase(),e+(r?ji(t):t)}));function ji(e){return Yi(wi(e).toLowerCase())}function Vi(e){return(e=wi(e))&&e.replace(Ae,or).replace(tt,"")}var Gi=Uo((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Hi=Uo((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Ki=No("toLowerCase");var Zi=Uo((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var qi=Uo((function(e,t,r){return e+(r?" ":"")+Yi(t)}));var Ji=Uo((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Yi=No("toUpperCase");function Xi(e,t,r){return e=wi(e),(t=r?o:t)===o?function(e){return st.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var Qi=Yn((function(e,t){try{return Wt(e,o,t)}catch(e){return Ya(e)?e:new Ee(e)}})),ec=os((function(e,t){return It(t,(function(t){t=Us(t),sn(e,t,_a(e[t],e))})),e}));function tc(e){return function(){return e}}var rc=$o(),nc=$o(!0);function oc(e){return e}function sc(e){return kn("function"==typeof e?e:un(e,1))}var ac=Yn((function(e,t){return function(r){return On(r,e,t)}})),ic=Yn((function(e,t){return function(r){return On(e,r,t)}}));function cc(e,t,r){var n=Ri(t),o=Pn(t,n);null!=r||ti(t)&&(o.length||!n.length)||(r=t,t=e,e=this,o=Pn(t,Ri(t)));var s=!(ti(r)&&"chain"in r&&!r.chain),a=Xa(e);return It(o,(function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(s||t){var r=e(this.__wrapped__);return(r.__actions__=Oo(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,kt([this.value()],arguments))})})),e}function uc(){}var lc=Go(Ft),dc=Go(Ot),fc=Go(Dt);function pc(e){return vs(e)?Kt(Us(e)):function(e){return function(t){return En(t,e)}}(e)}var hc=Ko(),gc=Ko(!0);function yc(){return[]}function mc(){return!1}var bc=Vo((function(e,t){return e+t}),0),wc=Jo("ceil"),Tc=Vo((function(e,t){return e/t}),1),Ac=Jo("floor");var vc,Pc=Vo((function(e,t){return e*t}),1),Ec=Jo("round"),Cc=Vo((function(e,t){return e-t}),0);return Lr.after=function(e,t){if("function"!=typeof t)throw new _e(s);return e=gi(e),function(){if(--e<1)return t.apply(this,arguments)}},Lr.ary=Sa,Lr.assign=Ti,Lr.assignIn=Ai,Lr.assignInWith=vi,Lr.assignWith=Pi,Lr.at=Ei,Lr.before=Ia,Lr.bind=_a,Lr.bindAll=ec,Lr.bindKey=Oa,Lr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ga(e)?e:[e]},Lr.chain=pa,Lr.chunk=function(e,t,r){t=(r?As(e,t,r):t===o)?1:br(gi(t),0);var s=null==e?0:e.length;if(!s||t<1)return[];for(var a=0,i=0,c=n(ht(s/t));a<s;)c[i++]=oo(e,a,a+=t);return c},Lr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,o=[];++t<r;){var s=e[t];s&&(o[n++]=s)}return o},Lr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],o=e;o--;)t[o-1]=arguments[o];return kt(Ga(r)?Oo(r):[r],bn(t,1))},Lr.cond=function(e){var t=null==e?0:e.length,r=ls();return e=t?Ft(e,(function(e){if("function"!=typeof e[1])throw new _e(s);return[r(e[0]),e[1]]})):[],Yn((function(r){for(var n=-1;++n<t;){var o=e[n];if(Wt(o[0],this,r))return Wt(o[1],this,r)}}))},Lr.conforms=function(e){return function(e){var t=Ri(e);return function(r){return ln(r,e,t)}}(un(e,1))},Lr.constant=tc,Lr.countBy=ya,Lr.create=function(e,t){var r=$r(e);return null==t?r:on(r,t)},Lr.curry=function e(t,r,n){var s=Qo(t,8,o,o,o,o,o,r=n?o:r);return s.placeholder=e.placeholder,s},Lr.curryRight=function e(t,r,n){var s=Qo(t,c,o,o,o,o,o,r=n?o:r);return s.placeholder=e.placeholder,s},Lr.debounce=Ra,Lr.defaults=Ci,Lr.defaultsDeep=Bi,Lr.defer=Ma,Lr.delay=xa,Lr.difference=$s,Lr.differenceBy=zs,Lr.differenceWith=js,Lr.drop=function(e,t,r){var n=null==e?0:e.length;return n?oo(e,(t=r||t===o?1:gi(t))<0?0:t,n):[]},Lr.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?oo(e,0,(t=n-(t=r||t===o?1:gi(t)))<0?0:t):[]},Lr.dropRightWhile=function(e,t){return e&&e.length?go(e,ls(t,3),!0,!0):[]},Lr.dropWhile=function(e,t){return e&&e.length?go(e,ls(t,3),!0):[]},Lr.fill=function(e,t,r,n){var s=null==e?0:e.length;return s?(r&&"number"!=typeof r&&As(e,t,r)&&(r=0,n=s),function(e,t,r,n){var s=e.length;for((r=gi(r))<0&&(r=-r>s?0:s+r),(n=n===o||n>s?s:gi(n))<0&&(n+=s),n=r>n?0:yi(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Lr.filter=function(e,t){return(Ga(e)?Rt:mn)(e,ls(t,3))},Lr.flatMap=function(e,t){return bn(Ea(e,t),1)},Lr.flatMapDeep=function(e,t){return bn(Ea(e,t),p)},Lr.flatMapDepth=function(e,t,r){return r=r===o?1:gi(r),bn(Ea(e,t),r)},Lr.flatten=Hs,Lr.flattenDeep=function(e){return(null==e?0:e.length)?bn(e,p):[]},Lr.flattenDepth=function(e,t){return(null==e?0:e.length)?bn(e,t=t===o?1:gi(t)):[]},Lr.flip=function(e){return Qo(e,512)},Lr.flow=rc,Lr.flowRight=nc,Lr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var o=e[t];n[o[0]]=o[1]}return n},Lr.functions=function(e){return null==e?[]:Pn(e,Ri(e))},Lr.functionsIn=function(e){return null==e?[]:Pn(e,Mi(e))},Lr.groupBy=Aa,Lr.initial=function(e){return(null==e?0:e.length)?oo(e,0,-1):[]},Lr.intersection=Zs,Lr.intersectionBy=qs,Lr.intersectionWith=Js,Lr.invert=Ii,Lr.invertBy=_i,Lr.invokeMap=va,Lr.iteratee=sc,Lr.keyBy=Pa,Lr.keys=Ri,Lr.keysIn=Mi,Lr.map=Ea,Lr.mapKeys=function(e,t){var r={};return t=ls(t,3),An(e,(function(e,n,o){sn(r,t(e,n,o),e)})),r},Lr.mapValues=function(e,t){var r={};return t=ls(t,3),An(e,(function(e,n,o){sn(r,n,t(e,n,o))})),r},Lr.matches=function(e){return $n(un(e,1))},Lr.matchesProperty=function(e,t){return zn(e,un(t,1))},Lr.memoize=Fa,Lr.merge=xi,Lr.mergeWith=Fi,Lr.method=ac,Lr.methodOf=ic,Lr.mixin=cc,Lr.negate=ka,Lr.nthArg=function(e){return e=gi(e),Yn((function(t){return Vn(t,e)}))},Lr.omit=ki,Lr.omitBy=function(e,t){return Ui(e,ka(ls(t)))},Lr.once=function(e){return Ia(2,e)},Lr.orderBy=function(e,t,r,n){return null==e?[]:(Ga(t)||(t=null==t?[]:[t]),Ga(r=n?o:r)||(r=null==r?[]:[r]),Gn(e,t,r))},Lr.over=lc,Lr.overArgs=Na,Lr.overEvery=dc,Lr.overSome=fc,Lr.partial=Ua,Lr.partialRight=Da,Lr.partition=Ca,Lr.pick=Ni,Lr.pickBy=Ui,Lr.property=pc,Lr.propertyOf=function(e){return function(t){return null==e?o:En(e,t)}},Lr.pull=Xs,Lr.pullAll=Qs,Lr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Kn(e,t,ls(r,2)):e},Lr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Kn(e,t,o,r):e},Lr.pullAt=ea,Lr.range=hc,Lr.rangeRight=gc,Lr.rearg=La,Lr.reject=function(e,t){return(Ga(e)?Rt:mn)(e,ka(ls(t,3)))},Lr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,o=[],s=e.length;for(t=ls(t,3);++n<s;){var a=e[n];t(a,n,e)&&(r.push(a),o.push(n))}return Zn(e,o),r},Lr.rest=function(e,t){if("function"!=typeof e)throw new _e(s);return Yn(e,t=t===o?t:gi(t))},Lr.reverse=ta,Lr.sampleSize=function(e,t,r){return t=(r?As(e,t,r):t===o)?1:gi(t),(Ga(e)?Xr:Qn)(e,t)},Lr.set=function(e,t,r){return null==e?e:eo(e,t,r)},Lr.setWith=function(e,t,r,n){return n="function"==typeof n?n:o,null==e?e:eo(e,t,r,n)},Lr.shuffle=function(e){return(Ga(e)?Qr:no)(e)},Lr.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&As(e,t,r)?(t=0,r=n):(t=null==t?0:gi(t),r=r===o?n:gi(r)),oo(e,t,r)):[]},Lr.sortBy=Ba,Lr.sortedUniq=function(e){return e&&e.length?co(e):[]},Lr.sortedUniqBy=function(e,t){return e&&e.length?co(e,ls(t,2)):[]},Lr.split=function(e,t,r){return r&&"number"!=typeof r&&As(e,t,r)&&(t=r=o),(r=r===o?y:r>>>0)?(e=wi(e))&&("string"==typeof t||null!=t&&!ai(t))&&!(t=lo(t))&&ir(e)?Po(hr(e),0,r):e.split(t,r):[]},Lr.spread=function(e,t){if("function"!=typeof e)throw new _e(s);return t=null==t?0:br(gi(t),0),Yn((function(r){var n=r[t],o=Po(r,0,t);return n&&kt(o,n),Wt(e,this,o)}))},Lr.tail=function(e){var t=null==e?0:e.length;return t?oo(e,1,t):[]},Lr.take=function(e,t,r){return e&&e.length?oo(e,0,(t=r||t===o?1:gi(t))<0?0:t):[]},Lr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?oo(e,(t=n-(t=r||t===o?1:gi(t)))<0?0:t,n):[]},Lr.takeRightWhile=function(e,t){return e&&e.length?go(e,ls(t,3),!1,!0):[]},Lr.takeWhile=function(e,t){return e&&e.length?go(e,ls(t,3)):[]},Lr.tap=function(e,t){return t(e),e},Lr.throttle=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new _e(s);return ti(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Ra(e,t,{leading:n,maxWait:t,trailing:o})},Lr.thru=ha,Lr.toArray=pi,Lr.toPairs=Di,Lr.toPairsIn=Li,Lr.toPath=function(e){return Ga(e)?Ft(e,Us):ui(e)?[e]:Oo(Ns(wi(e)))},Lr.toPlainObject=bi,Lr.transform=function(e,t,r){var n=Ga(e),o=n||qa(e)||li(e);if(t=ls(t,4),null==r){var s=e&&e.constructor;r=o?n?new s:[]:ti(e)&&Xa(s)?$r(Ke(e)):{}}return(o?It:An)(e,(function(e,n,o){return t(r,e,n,o)})),r},Lr.unary=function(e){return Sa(e,1)},Lr.union=ra,Lr.unionBy=na,Lr.unionWith=oa,Lr.uniq=function(e){return e&&e.length?fo(e):[]},Lr.uniqBy=function(e,t){return e&&e.length?fo(e,ls(t,2)):[]},Lr.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?fo(e,o,t):[]},Lr.unset=function(e,t){return null==e||po(e,t)},Lr.unzip=sa,Lr.unzipWith=aa,Lr.update=function(e,t,r){return null==e?e:ho(e,t,To(r))},Lr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:o,null==e?e:ho(e,t,To(r),n)},Lr.values=$i,Lr.valuesIn=function(e){return null==e?[]:er(e,Mi(e))},Lr.without=ia,Lr.words=Xi,Lr.wrap=function(e,t){return Ua(To(t),e)},Lr.xor=ca,Lr.xorBy=ua,Lr.xorWith=la,Lr.zip=da,Lr.zipObject=function(e,t){return bo(e||[],t||[],tn)},Lr.zipObjectDeep=function(e,t){return bo(e||[],t||[],eo)},Lr.zipWith=fa,Lr.entries=Di,Lr.entriesIn=Li,Lr.extend=Ai,Lr.extendWith=vi,cc(Lr,Lr),Lr.add=bc,Lr.attempt=Qi,Lr.camelCase=zi,Lr.capitalize=ji,Lr.ceil=wc,Lr.clamp=function(e,t,r){return r===o&&(r=t,t=o),r!==o&&(r=(r=mi(r))==r?r:0),t!==o&&(t=(t=mi(t))==t?t:0),cn(mi(e),t,r)},Lr.clone=function(e){return un(e,4)},Lr.cloneDeep=function(e){return un(e,5)},Lr.cloneDeepWith=function(e,t){return un(e,5,t="function"==typeof t?t:o)},Lr.cloneWith=function(e,t){return un(e,4,t="function"==typeof t?t:o)},Lr.conformsTo=function(e,t){return null==t||ln(e,t,Ri(t))},Lr.deburr=Vi,Lr.defaultTo=function(e,t){return null==e||e!=e?t:e},Lr.divide=Tc,Lr.endsWith=function(e,t,r){e=wi(e),t=lo(t);var n=e.length,s=r=r===o?n:cn(gi(r),0,n);return(r-=t.length)>=0&&e.slice(r,s)==t},Lr.eq=$a,Lr.escape=function(e){return(e=wi(e))&&Y.test(e)?e.replace(q,sr):e},Lr.escapeRegExp=function(e){return(e=wi(e))&&se.test(e)?e.replace(oe,"\\$&"):e},Lr.every=function(e,t,r){var n=Ga(e)?Ot:gn;return r&&As(e,t,r)&&(t=o),n(e,ls(t,3))},Lr.find=ma,Lr.findIndex=Vs,Lr.findKey=function(e,t){return $t(e,ls(t,3),An)},Lr.findLast=ba,Lr.findLastIndex=Gs,Lr.findLastKey=function(e,t){return $t(e,ls(t,3),vn)},Lr.floor=Ac,Lr.forEach=wa,Lr.forEachRight=Ta,Lr.forIn=function(e,t){return null==e?e:wn(e,ls(t,3),Mi)},Lr.forInRight=function(e,t){return null==e?e:Tn(e,ls(t,3),Mi)},Lr.forOwn=function(e,t){return e&&An(e,ls(t,3))},Lr.forOwnRight=function(e,t){return e&&vn(e,ls(t,3))},Lr.get=Wi,Lr.gt=za,Lr.gte=ja,Lr.has=function(e,t){return null!=e&&ms(e,t,Sn)},Lr.hasIn=Si,Lr.head=Ks,Lr.identity=oc,Lr.includes=function(e,t,r,n){e=Ka(e)?e:$i(e),r=r&&!n?gi(r):0;var o=e.length;return r<0&&(r=br(o+r,0)),ci(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&jt(e,t,r)>-1},Lr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=null==r?0:gi(r);return o<0&&(o=br(n+o,0)),jt(e,t,o)},Lr.inRange=function(e,t,r){return t=hi(t),r===o?(r=t,t=0):r=hi(r),function(e,t,r){return e>=wr(t,r)&&e<br(t,r)}(e=mi(e),t,r)},Lr.invoke=Oi,Lr.isArguments=Va,Lr.isArray=Ga,Lr.isArrayBuffer=Ha,Lr.isArrayLike=Ka,Lr.isArrayLikeObject=Za,Lr.isBoolean=function(e){return!0===e||!1===e||ri(e)&&Bn(e)==T},Lr.isBuffer=qa,Lr.isDate=Ja,Lr.isElement=function(e){return ri(e)&&1===e.nodeType&&!si(e)},Lr.isEmpty=function(e){if(null==e)return!0;if(Ka(e)&&(Ga(e)||"string"==typeof e||"function"==typeof e.splice||qa(e)||li(e)||Va(e)))return!e.length;var t=ys(e);if(t==C||t==_)return!e.size;if(Cs(e))return!Nn(e).length;for(var r in e)if(ke.call(e,r))return!1;return!0},Lr.isEqual=function(e,t){return Mn(e,t)},Lr.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:o)?r(e,t):o;return n===o?Mn(e,t,o,r):!!n},Lr.isError=Ya,Lr.isFinite=function(e){return"number"==typeof e&&Tt(e)},Lr.isFunction=Xa,Lr.isInteger=Qa,Lr.isLength=ei,Lr.isMap=ni,Lr.isMatch=function(e,t){return e===t||xn(e,t,fs(t))},Lr.isMatchWith=function(e,t,r){return r="function"==typeof r?r:o,xn(e,t,fs(t),r)},Lr.isNaN=function(e){return oi(e)&&e!=+e},Lr.isNative=function(e){if(Es(e))throw new Ee("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Fn(e)},Lr.isNil=function(e){return null==e},Lr.isNull=function(e){return null===e},Lr.isNumber=oi,Lr.isObject=ti,Lr.isObjectLike=ri,Lr.isPlainObject=si,Lr.isRegExp=ai,Lr.isSafeInteger=function(e){return Qa(e)&&e>=-9007199254740991&&e<=h},Lr.isSet=ii,Lr.isString=ci,Lr.isSymbol=ui,Lr.isTypedArray=li,Lr.isUndefined=function(e){return e===o},Lr.isWeakMap=function(e){return ri(e)&&ys(e)==M},Lr.isWeakSet=function(e){return ri(e)&&"[object WeakSet]"==Bn(e)},Lr.join=function(e,t){return null==e?"":Lt.call(e,t)},Lr.kebabCase=Gi,Lr.last=Ys,Lr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var s=n;return r!==o&&(s=(s=gi(r))<0?br(n+s,0):wr(s,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,s):zt(e,Gt,s,!0)},Lr.lowerCase=Hi,Lr.lowerFirst=Ki,Lr.lt=di,Lr.lte=fi,Lr.max=function(e){return e&&e.length?yn(e,oc,Wn):o},Lr.maxBy=function(e,t){return e&&e.length?yn(e,ls(t,2),Wn):o},Lr.mean=function(e){return Ht(e,oc)},Lr.meanBy=function(e,t){return Ht(e,ls(t,2))},Lr.min=function(e){return e&&e.length?yn(e,oc,Dn):o},Lr.minBy=function(e,t){return e&&e.length?yn(e,ls(t,2),Dn):o},Lr.stubArray=yc,Lr.stubFalse=mc,Lr.stubObject=function(){return{}},Lr.stubString=function(){return""},Lr.stubTrue=function(){return!0},Lr.multiply=Pc,Lr.nth=function(e,t){return e&&e.length?Vn(e,gi(t)):o},Lr.noConflict=function(){return gt._===this&&(gt._=$e),this},Lr.noop=uc,Lr.now=Wa,Lr.pad=function(e,t,r){e=wi(e);var n=(t=gi(t))?pr(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return Ho(yt(o),r)+e+Ho(ht(o),r)},Lr.padEnd=function(e,t,r){e=wi(e);var n=(t=gi(t))?pr(e):0;return t&&n<t?e+Ho(t-n,r):e},Lr.padStart=function(e,t,r){e=wi(e);var n=(t=gi(t))?pr(e):0;return t&&n<t?Ho(t-n,r)+e:e},Lr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),Ar(wi(e).replace(ae,""),t||0)},Lr.random=function(e,t,r){if(r&&"boolean"!=typeof r&&As(e,t,r)&&(t=r=o),r===o&&("boolean"==typeof t?(r=t,t=o):"boolean"==typeof e&&(r=e,e=o)),e===o&&t===o?(e=0,t=1):(e=hi(e),t===o?(t=e,e=0):t=hi(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var s=vr();return wr(e+s*(t-e+dt("1e-"+((s+"").length-1))),t)}return qn(e,t)},Lr.reduce=function(e,t,r){var n=Ga(e)?Nt:qt,o=arguments.length<3;return n(e,ls(t,4),r,o,pn)},Lr.reduceRight=function(e,t,r){var n=Ga(e)?Ut:qt,o=arguments.length<3;return n(e,ls(t,4),r,o,hn)},Lr.repeat=function(e,t,r){return t=(r?As(e,t,r):t===o)?1:gi(t),Jn(wi(e),t)},Lr.replace=function(){var e=arguments,t=wi(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Lr.result=function(e,t,r){var n=-1,s=(t=Ao(t,e)).length;for(s||(s=1,e=o);++n<s;){var a=null==e?o:e[Us(t[n])];a===o&&(n=s,a=r),e=Xa(a)?a.call(e):a}return e},Lr.round=Ec,Lr.runInContext=e,Lr.sample=function(e){return(Ga(e)?Yr:Xn)(e)},Lr.size=function(e){if(null==e)return 0;if(Ka(e))return ci(e)?pr(e):e.length;var t=ys(e);return t==C||t==_?e.size:Nn(e).length},Lr.snakeCase=Zi,Lr.some=function(e,t,r){var n=Ga(e)?Dt:so;return r&&As(e,t,r)&&(t=o),n(e,ls(t,3))},Lr.sortedIndex=function(e,t){return ao(e,t)},Lr.sortedIndexBy=function(e,t,r){return io(e,t,ls(r,2))},Lr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ao(e,t);if(n<r&&$a(e[n],t))return n}return-1},Lr.sortedLastIndex=function(e,t){return ao(e,t,!0)},Lr.sortedLastIndexBy=function(e,t,r){return io(e,t,ls(r,2),!0)},Lr.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var r=ao(e,t,!0)-1;if($a(e[r],t))return r}return-1},Lr.startCase=qi,Lr.startsWith=function(e,t,r){return e=wi(e),r=null==r?0:cn(gi(r),0,e.length),t=lo(t),e.slice(r,r+t.length)==t},Lr.subtract=Cc,Lr.sum=function(e){return e&&e.length?Jt(e,oc):0},Lr.sumBy=function(e,t){return e&&e.length?Jt(e,ls(t,2)):0},Lr.template=function(e,t,r){var n=Lr.templateSettings;r&&As(e,t,r)&&(t=o),e=wi(e),t=vi({},t,n,es);var s,a,i=vi({},t.imports,n.imports,es),c=Ri(i),u=er(i,c),l=0,d=t.interpolate||ve,f="__p += '",p=Se((t.escape||ve).source+"|"+d.source+"|"+(d===ee?he:ve).source+"|"+(t.evaluate||ve).source+"|$","g"),h="//# sourceURL="+(ke.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++it+"]")+"\n";e.replace(p,(function(t,r,n,o,i,c){return n||(n=o),f+=e.slice(l,c).replace(Pe,ar),r&&(s=!0,f+="' +\n__e("+r+") +\n'"),i&&(a=!0,f+="';\n"+i+";\n__p += '"),n&&(f+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=c+t.length,t})),f+="';\n";var g=ke.call(t,"variable")&&t.variable;if(g){if(fe.test(g))throw new Ee("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(a?f.replace(G,""):f).replace(H,"$1").replace(K,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var y=Qi((function(){return Ce(c,h+"return "+f).apply(o,u)}));if(y.source=f,Ya(y))throw y;return y},Lr.times=function(e,t){if((e=gi(e))<1||e>h)return[];var r=y,n=wr(e,y);t=ls(t),e-=y;for(var o=Yt(n,t);++r<e;)t(r);return o},Lr.toFinite=hi,Lr.toInteger=gi,Lr.toLength=yi,Lr.toLower=function(e){return wi(e).toLowerCase()},Lr.toNumber=mi,Lr.toSafeInteger=function(e){return e?cn(gi(e),-9007199254740991,h):0===e?e:0},Lr.toString=wi,Lr.toUpper=function(e){return wi(e).toUpperCase()},Lr.trim=function(e,t,r){if((e=wi(e))&&(r||t===o))return Xt(e);if(!e||!(t=lo(t)))return e;var n=hr(e),s=hr(t);return Po(n,rr(n,s),nr(n,s)+1).join("")},Lr.trimEnd=function(e,t,r){if((e=wi(e))&&(r||t===o))return e.slice(0,gr(e)+1);if(!e||!(t=lo(t)))return e;var n=hr(e);return Po(n,0,nr(n,hr(t))+1).join("")},Lr.trimStart=function(e,t,r){if((e=wi(e))&&(r||t===o))return e.replace(ae,"");if(!e||!(t=lo(t)))return e;var n=hr(e);return Po(n,rr(n,hr(t))).join("")},Lr.truncate=function(e,t){var r=30,n="...";if(ti(t)){var s="separator"in t?t.separator:s;r="length"in t?gi(t.length):r,n="omission"in t?lo(t.omission):n}var a=(e=wi(e)).length;if(ir(e)){var i=hr(e);a=i.length}if(r>=a)return e;var c=r-pr(n);if(c<1)return n;var u=i?Po(i,0,c).join(""):e.slice(0,c);if(s===o)return u+n;if(i&&(c+=u.length-c),ai(s)){if(e.slice(c).search(s)){var l,d=u;for(s.global||(s=Se(s.source,wi(ge.exec(s))+"g")),s.lastIndex=0;l=s.exec(d);)var f=l.index;u=u.slice(0,f===o?c:f)}}else if(e.indexOf(lo(s),c)!=c){var p=u.lastIndexOf(s);p>-1&&(u=u.slice(0,p))}return u+n},Lr.unescape=function(e){return(e=wi(e))&&J.test(e)?e.replace(Z,yr):e},Lr.uniqueId=function(e){var t=++Ne;return wi(e)+t},Lr.upperCase=Ji,Lr.upperFirst=Yi,Lr.each=wa,Lr.eachRight=Ta,Lr.first=Ks,cc(Lr,(vc={},An(Lr,(function(e,t){ke.call(Lr.prototype,t)||(vc[t]=e)})),vc),{chain:!1}),Lr.VERSION="4.17.21",It(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Lr[e].placeholder=Lr})),It(["drop","take"],(function(e,t){Vr.prototype[e]=function(r){r=r===o?1:br(gi(r),0);var n=this.__filtered__&&!t?new Vr(this):this.clone();return n.__filtered__?n.__takeCount__=wr(r,n.__takeCount__):n.__views__.push({size:wr(r,y),type:e+(n.__dir__<0?"Right":"")}),n},Vr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),It(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Vr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ls(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),It(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Vr.prototype[e]=function(){return this[r](1).value()[0]}})),It(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Vr.prototype[e]=function(){return this.__filtered__?new Vr(this):this[r](1)}})),Vr.prototype.compact=function(){return this.filter(oc)},Vr.prototype.find=function(e){return this.filter(e).head()},Vr.prototype.findLast=function(e){return this.reverse().find(e)},Vr.prototype.invokeMap=Yn((function(e,t){return"function"==typeof e?new Vr(this):this.map((function(r){return On(r,e,t)}))})),Vr.prototype.reject=function(e){return this.filter(ka(ls(e)))},Vr.prototype.slice=function(e,t){e=gi(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Vr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==o&&(r=(t=gi(t))<0?r.dropRight(-t):r.take(t-e)),r)},Vr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vr.prototype.toArray=function(){return this.take(y)},An(Vr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),s=Lr[n?"take"+("last"==t?"Right":""):t],a=n||/^find/.test(t);s&&(Lr.prototype[t]=function(){var t=this.__wrapped__,i=n?[1]:arguments,c=t instanceof Vr,u=i[0],l=c||Ga(t),d=function(e){var t=s.apply(Lr,kt([e],i));return n&&f?t[0]:t};l&&r&&"function"==typeof u&&1!=u.length&&(c=l=!1);var f=this.__chain__,p=!!this.__actions__.length,h=a&&!f,g=c&&!p;if(!a&&l){t=g?t:new Vr(this);var y=e.apply(t,i);return y.__actions__.push({func:ha,args:[d],thisArg:o}),new jr(y,f)}return h&&g?e.apply(this,i):(y=this.thru(d),h?n?y.value()[0]:y.value():y)})})),It(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Oe[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Lr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(Ga(o)?o:[],e)}return this[r]((function(r){return t.apply(Ga(r)?r:[],e)}))}})),An(Vr.prototype,(function(e,t){var r=Lr[t];if(r){var n=r.name+"";ke.call(Or,n)||(Or[n]=[]),Or[n].push({name:t,func:r})}})),Or[zo(o,2).name]=[{name:"wrapper",func:o}],Vr.prototype.clone=function(){var e=new Vr(this.__wrapped__);return e.__actions__=Oo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Oo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Oo(this.__views__),e},Vr.prototype.reverse=function(){if(this.__filtered__){var e=new Vr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Ga(e),n=t<0,o=r?e.length:0,s=function(e,t,r){var n=-1,o=r.length;for(;++n<o;){var s=r[n],a=s.size;switch(s.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=wr(t,e+a);break;case"takeRight":e=br(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=s.start,i=s.end,c=i-a,u=n?i:a-1,l=this.__iteratees__,d=l.length,f=0,p=wr(c,this.__takeCount__);if(!r||!n&&o==c&&p==c)return yo(e,this.__actions__);var h=[];e:for(;c--&&f<p;){for(var g=-1,y=e[u+=t];++g<d;){var m=l[g],b=m.iteratee,w=m.type,T=b(y);if(2==w)y=T;else if(!T){if(1==w)continue e;break e}}h[f++]=y}return h},Lr.prototype.at=ga,Lr.prototype.chain=function(){return pa(this)},Lr.prototype.commit=function(){return new jr(this.value(),this.__chain__)},Lr.prototype.next=function(){this.__values__===o&&(this.__values__=pi(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},Lr.prototype.plant=function(e){for(var t,r=this;r instanceof zr;){var n=Ls(r);n.__index__=0,n.__values__=o,t?s.__wrapped__=n:t=n;var s=n;r=r.__wrapped__}return s.__wrapped__=e,t},Lr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vr){var t=e;return this.__actions__.length&&(t=new Vr(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ta],thisArg:o}),new jr(t,this.__chain__)}return this.thru(ta)},Lr.prototype.toJSON=Lr.prototype.valueOf=Lr.prototype.value=function(){return yo(this.__wrapped__,this.__actions__)},Lr.prototype.first=Lr.prototype.head,Xe&&(Lr.prototype[Xe]=function(){return this}),Lr}();gt._=mr,(n=function(){return mr}.call(t,r,t,e))===o||(e.exports=n)}.call(this)},5318:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScriptCodes=void 0,t.default=function(e){return(0,o.default)(e),s.has(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=new Set(["Adlm","Afak","Aghb","Ahom","Arab","Aran","Armi","Armn","Avst","Bali","Bamu","Bass","Batk","Beng","Bhks","Blis","Bopo","Brah","Brai","Bugi","Buhd","Cakm","Cans","Cari","Cham","Cher","Chis","Chrs","Cirt","Copt","Cpmn","Cprt","Cyrl","Cyrs","Deva","Diak","Dogr","Dsrt","Dupl","Egyd","Egyh","Egyp","Elba","Elym","Ethi","Gara","Geok","Geor","Glag","Gong","Gonm","Goth","Gran","Grek","Gujr","Gukh","Guru","Hanb","Hang","Hani","Hano","Hans","Hant","Hatr","Hebr","Hira","Hluw","Hmng","Hmnp","Hrkt","Hung","Inds","Ital","Jamo","Java","Jpan","Jurc","Kali","Kana","Kawi","Khar","Khmr","Khoj","Kitl","Kits","Knda","Kore","Kpel","Krai","Kthi","Lana","Laoo","Latf","Latg","Latn","Leke","Lepc","Limb","Lina","Linb","Lisu","Loma","Lyci","Lydi","Mahj","Maka","Mand","Mani","Marc","Maya","Medf","Mend","Merc","Mero","Mlym","Modi","Mong","Moon","Mroo","Mtei","Mult","Mymr","Nagm","Nand","Narb","Nbat","Newa","Nkdb","Nkgb","Nkoo","Nshu","Ogam","Olck","Onao","Orkh","Orya","Osge","Osma","Ougr","Palm","Pauc","Pcun","Pelm","Perm","Phag","Phli","Phlp","Phlv","Phnx","Plrd","Piqd","Prti","Psin","Qaaa","Qaab","Qaac","Qaad","Qaae","Qaaf","Qaag","Qaah","Qaai","Qaaj","Qaak","Qaal","Qaam","Qaan","Qaao","Qaap","Qaaq","Qaar","Qaas","Qaat","Qaau","Qaav","Qaaw","Qaax","Qaay","Qaaz","Qaba","Qabb","Qabc","Qabd","Qabe","Qabf","Qabg","Qabh","Qabi","Qabj","Qabk","Qabl","Qabm","Qabn","Qabo","Qabp","Qabq","Qabr","Qabs","Qabt","Qabu","Qabv","Qabw","Qabx","Ranj","Rjng","Rohg","Roro","Runr","Samr","Sara","Sarb","Saur","Sgnw","Shaw","Shrd","Shui","Sidd","Sidt","Sind","Sinh","Sogd","Sogo","Sora","Soyo","Sund","Sunu","Sylo","Syrc","Syre","Syrj","Syrn","Tagb","Takr","Tale","Talu","Taml","Tang","Tavt","Tayo","Telu","Teng","Tfng","Tglg","Thaa","Thai","Tibt","Tirh","Tnsa","Todr","Tols","Toto","Tutg","Ugar","Vaii","Visp","Vith","Wara","Wcho","Wole","Xpeo","Xsux","Yezi","Yiii","Zanb","Zinh","Zmth","Zsye","Zsym","Zxxx","Zyyy","Zzzz"]);t.ScriptCodes=s},5338:(e,t,r)=>{const n=r(1636);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},5358:(e,t,r)=>{var n=r(7186),o=n,s="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==s&&s||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")();o.exportSymbol("proto.google.protobuf.Any",null,s),proto.google.protobuf.Any=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.google.protobuf.Any,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.Any.displayName="proto.google.protobuf.Any"),n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.Any.prototype.toObject=function(e){return proto.google.protobuf.Any.toObject(e,this)},proto.google.protobuf.Any.toObject=function(e,t){var r={typeUrl:n.Message.getFieldWithDefault(t,1,""),value:t.getValue_asB64()};return e&&(r.$jspbMessageInstance=t),r}),proto.google.protobuf.Any.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.google.protobuf.Any;return proto.google.protobuf.Any.deserializeBinaryFromReader(r,t)},proto.google.protobuf.Any.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readString();e.setTypeUrl(r);break;case 2:r=t.readBytes();e.setValue(r);break;default:t.skipField()}}return e},proto.google.protobuf.Any.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.google.protobuf.Any.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.google.protobuf.Any.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getTypeUrl()).length>0&&t.writeString(1,r),(r=e.getValue_asU8()).length>0&&t.writeBytes(2,r)},proto.google.protobuf.Any.prototype.getTypeUrl=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.Any.prototype.setTypeUrl=function(e){return n.Message.setProto3StringField(this,1,e)},proto.google.protobuf.Any.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,2,"")},proto.google.protobuf.Any.prototype.getValue_asB64=function(){return n.Message.bytesAsB64(this.getValue())},proto.google.protobuf.Any.prototype.getValue_asU8=function(){return n.Message.bytesAsU8(this.getValue())},proto.google.protobuf.Any.prototype.setValue=function(e){return n.Message.setProto3BytesField(this,2,e)},o.object.extend(t,proto.google.protobuf),proto.google.protobuf.Any.prototype.getTypeName=function(){return this.getTypeUrl().split("/").pop()},proto.google.protobuf.Any.prototype.pack=function(e,t,r){r||(r="type.googleapis.com/"),"/"!=r.substr(-1)?this.setTypeUrl(r+"/"+t):this.setTypeUrl(r+t),this.setValue(e)},proto.google.protobuf.Any.prototype.unpack=function(e,t){return this.getTypeName()==t?e(this.getValue_asU8()):null}},5410:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)(e),new RegExp("^[a-fA-F0-9]{".concat(s[t],"}$")).test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s={md5:32,md4:32,sha1:40,sha256:64,sha384:96,sha512:128,ripemd128:32,ripemd160:40,tiger128:32,tiger160:40,tiger192:48,crc32:8,crc32b:8};e.exports=t.default,e.exports.default=t.default},5441:(e,t,r)=>{const n=r(7784);e.exports=(e,t,r)=>{const o=new n(e,r),s=new n(t,r);return o.compare(s)||o.compareBuild(s)}},5456:(e,t,r)=>{const n=r(532);e.exports=(e,t,r)=>n(e,t,r)>0},5478:(e,t,r)=>{const n=r(7784),o=r(1636),{safeRe:s,t:a}=r(946);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const n=t.includePrerelease?s[a.COERCERTLFULL]:s[a.COERCERTL];let o;for(;(o=n.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&o.index+o[0].length===r.index+r[0].length||(r=o),n.lastIndex=o.index+o[1].length+o[2].length;n.lastIndex=-1}else r=e.match(t.includePrerelease?s[a.COERCEFULL]:s[a.COERCE]);if(null===r)return null;const i=r[2],c=r[3]||"0",u=r[4]||"0",l=t.includePrerelease&&r[5]?`-${r[5]}`:"",d=t.includePrerelease&&r[6]?`+${r[6]}`:"";return o(`${i}.${c}.${u}${l}${d}`,t)}},5578:(e,t,r)=>{const n=r(7784),o=r(2859);e.exports=(e,t,r)=>{let s=null,a=null,i=null;try{i=new o(t,r)}catch(e){return null}return e.forEach((e=>{i.test(e)&&(s&&1!==a.compare(e)||(s=e,a=new n(s,r)))})),s}},5627:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(0o)?[0-7]+$/i;e.exports=t.default,e.exports.default=t.default},5635:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){t=(0,o.default)(t,s);var r=e.split("@"),n=r.pop(),d=[r.join("@"),n];if(d[1]=d[1].toLowerCase(),"gmail.com"===d[1]||"googlemail.com"===d[1]){if(t.gmail_remove_subaddress&&(d[0]=d[0].split("+")[0]),t.gmail_remove_dots&&(d[0]=d[0].replace(/\.+/g,l)),!d[0].length)return!1;(t.all_lowercase||t.gmail_lowercase)&&(d[0]=d[0].toLowerCase()),d[1]=t.gmail_convert_googlemaildotcom?"gmail.com":d[1]}else if(a.indexOf(d[1])>=0){if(t.icloud_remove_subaddress&&(d[0]=d[0].split("+")[0]),!d[0].length)return!1;(t.all_lowercase||t.icloud_lowercase)&&(d[0]=d[0].toLowerCase())}else if(i.indexOf(d[1])>=0){if(t.outlookdotcom_remove_subaddress&&(d[0]=d[0].split("+")[0]),!d[0].length)return!1;(t.all_lowercase||t.outlookdotcom_lowercase)&&(d[0]=d[0].toLowerCase())}else if(c.indexOf(d[1])>=0){if(t.yahoo_remove_subaddress){var f=d[0].split("-");d[0]=f.length>1?f.slice(0,-1).join("-"):f[0]}if(!d[0].length)return!1;(t.all_lowercase||t.yahoo_lowercase)&&(d[0]=d[0].toLowerCase())}else u.indexOf(d[1])>=0?((t.all_lowercase||t.yandex_lowercase)&&(d[0]=d[0].toLowerCase()),d[1]=t.yandex_convert_yandexru?"yandex.ru":d[1]):t.all_lowercase&&(d[0]=d[0].toLowerCase());return d.join("@")};var n,o=(n=r(2533))&&n.__esModule?n:{default:n};var s={all_lowercase:!0,gmail_lowercase:!0,gmail_remove_dots:!0,gmail_remove_subaddress:!0,gmail_convert_googlemaildotcom:!0,outlookdotcom_lowercase:!0,outlookdotcom_remove_subaddress:!0,yahoo_lowercase:!0,yahoo_remove_subaddress:!0,yandex_lowercase:!0,yandex_convert_yandexru:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},a=["icloud.com","me.com"],i=["hotmail.at","hotmail.be","hotmail.ca","hotmail.cl","hotmail.co.il","hotmail.co.nz","hotmail.co.th","hotmail.co.uk","hotmail.com","hotmail.com.ar","hotmail.com.au","hotmail.com.br","hotmail.com.gr","hotmail.com.mx","hotmail.com.pe","hotmail.com.tr","hotmail.com.vn","hotmail.cz","hotmail.de","hotmail.dk","hotmail.es","hotmail.fr","hotmail.hu","hotmail.id","hotmail.ie","hotmail.in","hotmail.it","hotmail.jp","hotmail.kr","hotmail.lv","hotmail.my","hotmail.ph","hotmail.pt","hotmail.sa","hotmail.sg","hotmail.sk","live.be","live.co.uk","live.com","live.com.ar","live.com.mx","live.de","live.es","live.eu","live.fr","live.it","live.nl","msn.com","outlook.at","outlook.be","outlook.cl","outlook.co.il","outlook.co.nz","outlook.co.th","outlook.com","outlook.com.ar","outlook.com.au","outlook.com.br","outlook.com.gr","outlook.com.pe","outlook.com.tr","outlook.com.vn","outlook.cz","outlook.de","outlook.dk","outlook.es","outlook.fr","outlook.hu","outlook.id","outlook.ie","outlook.in","outlook.it","outlook.jp","outlook.kr","outlook.lv","outlook.my","outlook.ph","outlook.pt","outlook.sa","outlook.sg","outlook.sk","passport.com"],c=["rocketmail.com","yahoo.ca","yahoo.co.uk","yahoo.com","yahoo.de","yahoo.fr","yahoo.in","yahoo.it","ymail.com"],u=["yandex.ru","yandex.ua","yandex.kz","yandex.com","yandex.by","ya.ru"];function l(e){return e.length>1?e:""}e.exports=t.default,e.exports.default=t.default},5647:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),o=t.test(r);return n&&o&&(e=+e,r=+r),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},5716:(e,t,r)=>{const n=r(2859),o=r(8308),{ANY:s}=o,a=r(8346),i=r(532),c=[new o(">=0.0.0-0")],u=[new o(">=0.0.0")],l=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===s){if(1===t.length&&t[0].semver===s)return!0;e=r.includePrerelease?c:u}if(1===t.length&&t[0].semver===s){if(r.includePrerelease)return!0;t=u}const n=new Set;let o,l,p,h,g,y,m;for(const t of e)">"===t.operator||">="===t.operator?o=d(o,t,r):"<"===t.operator||"<="===t.operator?l=f(l,t,r):n.add(t.semver);if(n.size>1)return null;if(o&&l){if(p=i(o.semver,l.semver,r),p>0)return null;if(0===p&&(">="!==o.operator||"<="!==l.operator))return null}for(const e of n){if(o&&!a(e,String(o),r))return null;if(l&&!a(e,String(l),r))return null;for(const n of t)if(!a(e,String(n),r))return!1;return!0}let b=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver,w=!(!o||r.includePrerelease||!o.semver.prerelease.length)&&o.semver;b&&1===b.prerelease.length&&"<"===l.operator&&0===b.prerelease[0]&&(b=!1);for(const e of t){if(m=m||">"===e.operator||">="===e.operator,y=y||"<"===e.operator||"<="===e.operator,o)if(w&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===w.major&&e.semver.minor===w.minor&&e.semver.patch===w.patch&&(w=!1),">"===e.operator||">="===e.operator){if(h=d(o,e,r),h===e&&h!==o)return!1}else if(">="===o.operator&&!a(o.semver,String(e),r))return!1;if(l)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),"<"===e.operator||"<="===e.operator){if(g=f(l,e,r),g===e&&g!==l)return!1}else if("<="===l.operator&&!a(l.semver,String(e),r))return!1;if(!e.operator&&(l||o)&&0!==p)return!1}return!(o&&y&&!l&&0!==p)&&(!(l&&m&&!o&&0!==p)&&(!w&&!b))},d=(e,t,r)=>{if(!e)return t;const n=i(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},f=(e,t,r)=>{if(!e)return t;const n=i(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let o=!1;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,r);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},5830:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),s.test(e)};var n=o(r(8354));function o(e){return e&&e.__esModule?e:{default:e}}var s=(0,o(r(9043)).default)(["^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)","(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))","?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$"],"i");e.exports=t.default,e.exports.default=t.default},5933:(e,t,r)=>{const n=r(532);e.exports=(e,t,r)=>n(e,t,r)>=0},5977:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;e.exports=t.default,e.exports.default=t.default},5997:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r,s;if((0,n.default)(e),t=(0,o.default)(t,{urlSafe:!1,padding:!(null!==(r=t)&&void 0!==r&&r.urlSafe)}),""===e)return!0;if(t.padding&&e.length%4!=0)return!1;s=t.urlSafe?t.padding?c:u:t.padding?a:i;return(!t.padding||e.length%4==0)&&s.test(e)};var n=s(r(8354)),o=s(r(2533));function s(e){return e&&e.__esModule?e:{default:e}}var a=/^[A-Za-z0-9+/]+={0,2}$/,i=/^[A-Za-z0-9+/]+$/,c=/^[A-Za-z0-9_-]+={0,2}$/,u=/^[A-Za-z0-9_-]+$/;e.exports=t.default,e.exports.default=t.default},6070:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),e.replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&#x2F;/g,"/").replace(/&#x5C;/g,"\\").replace(/&#96;/g,"`").replace(/&amp;/g,"&")};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},6198:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(e);var t=e.slice(4,6).toUpperCase();if(!s.CountryCodes.has(t)&&"XK"!==t)return!1;return a.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n},s=r(2736);var a=/^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/;e.exports=t.default,e.exports.default=t.default},6237:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/;e.exports=t.default,e.exports.default=t.default},6255:(e,t,r)=>{const n=r(8247);e.exports=(e,t,r)=>n(e,t,">",r)},6298:(e,t,r)=>{const n=r(8247);e.exports=(e,t,r)=>n(e,t,"<",r)},6299:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),f.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/([01][0-9]|2[0-3])/,a=/[0-5][0-9]/,i=new RegExp("[-+]".concat(s.source,":").concat(a.source)),c=new RegExp("([zZ]|".concat(i.source,")")),u=new RegExp("".concat(s.source,":").concat(a.source,":").concat(/([0-5][0-9]|60)/.source).concat(/(\.[0-9]+)?/.source)),l=new RegExp("".concat(/[0-9]{4}/.source,"-").concat(/(0[1-9]|1[0-2])/.source,"-").concat(/([12]\d|0[1-9]|3[01])/.source)),d=new RegExp("".concat(u.source).concat(c.source)),f=new RegExp("^".concat(l.source,"[ tT]").concat(d.source,"$"));e.exports=t.default,e.exports.default=t.default},6331:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.default)(t);var n=("object"===s(r)?r.version:arguments[1])||"";if(!n)return e(t,{version:4})||e(t,{version:6});if("4"===n.toString())return c.test(t);if("6"===n.toString())return l.test(t);return!1};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}var a="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",i="(".concat(a,"[.]){3}").concat(a),c=new RegExp("^".concat(i,"$")),u="(?:[0-9a-fA-F]{1,4})",l=new RegExp("^("+"(?:".concat(u,":){7}(?:").concat(u,"|:)|")+"(?:".concat(u,":){6}(?:").concat(i,"|:").concat(u,"|:)|")+"(?:".concat(u,":){5}(?::").concat(i,"|(:").concat(u,"){1,2}|:)|")+"(?:".concat(u,":){4}(?:(:").concat(u,"){0,1}:").concat(i,"|(:").concat(u,"){1,3}|:)|")+"(?:".concat(u,":){3}(?:(:").concat(u,"){0,2}:").concat(i,"|(:").concat(u,"){1,4}|:)|")+"(?:".concat(u,":){2}(?:(:").concat(u,"){0,3}:").concat(i,"|(:").concat(u,"){1,5}|:)|")+"(?:".concat(u,":){1}(?:(:").concat(u,"){0,4}:").concat(i,"|(:").concat(u,"){1,6}|:)|")+"(?::((?::".concat(u,"){0,5}:").concat(i,"|(?::").concat(u,"){1,7}|:))")+")(%[0-9a-zA-Z.]{1,})?$");e.exports=t.default,e.exports.default=t.default},6343:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),t=(0,o.default)(t,d),!(0,s.default)(e,","))return!1;var r=e.split(",");if(r[0].startsWith("(")&&!r[1].endsWith(")")||r[1].endsWith(")")&&!r[0].startsWith("("))return!1;if(t.checkDMS)return u.test(r[0])&&l.test(r[1]);return i.test(r[0])&&c.test(r[1])};var n=a(r(8354)),o=a(r(2533)),s=a(r(4865));function a(e){return e&&e.__esModule?e:{default:e}}var i=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,c=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/,u=/^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i,l=/^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i,d={checkDMS:!1};e.exports=t.default,e.exports.default=t.default},6528:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e);try{t=(0,s.default)(t,c);var r=[];t.allow_primitives&&(r=[null,!1,!0]);var a=JSON.parse(e);return(0,o.default)(r,a)||!!a&&"object"===i(a)}catch(e){}return!1};var n=a(r(8354)),o=a(r(567)),s=a(r(2533));function a(e){return e&&e.__esModule?e:{default:e}}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var c={allow_primitives:!1};e.exports=t.default,e.exports.default=t.default},6774:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/[\uD800-\uDBFF][\uDC00-\uDFFF]/;e.exports=t.default,e.exports.default=t.default},6820:e=>{const t="object"==typeof process&&process.env&&/\bsemver\b/i.test("false")?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},6887:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.has(e.toUpperCase())};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=new Set(["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","VAT","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWZ","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","URY","UZB","VUT","VEN","VNM","VGB","VIR","WLF","ESH","YEM","ZMB","ZWE"]);e.exports=t.default,e.exports.default=t.default},6919:(e,t,r)=>{var n=r(7186),o=n,s="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==s&&s||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")(),a=r(4781);o.object.extend(proto,a),o.exportSymbol("TronWebProto.AccountBalanceRequest",null,s),o.exportSymbol("TronWebProto.AccountBalanceResponse",null,s),o.exportSymbol("TronWebProto.AccountIdentifier",null,s),o.exportSymbol("TronWebProto.AccountTrace",null,s),o.exportSymbol("TronWebProto.BlockBalanceTrace",null,s),o.exportSymbol("TronWebProto.BlockBalanceTrace.BlockIdentifier",null,s),o.exportSymbol("TronWebProto.CancelAllUnfreezeV2Contract",null,s),o.exportSymbol("TronWebProto.DelegateResourceContract",null,s),o.exportSymbol("TronWebProto.FreezeBalanceContract",null,s),o.exportSymbol("TronWebProto.FreezeBalanceV2Contract",null,s),o.exportSymbol("TronWebProto.TransactionBalanceTrace",null,s),o.exportSymbol("TronWebProto.TransactionBalanceTrace.Operation",null,s),o.exportSymbol("TronWebProto.TransferContract",null,s),o.exportSymbol("TronWebProto.UnDelegateResourceContract",null,s),o.exportSymbol("TronWebProto.UnfreezeBalanceContract",null,s),o.exportSymbol("TronWebProto.UnfreezeBalanceV2Contract",null,s),o.exportSymbol("TronWebProto.WithdrawBalanceContract",null,s),o.exportSymbol("TronWebProto.WithdrawExpireUnfreezeContract",null,s),TronWebProto.FreezeBalanceContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.FreezeBalanceContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.FreezeBalanceContract.displayName="TronWebProto.FreezeBalanceContract"),TronWebProto.UnfreezeBalanceContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UnfreezeBalanceContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UnfreezeBalanceContract.displayName="TronWebProto.UnfreezeBalanceContract"),TronWebProto.WithdrawBalanceContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.WithdrawBalanceContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.WithdrawBalanceContract.displayName="TronWebProto.WithdrawBalanceContract"),TronWebProto.TransferContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.TransferContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.TransferContract.displayName="TronWebProto.TransferContract"),TronWebProto.TransactionBalanceTrace=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.TransactionBalanceTrace.repeatedFields_,null)},o.inherits(TronWebProto.TransactionBalanceTrace,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.TransactionBalanceTrace.displayName="TronWebProto.TransactionBalanceTrace"),TronWebProto.TransactionBalanceTrace.Operation=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.TransactionBalanceTrace.Operation,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.TransactionBalanceTrace.Operation.displayName="TronWebProto.TransactionBalanceTrace.Operation"),TronWebProto.BlockBalanceTrace=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.BlockBalanceTrace.repeatedFields_,null)},o.inherits(TronWebProto.BlockBalanceTrace,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.BlockBalanceTrace.displayName="TronWebProto.BlockBalanceTrace"),TronWebProto.BlockBalanceTrace.BlockIdentifier=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.BlockBalanceTrace.BlockIdentifier,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.BlockBalanceTrace.BlockIdentifier.displayName="TronWebProto.BlockBalanceTrace.BlockIdentifier"),TronWebProto.AccountTrace=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountTrace,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountTrace.displayName="TronWebProto.AccountTrace"),TronWebProto.AccountIdentifier=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountIdentifier,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountIdentifier.displayName="TronWebProto.AccountIdentifier"),TronWebProto.AccountBalanceRequest=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountBalanceRequest,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountBalanceRequest.displayName="TronWebProto.AccountBalanceRequest"),TronWebProto.AccountBalanceResponse=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountBalanceResponse,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountBalanceResponse.displayName="TronWebProto.AccountBalanceResponse"),TronWebProto.FreezeBalanceV2Contract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.FreezeBalanceV2Contract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.FreezeBalanceV2Contract.displayName="TronWebProto.FreezeBalanceV2Contract"),TronWebProto.UnfreezeBalanceV2Contract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UnfreezeBalanceV2Contract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UnfreezeBalanceV2Contract.displayName="TronWebProto.UnfreezeBalanceV2Contract"),TronWebProto.WithdrawExpireUnfreezeContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.WithdrawExpireUnfreezeContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.WithdrawExpireUnfreezeContract.displayName="TronWebProto.WithdrawExpireUnfreezeContract"),TronWebProto.DelegateResourceContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.DelegateResourceContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.DelegateResourceContract.displayName="TronWebProto.DelegateResourceContract"),TronWebProto.UnDelegateResourceContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UnDelegateResourceContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UnDelegateResourceContract.displayName="TronWebProto.UnDelegateResourceContract"),TronWebProto.CancelAllUnfreezeV2Contract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.CancelAllUnfreezeV2Contract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.CancelAllUnfreezeV2Contract.displayName="TronWebProto.CancelAllUnfreezeV2Contract"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.FreezeBalanceContract.prototype.toObject=function(e){return TronWebProto.FreezeBalanceContract.toObject(e,this)},TronWebProto.FreezeBalanceContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),frozenBalance:n.Message.getFieldWithDefault(t,2,0),frozenDuration:n.Message.getFieldWithDefault(t,3,0),resource:n.Message.getFieldWithDefault(t,10,0),receiverAddress:t.getReceiverAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.FreezeBalanceContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.FreezeBalanceContract;return TronWebProto.FreezeBalanceContract.deserializeBinaryFromReader(r,t)},TronWebProto.FreezeBalanceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setFrozenBalance(r);break;case 3:r=t.readInt64();e.setFrozenDuration(r);break;case 10:r=t.readEnum();e.setResource(r);break;case 15:r=t.readBytes();e.setReceiverAddress(r);break;default:t.skipField()}}return e},TronWebProto.FreezeBalanceContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.FreezeBalanceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.FreezeBalanceContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getFrozenBalance())&&t.writeInt64(2,r),0!==(r=e.getFrozenDuration())&&t.writeInt64(3,r),0!==(r=e.getResource())&&t.writeEnum(10,r),(r=e.getReceiverAddress_asU8()).length>0&&t.writeBytes(15,r)},TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.FreezeBalanceContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.FreezeBalanceContract.prototype.getFrozenBalance=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.FreezeBalanceContract.prototype.setFrozenBalance=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.FreezeBalanceContract.prototype.getFrozenDuration=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.FreezeBalanceContract.prototype.setFrozenDuration=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.FreezeBalanceContract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,10,0)},TronWebProto.FreezeBalanceContract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,10,e)},TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress=function(){return n.Message.getFieldWithDefault(this,15,"")},TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress_asB64=function(){return n.Message.bytesAsB64(this.getReceiverAddress())},TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress_asU8=function(){return n.Message.bytesAsU8(this.getReceiverAddress())},TronWebProto.FreezeBalanceContract.prototype.setReceiverAddress=function(e){return n.Message.setProto3BytesField(this,15,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UnfreezeBalanceContract.prototype.toObject=function(e){return TronWebProto.UnfreezeBalanceContract.toObject(e,this)},TronWebProto.UnfreezeBalanceContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),resource:n.Message.getFieldWithDefault(t,10,0),receiverAddress:t.getReceiverAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UnfreezeBalanceContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UnfreezeBalanceContract;return TronWebProto.UnfreezeBalanceContract.deserializeBinaryFromReader(r,t)},TronWebProto.UnfreezeBalanceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 10:r=t.readEnum();e.setResource(r);break;case 15:r=t.readBytes();e.setReceiverAddress(r);break;default:t.skipField()}}return e},TronWebProto.UnfreezeBalanceContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UnfreezeBalanceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UnfreezeBalanceContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getResource())&&t.writeEnum(10,r),(r=e.getReceiverAddress_asU8()).length>0&&t.writeBytes(15,r)},TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UnfreezeBalanceContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UnfreezeBalanceContract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,10,0)},TronWebProto.UnfreezeBalanceContract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,10,e)},TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress=function(){return n.Message.getFieldWithDefault(this,15,"")},TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress_asB64=function(){return n.Message.bytesAsB64(this.getReceiverAddress())},TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress_asU8=function(){return n.Message.bytesAsU8(this.getReceiverAddress())},TronWebProto.UnfreezeBalanceContract.prototype.setReceiverAddress=function(e){return n.Message.setProto3BytesField(this,15,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.WithdrawBalanceContract.prototype.toObject=function(e){return TronWebProto.WithdrawBalanceContract.toObject(e,this)},TronWebProto.WithdrawBalanceContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.WithdrawBalanceContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.WithdrawBalanceContract;return TronWebProto.WithdrawBalanceContract.deserializeBinaryFromReader(r,t)},TronWebProto.WithdrawBalanceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){if(1===t.getFieldNumber()){var r=t.readBytes();e.setOwnerAddress(r)}else t.skipField()}return e},TronWebProto.WithdrawBalanceContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.WithdrawBalanceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.WithdrawBalanceContract.serializeBinaryToWriter=function(e,t){var r;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r)},TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.WithdrawBalanceContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.TransferContract.prototype.toObject=function(e){return TronWebProto.TransferContract.toObject(e,this)},TronWebProto.TransferContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),toAddress:t.getToAddress_asB64(),amount:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.TransferContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.TransferContract;return TronWebProto.TransferContract.deserializeBinaryFromReader(r,t)},TronWebProto.TransferContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setToAddress(r);break;case 3:r=t.readInt64();e.setAmount(r);break;default:t.skipField()}}return e},TronWebProto.TransferContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.TransferContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TransferContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getToAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getAmount())&&t.writeInt64(3,r)},TronWebProto.TransferContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.TransferContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.TransferContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.TransferContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.TransferContract.prototype.getToAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.TransferContract.prototype.getToAddress_asB64=function(){return n.Message.bytesAsB64(this.getToAddress())},TronWebProto.TransferContract.prototype.getToAddress_asU8=function(){return n.Message.bytesAsU8(this.getToAddress())},TronWebProto.TransferContract.prototype.setToAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.TransferContract.prototype.getAmount=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.TransferContract.prototype.setAmount=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.TransactionBalanceTrace.repeatedFields_=[2],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.TransactionBalanceTrace.prototype.toObject=function(e){return TronWebProto.TransactionBalanceTrace.toObject(e,this)},TronWebProto.TransactionBalanceTrace.toObject=function(e,t){var r={transactionIdentifier:t.getTransactionIdentifier_asB64(),operationList:n.Message.toObjectList(t.getOperationList(),TronWebProto.TransactionBalanceTrace.Operation.toObject,e),type:n.Message.getFieldWithDefault(t,3,""),status:n.Message.getFieldWithDefault(t,4,"")};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.TransactionBalanceTrace.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.TransactionBalanceTrace;return TronWebProto.TransactionBalanceTrace.deserializeBinaryFromReader(r,t)},TronWebProto.TransactionBalanceTrace.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setTransactionIdentifier(r);break;case 2:r=new TronWebProto.TransactionBalanceTrace.Operation;t.readMessage(r,TronWebProto.TransactionBalanceTrace.Operation.deserializeBinaryFromReader),e.addOperation(r);break;case 3:r=t.readString();e.setType(r);break;case 4:r=t.readString();e.setStatus(r);break;default:t.skipField()}}return e},TronWebProto.TransactionBalanceTrace.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.TransactionBalanceTrace.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TransactionBalanceTrace.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getTransactionIdentifier_asU8()).length>0&&t.writeBytes(1,r),(r=e.getOperationList()).length>0&&t.writeRepeatedMessage(2,r,TronWebProto.TransactionBalanceTrace.Operation.serializeBinaryToWriter),(r=e.getType()).length>0&&t.writeString(3,r),(r=e.getStatus()).length>0&&t.writeString(4,r)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.TransactionBalanceTrace.Operation.prototype.toObject=function(e){return TronWebProto.TransactionBalanceTrace.Operation.toObject(e,this)},TronWebProto.TransactionBalanceTrace.Operation.toObject=function(e,t){var r={operationIdentifier:n.Message.getFieldWithDefault(t,1,0),address:t.getAddress_asB64(),amount:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.TransactionBalanceTrace.Operation.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.TransactionBalanceTrace.Operation;return TronWebProto.TransactionBalanceTrace.Operation.deserializeBinaryFromReader(r,t)},TronWebProto.TransactionBalanceTrace.Operation.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setOperationIdentifier(r);break;case 2:r=t.readBytes();e.setAddress(r);break;case 3:r=t.readInt64();e.setAmount(r);break;default:t.skipField()}}return e},TronWebProto.TransactionBalanceTrace.Operation.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.TransactionBalanceTrace.Operation.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TransactionBalanceTrace.Operation.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getOperationIdentifier())&&t.writeInt64(1,r),(r=e.getAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getAmount())&&t.writeInt64(3,r)},TronWebProto.TransactionBalanceTrace.Operation.prototype.getOperationIdentifier=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.TransactionBalanceTrace.Operation.prototype.setOperationIdentifier=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.TransactionBalanceTrace.Operation.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.TransactionBalanceTrace.Operation.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.TransactionBalanceTrace.Operation.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.TransactionBalanceTrace.Operation.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.TransactionBalanceTrace.Operation.prototype.getAmount=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.TransactionBalanceTrace.Operation.prototype.setAmount=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.TransactionBalanceTrace.prototype.getTransactionIdentifier=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.TransactionBalanceTrace.prototype.getTransactionIdentifier_asB64=function(){return n.Message.bytesAsB64(this.getTransactionIdentifier())},TronWebProto.TransactionBalanceTrace.prototype.getTransactionIdentifier_asU8=function(){return n.Message.bytesAsU8(this.getTransactionIdentifier())},TronWebProto.TransactionBalanceTrace.prototype.setTransactionIdentifier=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.TransactionBalanceTrace.prototype.getOperationList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.TransactionBalanceTrace.Operation,2)},TronWebProto.TransactionBalanceTrace.prototype.setOperationList=function(e){return n.Message.setRepeatedWrapperField(this,2,e)},TronWebProto.TransactionBalanceTrace.prototype.addOperation=function(e,t){return n.Message.addToRepeatedWrapperField(this,2,e,TronWebProto.TransactionBalanceTrace.Operation,t)},TronWebProto.TransactionBalanceTrace.prototype.clearOperationList=function(){return this.setOperationList([])},TronWebProto.TransactionBalanceTrace.prototype.getType=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.TransactionBalanceTrace.prototype.setType=function(e){return n.Message.setProto3StringField(this,3,e)},TronWebProto.TransactionBalanceTrace.prototype.getStatus=function(){return n.Message.getFieldWithDefault(this,4,"")},TronWebProto.TransactionBalanceTrace.prototype.setStatus=function(e){return n.Message.setProto3StringField(this,4,e)},TronWebProto.BlockBalanceTrace.repeatedFields_=[3],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.BlockBalanceTrace.prototype.toObject=function(e){return TronWebProto.BlockBalanceTrace.toObject(e,this)},TronWebProto.BlockBalanceTrace.toObject=function(e,t){var r,o={blockIdentifier:(r=t.getBlockIdentifier())&&TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e,r),timestamp:n.Message.getFieldWithDefault(t,2,0),transactionBalanceTraceList:n.Message.toObjectList(t.getTransactionBalanceTraceList(),TronWebProto.TransactionBalanceTrace.toObject,e)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.BlockBalanceTrace.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.BlockBalanceTrace;return TronWebProto.BlockBalanceTrace.deserializeBinaryFromReader(r,t)},TronWebProto.BlockBalanceTrace.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=new TronWebProto.BlockBalanceTrace.BlockIdentifier;t.readMessage(r,TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader),e.setBlockIdentifier(r);break;case 2:r=t.readInt64();e.setTimestamp(r);break;case 3:r=new TronWebProto.TransactionBalanceTrace;t.readMessage(r,TronWebProto.TransactionBalanceTrace.deserializeBinaryFromReader),e.addTransactionBalanceTrace(r);break;default:t.skipField()}}return e},TronWebProto.BlockBalanceTrace.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.BlockBalanceTrace.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.BlockBalanceTrace.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getBlockIdentifier())&&t.writeMessage(1,r,TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter),0!==(r=e.getTimestamp())&&t.writeInt64(2,r),(r=e.getTransactionBalanceTraceList()).length>0&&t.writeRepeatedMessage(3,r,TronWebProto.TransactionBalanceTrace.serializeBinaryToWriter)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.toObject=function(e){return TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e,this)},TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject=function(e,t){var r={hash:t.getHash_asB64(),number:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.BlockBalanceTrace.BlockIdentifier;return TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader(r,t)},TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setHash(r);break;case 2:r=t.readInt64();e.setNumber(r);break;default:t.skipField()}}return e},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getHash_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getNumber())&&t.writeInt64(2,r)},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getHash=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getHash_asB64=function(){return n.Message.bytesAsB64(this.getHash())},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getHash_asU8=function(){return n.Message.bytesAsU8(this.getHash())},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.setHash=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getNumber=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.setNumber=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.BlockBalanceTrace.prototype.getBlockIdentifier=function(){return n.Message.getWrapperField(this,TronWebProto.BlockBalanceTrace.BlockIdentifier,1)},TronWebProto.BlockBalanceTrace.prototype.setBlockIdentifier=function(e){return n.Message.setWrapperField(this,1,e)},TronWebProto.BlockBalanceTrace.prototype.clearBlockIdentifier=function(){return this.setBlockIdentifier(void 0)},TronWebProto.BlockBalanceTrace.prototype.hasBlockIdentifier=function(){return null!=n.Message.getField(this,1)},TronWebProto.BlockBalanceTrace.prototype.getTimestamp=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.BlockBalanceTrace.prototype.setTimestamp=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.BlockBalanceTrace.prototype.getTransactionBalanceTraceList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.TransactionBalanceTrace,3)},TronWebProto.BlockBalanceTrace.prototype.setTransactionBalanceTraceList=function(e){return n.Message.setRepeatedWrapperField(this,3,e)},TronWebProto.BlockBalanceTrace.prototype.addTransactionBalanceTrace=function(e,t){return n.Message.addToRepeatedWrapperField(this,3,e,TronWebProto.TransactionBalanceTrace,t)},TronWebProto.BlockBalanceTrace.prototype.clearTransactionBalanceTraceList=function(){return this.setTransactionBalanceTraceList([])},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountTrace.prototype.toObject=function(e){return TronWebProto.AccountTrace.toObject(e,this)},TronWebProto.AccountTrace.toObject=function(e,t){var r={balance:n.Message.getFieldWithDefault(t,1,0),placeholder:n.Message.getFieldWithDefault(t,99,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountTrace.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountTrace;return TronWebProto.AccountTrace.deserializeBinaryFromReader(r,t)},TronWebProto.AccountTrace.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setBalance(r);break;case 99:r=t.readInt64();e.setPlaceholder(r);break;default:t.skipField()}}return e},TronWebProto.AccountTrace.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountTrace.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountTrace.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getBalance())&&t.writeInt64(1,r),0!==(r=e.getPlaceholder())&&t.writeInt64(99,r)},TronWebProto.AccountTrace.prototype.getBalance=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.AccountTrace.prototype.setBalance=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.AccountTrace.prototype.getPlaceholder=function(){return n.Message.getFieldWithDefault(this,99,0)},TronWebProto.AccountTrace.prototype.setPlaceholder=function(e){return n.Message.setProto3IntField(this,99,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountIdentifier.prototype.toObject=function(e){return TronWebProto.AccountIdentifier.toObject(e,this)},TronWebProto.AccountIdentifier.toObject=function(e,t){var r={address:t.getAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountIdentifier.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountIdentifier;return TronWebProto.AccountIdentifier.deserializeBinaryFromReader(r,t)},TronWebProto.AccountIdentifier.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){if(1===t.getFieldNumber()){var r=t.readBytes();e.setAddress(r)}else t.skipField()}return e},TronWebProto.AccountIdentifier.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountIdentifier.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountIdentifier.serializeBinaryToWriter=function(e,t){var r;(r=e.getAddress_asU8()).length>0&&t.writeBytes(1,r)},TronWebProto.AccountIdentifier.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.AccountIdentifier.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.AccountIdentifier.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.AccountIdentifier.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountBalanceRequest.prototype.toObject=function(e){return TronWebProto.AccountBalanceRequest.toObject(e,this)},TronWebProto.AccountBalanceRequest.toObject=function(e,t){var r,n={accountIdentifier:(r=t.getAccountIdentifier())&&TronWebProto.AccountIdentifier.toObject(e,r),blockIdentifier:(r=t.getBlockIdentifier())&&TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.AccountBalanceRequest.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountBalanceRequest;return TronWebProto.AccountBalanceRequest.deserializeBinaryFromReader(r,t)},TronWebProto.AccountBalanceRequest.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=new TronWebProto.AccountIdentifier;t.readMessage(r,TronWebProto.AccountIdentifier.deserializeBinaryFromReader),e.setAccountIdentifier(r);break;case 2:r=new TronWebProto.BlockBalanceTrace.BlockIdentifier;t.readMessage(r,TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader),e.setBlockIdentifier(r);break;default:t.skipField()}}return e},TronWebProto.AccountBalanceRequest.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountBalanceRequest.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountBalanceRequest.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getAccountIdentifier())&&t.writeMessage(1,r,TronWebProto.AccountIdentifier.serializeBinaryToWriter),null!=(r=e.getBlockIdentifier())&&t.writeMessage(2,r,TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter)},TronWebProto.AccountBalanceRequest.prototype.getAccountIdentifier=function(){return n.Message.getWrapperField(this,TronWebProto.AccountIdentifier,1)},TronWebProto.AccountBalanceRequest.prototype.setAccountIdentifier=function(e){return n.Message.setWrapperField(this,1,e)},TronWebProto.AccountBalanceRequest.prototype.clearAccountIdentifier=function(){return this.setAccountIdentifier(void 0)},TronWebProto.AccountBalanceRequest.prototype.hasAccountIdentifier=function(){return null!=n.Message.getField(this,1)},TronWebProto.AccountBalanceRequest.prototype.getBlockIdentifier=function(){return n.Message.getWrapperField(this,TronWebProto.BlockBalanceTrace.BlockIdentifier,2)},TronWebProto.AccountBalanceRequest.prototype.setBlockIdentifier=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.AccountBalanceRequest.prototype.clearBlockIdentifier=function(){return this.setBlockIdentifier(void 0)},TronWebProto.AccountBalanceRequest.prototype.hasBlockIdentifier=function(){return null!=n.Message.getField(this,2)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountBalanceResponse.prototype.toObject=function(e){return TronWebProto.AccountBalanceResponse.toObject(e,this)},TronWebProto.AccountBalanceResponse.toObject=function(e,t){var r,o={balance:n.Message.getFieldWithDefault(t,1,0),blockIdentifier:(r=t.getBlockIdentifier())&&TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e,r)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.AccountBalanceResponse.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountBalanceResponse;return TronWebProto.AccountBalanceResponse.deserializeBinaryFromReader(r,t)},TronWebProto.AccountBalanceResponse.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setBalance(r);break;case 2:r=new TronWebProto.BlockBalanceTrace.BlockIdentifier;t.readMessage(r,TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader),e.setBlockIdentifier(r);break;default:t.skipField()}}return e},TronWebProto.AccountBalanceResponse.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountBalanceResponse.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountBalanceResponse.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getBalance())&&t.writeInt64(1,r),null!=(r=e.getBlockIdentifier())&&t.writeMessage(2,r,TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter)},TronWebProto.AccountBalanceResponse.prototype.getBalance=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.AccountBalanceResponse.prototype.setBalance=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.AccountBalanceResponse.prototype.getBlockIdentifier=function(){return n.Message.getWrapperField(this,TronWebProto.BlockBalanceTrace.BlockIdentifier,2)},TronWebProto.AccountBalanceResponse.prototype.setBlockIdentifier=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.AccountBalanceResponse.prototype.clearBlockIdentifier=function(){return this.setBlockIdentifier(void 0)},TronWebProto.AccountBalanceResponse.prototype.hasBlockIdentifier=function(){return null!=n.Message.getField(this,2)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.FreezeBalanceV2Contract.prototype.toObject=function(e){return TronWebProto.FreezeBalanceV2Contract.toObject(e,this)},TronWebProto.FreezeBalanceV2Contract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),frozenBalance:n.Message.getFieldWithDefault(t,2,0),resource:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.FreezeBalanceV2Contract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.FreezeBalanceV2Contract;return TronWebProto.FreezeBalanceV2Contract.deserializeBinaryFromReader(r,t)},TronWebProto.FreezeBalanceV2Contract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setFrozenBalance(r);break;case 3:r=t.readEnum();e.setResource(r);break;default:t.skipField()}}return e},TronWebProto.FreezeBalanceV2Contract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.FreezeBalanceV2Contract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.FreezeBalanceV2Contract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getFrozenBalance())&&t.writeInt64(2,r),0!==(r=e.getResource())&&t.writeEnum(3,r)},TronWebProto.FreezeBalanceV2Contract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.FreezeBalanceV2Contract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.FreezeBalanceV2Contract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.FreezeBalanceV2Contract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.FreezeBalanceV2Contract.prototype.getFrozenBalance=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.FreezeBalanceV2Contract.prototype.setFrozenBalance=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.FreezeBalanceV2Contract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.FreezeBalanceV2Contract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UnfreezeBalanceV2Contract.prototype.toObject=function(e){return TronWebProto.UnfreezeBalanceV2Contract.toObject(e,this)},TronWebProto.UnfreezeBalanceV2Contract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),unfreezeBalance:n.Message.getFieldWithDefault(t,2,0),resource:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UnfreezeBalanceV2Contract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UnfreezeBalanceV2Contract;return TronWebProto.UnfreezeBalanceV2Contract.deserializeBinaryFromReader(r,t)},TronWebProto.UnfreezeBalanceV2Contract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setUnfreezeBalance(r);break;case 3:r=t.readEnum();e.setResource(r);break;default:t.skipField()}}return e},TronWebProto.UnfreezeBalanceV2Contract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UnfreezeBalanceV2Contract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UnfreezeBalanceV2Contract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getUnfreezeBalance())&&t.writeInt64(2,r),0!==(r=e.getResource())&&t.writeEnum(3,r)},TronWebProto.UnfreezeBalanceV2Contract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.UnfreezeBalanceV2Contract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UnfreezeBalanceV2Contract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UnfreezeBalanceV2Contract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UnfreezeBalanceV2Contract.prototype.getUnfreezeBalance=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.UnfreezeBalanceV2Contract.prototype.setUnfreezeBalance=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.UnfreezeBalanceV2Contract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.UnfreezeBalanceV2Contract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.WithdrawExpireUnfreezeContract.prototype.toObject=function(e){return TronWebProto.WithdrawExpireUnfreezeContract.toObject(e,this)},TronWebProto.WithdrawExpireUnfreezeContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.WithdrawExpireUnfreezeContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.WithdrawExpireUnfreezeContract;return TronWebProto.WithdrawExpireUnfreezeContract.deserializeBinaryFromReader(r,t)},TronWebProto.WithdrawExpireUnfreezeContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){if(1===t.getFieldNumber()){var r=t.readBytes();e.setOwnerAddress(r)}else t.skipField()}return e},TronWebProto.WithdrawExpireUnfreezeContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.WithdrawExpireUnfreezeContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.WithdrawExpireUnfreezeContract.serializeBinaryToWriter=function(e,t){var r;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r)},TronWebProto.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.WithdrawExpireUnfreezeContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.DelegateResourceContract.prototype.toObject=function(e){return TronWebProto.DelegateResourceContract.toObject(e,this)},TronWebProto.DelegateResourceContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),resource:n.Message.getFieldWithDefault(t,2,0),balance:n.Message.getFieldWithDefault(t,3,0),receiverAddress:t.getReceiverAddress_asB64(),lock:n.Message.getBooleanFieldWithDefault(t,5,!1),lockPeriod:n.Message.getFieldWithDefault(t,6,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.DelegateResourceContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.DelegateResourceContract;return TronWebProto.DelegateResourceContract.deserializeBinaryFromReader(r,t)},TronWebProto.DelegateResourceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readEnum();e.setResource(r);break;case 3:r=t.readInt64();e.setBalance(r);break;case 4:r=t.readBytes();e.setReceiverAddress(r);break;case 5:r=t.readBool();e.setLock(r);break;case 6:r=t.readInt64();e.setLockPeriod(r);break;default:t.skipField()}}return e},TronWebProto.DelegateResourceContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.DelegateResourceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.DelegateResourceContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getResource())&&t.writeEnum(2,r),0!==(r=e.getBalance())&&t.writeInt64(3,r),(r=e.getReceiverAddress_asU8()).length>0&&t.writeBytes(4,r),(r=e.getLock())&&t.writeBool(5,r),0!==(r=e.getLockPeriod())&&t.writeInt64(6,r)},TronWebProto.DelegateResourceContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.DelegateResourceContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.DelegateResourceContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.DelegateResourceContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.DelegateResourceContract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.DelegateResourceContract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,2,e)},TronWebProto.DelegateResourceContract.prototype.getBalance=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.DelegateResourceContract.prototype.setBalance=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.DelegateResourceContract.prototype.getReceiverAddress=function(){return n.Message.getFieldWithDefault(this,4,"")},TronWebProto.DelegateResourceContract.prototype.getReceiverAddress_asB64=function(){return n.Message.bytesAsB64(this.getReceiverAddress())},TronWebProto.DelegateResourceContract.prototype.getReceiverAddress_asU8=function(){return n.Message.bytesAsU8(this.getReceiverAddress())},TronWebProto.DelegateResourceContract.prototype.setReceiverAddress=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.DelegateResourceContract.prototype.getLock=function(){return n.Message.getBooleanFieldWithDefault(this,5,!1)},TronWebProto.DelegateResourceContract.prototype.setLock=function(e){return n.Message.setProto3BooleanField(this,5,e)},TronWebProto.DelegateResourceContract.prototype.getLockPeriod=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.DelegateResourceContract.prototype.setLockPeriod=function(e){return n.Message.setProto3IntField(this,6,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UnDelegateResourceContract.prototype.toObject=function(e){return TronWebProto.UnDelegateResourceContract.toObject(e,this)},TronWebProto.UnDelegateResourceContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),resource:n.Message.getFieldWithDefault(t,2,0),balance:n.Message.getFieldWithDefault(t,3,0),receiverAddress:t.getReceiverAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UnDelegateResourceContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UnDelegateResourceContract;return TronWebProto.UnDelegateResourceContract.deserializeBinaryFromReader(r,t)},TronWebProto.UnDelegateResourceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readEnum();e.setResource(r);break;case 3:r=t.readInt64();e.setBalance(r);break;case 4:r=t.readBytes();e.setReceiverAddress(r);break;default:t.skipField()}}return e},TronWebProto.UnDelegateResourceContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UnDelegateResourceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UnDelegateResourceContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getResource())&&t.writeEnum(2,r),0!==(r=e.getBalance())&&t.writeInt64(3,r),(r=e.getReceiverAddress_asU8()).length>0&&t.writeBytes(4,r)},TronWebProto.UnDelegateResourceContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.UnDelegateResourceContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UnDelegateResourceContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UnDelegateResourceContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UnDelegateResourceContract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.UnDelegateResourceContract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,2,e)},TronWebProto.UnDelegateResourceContract.prototype.getBalance=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.UnDelegateResourceContract.prototype.setBalance=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.UnDelegateResourceContract.prototype.getReceiverAddress=function(){return n.Message.getFieldWithDefault(this,4,"")},TronWebProto.UnDelegateResourceContract.prototype.getReceiverAddress_asB64=function(){return n.Message.bytesAsB64(this.getReceiverAddress())},TronWebProto.UnDelegateResourceContract.prototype.getReceiverAddress_asU8=function(){return n.Message.bytesAsU8(this.getReceiverAddress())},TronWebProto.UnDelegateResourceContract.prototype.setReceiverAddress=function(e){return n.Message.setProto3BytesField(this,4,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.CancelAllUnfreezeV2Contract.prototype.toObject=function(e){return TronWebProto.CancelAllUnfreezeV2Contract.toObject(e,this)},TronWebProto.CancelAllUnfreezeV2Contract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.CancelAllUnfreezeV2Contract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.CancelAllUnfreezeV2Contract;return TronWebProto.CancelAllUnfreezeV2Contract.deserializeBinaryFromReader(r,t)},TronWebProto.CancelAllUnfreezeV2Contract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){if(1===t.getFieldNumber()){var r=t.readBytes();e.setOwnerAddress(r)}else t.skipField()}return e},TronWebProto.CancelAllUnfreezeV2Contract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.CancelAllUnfreezeV2Contract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.CancelAllUnfreezeV2Contract.serializeBinaryToWriter=function(e,t){var r;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r)},TronWebProto.CancelAllUnfreezeV2Contract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.CancelAllUnfreezeV2Contract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.CancelAllUnfreezeV2Contract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.CancelAllUnfreezeV2Contract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},o.object.extend(t,TronWebProto)},6959:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[\x00-\x7F]+$/;e.exports=t.default,e.exports.default=t.default},6969:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e,{allow_leading_zeroes:!1,min:0,max:65535})};var n,o=(n=r(3353))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},6982:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r,n;(0,o.default)(e),"object"===s(t)?(r=t.min||0,n=t.max):(r=arguments[1]||0,n=arguments[2]);var a=e.match(/(\uFE0F|\uFE0E)/g)||[],i=e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g)||[],c=e.length-a.length-i.length,u=c>=r&&(void 0===n||c<=n);if(u&&Array.isArray(null==t?void 0:t.discreteLengths))return t.discreteLengths.some((function(e){return e===c}));return u};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}e.exports=t.default,e.exports.default=t.default},7186:function(e,t,r){var n="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,r){e!=Array.prototype&&e!=Object.prototype&&(e[t]=r.value)},o="undefined"!=typeof window&&window===this?this:void 0!==r.g&&null!=r.g?r.g:this;function s(){s=function(){},o.Symbol||(o.Symbol=c)}function a(e,t){this.a=e,n(this,"description",{configurable:!0,writable:!0,value:t})}a.prototype.toString=function(){return this.a};var i,c=(i=0,function e(t){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new a("jscomp_symbol_"+(t||"")+"_"+i++,t)});function u(){s();var e=o.Symbol.iterator;e||(e=o.Symbol.iterator=o.Symbol("Symbol.iterator")),"function"!=typeof Array.prototype[e]&&n(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return function(e){return u(),e={next:e},e[o.Symbol.iterator]=function(){return this},e}(function(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}(this))}}),u=function(){}}!function(e,t){if(t){var r=o;e=e.split(".");for(var s=0;s<e.length-1;s++){var a=e[s];a in r||(r[a]={}),r=r[a]}(t=t(s=r[e=e[e.length-1]]))!=s&&null!=t&&n(r,e,{configurable:!0,writable:!0,value:t})}}("Array.prototype.entries",(function(e){return e||function(){return function(e,t){u(),e instanceof String&&(e+="");var r=0,n={next:function(){if(r<e.length){var o=r++;return{value:t(o,e[o]),done:!1}}return n.next=function(){return{done:!0,value:void 0}},n.next()}};return n[Symbol.iterator]=function(){return n},n}(this,(function(e,t){return[e,t]}))}}));var l=this||self;function d(e,t,r){e=e.split("."),r=r||l,e[0]in r||void 0===r.execScript||r.execScript("var "+e[0]);for(var n;e.length&&(n=e.shift());)e.length||void 0===t?r=r[n]&&r[n]!==Object.prototype[n]?r[n]:r[n]={}:r[n]=t}function f(e){var t=typeof e;if("object"==t){if(!e)return"null";if(e instanceof Array)return"array";if(e instanceof Object)return t;var r=Object.prototype.toString.call(e);if("[object Window]"==r)return"object";if("[object Array]"==r||"number"==typeof e.length&&void 0!==e.splice&&void 0!==e.propertyIsEnumerable&&!e.propertyIsEnumerable("splice"))return"array";if("[object Function]"==r||void 0!==e.call&&void 0!==e.propertyIsEnumerable&&!e.propertyIsEnumerable("call"))return"function"}else if("function"==t&&void 0===e.call)return"object";return t}function p(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}var h="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");var g=Array.prototype.forEach?function(e,t){Array.prototype.forEach.call(e,t,void 0)}:function(e,t){for(var r=e.length,n="string"==typeof e?e.split(""):e,o=0;o<r;o++)o in n&&t.call(void 0,n[o],o,e)},y=Array.prototype.map?function(e,t){return Array.prototype.map.call(e,t,void 0)}:function(e,t){for(var r=e.length,n=Array(r),o="string"==typeof e?e.split(""):e,s=0;s<r;s++)s in o&&(n[s]=t.call(void 0,o[s],s,e));return n};function m(e,t,r){return 2>=arguments.length?Array.prototype.slice.call(e,t):Array.prototype.slice.call(e,t,r)}function b(e,t,r,n){var o="Assertion failed";if(r){o+=": "+r;var s=n}else e&&(o+=": "+e,s=t);throw Error(o,s||[])}function w(e,t,r){for(var n=[],o=2;o<arguments.length;++o)n[o-2]=arguments[o];return e||b("",null,t,n),e}function T(e,t){for(var r=[],n=1;n<arguments.length;++n)r[n-1]=arguments[n];throw Error("Failure"+(e?": "+e:""),r)}function A(e,t,r,n){for(var o=[],s=3;s<arguments.length;++s)o[s-3]=arguments[s];e instanceof t||b("Expected instanceof %s but got %s.",[v(t),v(e)],r,o)}function v(e){return e instanceof Function?e.displayName||e.name||"unknown type name":e instanceof Object?e.constructor.displayName||e.constructor.name||Object.prototype.toString.call(e):null===e?"null":typeof e}function P(e,t){if(this.c=e,this.b=t,this.a={},this.arrClean=!0,0<this.c.length){for(e=0;e<this.c.length;e++){var r=(t=this.c[e])[0];this.a[r.toString()]=new W(r,t[1])}this.arrClean=!0}}function E(e){this.a=0,this.b=e}function C(e,t){return e.b?(t.a||(t.a=new e.b(t.value)),t.a):t.value}function B(e){e=e.a;var t,r=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.push(t);return r}function W(e,t){this.key=e,this.value=t,this.a=void 0}function S(e){if(8192>=e.length)return String.fromCharCode.apply(null,e);for(var t="",r=0;r<e.length;r+=8192)t+=String.fromCharCode.apply(null,m(e,r,r+8192));return t}d("jspb.Map",P,void 0),P.prototype.g=function(){if(this.arrClean){if(this.b){var e,t=this.a;for(e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var r=t[e].a;r&&r.g()}}}else{for(this.c.length=0,(t=B(this)).sort(),e=0;e<t.length;e++){var n=this.a[t[e]];(r=n.a)&&r.g(),this.c.push([n.key,n.value])}this.arrClean=!0}return this.c},P.prototype.toArray=P.prototype.g,P.prototype.Mc=function(e,t){for(var r=this.g(),n=[],o=0;o<r.length;o++){var s=this.a[r[o][0].toString()];C(this,s);var a=s.a;a?(w(t),n.push([s.key,t(e,a)])):n.push([s.key,s.value])}return n},P.prototype.toObject=P.prototype.Mc,P.fromObject=function(e,t,r){t=new P([],t);for(var n=0;n<e.length;n++){var o=e[n][0],s=r(e[n][1]);t.set(o,s)}return t},E.prototype.next=function(){return this.a<this.b.length?{done:!1,value:this.b[this.a++]}:{done:!0,value:void 0}},"undefined"!=typeof Symbol&&(E.prototype[Symbol.iterator]=function(){return this}),P.prototype.Jb=function(){return B(this).length},P.prototype.getLength=P.prototype.Jb,P.prototype.clear=function(){this.a={},this.arrClean=!1},P.prototype.clear=P.prototype.clear,P.prototype.Cb=function(e){e=e.toString();var t=this.a.hasOwnProperty(e);return delete this.a[e],this.arrClean=!1,t},P.prototype.del=P.prototype.Cb,P.prototype.Eb=function(){var e=[],t=B(this);t.sort();for(var r=0;r<t.length;r++){var n=this.a[t[r]];e.push([n.key,n.value])}return e},P.prototype.getEntryList=P.prototype.Eb,P.prototype.entries=function(){var e=[],t=B(this);t.sort();for(var r=0;r<t.length;r++){var n=this.a[t[r]];e.push([n.key,C(this,n)])}return new E(e)},P.prototype.entries=P.prototype.entries,P.prototype.keys=function(){var e=[],t=B(this);t.sort();for(var r=0;r<t.length;r++)e.push(this.a[t[r]].key);return new E(e)},P.prototype.keys=P.prototype.keys,P.prototype.values=function(){var e=[],t=B(this);t.sort();for(var r=0;r<t.length;r++)e.push(C(this,this.a[t[r]]));return new E(e)},P.prototype.values=P.prototype.values,P.prototype.forEach=function(e,t){var r=B(this);r.sort();for(var n=0;n<r.length;n++){var o=this.a[r[n]];e.call(t,C(this,o),o.key,this)}},P.prototype.forEach=P.prototype.forEach,P.prototype.set=function(e,t){var r=new W(e);return this.b?(r.a=t,r.value=t.g()):r.value=t,this.a[e.toString()]=r,this.arrClean=!1,this},P.prototype.set=P.prototype.set,P.prototype.get=function(e){if(e=this.a[e.toString()])return C(this,e)},P.prototype.get=P.prototype.get,P.prototype.has=function(e){return e.toString()in this.a},P.prototype.has=P.prototype.has,P.prototype.Jc=function(e,t,r,n,o){var s=B(this);s.sort();for(var a=0;a<s.length;a++){var i=this.a[s[a]];t.Va(e),r.call(t,1,i.key),this.b?n.call(t,2,C(this,i),o):n.call(t,2,i.value),t.Ya()}},P.prototype.serializeBinary=P.prototype.Jc,P.deserializeBinary=function(e,t,r,n,o,s,a){for(;t.oa()&&!t.bb();){var i=t.c;1==i?s=r.call(t):2==i&&(e.b?(w(o),a||(a=new e.b),n.call(t,a,o)):a=n.call(t))}w(null!=s),w(null!=a),e.set(s,a)};var I={"\0":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\x0B",'"':'\\"',"\\":"\\\\","<":"\\u003C"},_={"'":"\\'"},O={},R=null;function M(e,t){void 0===t&&(t=0),F(),t=O[t];for(var r=[],n=0;n<e.length;n+=3){var o=e[n],s=n+1<e.length,a=s?e[n+1]:0,i=n+2<e.length,c=i?e[n+2]:0,u=o>>2;o=(3&o)<<4|a>>4,a=(15&a)<<2|c>>6,c&=63,i||(c=64,s||(a=64)),r.push(t[u],t[o],t[a]||"",t[c]||"")}return r.join("")}function x(e){var t=e.length,r=3*t/4;r%3?r=Math.floor(r):-1!="=.".indexOf(e[t-1])&&(r=-1!="=.".indexOf(e[t-2])?r-2:r-1);var n=new Uint8Array(r),o=0;return function(e,t){function r(t){for(;n<e.length;){var r=e.charAt(n++),o=R[r];if(null!=o)return o;if(!/^[\s\xa0]*$/.test(r))throw Error("Unknown base64 encoding at char: "+r)}return t}F();for(var n=0;;){var o=r(-1),s=r(0),a=r(64),i=r(64);if(64===i&&-1===o)break;t(o<<2|s>>4),64!=a&&(t(s<<4&240|a>>2),64!=i&&t(a<<6&192|i))}}(e,(function(e){n[o++]=e})),n.subarray(0,o)}function F(){if(!R){R={};for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),t=["+/=","+/","-_=","-_.","-_"],r=0;5>r;r++){var n=e.concat(t[r].split(""));O[r]=n;for(var o=0;o<n.length;o++){var s=n[o];void 0===R[s]&&(R[s]=o)}}}}d("jspb.ConstBinaryMessage",(function(){}),void 0),d("jspb.BinaryMessage",(function(){}),void 0),d("jspb.BinaryConstants.FieldType",{yb:-1,ee:1,FLOAT:2,ke:3,te:4,je:5,xb:6,wb:7,BOOL:8,re:9,ie:10,le:11,ce:12,se:13,ge:14,me:15,ne:16,oe:17,pe:18,he:30,ve:31},void 0),d("jspb.BinaryConstants.WireType",{yb:-1,ue:0,xb:1,de:2,qe:3,fe:4,wb:5},void 0),d("jspb.BinaryConstants.FieldTypeToWireType",(function(e){switch(e){case 5:case 3:case 13:case 4:case 17:case 18:case 8:case 14:case 31:return 0;case 1:case 6:case 16:case 30:return 1;case 9:case 11:case 12:return 2;case 2:case 7:case 15:return 5;default:return-1}}),void 0),d("jspb.BinaryConstants.INVALID_FIELD_NUMBER",-1,void 0),d("jspb.BinaryConstants.FLOAT32_EPS",1401298464324817e-60,void 0),d("jspb.BinaryConstants.FLOAT32_MIN",11754943508222875e-54,void 0),d("jspb.BinaryConstants.FLOAT32_MAX",34028234663852886e22,void 0),d("jspb.BinaryConstants.FLOAT64_EPS",5e-324,void 0),d("jspb.BinaryConstants.FLOAT64_MIN",22250738585072014e-324,void 0),d("jspb.BinaryConstants.FLOAT64_MAX",17976931348623157e292,void 0),d("jspb.BinaryConstants.TWO_TO_20",1048576,void 0),d("jspb.BinaryConstants.TWO_TO_23",8388608,void 0),d("jspb.BinaryConstants.TWO_TO_31",2147483648,void 0),d("jspb.BinaryConstants.TWO_TO_32",4294967296,void 0),d("jspb.BinaryConstants.TWO_TO_52",4503599627370496,void 0),d("jspb.BinaryConstants.TWO_TO_63",0x8000000000000000,void 0),d("jspb.BinaryConstants.TWO_TO_64",0x10000000000000000,void 0),d("jspb.BinaryConstants.ZERO_HASH","\0\0\0\0\0\0\0\0",void 0);var k=0,N=0;function U(e){var t=e>>>0;e=Math.floor((e-t)/4294967296)>>>0,k=t,N=e}function D(e){var t=0>e,r=(e=Math.abs(e))>>>0;e=Math.floor((e-r)/4294967296),e>>>=0,t&&(e=~e>>>0,4294967295<(r=(~r>>>0)+1)&&(r=0,4294967295<++e&&(e=0))),k=r,N=e}function L(e){var t=0>e;U(e=2*Math.abs(e)),e=k;var r=N;t&&(0==e?0==r?r=e=4294967295:(r--,e=4294967295):e--),k=e,N=r}function $(e){var t=0>e?1:0;if(0===(e=t?-e:e))0<1/e?k=N=0:(N=0,k=2147483648);else if(isNaN(e))N=0,k=2147483647;else if(34028234663852886e22<e)N=0,k=(t<<31|2139095040)>>>0;else if(11754943508222875e-54>e)e=Math.round(e/Math.pow(2,-149)),N=0,k=(t<<31|e)>>>0;else{var r=Math.floor(Math.log(e)/Math.LN2);e*=Math.pow(2,-r),16777216<=(e=Math.round(8388608*e))&&++r,N=0,k=(t<<31|r+127<<23|8388607&e)>>>0}}function z(e){var t=0>e?1:0;if(0===(e=t?-e:e))N=0<1/e?0:2147483648,k=0;else if(isNaN(e))N=2147483647,k=4294967295;else if(17976931348623157e292<e)N=(t<<31|2146435072)>>>0,k=0;else if(22250738585072014e-324>e)e/=Math.pow(2,-1074),N=(t<<31|e/4294967296)>>>0,k=e>>>0;else{var r=e,n=0;if(2<=r)for(;2<=r&&1023>n;)n++,r/=2;else for(;1>r&&-1022<n;)r*=2,n--;e*=Math.pow(2,-n),N=(t<<31|n+1023<<20|1048576*e&1048575)>>>0,k=4503599627370496*e>>>0}}function j(e){var t=e.charCodeAt(4),r=e.charCodeAt(5),n=e.charCodeAt(6),o=e.charCodeAt(7);k=e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)>>>0,N=t+(r<<8)+(n<<16)+(o<<24)>>>0}function V(e,t){return 4294967296*t+(e>>>0)}function G(e,t){var r=2147483648&t;return r&&(t=~t>>>0,0==(e=1+~e>>>0)&&(t=t+1>>>0)),e=V(e,t),r?-e:e}function H(e,t,r){var n=t>>31;return r(e<<1^n,(t<<1|e>>>31)^n)}function K(e,t){return Z(e,t,G)}function Z(e,t,r){var n=-(1&e);return r((e>>>1|t<<31)^n,t>>>1^n)}function q(e){var t=2*(e>>31)+1,r=e>>>23&255;return e&=8388607,255==r?e?NaN:1/0*t:0==r?t*Math.pow(2,-149)*e:t*Math.pow(2,r-150)*(e+Math.pow(2,23))}function J(e,t){var r=2*(t>>31)+1,n=t>>>20&2047;return e=4294967296*(1048575&t)+e,2047==n?e?NaN:1/0*r:0==n?r*Math.pow(2,-1074)*e:r*Math.pow(2,n-1075)*(e+4503599627370496)}function Y(e,t){return String.fromCharCode(e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255,t>>>0&255,t>>>8&255,t>>>16&255,t>>>24&255)}function X(e,t){function r(e,t){return e=e?String(e):"",t?"0000000".slice(e.length)+e:e}if(2097151>=t)return""+V(e,t);var n=(e>>>24|t<<8)>>>0&16777215;return e=(16777215&e)+6777216*n+6710656*(t=t>>16&65535),n+=8147497*t,t*=2,1e7<=e&&(n+=Math.floor(e/1e7),e%=1e7),1e7<=n&&(t+=Math.floor(n/1e7),n%=1e7),r(t,0)+r(n,t)+r(e,1)}function Q(e,t){var r=2147483648&t;return r&&(t=~t+(0==(e=1+~e>>>0)?1:0)>>>0),e=X(e,t),r?"-"+e:e}function ee(e,t){j(e),e=k;var r=N;return t?Q(e,r):X(e,r)}function te(e){function t(e,t){for(var r=0;8>r&&(1!==e||0<t);r++)t=e*n[r]+t,n[r]=255&t,t>>>=8}w(0<e.length);var r=!1;"-"===e[0]&&(r=!0,e=e.slice(1));for(var n=[0,0,0,0,0,0,0,0],o=0;o<e.length;o++)t(10,e.charCodeAt(o)-48);return r&&(function(){for(var e=0;8>e;e++)n[e]=255&~n[e]}(),t(1,1)),S(n)}function re(e){return String.fromCharCode(10>e?48+e:87+e)}function ne(e){return 97<=e?e-97+10:e-48}function oe(e,t,r,n,o){var s=0;if(128>n)for(;t<r&&e[t++]==n;)s++,t+=o;else for(;t<r;){for(var a=n;128<a;){if(e[t++]!=(127&a|128))return s;a>>=7}if(e[t++]!=a)break;s++,t+=o}return s}function se(e){return e.constructor===Uint8Array?e:e.constructor===ArrayBuffer||e.constructor===Array?new Uint8Array(e):e.constructor===String?x(e):e instanceof Uint8Array?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):(T("Type not convertible to Uint8Array."),new Uint8Array(0))}function ae(e,t,r){this.b=null,this.a=this.c=this.h=0,this.v=!1,e&&this.H(e,t,r)}d("jspb.utils.getSplit64Low",(function(){return k}),void 0),d("jspb.utils.getSplit64High",(function(){return N}),void 0),d("jspb.utils.splitUint64",U,void 0),d("jspb.utils.splitInt64",D,void 0),d("jspb.utils.splitZigzag64",L,void 0),d("jspb.utils.splitFloat32",$,void 0),d("jspb.utils.splitFloat64",z,void 0),d("jspb.utils.splitHash64",j,void 0),d("jspb.utils.joinUint64",V,void 0),d("jspb.utils.joinInt64",G,void 0),d("jspb.utils.toZigzag64",H,void 0),d("jspb.utils.joinZigzag64",K,void 0),d("jspb.utils.fromZigzag64",Z,void 0),d("jspb.utils.joinFloat32",q,void 0),d("jspb.utils.joinFloat64",J,void 0),d("jspb.utils.joinHash64",Y,void 0),d("jspb.utils.DIGITS","0123456789abcdef".split(""),void 0),d("jspb.utils.joinUnsignedDecimalString",X,void 0),d("jspb.utils.joinSignedDecimalString",Q,void 0),d("jspb.utils.hash64ToDecimalString",ee,void 0),d("jspb.utils.hash64ArrayToDecimalStrings",(function(e,t){for(var r=Array(e.length),n=0;n<e.length;n++)r[n]=ee(e[n],t);return r}),void 0),d("jspb.utils.decimalStringToHash64",te,void 0),d("jspb.utils.splitDecimalString",(function(e){j(te(e))}),void 0),d("jspb.utils.hash64ToHexString",(function(e){var t=Array(18);t[0]="0",t[1]="x";for(var r=0;8>r;r++){var n=e.charCodeAt(7-r);t[2*r+2]=re(n>>4),t[2*r+3]=re(15&n)}return t.join("")}),void 0),d("jspb.utils.hexStringToHash64",(function(e){w(18==(e=e.toLowerCase()).length),w("0"==e[0]),w("x"==e[1]);for(var t="",r=0;8>r;r++)t=String.fromCharCode(16*ne(e.charCodeAt(2*r+2))+ne(e.charCodeAt(2*r+3)))+t;return t}),void 0),d("jspb.utils.hash64ToNumber",(function(e,t){j(e),e=k;var r=N;return t?G(e,r):V(e,r)}),void 0),d("jspb.utils.numberToHash64",(function(e){return D(e),Y(k,N)}),void 0),d("jspb.utils.countVarints",(function(e,t,r){for(var n=0,o=t;o<r;o++)n+=e[o]>>7;return r-t-n}),void 0),d("jspb.utils.countVarintFields",(function(e,t,r,n){var o=0;if(128>(n*=8))for(;t<r&&e[t++]==n;)for(o++;;){var s=e[t++];if(!(128&s))break}else for(;t<r;){for(s=n;128<s;){if(e[t]!=(127&s|128))return o;t++,s>>=7}if(e[t++]!=s)break;for(o++;128&(s=e[t++]););}return o}),void 0),d("jspb.utils.countFixed32Fields",(function(e,t,r,n){return oe(e,t,r,8*n+5,4)}),void 0),d("jspb.utils.countFixed64Fields",(function(e,t,r,n){return oe(e,t,r,8*n+1,8)}),void 0),d("jspb.utils.countDelimitedFields",(function(e,t,r,n){var o=0;for(n=8*n+2;t<r;){for(var s=n;128<s;){if(e[t++]!=(127&s|128))return o;s>>=7}if(e[t++]!=s)break;o++;for(var a=0,i=1;a+=(127&(s=e[t++]))*i,i*=128,128&s;);t+=a}return o}),void 0),d("jspb.utils.debugBytesToTextFormat",(function(e){var t='"';if(e){e=se(e);for(var r=0;r<e.length;r++)t+="\\x",16>e[r]&&(t+="0"),t+=e[r].toString(16)}return t+'"'}),void 0),d("jspb.utils.debugScalarToTextFormat",(function(e){if("string"==typeof e){e=String(e);for(var t=['"'],r=0;r<e.length;r++){var n,o=e.charAt(r),s=o.charCodeAt(0),a=r+1;(n=I[o])||(31<s&&127>s||((s=o)in _?o=_[s]:s in I?o=_[s]=I[s]:(31<(n=s.charCodeAt(0))&&127>n?o=s:(256>n?(o="\\x",(16>n||256<n)&&(o+="0")):(o="\\u",4096>n&&(o+="0")),o+=n.toString(16).toUpperCase()),o=_[s]=o)),n=o),t[a]=n}t.push('"'),e=t.join("")}else e=e.toString();return e}),void 0),d("jspb.utils.stringToByteArray",(function(e){for(var t=new Uint8Array(e.length),r=0;r<e.length;r++){var n=e.charCodeAt(r);if(255<n)throw Error("Conversion error: string contains codepoint outside of byte range");t[r]=n}return t}),void 0),d("jspb.utils.byteSourceToUint8Array",se,void 0),d("jspb.BinaryDecoder",ae,void 0);var ie=[];function ce(e,t,r){if(ie.length){var n=ie.pop();return e&&n.H(e,t,r),n}return new ae(e,t,r)}function ue(e,t,r){this.a=ce(e,t,r),this.O=this.a.B(),this.b=this.c=-1,this.h=!1,this.v=null}ae.getInstanceCacheLength=function(){return ie.length},ae.alloc=ce,ae.prototype.Ca=function(){this.clear(),100>ie.length&&ie.push(this)},ae.prototype.free=ae.prototype.Ca,ae.prototype.clone=function(){return ce(this.b,this.h,this.c-this.h)},ae.prototype.clone=ae.prototype.clone,ae.prototype.clear=function(){this.b=null,this.a=this.c=this.h=0,this.v=!1},ae.prototype.clear=ae.prototype.clear,ae.prototype.Y=function(){return this.b},ae.prototype.getBuffer=ae.prototype.Y,ae.prototype.H=function(e,t,r){this.b=se(e),this.h=void 0!==t?t:0,this.c=void 0!==r?this.h+r:this.b.length,this.a=this.h},ae.prototype.setBlock=ae.prototype.H,ae.prototype.Db=function(){return this.c},ae.prototype.getEnd=ae.prototype.Db,ae.prototype.setEnd=function(e){this.c=e},ae.prototype.setEnd=ae.prototype.setEnd,ae.prototype.reset=function(){this.a=this.h},ae.prototype.reset=ae.prototype.reset,ae.prototype.B=function(){return this.a},ae.prototype.getCursor=ae.prototype.B,ae.prototype.Ma=function(e){this.a=e},ae.prototype.setCursor=ae.prototype.Ma,ae.prototype.advance=function(e){this.a+=e,w(this.a<=this.c)},ae.prototype.advance=ae.prototype.advance,ae.prototype.ya=function(){return this.a==this.c},ae.prototype.atEnd=ae.prototype.ya,ae.prototype.Qb=function(){return this.a>this.c},ae.prototype.pastEnd=ae.prototype.Qb,ae.prototype.getError=function(){return this.v||0>this.a||this.a>this.c},ae.prototype.getError=ae.prototype.getError,ae.prototype.w=function(e){for(var t=128,r=0,n=0,o=0;4>o&&128<=t;o++)r|=(127&(t=this.b[this.a++]))<<7*o;if(128<=t&&(r|=(127&(t=this.b[this.a++]))<<28,n|=(127&t)>>4),128<=t)for(o=0;5>o&&128<=t;o++)n|=(127&(t=this.b[this.a++]))<<7*o+3;if(128>t)return e(r>>>0,n>>>0);T("Failed to read varint, encoding is invalid."),this.v=!0},ae.prototype.readSplitVarint64=ae.prototype.w,ae.prototype.ea=function(e){return this.w((function(t,r){return Z(t,r,e)}))},ae.prototype.readSplitZigzagVarint64=ae.prototype.ea,ae.prototype.ta=function(e){var t=this.b,r=this.a;this.a+=8;for(var n=0,o=0,s=r+7;s>=r;s--)n=n<<8|t[s],o=o<<8|t[s+4];return e(n,o)},ae.prototype.readSplitFixed64=ae.prototype.ta,ae.prototype.kb=function(){for(;128&this.b[this.a];)this.a++;this.a++},ae.prototype.skipVarint=ae.prototype.kb,ae.prototype.mb=function(e){for(;128<e;)this.a--,e>>>=7;this.a--},ae.prototype.unskipVarint=ae.prototype.mb,ae.prototype.o=function(){var e=this.b,t=e[this.a],r=127&t;return 128>t?(this.a+=1,w(this.a<=this.c),r):(r|=(127&(t=e[this.a+1]))<<7,128>t?(this.a+=2,w(this.a<=this.c),r):(r|=(127&(t=e[this.a+2]))<<14,128>t?(this.a+=3,w(this.a<=this.c),r):(r|=(127&(t=e[this.a+3]))<<21,128>t?(this.a+=4,w(this.a<=this.c),r):(r|=(15&(t=e[this.a+4]))<<28,128>t?(this.a+=5,w(this.a<=this.c),r>>>0):(this.a+=5,128<=e[this.a++]&&128<=e[this.a++]&&128<=e[this.a++]&&128<=e[this.a++]&&128<=e[this.a++]&&w(!1),w(this.a<=this.c),r)))))},ae.prototype.readUnsignedVarint32=ae.prototype.o,ae.prototype.da=function(){return~~this.o()},ae.prototype.readSignedVarint32=ae.prototype.da,ae.prototype.O=function(){return this.o().toString()},ae.prototype.Ea=function(){return this.da().toString()},ae.prototype.readSignedVarint32String=ae.prototype.Ea,ae.prototype.Ia=function(){var e=this.o();return e>>>1^-(1&e)},ae.prototype.readZigzagVarint32=ae.prototype.Ia,ae.prototype.Ga=function(){return this.w(V)},ae.prototype.readUnsignedVarint64=ae.prototype.Ga,ae.prototype.Ha=function(){return this.w(X)},ae.prototype.readUnsignedVarint64String=ae.prototype.Ha,ae.prototype.sa=function(){return this.w(G)},ae.prototype.readSignedVarint64=ae.prototype.sa,ae.prototype.Fa=function(){return this.w(Q)},ae.prototype.readSignedVarint64String=ae.prototype.Fa,ae.prototype.Ja=function(){return this.w(K)},ae.prototype.readZigzagVarint64=ae.prototype.Ja,ae.prototype.fb=function(){return this.ea(Y)},ae.prototype.readZigzagVarintHash64=ae.prototype.fb,ae.prototype.Ka=function(){return this.ea(Q)},ae.prototype.readZigzagVarint64String=ae.prototype.Ka,ae.prototype.Gc=function(){var e=this.b[this.a];return this.a+=1,w(this.a<=this.c),e},ae.prototype.readUint8=ae.prototype.Gc,ae.prototype.Ec=function(){var e=this.b[this.a],t=this.b[this.a+1];return this.a+=2,w(this.a<=this.c),e|t<<8},ae.prototype.readUint16=ae.prototype.Ec,ae.prototype.m=function(){var e=this.b[this.a],t=this.b[this.a+1],r=this.b[this.a+2],n=this.b[this.a+3];return this.a+=4,w(this.a<=this.c),(e|t<<8|r<<16|n<<24)>>>0},ae.prototype.readUint32=ae.prototype.m,ae.prototype.ga=function(){return V(this.m(),this.m())},ae.prototype.readUint64=ae.prototype.ga,ae.prototype.ha=function(){return X(this.m(),this.m())},ae.prototype.readUint64String=ae.prototype.ha,ae.prototype.Xb=function(){var e=this.b[this.a];return this.a+=1,w(this.a<=this.c),e<<24>>24},ae.prototype.readInt8=ae.prototype.Xb,ae.prototype.Vb=function(){var e=this.b[this.a],t=this.b[this.a+1];return this.a+=2,w(this.a<=this.c),(e|t<<8)<<16>>16},ae.prototype.readInt16=ae.prototype.Vb,ae.prototype.P=function(){var e=this.b[this.a],t=this.b[this.a+1],r=this.b[this.a+2],n=this.b[this.a+3];return this.a+=4,w(this.a<=this.c),e|t<<8|r<<16|n<<24},ae.prototype.readInt32=ae.prototype.P,ae.prototype.ba=function(){return G(this.m(),this.m())},ae.prototype.readInt64=ae.prototype.ba,ae.prototype.ca=function(){return Q(this.m(),this.m())},ae.prototype.readInt64String=ae.prototype.ca,ae.prototype.aa=function(){return q(this.m())},ae.prototype.readFloat=ae.prototype.aa,ae.prototype.Z=function(){return J(this.m(),this.m())},ae.prototype.readDouble=ae.prototype.Z,ae.prototype.pa=function(){return!!this.b[this.a++]},ae.prototype.readBool=ae.prototype.pa,ae.prototype.ra=function(){return this.da()},ae.prototype.readEnum=ae.prototype.ra,ae.prototype.fa=function(e){var t=this.b,r=this.a;e=r+e;for(var n=[],o="";r<e;){var s=t[r++];if(128>s)n.push(s);else{if(192>s)continue;if(224>s){var a=t[r++];n.push((31&s)<<6|63&a)}else if(240>s){a=t[r++];var i=t[r++];n.push((15&s)<<12|(63&a)<<6|63&i)}else if(248>s){s=(7&s)<<18|(63&(a=t[r++]))<<12|(63&(i=t[r++]))<<6|63&t[r++],s-=65536,n.push(55296+(s>>10&1023),56320+(1023&s))}}8192<=n.length&&(o+=String.fromCharCode.apply(null,n),n.length=0)}return o+=S(n),this.a=r,o},ae.prototype.readString=ae.prototype.fa,ae.prototype.Dc=function(){var e=this.o();return this.fa(e)},ae.prototype.readStringWithLength=ae.prototype.Dc,ae.prototype.qa=function(e){if(0>e||this.a+e>this.b.length)return this.v=!0,T("Invalid byte length!"),new Uint8Array(0);var t=this.b.subarray(this.a,this.a+e);return this.a+=e,w(this.a<=this.c),t},ae.prototype.readBytes=ae.prototype.qa,ae.prototype.ia=function(){return this.w(Y)},ae.prototype.readVarintHash64=ae.prototype.ia,ae.prototype.$=function(){var e=this.b,t=this.a,r=e[t],n=e[t+1],o=e[t+2],s=e[t+3],a=e[t+4],i=e[t+5],c=e[t+6];return e=e[t+7],this.a+=8,String.fromCharCode(r,n,o,s,a,i,c,e)},ae.prototype.readFixedHash64=ae.prototype.$,d("jspb.BinaryReader",ue,void 0);var le=[];function de(e,t,r){if(le.length){var n=le.pop();return e&&n.a.H(e,t,r),n}return new ue(e,t,r)}function fe(e,t){w(2==e.b);var r=e.a.o();r=e.a.B()+r;for(var n=[];e.a.B()<r;)n.push(t.call(e.a));return n}function pe(e,t,r,n,o){this.ma=e,this.Ba=t,this.la=r,this.Na=n,this.na=o}function he(e,t,r,n,o,s){this.Za=e,this.za=t,this.Aa=r,this.Wa=n,this.Ab=o,this.Nb=s}function ge(){}ue.clearInstanceCache=function(){le=[]},ue.getInstanceCacheLength=function(){return le.length},ue.alloc=de,ue.prototype.zb=de,ue.prototype.alloc=ue.prototype.zb,ue.prototype.Ca=function(){this.a.clear(),this.b=this.c=-1,this.h=!1,this.v=null,100>le.length&&le.push(this)},ue.prototype.free=ue.prototype.Ca,ue.prototype.Fb=function(){return this.O},ue.prototype.getFieldCursor=ue.prototype.Fb,ue.prototype.B=function(){return this.a.B()},ue.prototype.getCursor=ue.prototype.B,ue.prototype.Y=function(){return this.a.Y()},ue.prototype.getBuffer=ue.prototype.Y,ue.prototype.Hb=function(){return this.c},ue.prototype.getFieldNumber=ue.prototype.Hb,ue.prototype.Lb=function(){return this.b},ue.prototype.getWireType=ue.prototype.Lb,ue.prototype.Mb=function(){return 2==this.b},ue.prototype.isDelimited=ue.prototype.Mb,ue.prototype.bb=function(){return 4==this.b},ue.prototype.isEndGroup=ue.prototype.bb,ue.prototype.getError=function(){return this.h||this.a.getError()},ue.prototype.getError=ue.prototype.getError,ue.prototype.H=function(e,t,r){this.a.H(e,t,r),this.b=this.c=-1},ue.prototype.setBlock=ue.prototype.H,ue.prototype.reset=function(){this.a.reset(),this.b=this.c=-1},ue.prototype.reset=ue.prototype.reset,ue.prototype.advance=function(e){this.a.advance(e)},ue.prototype.advance=ue.prototype.advance,ue.prototype.oa=function(){if(this.a.ya())return!1;if(this.getError())return T("Decoder hit an error"),!1;this.O=this.a.B();var e=this.a.o(),t=e>>>3;return 0!=(e&=7)&&5!=e&&1!=e&&2!=e&&3!=e&&4!=e?(T("Invalid wire type: %s (at position %s)",e,this.O),this.h=!0,!1):(this.c=t,this.b=e,!0)},ue.prototype.nextField=ue.prototype.oa,ue.prototype.Oa=function(){this.a.mb(this.c<<3|this.b)},ue.prototype.unskipHeader=ue.prototype.Oa,ue.prototype.Lc=function(){var e=this.c;for(this.Oa();this.oa()&&this.c==e;)this.C();this.a.ya()||this.Oa()},ue.prototype.skipMatchingFields=ue.prototype.Lc,ue.prototype.lb=function(){0!=this.b?(T("Invalid wire type for skipVarintField"),this.C()):this.a.kb()},ue.prototype.skipVarintField=ue.prototype.lb,ue.prototype.gb=function(){if(2!=this.b)T("Invalid wire type for skipDelimitedField"),this.C();else{var e=this.a.o();this.a.advance(e)}},ue.prototype.skipDelimitedField=ue.prototype.gb,ue.prototype.hb=function(){5!=this.b?(T("Invalid wire type for skipFixed32Field"),this.C()):this.a.advance(4)},ue.prototype.skipFixed32Field=ue.prototype.hb,ue.prototype.ib=function(){1!=this.b?(T("Invalid wire type for skipFixed64Field"),this.C()):this.a.advance(8)},ue.prototype.skipFixed64Field=ue.prototype.ib,ue.prototype.jb=function(){for(var e=this.c;;){if(!this.oa()){T("Unmatched start-group tag: stream EOF"),this.h=!0;break}if(4==this.b){this.c!=e&&(T("Unmatched end-group tag"),this.h=!0);break}this.C()}},ue.prototype.skipGroup=ue.prototype.jb,ue.prototype.C=function(){switch(this.b){case 0:this.lb();break;case 1:this.ib();break;case 2:this.gb();break;case 5:this.hb();break;case 3:this.jb();break;default:T("Invalid wire encoding for field.")}},ue.prototype.skipField=ue.prototype.C,ue.prototype.Hc=function(e,t){null===this.v&&(this.v={}),w(!this.v[e]),this.v[e]=t},ue.prototype.registerReadCallback=ue.prototype.Hc,ue.prototype.Ic=function(e){return w(null!==this.v),w(e=this.v[e]),e(this)},ue.prototype.runReadCallback=ue.prototype.Ic,ue.prototype.Yb=function(e,t){w(2==this.b);var r=this.a.c,n=this.a.o();n=this.a.B()+n,this.a.setEnd(n),t(e,this),this.a.Ma(n),this.a.setEnd(r)},ue.prototype.readMessage=ue.prototype.Yb,ue.prototype.Ub=function(e,t,r){w(3==this.b),w(this.c==e),r(t,this),this.h||4==this.b||(T("Group submessage did not end with an END_GROUP tag"),this.h=!0)},ue.prototype.readGroup=ue.prototype.Ub,ue.prototype.Gb=function(){w(2==this.b);var e=this.a.o(),t=this.a.B(),r=t+e;return e=ce(this.a.Y(),t,e),this.a.Ma(r),e},ue.prototype.getFieldDecoder=ue.prototype.Gb,ue.prototype.P=function(){return w(0==this.b),this.a.da()},ue.prototype.readInt32=ue.prototype.P,ue.prototype.Wb=function(){return w(0==this.b),this.a.Ea()},ue.prototype.readInt32String=ue.prototype.Wb,ue.prototype.ba=function(){return w(0==this.b),this.a.sa()},ue.prototype.readInt64=ue.prototype.ba,ue.prototype.ca=function(){return w(0==this.b),this.a.Fa()},ue.prototype.readInt64String=ue.prototype.ca,ue.prototype.m=function(){return w(0==this.b),this.a.o()},ue.prototype.readUint32=ue.prototype.m,ue.prototype.Fc=function(){return w(0==this.b),this.a.O()},ue.prototype.readUint32String=ue.prototype.Fc,ue.prototype.ga=function(){return w(0==this.b),this.a.Ga()},ue.prototype.readUint64=ue.prototype.ga,ue.prototype.ha=function(){return w(0==this.b),this.a.Ha()},ue.prototype.readUint64String=ue.prototype.ha,ue.prototype.zc=function(){return w(0==this.b),this.a.Ia()},ue.prototype.readSint32=ue.prototype.zc,ue.prototype.Ac=function(){return w(0==this.b),this.a.Ja()},ue.prototype.readSint64=ue.prototype.Ac,ue.prototype.Bc=function(){return w(0==this.b),this.a.Ka()},ue.prototype.readSint64String=ue.prototype.Bc,ue.prototype.Rb=function(){return w(5==this.b),this.a.m()},ue.prototype.readFixed32=ue.prototype.Rb,ue.prototype.Sb=function(){return w(1==this.b),this.a.ga()},ue.prototype.readFixed64=ue.prototype.Sb,ue.prototype.Tb=function(){return w(1==this.b),this.a.ha()},ue.prototype.readFixed64String=ue.prototype.Tb,ue.prototype.vc=function(){return w(5==this.b),this.a.P()},ue.prototype.readSfixed32=ue.prototype.vc,ue.prototype.wc=function(){return w(5==this.b),this.a.P().toString()},ue.prototype.readSfixed32String=ue.prototype.wc,ue.prototype.xc=function(){return w(1==this.b),this.a.ba()},ue.prototype.readSfixed64=ue.prototype.xc,ue.prototype.yc=function(){return w(1==this.b),this.a.ca()},ue.prototype.readSfixed64String=ue.prototype.yc,ue.prototype.aa=function(){return w(5==this.b),this.a.aa()},ue.prototype.readFloat=ue.prototype.aa,ue.prototype.Z=function(){return w(1==this.b),this.a.Z()},ue.prototype.readDouble=ue.prototype.Z,ue.prototype.pa=function(){return w(0==this.b),!!this.a.o()},ue.prototype.readBool=ue.prototype.pa,ue.prototype.ra=function(){return w(0==this.b),this.a.sa()},ue.prototype.readEnum=ue.prototype.ra,ue.prototype.fa=function(){w(2==this.b);var e=this.a.o();return this.a.fa(e)},ue.prototype.readString=ue.prototype.fa,ue.prototype.qa=function(){w(2==this.b);var e=this.a.o();return this.a.qa(e)},ue.prototype.readBytes=ue.prototype.qa,ue.prototype.ia=function(){return w(0==this.b),this.a.ia()},ue.prototype.readVarintHash64=ue.prototype.ia,ue.prototype.Cc=function(){return w(0==this.b),this.a.fb()},ue.prototype.readSintHash64=ue.prototype.Cc,ue.prototype.w=function(e){return w(0==this.b),this.a.w(e)},ue.prototype.readSplitVarint64=ue.prototype.w,ue.prototype.ea=function(e){return w(0==this.b),this.a.w((function(t,r){return Z(t,r,e)}))},ue.prototype.readSplitZigzagVarint64=ue.prototype.ea,ue.prototype.$=function(){return w(1==this.b),this.a.$()},ue.prototype.readFixedHash64=ue.prototype.$,ue.prototype.ta=function(e){return w(1==this.b),this.a.ta(e)},ue.prototype.readSplitFixed64=ue.prototype.ta,ue.prototype.gc=function(){return fe(this,this.a.da)},ue.prototype.readPackedInt32=ue.prototype.gc,ue.prototype.hc=function(){return fe(this,this.a.Ea)},ue.prototype.readPackedInt32String=ue.prototype.hc,ue.prototype.ic=function(){return fe(this,this.a.sa)},ue.prototype.readPackedInt64=ue.prototype.ic,ue.prototype.jc=function(){return fe(this,this.a.Fa)},ue.prototype.readPackedInt64String=ue.prototype.jc,ue.prototype.qc=function(){return fe(this,this.a.o)},ue.prototype.readPackedUint32=ue.prototype.qc,ue.prototype.rc=function(){return fe(this,this.a.O)},ue.prototype.readPackedUint32String=ue.prototype.rc,ue.prototype.sc=function(){return fe(this,this.a.Ga)},ue.prototype.readPackedUint64=ue.prototype.sc,ue.prototype.tc=function(){return fe(this,this.a.Ha)},ue.prototype.readPackedUint64String=ue.prototype.tc,ue.prototype.nc=function(){return fe(this,this.a.Ia)},ue.prototype.readPackedSint32=ue.prototype.nc,ue.prototype.oc=function(){return fe(this,this.a.Ja)},ue.prototype.readPackedSint64=ue.prototype.oc,ue.prototype.pc=function(){return fe(this,this.a.Ka)},ue.prototype.readPackedSint64String=ue.prototype.pc,ue.prototype.bc=function(){return fe(this,this.a.m)},ue.prototype.readPackedFixed32=ue.prototype.bc,ue.prototype.cc=function(){return fe(this,this.a.ga)},ue.prototype.readPackedFixed64=ue.prototype.cc,ue.prototype.dc=function(){return fe(this,this.a.ha)},ue.prototype.readPackedFixed64String=ue.prototype.dc,ue.prototype.kc=function(){return fe(this,this.a.P)},ue.prototype.readPackedSfixed32=ue.prototype.kc,ue.prototype.lc=function(){return fe(this,this.a.ba)},ue.prototype.readPackedSfixed64=ue.prototype.lc,ue.prototype.mc=function(){return fe(this,this.a.ca)},ue.prototype.readPackedSfixed64String=ue.prototype.mc,ue.prototype.fc=function(){return fe(this,this.a.aa)},ue.prototype.readPackedFloat=ue.prototype.fc,ue.prototype.$b=function(){return fe(this,this.a.Z)},ue.prototype.readPackedDouble=ue.prototype.$b,ue.prototype.Zb=function(){return fe(this,this.a.pa)},ue.prototype.readPackedBool=ue.prototype.Zb,ue.prototype.ac=function(){return fe(this,this.a.ra)},ue.prototype.readPackedEnum=ue.prototype.ac,ue.prototype.uc=function(){return fe(this,this.a.ia)},ue.prototype.readPackedVarintHash64=ue.prototype.uc,ue.prototype.ec=function(){return fe(this,this.a.$)},ue.prototype.readPackedFixedHash64=ue.prototype.ec,d("jspb.ExtensionFieldInfo",pe,void 0),d("jspb.ExtensionFieldBinaryInfo",he,void 0),pe.prototype.F=function(){return!!this.la},pe.prototype.isMessageType=pe.prototype.F,d("jspb.Message",ge,void 0),ge.GENERATE_TO_OBJECT=!0,ge.GENERATE_FROM_OBJECT=!0;var ye="function"==typeof Uint8Array;ge.prototype.Ib=function(){return this.b},ge.prototype.getJsPbMessageId=ge.prototype.Ib,ge.initialize=function(e,t,r,n,o,s){if(e.f=null,t||(t=r?[r]:[]),e.b=r?String(r):void 0,e.D=0===r?-1:0,e.u=t,t=-1,!(r=e.u.length)||(t=r-1,null===(r=e.u[t])||"object"!=typeof r||Array.isArray(r)||ye&&r instanceof Uint8Array)?-1<n?(e.G=Math.max(n,t+1-e.D),e.i=null):e.G=Number.MAX_VALUE:(e.G=t-e.D,e.i=r),e.a={},o)for(n=0;n<o.length;n++)(t=o[n])<e.G?(t+=e.D,e.u[t]=e.u[t]||me):(be(e),e.i[t]=e.i[t]||me);if(s&&s.length)for(n=0;n<s.length;n++)_e(e,s[n])};var me=Object.freeze?Object.freeze([]):[];function be(e){var t=e.G+e.D;e.u[t]||(e.i=e.u[t]={})}function we(e,t,r){for(var n=[],o=0;o<e.length;o++)n[o]=t.call(e[o],r,e[o]);return n}function Te(e,t){if(t<e.G){t+=e.D;var r=e.u[t];return r===me?e.u[t]=[]:r}if(e.i)return(r=e.i[t])===me?e.i[t]=[]:r}function Ae(e,t){return null==(e=Te(e,t))?e:+e}function ve(e,t){return null==(e=Te(e,t))?e:!!e}function Pe(e){return null==e||"string"==typeof e?e:ye&&e instanceof Uint8Array?M(e):(T("Cannot coerce to b64 string: "+f(e)),null)}function Ee(e){return null==e||e instanceof Uint8Array?e:"string"==typeof e?x(e):(T("Cannot coerce to Uint8Array: "+f(e)),null)}function Ce(e){if(e&&1<e.length){var t=f(e[0]);g(e,(function(e){f(e)!=t&&T("Inconsistent type in JSPB repeated field array. Got "+f(e)+" expected "+t)}))}}function Be(e,t,r){return null==(e=Te(e,t))?r:e}function We(e,t,r){return A(e,ge),t<e.G?e.u[t+e.D]=r:(be(e),e.i[t]=r),e}function Se(e,t,r,n){return A(e,ge),r!==n?We(e,t,r):t<e.G?e.u[t+e.D]=null:(be(e),delete e.i[t]),e}function Ie(e,t,r,n){return A(e,ge),(r=_e(e,r))&&r!==t&&void 0!==n&&(e.f&&r in e.f&&(e.f[r]=void 0),We(e,r,void 0)),We(e,t,n)}function _e(e,t){for(var r,n,o=0;o<t.length;o++){var s=t[o],a=Te(e,s);null!=a&&(r=s,n=a,We(e,s,void 0))}return r?(We(e,r,n),r):0}function Oe(e,t,r){if(e.f||(e.f={}),!e.f[r]){for(var n=Te(e,r),o=[],s=0;s<n.length;s++)o[s]=new t(n[s]);e.f[r]=o}}function Re(e){if(e.f)for(var t in e.f){var r=e.f[t];if(Array.isArray(r))for(var n=0;n<r.length;n++)r[n]&&r[n].g();else r&&r.g()}}function Me(e,t){e=e||{},t=t||{};var r,n={};for(r in e)n[r]=0;for(r in t)n[r]=0;for(r in n)if(!xe(e[r],t[r]))return!1;return!0}function xe(e,t){if(e==t)return!0;if(!p(e)||!p(t))return!!("number"==typeof e&&isNaN(e)||"number"==typeof t&&isNaN(t))&&String(e)==String(t);if(e.constructor!=t.constructor)return!1;if(ye&&e.constructor===Uint8Array){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0}if(e.constructor===Array){var n=void 0,o=void 0,s=Math.max(e.length,t.length);for(r=0;r<s;r++){var a=e[r],i=t[r];if(a&&a.constructor==Object&&(w(void 0===n),w(r===e.length-1),n=a,a=void 0),i&&i.constructor==Object&&(w(void 0===o),w(r===t.length-1),o=i,i=void 0),!xe(a,i))return!1}return!n&&!o||Me(n=n||{},o=o||{})}if(e.constructor===Object)return Me(e,t);throw Error("Invalid type in JSPB array")}function Fe(e){return new e.constructor(ke(e.g()))}function ke(e){if(Array.isArray(e)){for(var t=Array(e.length),r=0;r<e.length;r++){var n=e[r];null!=n&&(t[r]="object"==typeof n?ke(w(n)):n)}return t}if(ye&&e instanceof Uint8Array)return new Uint8Array(e);for(r in t={},e)null!=(n=e[r])&&(t[r]="object"==typeof n?ke(w(n)):n);return t}ge.toObjectList=we,ge.toObjectExtension=function(e,t,r,n,o){for(var s in r){var a=r[s],i=n.call(e,a);if(null!=i){for(var c in a.Ba)if(a.Ba.hasOwnProperty(c))break;t[c]=a.Na?a.na?we(i,a.Na,o):a.Na(o,i):i}}},ge.serializeBinaryExtensions=function(e,t,r,n){for(var o in r){var s=r[o],a=s.Za;if(!s.Aa)throw Error("Message extension present that was generated without binary serialization support");var i=n.call(e,a);if(null!=i)if(a.F()){if(!s.Wa)throw Error("Message extension present holding submessage without binary support enabled, and message is being serialized to binary format");s.Aa.call(t,a.ma,i,s.Wa)}else s.Aa.call(t,a.ma,i)}},ge.readBinaryExtension=function(e,t,r,n,o){var s=r[t.c];if(s){if(r=s.Za,!s.za)throw Error("Deserializing extension whose generated code does not support binary format");if(r.F()){var a=new r.la;s.za.call(t,a,s.Ab)}else a=s.za.call(t);r.na&&!s.Nb?(t=n.call(e,r))?t.push(a):o.call(e,r,[a]):o.call(e,r,a)}else t.C()},ge.getField=Te,ge.getRepeatedField=function(e,t){return Te(e,t)},ge.getOptionalFloatingPointField=Ae,ge.getBooleanField=ve,ge.getRepeatedFloatingPointField=function(e,t){var r=Te(e,t);if(e.a||(e.a={}),!e.a[t]){for(var n=0;n<r.length;n++)r[n]=+r[n];e.a[t]=!0}return r},ge.getRepeatedBooleanField=function(e,t){var r=Te(e,t);if(e.a||(e.a={}),!e.a[t]){for(var n=0;n<r.length;n++)r[n]=!!r[n];e.a[t]=!0}return r},ge.bytesAsB64=Pe,ge.bytesAsU8=Ee,ge.bytesListAsB64=function(e){return Ce(e),e.length&&"string"!=typeof e[0]?y(e,Pe):e},ge.bytesListAsU8=function(e){return Ce(e),!e.length||e[0]instanceof Uint8Array?e:y(e,Ee)},ge.getFieldWithDefault=Be,ge.getBooleanFieldWithDefault=function(e,t,r){return null==(e=ve(e,t))?r:e},ge.getFloatingPointFieldWithDefault=function(e,t,r){return null==(e=Ae(e,t))?r:e},ge.getFieldProto3=Be,ge.getMapField=function(e,t,r,n){if(e.f||(e.f={}),t in e.f)return e.f[t];var o=Te(e,t);if(!o){if(r)return;We(e,t,o=[])}return e.f[t]=new P(o,n)},ge.setField=We,ge.setProto3IntField=function(e,t,r){return Se(e,t,r,0)},ge.setProto3FloatField=function(e,t,r){return Se(e,t,r,0)},ge.setProto3BooleanField=function(e,t,r){return Se(e,t,r,!1)},ge.setProto3StringField=function(e,t,r){return Se(e,t,r,"")},ge.setProto3BytesField=function(e,t,r){return Se(e,t,r,"")},ge.setProto3EnumField=function(e,t,r){return Se(e,t,r,0)},ge.setProto3StringIntField=function(e,t,r){return Se(e,t,r,"0")},ge.addToRepeatedField=function(e,t,r,n){return A(e,ge),t=Te(e,t),null!=n?t.splice(n,0,r):t.push(r),e},ge.setOneofField=Ie,ge.computeOneofCase=_e,ge.getWrapperField=function(e,t,r,n){if(e.f||(e.f={}),!e.f[r]){var o=Te(e,r);(n||o)&&(e.f[r]=new t(o))}return e.f[r]},ge.getRepeatedWrapperField=function(e,t,r){return Oe(e,t,r),(t=e.f[r])==me&&(t=e.f[r]=[]),t},ge.setWrapperField=function(e,t,r){A(e,ge),e.f||(e.f={});var n=r?r.g():r;return e.f[t]=r,We(e,t,n)},ge.setOneofWrapperField=function(e,t,r,n){A(e,ge),e.f||(e.f={});var o=n?n.g():n;return e.f[t]=n,Ie(e,t,r,o)},ge.setRepeatedWrapperField=function(e,t,r){A(e,ge),e.f||(e.f={}),r=r||[];for(var n=[],o=0;o<r.length;o++)n[o]=r[o].g();return e.f[t]=r,We(e,t,n)},ge.addToRepeatedWrapperField=function(e,t,r,n,o){Oe(e,n,t);var s=e.f[t];return s||(s=e.f[t]=[]),r=r||new n,e=Te(e,t),null!=o?(s.splice(o,0,r),e.splice(o,0,r.g())):(s.push(r),e.push(r.g())),r},ge.toMap=function(e,t,r,n){for(var o={},s=0;s<e.length;s++)o[t.call(e[s])]=r?r.call(e[s],n,e[s]):e[s];return o},ge.prototype.g=function(){return Re(this),this.u},ge.prototype.toArray=ge.prototype.g,ge.prototype.toString=function(){return Re(this),this.u.toString()},ge.prototype.getExtension=function(e){if(this.i){this.f||(this.f={});var t=e.ma;if(e.na){if(e.F())return this.f[t]||(this.f[t]=y(this.i[t]||[],(function(t){return new e.la(t)}))),this.f[t]}else if(e.F())return!this.f[t]&&this.i[t]&&(this.f[t]=new e.la(this.i[t])),this.f[t];return this.i[t]}},ge.prototype.getExtension=ge.prototype.getExtension,ge.prototype.Kc=function(e,t){this.f||(this.f={}),be(this);var r=e.ma;return e.na?(t=t||[],e.F()?(this.f[r]=t,this.i[r]=y(t,(function(e){return e.g()}))):this.i[r]=t):e.F()?(this.f[r]=t,this.i[r]=t?t.g():t):this.i[r]=t,this},ge.prototype.setExtension=ge.prototype.Kc,ge.difference=function(e,t){if(!(e instanceof t.constructor))throw Error("Messages have different types.");var r=e.g();t=t.g();var n=[],o=0,s=r.length>t.length?r.length:t.length;for(e.b&&(n[0]=e.b,o=1);o<s;o++)xe(r[o],t[o])||(n[o]=t[o]);return new e.constructor(n)},ge.equals=function(e,t){return e==t||!(!e||!t)&&e instanceof t.constructor&&xe(e.g(),t.g())},ge.compareExtensions=Me,ge.compareFields=xe,ge.prototype.Bb=function(){return Fe(this)},ge.prototype.cloneMessage=ge.prototype.Bb,ge.prototype.clone=function(){return Fe(this)},ge.prototype.clone=ge.prototype.clone,ge.clone=function(e){return Fe(e)},ge.copyInto=function(e,t){A(e,ge),A(t,ge),w(e.constructor==t.constructor,"Copy source and target message should have the same type."),e=Fe(e);for(var r=t.g(),n=e.g(),o=r.length=0;o<n.length;o++)r[o]=n[o];t.f=e.f,t.i=e.i},ge.registerMessageType=function(e,t){t.we=e};var Ne={dump:function(e){return A(e,ge,"jspb.Message instance expected"),w(e.getExtension,"Only unobfuscated and unoptimized compilation modes supported."),Ne.X(e)}};function Ue(){this.a=[]}function De(e,t){this.lo=e,this.hi=t}function Le(e,t){var r=65535&e,n=65535&t,o=t>>>16;for(t=r*n+65536*(r*o&65535)+65536*((e>>>=16)*n&65535),r=e*o+(r*o>>>16)+(e*n>>>16);4294967296<=t;)t-=4294967296,r+=1;return new De(t>>>0,r>>>0)}function $e(e){for(var t=new De(0,0),r=new De(0,0),n=0;n<e.length;n++){if("0">e[n]||"9"<e[n])return null;r.lo=parseInt(e[n],10),t=t.eb(10).add(r)}return t}function ze(e,t){this.lo=e,this.hi=t}function je(e){var t=0<e.length&&"-"==e[0];return t&&(e=e.substring(1)),null===(e=$e(e))?null:(t&&(e=new De(0,0).sub(e)),new ze(e.lo,e.hi))}function Ve(){this.c=[],this.b=0,this.a=new Ue,this.h=[]}function Ge(e,t){var r=e.a.end();e.c.push(r),e.c.push(t),e.b+=r.length+t.length}function He(e,t){return Ze(e,t,2),t=e.a.end(),e.c.push(t),e.b+=t.length,t.push(e.b),t}function Ke(e,t){var r=t.pop();for(w(0<=(r=e.b+e.a.length()-r));127<r;)t.push(127&r|128),r>>>=7,e.b++;t.push(r),e.b++}function Ze(e,t,r){w(1<=t&&t==Math.floor(t)),e.a.j(8*t+r)}function qe(e,t,r){null!=r&&(Ze(e,t,0),e.a.j(r))}function Je(e,t,r){null!=r&&(Ze(e,t,0),e.a.M(r))}d("jspb.debug.dump",Ne.dump,void 0),Ne.X=function(e){var t=f(e);if("number"==t||"string"==t||"boolean"==t||"null"==t||"undefined"==t||"undefined"!=typeof Uint8Array&&e instanceof Uint8Array)return e;if("array"==t)return function(e,t,r){for(var n=[],o=2;o<arguments.length;++o)n[o-2]=arguments[o];Array.isArray(e)||b("Expected array but got %s: %s.",[f(e),e],t,n)}(e),y(e,Ne.X);if(e instanceof P){for(var r={},n=(e=e.entries()).next();!n.done;n=e.next())r[n.value[0]]=Ne.X(n.value[1]);return r}A(e,ge,"Only messages expected: "+e);var o={$name:(t=e.constructor).name||t.displayName};for(i in t.prototype){var s=/^get([A-Z]\w*)/.exec(i);if(s&&"getExtension"!=i&&"getJsPbMessageId"!=i){var a="has"+s[1];e[a]&&!e[a]()||(a=e[i](),o[Ne.$a(s[1])]=Ne.X(a))}}if(e.extensionObject_)return o.$extensions="Recursive dumping of extensions not supported in compiled code. Switch to uncompiled or dump extension object directly",o;for(n in t.extensions)if(/^\d+$/.test(n)){a=t.extensions[n];var i=e.getExtension(a);s=void 0,a=a.Ba;var c=[],u=0;for(s in a)c[u++]=s;s=c[0],null!=i&&(r||(r=o.$extensions={}),r[Ne.$a(s)]=Ne.X(i))}return o},Ne.$a=function(e){return e.replace(/^[A-Z]/,(function(e){return e.toLowerCase()}))},d("jspb.BinaryEncoder",Ue,void 0),Ue.prototype.length=function(){return this.a.length},Ue.prototype.length=Ue.prototype.length,Ue.prototype.end=function(){var e=this.a;return this.a=[],e},Ue.prototype.end=Ue.prototype.end,Ue.prototype.l=function(e,t){for(w(e==Math.floor(e)),w(t==Math.floor(t)),w(0<=e&&4294967296>e),w(0<=t&&4294967296>t);0<t||127<e;)this.a.push(127&e|128),e=(e>>>7|t<<25)>>>0,t>>>=7;this.a.push(e)},Ue.prototype.writeSplitVarint64=Ue.prototype.l,Ue.prototype.A=function(e,t){w(e==Math.floor(e)),w(t==Math.floor(t)),w(0<=e&&4294967296>e),w(0<=t&&4294967296>t),this.s(e),this.s(t)},Ue.prototype.writeSplitFixed64=Ue.prototype.A,Ue.prototype.j=function(e){for(w(e==Math.floor(e)),w(0<=e&&4294967296>e);127<e;)this.a.push(127&e|128),e>>>=7;this.a.push(e)},Ue.prototype.writeUnsignedVarint32=Ue.prototype.j,Ue.prototype.M=function(e){if(w(e==Math.floor(e)),w(-2147483648<=e&&2147483648>e),0<=e)this.j(e);else{for(var t=0;9>t;t++)this.a.push(127&e|128),e>>=7;this.a.push(1)}},Ue.prototype.writeSignedVarint32=Ue.prototype.M,Ue.prototype.va=function(e){w(e==Math.floor(e)),w(0<=e&&0x10000000000000000>e),D(e),this.l(k,N)},Ue.prototype.writeUnsignedVarint64=Ue.prototype.va,Ue.prototype.ua=function(e){w(e==Math.floor(e)),w(-0x8000000000000000<=e&&0x8000000000000000>e),D(e),this.l(k,N)},Ue.prototype.writeSignedVarint64=Ue.prototype.ua,Ue.prototype.wa=function(e){w(e==Math.floor(e)),w(-2147483648<=e&&2147483648>e),this.j((e<<1^e>>31)>>>0)},Ue.prototype.writeZigzagVarint32=Ue.prototype.wa,Ue.prototype.xa=function(e){w(e==Math.floor(e)),w(-0x8000000000000000<=e&&0x8000000000000000>e),L(e),this.l(k,N)},Ue.prototype.writeZigzagVarint64=Ue.prototype.xa,Ue.prototype.Ta=function(e){this.W(te(e))},Ue.prototype.writeZigzagVarint64String=Ue.prototype.Ta,Ue.prototype.W=function(e){var t=this;j(e),H(k,N,(function(e,r){t.l(e>>>0,r>>>0)}))},Ue.prototype.writeZigzagVarintHash64=Ue.prototype.W,Ue.prototype.be=function(e){w(e==Math.floor(e)),w(0<=e&&256>e),this.a.push(e>>>0&255)},Ue.prototype.writeUint8=Ue.prototype.be,Ue.prototype.ae=function(e){w(e==Math.floor(e)),w(0<=e&&65536>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255)},Ue.prototype.writeUint16=Ue.prototype.ae,Ue.prototype.s=function(e){w(e==Math.floor(e)),w(0<=e&&4294967296>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255),this.a.push(e>>>16&255),this.a.push(e>>>24&255)},Ue.prototype.writeUint32=Ue.prototype.s,Ue.prototype.V=function(e){w(e==Math.floor(e)),w(0<=e&&0x10000000000000000>e),U(e),this.s(k),this.s(N)},Ue.prototype.writeUint64=Ue.prototype.V,Ue.prototype.Qc=function(e){w(e==Math.floor(e)),w(-128<=e&&128>e),this.a.push(e>>>0&255)},Ue.prototype.writeInt8=Ue.prototype.Qc,Ue.prototype.Pc=function(e){w(e==Math.floor(e)),w(-32768<=e&&32768>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255)},Ue.prototype.writeInt16=Ue.prototype.Pc,Ue.prototype.S=function(e){w(e==Math.floor(e)),w(-2147483648<=e&&2147483648>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255),this.a.push(e>>>16&255),this.a.push(e>>>24&255)},Ue.prototype.writeInt32=Ue.prototype.S,Ue.prototype.T=function(e){w(e==Math.floor(e)),w(-0x8000000000000000<=e&&0x8000000000000000>e),D(e),this.A(k,N)},Ue.prototype.writeInt64=Ue.prototype.T,Ue.prototype.ka=function(e){w(e==Math.floor(e)),w(-0x8000000000000000<=+e&&0x8000000000000000>+e),j(te(e)),this.A(k,N)},Ue.prototype.writeInt64String=Ue.prototype.ka,Ue.prototype.L=function(e){w(1/0===e||-1/0===e||isNaN(e)||-34028234663852886e22<=e&&34028234663852886e22>=e),$(e),this.s(k)},Ue.prototype.writeFloat=Ue.prototype.L,Ue.prototype.J=function(e){w(1/0===e||-1/0===e||isNaN(e)||-17976931348623157e292<=e&&17976931348623157e292>=e),z(e),this.s(k),this.s(N)},Ue.prototype.writeDouble=Ue.prototype.J,Ue.prototype.I=function(e){w("boolean"==typeof e||"number"==typeof e),this.a.push(e?1:0)},Ue.prototype.writeBool=Ue.prototype.I,Ue.prototype.R=function(e){w(e==Math.floor(e)),w(-2147483648<=e&&2147483648>e),this.M(e)},Ue.prototype.writeEnum=Ue.prototype.R,Ue.prototype.ja=function(e){this.a.push.apply(this.a,e)},Ue.prototype.writeBytes=Ue.prototype.ja,Ue.prototype.N=function(e){j(e),this.l(k,N)},Ue.prototype.writeVarintHash64=Ue.prototype.N,Ue.prototype.K=function(e){j(e),this.s(k),this.s(N)},Ue.prototype.writeFixedHash64=Ue.prototype.K,Ue.prototype.U=function(e){var t=this.a.length;!function(e,t,r){for(var n=[],o=2;o<arguments.length;++o)n[o-2]=arguments[o];"string"!=typeof e&&b("Expected string but got %s: %s.",[f(e),e],t,n)}(e);for(var r=0;r<e.length;r++){var n=e.charCodeAt(r);if(128>n)this.a.push(n);else if(2048>n)this.a.push(n>>6|192),this.a.push(63&n|128);else if(65536>n)if(55296<=n&&56319>=n&&r+1<e.length){var o=e.charCodeAt(r+1);56320<=o&&57343>=o&&(n=1024*(n-55296)+o-56320+65536,this.a.push(n>>18|240),this.a.push(n>>12&63|128),this.a.push(n>>6&63|128),this.a.push(63&n|128),r++)}else this.a.push(n>>12|224),this.a.push(n>>6&63|128),this.a.push(63&n|128)}return this.a.length-t},Ue.prototype.writeString=Ue.prototype.U,d("jspb.arith.UInt64",De,void 0),De.prototype.cmp=function(e){return this.hi<e.hi||this.hi==e.hi&&this.lo<e.lo?-1:this.hi==e.hi&&this.lo==e.lo?0:1},De.prototype.cmp=De.prototype.cmp,De.prototype.La=function(){return new De((this.lo>>>1|(1&this.hi)<<31)>>>0,this.hi>>>1>>>0)},De.prototype.rightShift=De.prototype.La,De.prototype.Da=function(){return new De(this.lo<<1>>>0,(this.hi<<1|this.lo>>>31)>>>0)},De.prototype.leftShift=De.prototype.Da,De.prototype.cb=function(){return!!(2147483648&this.hi)},De.prototype.msb=De.prototype.cb,De.prototype.Ob=function(){return!!(1&this.lo)},De.prototype.lsb=De.prototype.Ob,De.prototype.Ua=function(){return 0==this.lo&&0==this.hi},De.prototype.zero=De.prototype.Ua,De.prototype.add=function(e){return new De((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},De.prototype.add=De.prototype.add,De.prototype.sub=function(e){return new De((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},De.prototype.sub=De.prototype.sub,De.mul32x32=Le,De.prototype.eb=function(e){var t=Le(this.lo,e);return(e=Le(this.hi,e)).hi=e.lo,e.lo=0,t.add(e)},De.prototype.mul=De.prototype.eb,De.prototype.Xa=function(e){if(0==e)return[];var t=new De(0,0),r=new De(this.lo,this.hi);e=new De(e,0);for(var n=new De(1,0);!e.cb();)e=e.Da(),n=n.Da();for(;!n.Ua();)0>=e.cmp(r)&&(t=t.add(n),r=r.sub(e)),e=e.La(),n=n.La();return[t,r]},De.prototype.div=De.prototype.Xa,De.prototype.toString=function(){for(var e="",t=this;!t.Ua();){var r=(t=t.Xa(10))[0];e=t[1].lo+e,t=r}return""==e&&(e="0"),e},De.prototype.toString=De.prototype.toString,De.fromString=$e,De.prototype.clone=function(){return new De(this.lo,this.hi)},De.prototype.clone=De.prototype.clone,d("jspb.arith.Int64",ze,void 0),ze.prototype.add=function(e){return new ze((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},ze.prototype.add=ze.prototype.add,ze.prototype.sub=function(e){return new ze((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},ze.prototype.sub=ze.prototype.sub,ze.prototype.clone=function(){return new ze(this.lo,this.hi)},ze.prototype.clone=ze.prototype.clone,ze.prototype.toString=function(){var e=!!(2147483648&this.hi),t=new De(this.lo,this.hi);return e&&(t=new De(0,0).sub(t)),(e?"-":"")+t.toString()},ze.prototype.toString=ze.prototype.toString,ze.fromString=je,d("jspb.BinaryWriter",Ve,void 0),Ve.prototype.pb=function(e,t,r){Ge(this,e.subarray(t,r))},Ve.prototype.writeSerializedMessage=Ve.prototype.pb,Ve.prototype.Pb=function(e,t,r){null!=e&&null!=t&&null!=r&&this.pb(e,t,r)},Ve.prototype.maybeWriteSerializedMessage=Ve.prototype.Pb,Ve.prototype.reset=function(){this.c=[],this.a.end(),this.b=0,this.h=[]},Ve.prototype.reset=Ve.prototype.reset,Ve.prototype.ab=function(){w(0==this.h.length);for(var e=new Uint8Array(this.b+this.a.length()),t=this.c,r=t.length,n=0,o=0;o<r;o++){var s=t[o];e.set(s,n),n+=s.length}return t=this.a.end(),e.set(t,n),w((n+=t.length)==e.length),this.c=[e],e},Ve.prototype.getResultBuffer=Ve.prototype.ab,Ve.prototype.Kb=function(e){return M(this.ab(),e)},Ve.prototype.getResultBase64String=Ve.prototype.Kb,Ve.prototype.Va=function(e){this.h.push(He(this,e))},Ve.prototype.beginSubMessage=Ve.prototype.Va,Ve.prototype.Ya=function(){w(0<=this.h.length),Ke(this,this.h.pop())},Ve.prototype.endSubMessage=Ve.prototype.Ya,Ve.prototype.Nc=function(e,t,r){switch(e){case 1:this.J(t,r);break;case 2:this.L(t,r);break;case 3:this.T(t,r);break;case 4:this.V(t,r);break;case 5:this.S(t,r);break;case 6:this.Qa(t,r);break;case 7:this.Pa(t,r);break;case 8:this.I(t,r);break;case 9:this.U(t,r);break;case 10:T("Group field type not supported in writeAny()");break;case 11:T("Message field type not supported in writeAny()");break;case 12:this.ja(t,r);break;case 13:this.s(t,r);break;case 14:this.R(t,r);break;case 15:this.Ra(t,r);break;case 16:this.Sa(t,r);break;case 17:this.rb(t,r);break;case 18:this.sb(t,r);break;case 30:this.K(t,r);break;case 31:this.N(t,r);break;default:T("Invalid field type in writeAny()")}},Ve.prototype.writeAny=Ve.prototype.Nc,Ve.prototype.S=function(e,t){null!=t&&(w(-2147483648<=t&&2147483648>t),Je(this,e,t))},Ve.prototype.writeInt32=Ve.prototype.S,Ve.prototype.ob=function(e,t){null!=t&&(w(-2147483648<=(t=parseInt(t,10))&&2147483648>t),Je(this,e,t))},Ve.prototype.writeInt32String=Ve.prototype.ob,Ve.prototype.T=function(e,t){null!=t&&(w(-0x8000000000000000<=t&&0x8000000000000000>t),null!=t&&(Ze(this,e,0),this.a.ua(t)))},Ve.prototype.writeInt64=Ve.prototype.T,Ve.prototype.ka=function(e,t){null!=t&&(t=je(t),Ze(this,e,0),this.a.l(t.lo,t.hi))},Ve.prototype.writeInt64String=Ve.prototype.ka,Ve.prototype.s=function(e,t){null!=t&&(w(0<=t&&4294967296>t),qe(this,e,t))},Ve.prototype.writeUint32=Ve.prototype.s,Ve.prototype.ub=function(e,t){null!=t&&(w(0<=(t=parseInt(t,10))&&4294967296>t),qe(this,e,t))},Ve.prototype.writeUint32String=Ve.prototype.ub,Ve.prototype.V=function(e,t){null!=t&&(w(0<=t&&0x10000000000000000>t),null!=t&&(Ze(this,e,0),this.a.va(t)))},Ve.prototype.writeUint64=Ve.prototype.V,Ve.prototype.vb=function(e,t){null!=t&&(t=$e(t),Ze(this,e,0),this.a.l(t.lo,t.hi))},Ve.prototype.writeUint64String=Ve.prototype.vb,Ve.prototype.rb=function(e,t){null!=t&&(w(-2147483648<=t&&2147483648>t),null!=t&&(Ze(this,e,0),this.a.wa(t)))},Ve.prototype.writeSint32=Ve.prototype.rb,Ve.prototype.sb=function(e,t){null!=t&&(w(-0x8000000000000000<=t&&0x8000000000000000>t),null!=t&&(Ze(this,e,0),this.a.xa(t)))},Ve.prototype.writeSint64=Ve.prototype.sb,Ve.prototype.$d=function(e,t){null!=t&&null!=t&&(Ze(this,e,0),this.a.W(t))},Ve.prototype.writeSintHash64=Ve.prototype.$d,Ve.prototype.Zd=function(e,t){null!=t&&null!=t&&(Ze(this,e,0),this.a.Ta(t))},Ve.prototype.writeSint64String=Ve.prototype.Zd,Ve.prototype.Pa=function(e,t){null!=t&&(w(0<=t&&4294967296>t),Ze(this,e,5),this.a.s(t))},Ve.prototype.writeFixed32=Ve.prototype.Pa,Ve.prototype.Qa=function(e,t){null!=t&&(w(0<=t&&0x10000000000000000>t),Ze(this,e,1),this.a.V(t))},Ve.prototype.writeFixed64=Ve.prototype.Qa,Ve.prototype.nb=function(e,t){null!=t&&(t=$e(t),Ze(this,e,1),this.a.A(t.lo,t.hi))},Ve.prototype.writeFixed64String=Ve.prototype.nb,Ve.prototype.Ra=function(e,t){null!=t&&(w(-2147483648<=t&&2147483648>t),Ze(this,e,5),this.a.S(t))},Ve.prototype.writeSfixed32=Ve.prototype.Ra,Ve.prototype.Sa=function(e,t){null!=t&&(w(-0x8000000000000000<=t&&0x8000000000000000>t),Ze(this,e,1),this.a.T(t))},Ve.prototype.writeSfixed64=Ve.prototype.Sa,Ve.prototype.qb=function(e,t){null!=t&&(t=je(t),Ze(this,e,1),this.a.A(t.lo,t.hi))},Ve.prototype.writeSfixed64String=Ve.prototype.qb,Ve.prototype.L=function(e,t){null!=t&&(Ze(this,e,5),this.a.L(t))},Ve.prototype.writeFloat=Ve.prototype.L,Ve.prototype.J=function(e,t){null!=t&&(Ze(this,e,1),this.a.J(t))},Ve.prototype.writeDouble=Ve.prototype.J,Ve.prototype.I=function(e,t){null!=t&&(w("boolean"==typeof t||"number"==typeof t),Ze(this,e,0),this.a.I(t))},Ve.prototype.writeBool=Ve.prototype.I,Ve.prototype.R=function(e,t){null!=t&&(w(-2147483648<=t&&2147483648>t),Ze(this,e,0),this.a.M(t))},Ve.prototype.writeEnum=Ve.prototype.R,Ve.prototype.U=function(e,t){null!=t&&(e=He(this,e),this.a.U(t),Ke(this,e))},Ve.prototype.writeString=Ve.prototype.U,Ve.prototype.ja=function(e,t){null!=t&&(t=se(t),Ze(this,e,2),this.a.j(t.length),Ge(this,t))},Ve.prototype.writeBytes=Ve.prototype.ja,Ve.prototype.Rc=function(e,t,r){null!=t&&(e=He(this,e),r(t,this),Ke(this,e))},Ve.prototype.writeMessage=Ve.prototype.Rc,Ve.prototype.Sc=function(e,t,r){null!=t&&(Ze(this,1,3),Ze(this,2,0),this.a.M(e),e=He(this,3),r(t,this),Ke(this,e),Ze(this,1,4))},Ve.prototype.writeMessageSet=Ve.prototype.Sc,Ve.prototype.Oc=function(e,t,r){null!=t&&(Ze(this,e,3),r(t,this),Ze(this,e,4))},Ve.prototype.writeGroup=Ve.prototype.Oc,Ve.prototype.K=function(e,t){null!=t&&(w(8==t.length),Ze(this,e,1),this.a.K(t))},Ve.prototype.writeFixedHash64=Ve.prototype.K,Ve.prototype.N=function(e,t){null!=t&&(w(8==t.length),Ze(this,e,0),this.a.N(t))},Ve.prototype.writeVarintHash64=Ve.prototype.N,Ve.prototype.A=function(e,t,r){Ze(this,e,1),this.a.A(t,r)},Ve.prototype.writeSplitFixed64=Ve.prototype.A,Ve.prototype.l=function(e,t,r){Ze(this,e,0),this.a.l(t,r)},Ve.prototype.writeSplitVarint64=Ve.prototype.l,Ve.prototype.tb=function(e,t,r){Ze(this,e,0);var n=this.a;H(t,r,(function(e,t){n.l(e>>>0,t>>>0)}))},Ve.prototype.writeSplitZigzagVarint64=Ve.prototype.tb,Ve.prototype.Ed=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)Je(this,e,t[r])},Ve.prototype.writeRepeatedInt32=Ve.prototype.Ed,Ve.prototype.Fd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.ob(e,t[r])},Ve.prototype.writeRepeatedInt32String=Ve.prototype.Fd,Ve.prototype.Gd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++){var n=t[r];null!=n&&(Ze(this,e,0),this.a.ua(n))}},Ve.prototype.writeRepeatedInt64=Ve.prototype.Gd,Ve.prototype.Qd=function(e,t,r,n){if(null!=t)for(var o=0;o<t.length;o++)this.A(e,r(t[o]),n(t[o]))},Ve.prototype.writeRepeatedSplitFixed64=Ve.prototype.Qd,Ve.prototype.Rd=function(e,t,r,n){if(null!=t)for(var o=0;o<t.length;o++)this.l(e,r(t[o]),n(t[o]))},Ve.prototype.writeRepeatedSplitVarint64=Ve.prototype.Rd,Ve.prototype.Sd=function(e,t,r,n){if(null!=t)for(var o=0;o<t.length;o++)this.tb(e,r(t[o]),n(t[o]))},Ve.prototype.writeRepeatedSplitZigzagVarint64=Ve.prototype.Sd,Ve.prototype.Hd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.ka(e,t[r])},Ve.prototype.writeRepeatedInt64String=Ve.prototype.Hd,Ve.prototype.Ud=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)qe(this,e,t[r])},Ve.prototype.writeRepeatedUint32=Ve.prototype.Ud,Ve.prototype.Vd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.ub(e,t[r])},Ve.prototype.writeRepeatedUint32String=Ve.prototype.Vd,Ve.prototype.Wd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++){var n=t[r];null!=n&&(Ze(this,e,0),this.a.va(n))}},Ve.prototype.writeRepeatedUint64=Ve.prototype.Wd,Ve.prototype.Xd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.vb(e,t[r])},Ve.prototype.writeRepeatedUint64String=Ve.prototype.Xd,Ve.prototype.Md=function(e,t){if(null!=t)for(var r=0;r<t.length;r++){var n=t[r];null!=n&&(Ze(this,e,0),this.a.wa(n))}},Ve.prototype.writeRepeatedSint32=Ve.prototype.Md,Ve.prototype.Nd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++){var n=t[r];null!=n&&(Ze(this,e,0),this.a.xa(n))}},Ve.prototype.writeRepeatedSint64=Ve.prototype.Nd,Ve.prototype.Od=function(e,t){if(null!=t)for(var r=0;r<t.length;r++){var n=t[r];null!=n&&(Ze(this,e,0),this.a.Ta(n))}},Ve.prototype.writeRepeatedSint64String=Ve.prototype.Od,Ve.prototype.Pd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++){var n=t[r];null!=n&&(Ze(this,e,0),this.a.W(n))}},Ve.prototype.writeRepeatedSintHash64=Ve.prototype.Pd,Ve.prototype.yd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.Pa(e,t[r])},Ve.prototype.writeRepeatedFixed32=Ve.prototype.yd,Ve.prototype.zd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.Qa(e,t[r])},Ve.prototype.writeRepeatedFixed64=Ve.prototype.zd,Ve.prototype.Ad=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.nb(e,t[r])},Ve.prototype.writeRepeatedFixed64String=Ve.prototype.Ad,Ve.prototype.Jd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.Ra(e,t[r])},Ve.prototype.writeRepeatedSfixed32=Ve.prototype.Jd,Ve.prototype.Kd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.Sa(e,t[r])},Ve.prototype.writeRepeatedSfixed64=Ve.prototype.Kd,Ve.prototype.Ld=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.qb(e,t[r])},Ve.prototype.writeRepeatedSfixed64String=Ve.prototype.Ld,Ve.prototype.Cd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.L(e,t[r])},Ve.prototype.writeRepeatedFloat=Ve.prototype.Cd,Ve.prototype.wd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.J(e,t[r])},Ve.prototype.writeRepeatedDouble=Ve.prototype.wd,Ve.prototype.ud=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.I(e,t[r])},Ve.prototype.writeRepeatedBool=Ve.prototype.ud,Ve.prototype.xd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.R(e,t[r])},Ve.prototype.writeRepeatedEnum=Ve.prototype.xd,Ve.prototype.Td=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.U(e,t[r])},Ve.prototype.writeRepeatedString=Ve.prototype.Td,Ve.prototype.vd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.ja(e,t[r])},Ve.prototype.writeRepeatedBytes=Ve.prototype.vd,Ve.prototype.Id=function(e,t,r){if(null!=t)for(var n=0;n<t.length;n++){var o=He(this,e);r(t[n],this),Ke(this,o)}},Ve.prototype.writeRepeatedMessage=Ve.prototype.Id,Ve.prototype.Dd=function(e,t,r){if(null!=t)for(var n=0;n<t.length;n++)Ze(this,e,3),r(t[n],this),Ze(this,e,4)},Ve.prototype.writeRepeatedGroup=Ve.prototype.Dd,Ve.prototype.Bd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.K(e,t[r])},Ve.prototype.writeRepeatedFixedHash64=Ve.prototype.Bd,Ve.prototype.Yd=function(e,t){if(null!=t)for(var r=0;r<t.length;r++)this.N(e,t[r])},Ve.prototype.writeRepeatedVarintHash64=Ve.prototype.Yd,Ve.prototype.ad=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.M(t[r]);Ke(this,e)}},Ve.prototype.writePackedInt32=Ve.prototype.ad,Ve.prototype.bd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.M(parseInt(t[r],10));Ke(this,e)}},Ve.prototype.writePackedInt32String=Ve.prototype.bd,Ve.prototype.cd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.ua(t[r]);Ke(this,e)}},Ve.prototype.writePackedInt64=Ve.prototype.cd,Ve.prototype.md=function(e,t,r,n){if(null!=t){e=He(this,e);for(var o=0;o<t.length;o++)this.a.A(r(t[o]),n(t[o]));Ke(this,e)}},Ve.prototype.writePackedSplitFixed64=Ve.prototype.md,Ve.prototype.nd=function(e,t,r,n){if(null!=t){e=He(this,e);for(var o=0;o<t.length;o++)this.a.l(r(t[o]),n(t[o]));Ke(this,e)}},Ve.prototype.writePackedSplitVarint64=Ve.prototype.nd,Ve.prototype.od=function(e,t,r,n){if(null!=t){e=He(this,e);for(var o=this.a,s=0;s<t.length;s++)H(r(t[s]),n(t[s]),(function(e,t){o.l(e>>>0,t>>>0)}));Ke(this,e)}},Ve.prototype.writePackedSplitZigzagVarint64=Ve.prototype.od,Ve.prototype.dd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++){var n=je(t[r]);this.a.l(n.lo,n.hi)}Ke(this,e)}},Ve.prototype.writePackedInt64String=Ve.prototype.dd,Ve.prototype.pd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.j(t[r]);Ke(this,e)}},Ve.prototype.writePackedUint32=Ve.prototype.pd,Ve.prototype.qd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.j(parseInt(t[r],10));Ke(this,e)}},Ve.prototype.writePackedUint32String=Ve.prototype.qd,Ve.prototype.rd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.va(t[r]);Ke(this,e)}},Ve.prototype.writePackedUint64=Ve.prototype.rd,Ve.prototype.sd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++){var n=$e(t[r]);this.a.l(n.lo,n.hi)}Ke(this,e)}},Ve.prototype.writePackedUint64String=Ve.prototype.sd,Ve.prototype.hd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.wa(t[r]);Ke(this,e)}},Ve.prototype.writePackedSint32=Ve.prototype.hd,Ve.prototype.jd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.xa(t[r]);Ke(this,e)}},Ve.prototype.writePackedSint64=Ve.prototype.jd,Ve.prototype.kd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.W(te(t[r]));Ke(this,e)}},Ve.prototype.writePackedSint64String=Ve.prototype.kd,Ve.prototype.ld=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.W(t[r]);Ke(this,e)}},Ve.prototype.writePackedSintHash64=Ve.prototype.ld,Ve.prototype.Wc=function(e,t){if(null!=t&&t.length)for(Ze(this,e,2),this.a.j(4*t.length),e=0;e<t.length;e++)this.a.s(t[e])},Ve.prototype.writePackedFixed32=Ve.prototype.Wc,Ve.prototype.Xc=function(e,t){if(null!=t&&t.length)for(Ze(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.V(t[e])},Ve.prototype.writePackedFixed64=Ve.prototype.Xc,Ve.prototype.Yc=function(e,t){if(null!=t&&t.length)for(Ze(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++){var r=$e(t[e]);this.a.A(r.lo,r.hi)}},Ve.prototype.writePackedFixed64String=Ve.prototype.Yc,Ve.prototype.ed=function(e,t){if(null!=t&&t.length)for(Ze(this,e,2),this.a.j(4*t.length),e=0;e<t.length;e++)this.a.S(t[e])},Ve.prototype.writePackedSfixed32=Ve.prototype.ed,Ve.prototype.fd=function(e,t){if(null!=t&&t.length)for(Ze(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.T(t[e])},Ve.prototype.writePackedSfixed64=Ve.prototype.fd,Ve.prototype.gd=function(e,t){if(null!=t&&t.length)for(Ze(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.ka(t[e])},Ve.prototype.writePackedSfixed64String=Ve.prototype.gd,Ve.prototype.$c=function(e,t){if(null!=t&&t.length)for(Ze(this,e,2),this.a.j(4*t.length),e=0;e<t.length;e++)this.a.L(t[e])},Ve.prototype.writePackedFloat=Ve.prototype.$c,Ve.prototype.Uc=function(e,t){if(null!=t&&t.length)for(Ze(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.J(t[e])},Ve.prototype.writePackedDouble=Ve.prototype.Uc,Ve.prototype.Tc=function(e,t){if(null!=t&&t.length)for(Ze(this,e,2),this.a.j(t.length),e=0;e<t.length;e++)this.a.I(t[e])},Ve.prototype.writePackedBool=Ve.prototype.Tc,Ve.prototype.Vc=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.R(t[r]);Ke(this,e)}},Ve.prototype.writePackedEnum=Ve.prototype.Vc,Ve.prototype.Zc=function(e,t){if(null!=t&&t.length)for(Ze(this,e,2),this.a.j(8*t.length),e=0;e<t.length;e++)this.a.K(t[e])},Ve.prototype.writePackedFixedHash64=Ve.prototype.Zc,Ve.prototype.td=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r<t.length;r++)this.a.N(t[r]);Ke(this,e)}},Ve.prototype.writePackedVarintHash64=Ve.prototype.td,t.debug=Ne,t.Map=P,t.Message=ge,t.BinaryReader=ue,t.BinaryWriter=Ve,t.ExtensionFieldInfo=pe,t.ExtensionFieldBinaryInfo=he,t.exportSymbol=function(e,t,r){d(e,t,r)},t.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e},t.object={extend:function(e,t){for(var r,n,o=1;o<arguments.length;o++){for(r in n=arguments[o])e[r]=n[r];for(var s=0;s<h.length;s++)r=h[s],Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}}},t.typeOf=f},7217:(e,t,r)=>{const n=r(7784),o=r(2859),s=r(5456);e.exports=(e,t)=>{e=new o(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const o=e.set[t];let a=null;o.forEach((e=>{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":a&&!s(t,a)||(a=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!a||r&&!s(r,a)||(r=a)}return r&&e.test(r)?r:null}},7303:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(e);var t=e.replace(/\s+/g," ").replace(/\s?(hsla?\(|\)|,)\s?/gi,"$1");if(-1!==t.indexOf(","))return s.test(t);return a.test(t)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}(,((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?))?\)$/i,a=/^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(\s(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}\s?(\/\s((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?)\s?)?\)$/i;e.exports=t.default,e.exports.default=t.default},7574:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,o.default)(e),!s.test(e))return!1;for(var t=0,r=0;r<e.length;r++)t+=r%3==0?3*e[r]:r%3==1?7*e[r]:1*e[r];return t%10==0};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(?!(1[3-9])|(20)|(3[3-9])|(4[0-9])|(5[0-9])|(60)|(7[3-9])|(8[1-9])|(9[0-2])|(9[3-9]))[0-9]{9}$/;e.exports=t.default,e.exports.default=t.default},7616:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFreightContainerID=void 0,t.isISO6346=i;var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[A-Z]{3}(U[0-9]{7})|([J,Z][0-9]{6,7})$/,a=/^[0-9]$/;function i(e){if((0,o.default)(e),e=e.toUpperCase(),!s.test(e))return!1;if(11===e.length){for(var t=0,r=0;r<e.length-1;r++)if(a.test(e[r]))t+=e[r]*Math.pow(2,r);else{var n=e.charCodeAt(r)-55;t+=(n<11?n:n>=11&&n<=20?12+n%11:n>=21&&n<=30?23+n%21:34+n%31)*Math.pow(2,r)}var i=t%11;return 10===i&&(i=0),Number(e[e.length-1])===i}return!0}t.isFreightContainerID=i},7640:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.farsiLocales=t.englishLocales=t.dotDecimal=t.decimal=t.commaDecimal=t.bengaliLocales=t.arabicLocales=t.alphanumeric=t.alpha=void 0;for(var r,n=t.alpha={"en-US":/^[A-Z]+$/i,"az-AZ":/^[A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[А-Я]+$/i,"cs-CZ":/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[A-ZÆØÅ]+$/i,"de-DE":/^[A-ZÄÖÜß]+$/i,"el-GR":/^[Α-ώ]+$/i,"es-ES":/^[A-ZÁÉÍÑÓÚÜ]+$/i,"fa-IR":/^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,"fi-FI":/^[A-ZÅÄÖ]+$/i,"fr-FR":/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[A-ZÀÉÈÌÎÓÒÙ]+$/i,"ja-JP":/^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,"nb-NO":/^[A-ZÆØÅ]+$/i,"nl-NL":/^[A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[A-ZÆØÅ]+$/i,"hu-HU":/^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"pl-PL":/^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[А-ЯЁ]+$/i,"kk-KZ":/^[А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๐\s]+$/i,"tr-TR":/^[A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[А-ЩЬЮЯЄIЇҐі]+$/i,"vi-VN":/^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,"ko-KR":/^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,"ku-IQ":/^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[א-ת]+$/,fa:/^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,"hi-IN":/^[\u0900-\u0961]+[\u0972-\u097F]*$/i,"si-LK":/^[\u0D80-\u0DFF]+$/,"ta-IN":/^[\u0B80-\u0BFF]+$/i,"te-IN":/^[\u0C00-\u0C7F]+$/i,"kn-IN":/^[\u0C80-\u0CFF]+$/i,"ml-IN":/^[\u0D00-\u0D7F]+$/i,"gu-IN":/^[\u0A80-\u0AFF]+$/i,"pa-IN":/^[\u0A00-\u0A7F]+$/i,"or-IN":/^[\u0B00-\u0B7F]+$/i},o=t.alphanumeric={"en-US":/^[0-9A-Z]+$/i,"az-AZ":/^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[0-9А-Я]+$/i,"cs-CZ":/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[0-9A-ZÆØÅ]+$/i,"de-DE":/^[0-9A-ZÄÖÜß]+$/i,"el-GR":/^[0-9Α-ω]+$/i,"es-ES":/^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,"fi-FI":/^[0-9A-ZÅÄÖ]+$/i,"fr-FR":/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,"ja-JP":/^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,"hu-HU":/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"nb-NO":/^[0-9A-ZÆØÅ]+$/i,"nl-NL":/^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[0-9A-ZÆØÅ]+$/i,"pl-PL":/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[0-9А-ЯЁ]+$/i,"kk-KZ":/^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[0-9A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[0-9A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[0-9А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[0-9A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๙\s]+$/i,"tr-TR":/^[0-9A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,"ko-KR":/^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,"ku-IQ":/^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,"vi-VN":/^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[0-9א-ת]+$/,fa:/^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,eo:/^[0-9ABCĈD-GĜHĤIJĴK-PRSŜTUŬVZ]+$/i,"hi-IN":/^[\u0900-\u0963]+[\u0966-\u097F]*$/i,"si-LK":/^[0-9\u0D80-\u0DFF]+$/,"ta-IN":/^[0-9\u0B80-\u0BFF.]+$/i,"te-IN":/^[0-9\u0C00-\u0C7F.]+$/i,"kn-IN":/^[0-9\u0C80-\u0CFF.]+$/i,"ml-IN":/^[0-9\u0D00-\u0D7F.]+$/i,"gu-IN":/^[0-9\u0A80-\u0AFF.]+$/i,"pa-IN":/^[0-9\u0A00-\u0A7F.]+$/i,"or-IN":/^[0-9\u0B00-\u0B7F.]+$/i},s=t.decimal={"en-US":".",ar:"٫"},a=t.englishLocales=["AU","GB","HK","IN","NZ","ZA","ZM"],i=0;i<a.length;i++)n[r="en-".concat(a[i])]=n["en-US"],o[r]=o["en-US"],s[r]=s["en-US"];for(var c,u=t.arabicLocales=["AE","BH","DZ","EG","IQ","JO","KW","LB","LY","MA","QM","QA","SA","SD","SY","TN","YE"],l=0;l<u.length;l++)n[c="ar-".concat(u[l])]=n.ar,o[c]=o.ar,s[c]=s.ar;for(var d,f=t.farsiLocales=["IR","AF"],p=0;p<f.length;p++)o[d="fa-".concat(f[p])]=o.fa,s[d]=s.ar;for(var h,g=t.bengaliLocales=["BD","IN"],y=0;y<g.length;y++)n[h="bn-".concat(g[y])]=n.bn,o[h]=o.bn,s[h]=s["en-US"];for(var m=t.dotDecimal=["ar-EG","ar-LB","ar-LY"],b=t.commaDecimal=["bg-BG","cs-CZ","da-DK","de-DE","el-GR","en-ZM","eo","es-ES","fr-CA","fr-FR","gu-IN","hi-IN","hu-HU","id-ID","it-IT","kk-KZ","kn-IN","ku-IQ","ml-IN","nb-NO","nl-NL","nn-NO","or-IN","pa-IN","pl-PL","pt-PT","ru-RU","si-LK","sl-SI","sr-RS","sr-RS@latin","sv-SE","ta-IN","te-IN","tr-TR","uk-UA","vi-VN"],w=0;w<m.length;w++)s[m[w]]=s["en-US"];for(var T=0;T<b.length;T++)s[b[T]]=",";n["fr-CA"]=n["fr-FR"],o["fr-CA"]=o["fr-FR"],n["pt-BR"]=n["pt-PT"],o["pt-BR"]=o["pt-PT"],s["pt-BR"]=s["pt-PT"],n["pl-Pl"]=n["pl-PL"],o["pl-Pl"]=o["pl-PL"],s["pl-Pl"]=s["pl-PL"],n["fa-AF"]=n.fa},7651:(e,t,r)=>{const n=r(7784);e.exports=(e,t,r,o,s)=>{"string"==typeof r&&(s=o,o=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,o,s).version}catch(e){return null}}},7692:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.default)(e);var r=t.strictSeparator?a.test(e):s.test(e);return r&&t.strict?i(e):r};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,a=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,i=function(e){var t=e.match(/^(\d{4})-?(\d{3})([ T]{1}\.*|$)/);if(t){var r=Number(t[1]),n=Number(t[2]);return r%4==0&&r%100!=0||r%400==0?n<=366:n<=365}var o=e.match(/(\d{4})-?(\d{0,2})-?(\d*)/).map(Number),s=o[1],a=o[2],i=o[3],c=a?"0".concat(a).slice(-2):a,u=i?"0".concat(i).slice(-2):i,l=new Date("".concat(s,"-").concat(c||"01","-").concat(u||"01"));return!a||!i||l.getUTCFullYear()===s&&l.getUTCMonth()+1===a&&l.getUTCDate()===i};e.exports=t.default,e.exports.default=t.default},7706:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=("object"===s(t)?t.comparisonDate:t)||Date().toString(),n=(0,o.default)(r),a=(0,o.default)(e);return!!(a&&n&&a>n)};var n,o=(n=r(5071))&&n.__esModule?n:{default:n};function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}e.exports=t.default,e.exports.default=t.default},7724:(e,t,r)=>{var n=r(7186),o=n,s="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==s&&s||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")();o.exportSymbol("TronWebProto.BuyStorageBytesContract",null,s),o.exportSymbol("TronWebProto.BuyStorageContract",null,s),o.exportSymbol("TronWebProto.SellStorageContract",null,s),o.exportSymbol("TronWebProto.UpdateBrokerageContract",null,s),TronWebProto.BuyStorageBytesContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.BuyStorageBytesContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.BuyStorageBytesContract.displayName="TronWebProto.BuyStorageBytesContract"),TronWebProto.BuyStorageContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.BuyStorageContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.BuyStorageContract.displayName="TronWebProto.BuyStorageContract"),TronWebProto.SellStorageContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.SellStorageContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SellStorageContract.displayName="TronWebProto.SellStorageContract"),TronWebProto.UpdateBrokerageContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UpdateBrokerageContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UpdateBrokerageContract.displayName="TronWebProto.UpdateBrokerageContract"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.BuyStorageBytesContract.prototype.toObject=function(e){return TronWebProto.BuyStorageBytesContract.toObject(e,this)},TronWebProto.BuyStorageBytesContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),bytes:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.BuyStorageBytesContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.BuyStorageBytesContract;return TronWebProto.BuyStorageBytesContract.deserializeBinaryFromReader(r,t)},TronWebProto.BuyStorageBytesContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setBytes(r);break;default:t.skipField()}}return e},TronWebProto.BuyStorageBytesContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.BuyStorageBytesContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.BuyStorageBytesContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getBytes())&&t.writeInt64(2,r)},TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.BuyStorageBytesContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.BuyStorageBytesContract.prototype.getBytes=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.BuyStorageBytesContract.prototype.setBytes=function(e){return n.Message.setProto3IntField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.BuyStorageContract.prototype.toObject=function(e){return TronWebProto.BuyStorageContract.toObject(e,this)},TronWebProto.BuyStorageContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),quant:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.BuyStorageContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.BuyStorageContract;return TronWebProto.BuyStorageContract.deserializeBinaryFromReader(r,t)},TronWebProto.BuyStorageContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setQuant(r);break;default:t.skipField()}}return e},TronWebProto.BuyStorageContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.BuyStorageContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.BuyStorageContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getQuant())&&t.writeInt64(2,r)},TronWebProto.BuyStorageContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.BuyStorageContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.BuyStorageContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.BuyStorageContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.BuyStorageContract.prototype.getQuant=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.BuyStorageContract.prototype.setQuant=function(e){return n.Message.setProto3IntField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SellStorageContract.prototype.toObject=function(e){return TronWebProto.SellStorageContract.toObject(e,this)},TronWebProto.SellStorageContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),storageBytes:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SellStorageContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SellStorageContract;return TronWebProto.SellStorageContract.deserializeBinaryFromReader(r,t)},TronWebProto.SellStorageContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setStorageBytes(r);break;default:t.skipField()}}return e},TronWebProto.SellStorageContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SellStorageContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SellStorageContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getStorageBytes())&&t.writeInt64(2,r)},TronWebProto.SellStorageContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.SellStorageContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.SellStorageContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.SellStorageContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.SellStorageContract.prototype.getStorageBytes=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.SellStorageContract.prototype.setStorageBytes=function(e){return n.Message.setProto3IntField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UpdateBrokerageContract.prototype.toObject=function(e){return TronWebProto.UpdateBrokerageContract.toObject(e,this)},TronWebProto.UpdateBrokerageContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),brokerage:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UpdateBrokerageContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UpdateBrokerageContract;return TronWebProto.UpdateBrokerageContract.deserializeBinaryFromReader(r,t)},TronWebProto.UpdateBrokerageContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt32();e.setBrokerage(r);break;default:t.skipField()}}return e},TronWebProto.UpdateBrokerageContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UpdateBrokerageContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UpdateBrokerageContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getBrokerage())&&t.writeInt32(2,r)},TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UpdateBrokerageContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UpdateBrokerageContract.prototype.getBrokerage=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.UpdateBrokerageContract.prototype.setBrokerage=function(e){return n.Message.setProto3IntField(this,2,e)},o.object.extend(t,TronWebProto)},7784:(e,t,r)=>{const n=r(6820),{MAX_LENGTH:o,MAX_SAFE_INTEGER:s}=r(4830),{safeRe:a,safeSrc:i,t:c}=r(946),u=r(3607),{compareIdentifiers:l}=r(5647);class d{constructor(e,t){if(t=u(t),e instanceof d){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?a[c.LOOSE]:a[c.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>s||this.major<0)throw new TypeError("Invalid major version");if(this.minor>s||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>s||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<s)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof d)){if("string"==typeof e&&e===this.version)return 0;e=new d(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof d||(e=new d(e,this.options)),l(this.major,e.major)||l(this.minor,e.minor)||l(this.patch,e.patch)}comparePre(e){if(e instanceof d||(e=new d(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return l(r,o)}while(++t)}compareBuild(e){e instanceof d||(e=new d(e,this.options));let t=0;do{const r=this.build[t],o=e.build[t];if(n("build compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return l(r,o)}while(++t)}inc(e,t,r){if(e.startsWith("pre")){if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(t){const e=new RegExp(`^${this.options.loose?i[c.PRERELEASELOOSE]:i[c.PRERELEASE]}$`),r=`-${t}`.match(e);if(!r||r[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===l(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=d},7814:(e,t,r)=>{const n=r(2859);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},7900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r,n;(0,o.default)(e),"object"===s(t)?(r=t.min||0,n=t.max):(r=arguments[1],n=arguments[2]);var a=encodeURI(e).split(/%..|./).length-1;return a>=r&&(void 0===n||a<=n)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}e.exports=t.default,e.exports.default=t.default},7991:(e,t)=>{"use strict";t.byteLength=function(e){var t=i(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,s=i(e),a=s[0],c=s[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,c)),l=0,d=c>0?a-4:a;for(r=0;r<d;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)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t);1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,s=[],a=16383,i=0,u=n-o;i<u;i+=a)s.push(c(e,i,i+a>u?u:i+a));1===o?(t=e[n-1],s.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(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=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=s[a],n[s.charCodeAt(a)]=a;function i(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 c(e,t,n){for(var o,s,a=[],i=t;i<n;i+=3)o=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),a.push(r[(s=o)>>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8036:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,o.default)(e),0!==e.indexOf("magnet:?"))return!1;return s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/(?:^magnet:\?|[^?&]&)xt(?:\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i;e.exports=t.default,e.exports.default=t.default},8099:(e,t,r)=>{var n=r(7186),o=n,s="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==s&&s||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")();o.exportSymbol("TronWebProto.ProposalApproveContract",null,s),o.exportSymbol("TronWebProto.ProposalCreateContract",null,s),o.exportSymbol("TronWebProto.ProposalDeleteContract",null,s),TronWebProto.ProposalApproveContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ProposalApproveContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ProposalApproveContract.displayName="TronWebProto.ProposalApproveContract"),TronWebProto.ProposalCreateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ProposalCreateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ProposalCreateContract.displayName="TronWebProto.ProposalCreateContract"),TronWebProto.ProposalDeleteContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ProposalDeleteContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ProposalDeleteContract.displayName="TronWebProto.ProposalDeleteContract"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ProposalApproveContract.prototype.toObject=function(e){return TronWebProto.ProposalApproveContract.toObject(e,this)},TronWebProto.ProposalApproveContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),proposalId:n.Message.getFieldWithDefault(t,2,0),isAddApproval:n.Message.getBooleanFieldWithDefault(t,3,!1)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ProposalApproveContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ProposalApproveContract;return TronWebProto.ProposalApproveContract.deserializeBinaryFromReader(r,t)},TronWebProto.ProposalApproveContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setProposalId(r);break;case 3:r=t.readBool();e.setIsAddApproval(r);break;default:t.skipField()}}return e},TronWebProto.ProposalApproveContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ProposalApproveContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ProposalApproveContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getProposalId())&&t.writeInt64(2,r),(r=e.getIsAddApproval())&&t.writeBool(3,r)},TronWebProto.ProposalApproveContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.ProposalApproveContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ProposalApproveContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ProposalApproveContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ProposalApproveContract.prototype.getProposalId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ProposalApproveContract.prototype.setProposalId=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.ProposalApproveContract.prototype.getIsAddApproval=function(){return n.Message.getBooleanFieldWithDefault(this,3,!1)},TronWebProto.ProposalApproveContract.prototype.setIsAddApproval=function(e){return n.Message.setProto3BooleanField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ProposalCreateContract.prototype.toObject=function(e){return TronWebProto.ProposalCreateContract.toObject(e,this)},TronWebProto.ProposalCreateContract.toObject=function(e,t){var r,n={ownerAddress:t.getOwnerAddress_asB64(),parametersMap:(r=t.getParametersMap())?r.toObject(e,void 0):[]};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.ProposalCreateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ProposalCreateContract;return TronWebProto.ProposalCreateContract.deserializeBinaryFromReader(r,t)},TronWebProto.ProposalCreateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=e.getParametersMap();t.readMessage(r,(function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readInt64,n.BinaryReader.prototype.readInt64,null,0,0)}));break;default:t.skipField()}}return e},TronWebProto.ProposalCreateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ProposalCreateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ProposalCreateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getParametersMap(!0))&&r.getLength()>0&&r.serializeBinary(2,t,n.BinaryWriter.prototype.writeInt64,n.BinaryWriter.prototype.writeInt64)},TronWebProto.ProposalCreateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.ProposalCreateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ProposalCreateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ProposalCreateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ProposalCreateContract.prototype.getParametersMap=function(e){return n.Message.getMapField(this,2,e,null)},TronWebProto.ProposalCreateContract.prototype.clearParametersMap=function(){return this.getParametersMap().clear(),this},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ProposalDeleteContract.prototype.toObject=function(e){return TronWebProto.ProposalDeleteContract.toObject(e,this)},TronWebProto.ProposalDeleteContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),proposalId:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ProposalDeleteContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ProposalDeleteContract;return TronWebProto.ProposalDeleteContract.deserializeBinaryFromReader(r,t)},TronWebProto.ProposalDeleteContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64();e.setProposalId(r);break;default:t.skipField()}}return e},TronWebProto.ProposalDeleteContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ProposalDeleteContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ProposalDeleteContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getProposalId())&&t.writeInt64(2,r)},TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ProposalDeleteContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ProposalDeleteContract.prototype.getProposalId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ProposalDeleteContract.prototype.setProposalId=function(e){return n.Message.setProto3IntField(this,2,e)},o.object.extend(t,TronWebProto)},8137:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\//g,"&#x2F;").replace(/\\/g,"&#x5C;").replace(/`/g,"&#96;")};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},8198:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.default)(e),function(e,t){var r=e.replace(/[\s\-]+/gi,"").toUpperCase(),n=r.slice(0,2).toUpperCase(),s=n in a;if(t.whitelist){if(!function(e){if(e.filter((function(e){return!(e in a)})).length>0)return!1;return!0}(t.whitelist))return!1;if(!(0,o.default)(t.whitelist,n))return!1}if(t.blacklist){if((0,o.default)(t.blacklist,n))return!1}return s&&a[n].test(r)}(e,t)&&function(e){var t=e.replace(/[^A-Z0-9]+/gi,"").toUpperCase();return 1===(t.slice(4)+t.slice(0,4)).replace(/[A-Z]/g,(function(e){return e.charCodeAt(0)-55})).match(/\d{1,7}/g).reduce((function(e,t){return Number(e+t)%97}),"")}(e)},t.locales=void 0;var n=s(r(8354)),o=s(r(567));function s(e){return e&&e.__esModule?e:{default:e}}var a={AD:/^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/,AE:/^(AE[0-9]{2})\d{3}\d{16}$/,AL:/^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/,AT:/^(AT[0-9]{2})\d{16}$/,AZ:/^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/,BA:/^(BA[0-9]{2})\d{16}$/,BE:/^(BE[0-9]{2})\d{12}$/,BG:/^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/,BH:/^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/,BR:/^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/,BY:/^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/,CH:/^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/,CR:/^(CR[0-9]{2})\d{18}$/,CY:/^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/,CZ:/^(CZ[0-9]{2})\d{20}$/,DE:/^(DE[0-9]{2})\d{18}$/,DK:/^(DK[0-9]{2})\d{14}$/,DO:/^(DO[0-9]{2})[A-Z]{4}\d{20}$/,DZ:/^(DZ\d{24})$/,EE:/^(EE[0-9]{2})\d{16}$/,EG:/^(EG[0-9]{2})\d{25}$/,ES:/^(ES[0-9]{2})\d{20}$/,FI:/^(FI[0-9]{2})\d{14}$/,FO:/^(FO[0-9]{2})\d{14}$/,FR:/^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,GB:/^(GB[0-9]{2})[A-Z]{4}\d{14}$/,GE:/^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/,GI:/^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/,GL:/^(GL[0-9]{2})\d{14}$/,GR:/^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/,GT:/^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/,HR:/^(HR[0-9]{2})\d{17}$/,HU:/^(HU[0-9]{2})\d{24}$/,IE:/^(IE[0-9]{2})[A-Z]{4}\d{14}$/,IL:/^(IL[0-9]{2})\d{19}$/,IQ:/^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,IR:/^(IR[0-9]{2})0\d{2}0\d{18}$/,IS:/^(IS[0-9]{2})\d{22}$/,IT:/^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,JO:/^(JO[0-9]{2})[A-Z]{4}\d{22}$/,KW:/^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/,KZ:/^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/,LB:/^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/,LC:/^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/,LI:/^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/,LT:/^(LT[0-9]{2})\d{16}$/,LU:/^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/,LV:/^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/,MA:/^(MA[0-9]{26})$/,MC:/^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,MD:/^(MD[0-9]{2})[A-Z0-9]{20}$/,ME:/^(ME[0-9]{2})\d{18}$/,MK:/^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/,MR:/^(MR[0-9]{2})\d{23}$/,MT:/^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/,MU:/^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/,MZ:/^(MZ[0-9]{2})\d{21}$/,NL:/^(NL[0-9]{2})[A-Z]{4}\d{10}$/,NO:/^(NO[0-9]{2})\d{11}$/,PK:/^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/,PL:/^(PL[0-9]{2})\d{24}$/,PS:/^(PS[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,PT:/^(PT[0-9]{2})\d{21}$/,QA:/^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,RO:/^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/,RS:/^(RS[0-9]{2})\d{18}$/,SA:/^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/,SC:/^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/,SE:/^(SE[0-9]{2})\d{20}$/,SI:/^(SI[0-9]{2})\d{15}$/,SK:/^(SK[0-9]{2})\d{20}$/,SM:/^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,SV:/^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/,TL:/^(TL[0-9]{2})\d{19}$/,TN:/^(TN[0-9]{2})\d{20}$/,TR:/^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/,UA:/^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/,VA:/^(VA[0-9]{2})\d{18}$/,VG:/^(VG[0-9]{2})[A-Z]{4}\d{16}$/,XK:/^(XK[0-9]{2})\d{16}$/};t.locales=Object.keys(a)},8241:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,o.default)(e);var n=e,a=r.ignore;if(a)if(a instanceof RegExp)n=n.replace(a,"");else{if("string"!=typeof a)throw new Error("ignore should be instance of a String or RegExp");n=n.replace(new RegExp("[".concat(a.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"")}if(t in s.alphanumeric)return s.alphanumeric[t].test(n);throw new Error("Invalid locale '".concat(t,"'"))},t.locales=void 0;var n,o=(n=r(8354))&&n.__esModule?n:{default:n},s=r(7640);t.locales=Object.keys(s.alphanumeric)},8247:(e,t,r)=>{const n=r(7784),o=r(8308),{ANY:s}=o,a=r(2859),i=r(8346),c=r(5456),u=r(2615),l=r(2436),d=r(5933);e.exports=(e,t,r,f)=>{let p,h,g,y,m;switch(e=new n(e,f),t=new a(t,f),r){case">":p=c,h=l,g=u,y=">",m=">=";break;case"<":p=u,h=d,g=c,y="<",m="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(e,t,f))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let a=null,i=null;if(n.forEach((e=>{e.semver===s&&(e=new o(">=0.0.0")),a=a||e,i=i||e,p(e.semver,a.semver,f)?a=e:g(e.semver,i.semver,f)&&(i=e)})),a.operator===y||a.operator===m)return!1;if((!i.operator||i.operator===y)&&h(e,i.semver))return!1;if(i.operator===m&&g(e,i.semver))return!1}return!0}},8308:(e,t,r)=>{const n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=s(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?a[i.COMPARATORLOOSE]:a[i.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new l(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):(!(t=s(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(c(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(c(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}e.exports=o;const s=r(3607),{safeRe:a,t:i}=r(946),c=r(835),u=r(6820),l=r(7784),d=r(2859)},8346:(e,t,r)=>{const n=r(2859);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},8354:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(null==e)throw new TypeError("Expected a string but received a ".concat(e));if("String"!==e.constructor.name)throw new TypeError("Expected a string but received a ".concat(e.constructor.name))},e.exports=t.default,e.exports.default=t.default},8462:(e,t,r)=>{var n=r(7186),o=n,s="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==s&&s||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")(),a=r(4856);o.object.extend(proto,a),o.exportSymbol("TronWebProto.AccountCreateContract",null,s),o.exportSymbol("TronWebProto.AccountPermissionUpdateContract",null,s),o.exportSymbol("TronWebProto.AccountUpdateContract",null,s),o.exportSymbol("TronWebProto.SetAccountIdContract",null,s),TronWebProto.AccountCreateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountCreateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountCreateContract.displayName="TronWebProto.AccountCreateContract"),TronWebProto.AccountUpdateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountUpdateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountUpdateContract.displayName="TronWebProto.AccountUpdateContract"),TronWebProto.SetAccountIdContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.SetAccountIdContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SetAccountIdContract.displayName="TronWebProto.SetAccountIdContract"),TronWebProto.AccountPermissionUpdateContract=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.AccountPermissionUpdateContract.repeatedFields_,null)},o.inherits(TronWebProto.AccountPermissionUpdateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountPermissionUpdateContract.displayName="TronWebProto.AccountPermissionUpdateContract"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountCreateContract.prototype.toObject=function(e){return TronWebProto.AccountCreateContract.toObject(e,this)},TronWebProto.AccountCreateContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),accountAddress:t.getAccountAddress_asB64(),type:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountCreateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountCreateContract;return TronWebProto.AccountCreateContract.deserializeBinaryFromReader(r,t)},TronWebProto.AccountCreateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes();e.setAccountAddress(r);break;case 3:r=t.readEnum();e.setType(r);break;default:t.skipField()}}return e},TronWebProto.AccountCreateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountCreateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountCreateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getAccountAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getType())&&t.writeEnum(3,r)},TronWebProto.AccountCreateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.AccountCreateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.AccountCreateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.AccountCreateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.AccountCreateContract.prototype.getAccountAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.AccountCreateContract.prototype.getAccountAddress_asB64=function(){return n.Message.bytesAsB64(this.getAccountAddress())},TronWebProto.AccountCreateContract.prototype.getAccountAddress_asU8=function(){return n.Message.bytesAsU8(this.getAccountAddress())},TronWebProto.AccountCreateContract.prototype.setAccountAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.AccountCreateContract.prototype.getType=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.AccountCreateContract.prototype.setType=function(e){return n.Message.setProto3EnumField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountUpdateContract.prototype.toObject=function(e){return TronWebProto.AccountUpdateContract.toObject(e,this)},TronWebProto.AccountUpdateContract.toObject=function(e,t){var r={accountName:t.getAccountName_asB64(),ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountUpdateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountUpdateContract;return TronWebProto.AccountUpdateContract.deserializeBinaryFromReader(r,t)},TronWebProto.AccountUpdateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAccountName(r);break;case 2:r=t.readBytes();e.setOwnerAddress(r);break;default:t.skipField()}}return e},TronWebProto.AccountUpdateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountUpdateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountUpdateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAccountName_asU8()).length>0&&t.writeBytes(1,r),(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.AccountUpdateContract.prototype.getAccountName=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.AccountUpdateContract.prototype.getAccountName_asB64=function(){return n.Message.bytesAsB64(this.getAccountName())},TronWebProto.AccountUpdateContract.prototype.getAccountName_asU8=function(){return n.Message.bytesAsU8(this.getAccountName())},TronWebProto.AccountUpdateContract.prototype.setAccountName=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.AccountUpdateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.AccountUpdateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.AccountUpdateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.AccountUpdateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SetAccountIdContract.prototype.toObject=function(e){return TronWebProto.SetAccountIdContract.toObject(e,this)},TronWebProto.SetAccountIdContract.toObject=function(e,t){var r={accountId:t.getAccountId_asB64(),ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SetAccountIdContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SetAccountIdContract;return TronWebProto.SetAccountIdContract.deserializeBinaryFromReader(r,t)},TronWebProto.SetAccountIdContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAccountId(r);break;case 2:r=t.readBytes();e.setOwnerAddress(r);break;default:t.skipField()}}return e},TronWebProto.SetAccountIdContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SetAccountIdContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SetAccountIdContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAccountId_asU8()).length>0&&t.writeBytes(1,r),(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.SetAccountIdContract.prototype.getAccountId=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.SetAccountIdContract.prototype.getAccountId_asB64=function(){return n.Message.bytesAsB64(this.getAccountId())},TronWebProto.SetAccountIdContract.prototype.getAccountId_asU8=function(){return n.Message.bytesAsU8(this.getAccountId())},TronWebProto.SetAccountIdContract.prototype.setAccountId=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.SetAccountIdContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.SetAccountIdContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.SetAccountIdContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.SetAccountIdContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.AccountPermissionUpdateContract.repeatedFields_=[4],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountPermissionUpdateContract.prototype.toObject=function(e){return TronWebProto.AccountPermissionUpdateContract.toObject(e,this)},TronWebProto.AccountPermissionUpdateContract.toObject=function(e,t){var r,o={ownerAddress:t.getOwnerAddress_asB64(),owner:(r=t.getOwner())&&a.Permission.toObject(e,r),witness:(r=t.getWitness())&&a.Permission.toObject(e,r),activesList:n.Message.toObjectList(t.getActivesList(),a.Permission.toObject,e)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.AccountPermissionUpdateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountPermissionUpdateContract;return TronWebProto.AccountPermissionUpdateContract.deserializeBinaryFromReader(r,t)},TronWebProto.AccountPermissionUpdateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();){switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=new a.Permission;t.readMessage(r,a.Permission.deserializeBinaryFromReader),e.setOwner(r);break;case 3:r=new a.Permission;t.readMessage(r,a.Permission.deserializeBinaryFromReader),e.setWitness(r);break;case 4:r=new a.Permission;t.readMessage(r,a.Permission.deserializeBinaryFromReader),e.addActives(r);break;default:t.skipField()}}return e},TronWebProto.AccountPermissionUpdateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountPermissionUpdateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountPermissionUpdateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),null!=(r=e.getOwner())&&t.writeMessage(2,r,a.Permission.serializeBinaryToWriter),null!=(r=e.getWitness())&&t.writeMessage(3,r,a.Permission.serializeBinaryToWriter),(r=e.getActivesList()).length>0&&t.writeRepeatedMessage(4,r,a.Permission.serializeBinaryToWriter)},TronWebProto.AccountPermissionUpdateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.AccountPermissionUpdateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.AccountPermissionUpdateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.AccountPermissionUpdateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.AccountPermissionUpdateContract.prototype.getOwner=function(){return n.Message.getWrapperField(this,a.Permission,2)},TronWebProto.AccountPermissionUpdateContract.prototype.setOwner=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.AccountPermissionUpdateContract.prototype.clearOwner=function(){return this.setOwner(void 0)},TronWebProto.AccountPermissionUpdateContract.prototype.hasOwner=function(){return null!=n.Message.getField(this,2)},TronWebProto.AccountPermissionUpdateContract.prototype.getWitness=function(){return n.Message.getWrapperField(this,a.Permission,3)},TronWebProto.AccountPermissionUpdateContract.prototype.setWitness=function(e){return n.Message.setWrapperField(this,3,e)},TronWebProto.AccountPermissionUpdateContract.prototype.clearWitness=function(){return this.setWitness(void 0)},TronWebProto.AccountPermissionUpdateContract.prototype.hasWitness=function(){return null!=n.Message.getField(this,3)},TronWebProto.AccountPermissionUpdateContract.prototype.getActivesList=function(){return n.Message.getRepeatedWrapperField(this,a.Permission,4)},TronWebProto.AccountPermissionUpdateContract.prototype.setActivesList=function(e){return n.Message.setRepeatedWrapperField(this,4,e)},TronWebProto.AccountPermissionUpdateContract.prototype.addActives=function(e,t){return n.Message.addToRepeatedWrapperField(this,4,e,TronWebProto.Permission,t)},TronWebProto.AccountPermissionUpdateContract.prototype.clearActivesList=function(){return this.setActivesList([])},o.object.extend(t,TronWebProto)},8498:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(e);for(var t,r,n,s=e.replace(/[- ]+/g,""),a=0,i=s.length-1;i>=0;i--)t=s.substring(i,i+1),r=parseInt(t,10),a+=n&&(r*=2)>=10?r%10+1:r,n=!n;return!(a%10!=0||!s)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},8515:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,o.default)(e),(t=(0,n.default)(t,c)).locale in a.decimal)return!(0,s.default)(u,e.replace(/ /g,""))&&function(e){var t=new RegExp("^[-+]?([0-9]+)?(\\".concat(a.decimal[e.locale],"[0-9]{").concat(e.decimal_digits,"})").concat(e.force_decimal?"":"?","$"));return t}(t).test(e);throw new Error("Invalid locale '".concat(t.locale,"'"))};var n=i(r(2533)),o=i(r(8354)),s=i(r(567)),a=r(7640);function i(e){return e&&e.__esModule?e:{default:e}}var c={force_decimal:!1,decimal_digits:"1,",locale:"en-US"},u=["","-","+"];e.exports=t.default,e.exports.default=t.default},8524:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.fullWidth.test(e)&&a.halfWidth.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n},s=r(3167),a=r(2167);e.exports=t.default,e.exports.default=t.default},8631:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/[^\x00-\x7F]/;e.exports=t.default,e.exports.default=t.default},8689:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,n.default)(e),0===((t=(0,o.default)(t,a)).ignore_whitespace?e.trim().length:e.length)};var n=s(r(8354)),o=s(r(2533));function s(e){return e&&e.__esModule?e:{default:e}}var a={ignore_whitespace:!1};e.exports=t.default,e.exports.default=t.default},8755:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){for(var r=0;r<t.length;r++){var n=t[r];if(e===n||(o=n,"[object RegExp]"===Object.prototype.toString.call(o)&&n.test(e)))return!0}var o;return!1},e.exports=t.default,e.exports.default=t.default},8925:(e,t,r)=>{const n=r(532);e.exports=(e,t,r)=>0===n(e,t,r)},8985:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function s(e,t,n,s,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var i=new o(n,s||e,a),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],i]:e._events[c].push(i):(e._events[c]=i,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function i(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),i.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},i.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,s=n.length,a=new Array(s);o<s;o++)a[o]=n[o].fn;return a},i.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},i.prototype.emit=function(e,t,n,o,s,a){var i=r?r+e:e;if(!this._events[i])return!1;var c,u,l=this._events[i],d=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,o),!0;case 5:return l.fn.call(l.context,t,n,o,s),!0;case 6:return l.fn.call(l.context,t,n,o,s,a),!0}for(u=1,c=new Array(d-1);u<d;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var f,p=l.length;for(u=0;u<p;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),d){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,n);break;case 4:l[u].fn.call(l[u].context,t,n,o);break;default:if(!c)for(f=1,c=new Array(d-1);f<d;f++)c[f-1]=arguments[f];l[u].fn.apply(l[u].context,c)}}return!0},i.prototype.on=function(e,t,r){return s(this,e,t,r,!1)},i.prototype.once=function(e,t,r){return s(this,e,t,r,!0)},i.prototype.removeListener=function(e,t,n,o){var s=r?r+e:e;if(!this._events[s])return this;if(!t)return a(this,s),this;var i=this._events[s];if(i.fn)i.fn!==t||o&&!i.once||n&&i.context!==n||a(this,s);else{for(var c=0,u=[],l=i.length;c<l;c++)(i[c].fn!==t||o&&!i[c].once||n&&i[c].context!==n)&&u.push(i[c]);u.length?this._events[s]=1===u.length?u[0]:u:a(this,s)}return this},i.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},i.prototype.off=i.prototype.removeListener,i.prototype.addListener=i.prototype.on,i.prefixed=r,i.EventEmitter=i,e.exports=i},8993:(e,t,r)=>{const n=r(7784);e.exports=(e,t)=>new n(e,t).patch},9013:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,n.default)(e);var r=t.provider,s=e.replace(/[- ]+/g,"");if(r&&r.toLowerCase()in a){if(!a[r.toLowerCase()].test(s))return!1}else{if(r&&!(r.toLowerCase()in a))throw new Error("".concat(r," is not a valid credit card provider."));if(!i.some((function(e){return e.test(s)})))return!1}return(0,o.default)(e)};var n=s(r(8354)),o=s(r(8498));function s(e){return e&&e.__esModule?e:{default:e}}var a={amex:/^3[47][0-9]{13}$/,dinersclub:/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,discover:/^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,jcb:/^(?:2131|1800|35\d{3})\d{11}$/,mastercard:/^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/,unionpay:/^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,visa:/^(?:4[0-9]{12})(?:[0-9]{3,6})?$/},i=function(){var e=[];for(var t in a)a.hasOwnProperty(t)&&e.push(a[t]);return e}();e.exports=t.default,e.exports.default=t.default},9026:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,n.default)(e);var r=e.split("/");if(2!==r.length)return!1;if(!a.test(r[1]))return!1;if(r[1].length>1&&r[1].startsWith("0"))return!1;if(!(0,o.default)(r[0],t))return!1;var s=null;switch(String(t)){case"4":s=i;break;case"6":s=c;break;default:s=(0,o.default)(r[0],"6")?c:i}return r[1]<=s&&r[1]>=0};var n=s(r(8354)),o=s(r(6331));function s(e){return e&&e.__esModule?e:{default:e}}var a=/^\d{1,3}$/,i=32,c=128;e.exports=t.default,e.exports.default=t.default},9043:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=e.join("");return new RegExp(r,t)},e.exports=t.default,e.exports.default=t.default},9190:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e),t=t||{};var r=new RegExp("^(?:[-+])?(?:[0-9]+)?(?:\\".concat(t.locale?s.decimal[t.locale]:".","[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$"));if(""===e||"."===e||","===e||"-"===e||"+"===e)return!1;var a=parseFloat(e.replace(",","."));return r.test(e)&&(!t.hasOwnProperty("min")||(0,o.default)(t.min)||a>=t.min)&&(!t.hasOwnProperty("max")||(0,o.default)(t.max)||a<=t.max)&&(!t.hasOwnProperty("lt")||(0,o.default)(t.lt)||a<t.lt)&&(!t.hasOwnProperty("gt")||(0,o.default)(t.gt)||a>t.gt)},t.locales=void 0;var n=a(r(8354)),o=a(r(3224)),s=r(7640);function a(e){return e&&e.__esModule?e:{default:e}}t.locales=Object.keys(s.decimal)},9300:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,o.default)(e);var r=function(e){var t=function(e){var t={};return Array.from(e).forEach((function(e){t[e]?t[e]+=1:t[e]=1})),t}(e),r={length:e.length,uniqueChars:Object.keys(t).length,uppercaseCount:0,lowercaseCount:0,numberCount:0,symbolCount:0};return Object.keys(t).forEach((function(e){a.test(e)?r.uppercaseCount+=t[e]:i.test(e)?r.lowercaseCount+=t[e]:c.test(e)?r.numberCount+=t[e]:u.test(e)&&(r.symbolCount+=t[e])})),r}(e);if((t=(0,n.default)(t||{},l)).returnScore)return function(e,t){var r=0;r+=e.uniqueChars*t.pointsPerUnique,r+=(e.length-e.uniqueChars)*t.pointsPerRepeat,e.lowercaseCount>0&&(r+=t.pointsForContainingLower);e.uppercaseCount>0&&(r+=t.pointsForContainingUpper);e.numberCount>0&&(r+=t.pointsForContainingNumber);e.symbolCount>0&&(r+=t.pointsForContainingSymbol);return r}(r,t);return r.length>=t.minLength&&r.lowercaseCount>=t.minLowercase&&r.uppercaseCount>=t.minUppercase&&r.numberCount>=t.minNumbers&&r.symbolCount>=t.minSymbols};var n=s(r(2533)),o=s(r(8354));function s(e){return e&&e.__esModule?e:{default:e}}var a=/^[A-Z]$/,i=/^[a-z]$/,c=/^[0-9]$/,u=/^[-#!$@£%^&*()_+|~=`{}\[\]:";'<>?,.\/\\ ]$/,l={minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1,returnScore:!1,pointsPerUnique:1,pointsPerRepeat:.5,pointsForContainingLower:10,pointsForContainingUpper:10,pointsForContainingNumber:10,pointsForContainingSymbol:10};e.exports=t.default,e.exports.default=t.default},9317:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(e),null==t&&(t="all");return t in s&&s[t].test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,6:/^[0-9A-F]{8}-[0-9A-F]{4}-6[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,7:/^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,8:/^[0-9A-F]{8}-[0-9A-F]{4}-8[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,nil:/^00000000-0000-0000-0000-000000000000$/i,max:/^ffffffff-ffff-ffff-ffff-ffffffffffff$/i,loose:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,all:/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i};e.exports=t.default,e.exports.default=t.default},9318:(e,t)=>{t.read=function(e,t,r,n,o){var s,a,i=8*o-n-1,c=(1<<i)-1,u=c>>1,l=-7,d=r?o-1:0,f=r?-1:1,p=e[t+d];for(d+=f,s=p&(1<<-l)-1,p>>=-l,l+=i;l>0;s=256*s+e[t+d],d+=f,l-=8);for(a=s&(1<<-l)-1,s>>=-l,l+=n;l>0;a=256*a+e[t+d],d+=f,l-=8);if(0===s)s=1-u;else{if(s===c)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),s-=u}return(p?-1:1)*a*Math.pow(2,s-n)},t.write=function(e,t,r,n,o,s){var a,i,c,u=8*s-o-1,l=(1<<u)-1,d=l>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:s-1,h=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(i=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?f/c:f*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=l?(i=0,a=l):a+d>=1?(i=(t*c-1)*Math.pow(2,o),a+=d):(i=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[r+p]=255&i,p+=h,i/=256,o-=8);for(a=a<<o|i,u+=o;u>0;e[r+p]=255&a,p+=h,a/=256,u-=8);e[r+p-h]|=128*g}},9514:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(e);var r=s;(t=t||{}).allow_hyphens&&(r=a);if(!r.test(e))return!1;e=e.replace(/-/g,"");for(var n=0,i=2,c=0;c<14;c++){var u=e.substring(14-c-1,14-c),l=parseInt(u,10)*i;n+=l>=10?l%10+1:l,1===i?i+=1:i-=1}if((10-n%10)%10!==parseInt(e.substring(14,15),10))return!1;return!0};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^[0-9]{15}$/,a=/^\d{2}-\d{6}-\d{6}-\d{1}$/;e.exports=t.default,e.exports.default=t.default},9664:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(e);var r=!1,n=!0;"object"!==s(t)?arguments.length>=2&&(n=arguments[1]):(r=void 0!==t.allowSpaces?t.allowSpaces:r,n=void 0!==t.includePercentValues?t.includePercentValues:n);if(r){if(!l.test(e))return!1;e=e.replace(/\s/g,"")}if(!n)return a.test(e)||i.test(e);return a.test(e)||i.test(e)||c.test(e)||u.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}var a=/^rgb\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\)$/,i=/^rgba\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\.\d\d?|1(\.0)?|0(\.0)?)\)$/,c=/^rgb\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\)$/,u=/^rgba\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\.\d\d?|1(\.0)?|0(\.0)?)\)$/,l=/^rgba?/;e.exports=t.default,e.exports.default=t.default},9711:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r){(0,o.default)(t),null!=r&&r.eui&&(r.eui=String(r.eui));if(null!=r&&r.no_colons||null!=r&&r.no_separators)return"48"===r.eui?a.test(t):"64"===r.eui?u.test(t):a.test(t)||u.test(t);if("48"===(null==r?void 0:r.eui))return s.test(t)||i.test(t);if("64"===(null==r?void 0:r.eui))return c.test(t)||l.test(t);return e(t,{eui:"48"})||e(t,{eui:"64"})};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){4}([0-9a-fA-F]{2})$/,a=/^([0-9a-fA-F]){12}$/,i=/^([0-9a-fA-F]{4}\.){2}([0-9a-fA-F]{4})$/,c=/^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){6}([0-9a-fA-F]{2})$/,u=/^([0-9a-fA-F]){16}$/,l=/^([0-9a-fA-F]{4}\.){3}([0-9a-fA-F]{4})$/;e.exports=t.default,e.exports.default=t.default},9760:(e,t,r)=>{const n=r(7784),o=r(2859);e.exports=(e,t,r)=>{let s=null,a=null,i=null;try{i=new o(t,r)}catch(e){return null}return e.forEach((e=>{i.test(e)&&(s&&-1!==a.compare(e)||(s=e,a=new n(s,r)))})),s}},9864:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),e===e.toUpperCase()};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},9974:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(8354))&&n.__esModule?n:{default:n};var s=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;e.exports=t.default,e.exports.default=t.default}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(s.exports,s,s.exports,r),s.loaded=!0,s.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};(()=>{"use strict";r.r(n),r.d(n,{onAssetHistoricalPrice:()=>m_,onAssetsConversion:()=>b_,onAssetsLookup:()=>w_,onAssetsMarketData:()=>T_,onClientRequest:()=>A_,onCronjob:()=>v_,onKeyringRequest:()=>P_,onRpcRequest:()=>E_,onUserInput:()=>C_});var e={};r.r(e),r.d(e,{base64DecodeFromString:()=>So,base64EncodeToString:()=>Io,byte2hexStr:()=>Eo,byteArray2hexStr:()=>Wo,bytesToString:()=>Co,hextoString:()=>Bo});var t={};r.r(t),r.d(t,{ADDRESS_PREFIX:()=>Oo,ADDRESS_PREFIX_BYTE:()=>Ro,ADDRESS_PREFIX_REGEX:()=>Mo,ADDRESS_SIZE:()=>_o,TRON_BIP39_PATH_INDEX_0:()=>Fo,TRON_BIP39_PATH_PREFIX:()=>xo});var o={};r.r(o),r.d(o,{arrayEquals:()=>No,base64DecodeFromString:()=>So,base64EncodeToString:()=>Io,bin2String:()=>ko,byte2hexStr:()=>Eo,byteArray2hexStr:()=>Wo,bytesToString:()=>Co,getStringType:()=>Vo,hexChar2byte:()=>Do,hexStr2byteArray:()=>$o,hextoString:()=>Bo,isHexChar:()=>Lo,isNumber:()=>jo,strToDate:()=>zo,stringToBytes:()=>Uo});var s={};r.r(s),r.d(s,{decode58:()=>qo,encode58:()=>Zo});var a={};r.r(a),r.d(a,{OG:()=>Bc,My:()=>mc,Ph:()=>Tc,lX:()=>Ac,Id:()=>Cc,fg:()=>Ic,qj:()=>Ec,aT:()=>wc,lq:()=>vc,z:()=>Pc,Q5:()=>Oc});var i={};r.r(i),r.d(i,{AbiCoder:()=>Wl,FormatTypes:()=>ph,Interface:()=>ch,Mnemonic:()=>xi,Signature:()=>js,SigningKey:()=>yu,Wordlist:()=>Bi,arrayify:()=>fh,concat:()=>ms,ethersHDNodeWallet:()=>cp,id:()=>Ai,isValidMnemonic:()=>hh,joinSignature:()=>dh,keccak256:()=>Ti,pbkdf2:()=>qa,recoverAddress:()=>bu,sha256:()=>Va,sha512:()=>Ga,splitSignature:()=>lh,toUtf8Bytes:()=>Qa,toUtf8String:()=>ei,wordlists:()=>lp});var c={};r.r(c),r.d(c,{DO:()=>Dh,OG:()=>Xh,My:()=>$h,Ph:()=>Hh,lX:()=>Kh,Id:()=>Yh,fg:()=>tg,qj:()=>Jh,aT:()=>Gh,aY:()=>Uh,lq:()=>Zh,z:()=>qh,Q5:()=>ng});var u={};r.r(u),r.d(u,{ECKeySign:()=>ny,SHA256:()=>oy,arrayToBase64String:()=>Gg,computeAddress:()=>qg,decode58Check:()=>Yg,decodeBase58Address:()=>zg,ecRecover:()=>Vg,genPriKey:()=>Zg,getAddressFromPriKey:()=>Jg,getAddressFromPriKeyBase64String:()=>ty,getBase58CheckAddress:()=>$g,getBase58CheckAddressFromPriKeyBase64String:()=>Qg,getHexStrAddressFromPriKeyBase64String:()=>ey,getPubKeyFromPriKey:()=>ry,getRowBytesFromTransactionBase64:()=>Kg,isAddressValid:()=>Xg,passwordToAddress:()=>sy,pkToAddress:()=>ay,sha3:()=>iy,signBytes:()=>Hg,signTransaction:()=>jg});var l={};r.r(l),r.d(l,{generateAccount:()=>uy,generateAccountWithMnemonic:()=>dy,generateRandom:()=>ly});var d={};r.r(d),r.d(d,{hasProperties:()=>jy,hasProperty:()=>zy,isArray:()=>xy,isBigNumber:()=>Ny,isBoolean:()=>ky,isFunction:()=>Dy,isHex:()=>Ly,isInteger:()=>$y,isJson:()=>Fy,isNotNullOrUndefined:()=>Ky,isObject:()=>My,isString:()=>Uy,isValidURL:()=>Ry,mapEvent:()=>Vy,padLeft:()=>Hy,parseEvent:()=>Gy,sleep:()=>Zy});var f={};r.r(f),r.d(f,{fromHex:()=>qy,fromPrivateKey:()=>Qy,isAddress:()=>em,isChecksumAddress:()=>Xy,toChecksumAddress:()=>Yy,toHex:()=>Jy});var p={};r.r(p),r.d(p,{decodeParams:()=>nm,decodeParamsV2ByABI:()=>cm,encodeParams:()=>om,encodeParamsV2ByABI:()=>im});var h={};r.r(h),r.d(h,{TRON_MESSAGE_PREFIX:()=>um,hashMessage:()=>lm,signMessage:()=>dm,verifyMessage:()=>fm});var g={};r.r(g),r.d(g,{TypedDataEncoder:()=>Bm,signTypedData:()=>Wm,verifyTypedData:()=>Sm});var y={};r.r(y),r.d(y,{hasBrowserEnv:()=>Lb,hasStandardBrowserEnv:()=>zb,hasStandardBrowserWebWorkerEnv:()=>jb,navigator:()=>$b,origin:()=>Vb});var m={};r.r(m),r.d(m,{txCheck:()=>AA,txCheckWithArgs:()=>vA,txJsonToPb:()=>mA,txJsonToPbWithArgs:()=>bA,txPbToRawDataHex:()=>TA,txPbToTxID:()=>PA});var b={};r.r(b),r.d(b,{deserializeTransaction:()=>DA});var w={};function T(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}r.r(w),r.d(w,{AccountType:()=>tT,ContractType:()=>Qw,Permission_PermissionType:()=>eT,ResourceCode:()=>$A});class A extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}function v(e,t="Assertion failed.",r=A){if(!e){if(t instanceof Error)throw t;throw T(r,t)}}class P extends TypeError{constructor(e,t){let r;const{message:n,explanation:o,...s}=e,{path:a}=e,i=0===a.length?n:`At path: ${a.join(".")} -- ${n}`;super(o??i),null!=o&&(this.cause=i),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function E(e){return"object"==typeof e&&null!==e}function C(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function B(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:o,branch:s}=t,{type:a}=r,{refinement:i,message:c=`Expected a value of type \`${a}\`${i?` with refinement \`${i}\``:""}, but received: \`${C(n)}\``}=e;return{value:n,type:a,refinement:i,key:o[o.length-1],path:o,branch:s,...e,message:c}}function*W(e,t,r,n){(function(e){return E(e)&&"function"==typeof e[Symbol.iterator]})(e)||(e=[e]);for(const o of e){const e=B(o,t,r,n);e&&(yield e)}}function*S(e,t,r={}){const{path:n=[],branch:o=[e],coerce:s=!1,mask:a=!1}=r,i={path:n,branch:o};if(s&&(e=t.coercer(e,i),a&&"type"!==t.type&&E(t.schema)&&E(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let c="valid";for(const n of t.validator(e,i))n.explanation=r.message,c="not_valid",yield[n,void 0];for(let[u,l,d]of t.entries(e,i)){const t=S(l,d,{path:void 0===u?n:[...n,u],branch:void 0===u?o:[...o,l],coerce:s,mask:a,message:r.message});for(const r of t)r[0]?(c=null===r[0].refinement||void 0===r[0].refinement?"not_valid":"not_refined",yield[r[0],void 0]):s&&(l=r[1],void 0===u?e=l:e instanceof Map?e.set(u,l):e instanceof Set?e.add(l):E(e)&&(void 0!==l||u in e)&&(e[u]=l))}if("not_valid"!==c)for(const n of t.refiner(e,i))n.explanation=r.message,c="not_refined",yield[n,void 0];"valid"===c&&(yield[void 0,e])}class I{constructor(e){const{type:t,schema:r,validator:n,refiner:o,coercer:s=e=>e,entries:a=function*(){}}=e;this.type=t,this.schema=r,this.entries=a,this.coercer=s,this.validator=n?(e,t)=>W(n(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>W(o(e,t),t,this,e):()=>[]}assert(e,t){return R(e,this,t)}create(e,t){return M(e,this,t)}is(e){return x(e,this)}mask(e,t){return function(e,t,r){const n=F(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}(e,this,t)}validate(e,t={}){return F(e,this,t)}}const _="EXACT_OPTIONAL";class O extends I{constructor(e){super({...e,type:`exact optional ${e.type}`}),this.brand=_}static isExactOptional(e){return E(e)&&"brand"in e&&e.brand===_}}function R(e,t,r){const n=F(e,t,{message:r});if(n[0])throw n[0]}function M(e,t,r){const n=F(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function x(e,t){return!F(e,t)[0]}function F(e,t,r={}){const n=S(e,t,r),o=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(n);if(o[0]){return[new P(o[0],(function*(){for(const e of n)e[0]&&(yield e[0])})),void 0]}return[void 0,o[1]]}function k(e,t){return new I({type:e,schema:null,validator:t})}function N(){return k("any",(()=>!0))}function U(e){return new I({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${C(e)}`})}function D(){return k("boolean",(e=>"boolean"==typeof e))}function L(e){const t={},r=e.map((e=>C(e))).join();for(const r of e)t[r]=r;return new I({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${r}\`, but received: ${C(t)}`})}function $(){return k("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${C(e)}`))}function z(e){const t=C(e),r=typeof e;return new I({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${C(r)}`})}function j(){return k("never",(()=>!1))}function V(e){return new I({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})}function G(){return k("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${C(e)}`))}function H(e){const t=e?Object.keys(e):[],r=j();return new I({type:"object",schema:e??null,*entries(n){if(e&&E(n)){const o=new Set(Object.keys(n));for(const r of t){o.delete(r);const t=e[r];O.isExactOptional(t)&&!Object.prototype.hasOwnProperty.call(n,r)||(yield[r,n[r],e[r]])}for(const e of o)yield[e,n[e],r]}},validator:e=>E(e)||`Expected an object, but received: ${C(e)}`,coercer:e=>E(e)?{...e}:e})}function K(e){return new I({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function Z(e){return new O(e)}function q(e,t){return new I({type:"record",schema:null,*entries(r){if(E(r))for(const n in r){const o=r[n];yield[n,n,e],yield[n,o,t]}},validator:e=>E(e)||`Expected an object, but received: ${C(e)}`})}function J(){return k("string",(e=>"string"==typeof e||`Expected a string, but received: ${C(e)}`))}function Y(e){const t=j();return new I({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let o=0;o<n;o++)yield[o,r[o],e[o]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${C(e)}`})}function X(e){const t=Object.keys(e);return new I({type:"type",schema:e,*entries(r){if(E(r))for(const n of t)yield[n,r[n],e[n]]},validator:e=>E(e)||`Expected an object, but received: ${C(e)}`,coercer:e=>E(e)?{...e}:e})}function Q(e){const t=e.map((e=>e.type)).join(" | ");return new I({type:"union",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const o=[];for(const t of e){const[...e]=S(r,t,n),[s]=e;if(!s?.[0])return[];for(const[t]of e)t&&o.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${C(r)}`,...o]}})}function ee(){return k("unknown",(()=>!0))}function te(e,t){return k(e,(e=>"string"==typeof e&&t.test(e)))}const re=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,ne=/^[-a-z0-9]{3,8}$/u,oe=/^[-_a-zA-Z0-9]{1,32}$/u,se=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,ae=/^[-.%a-zA-Z0-9]{1,128}$/u,ie=/^[-a-z0-9]{3,8}$/u,ce=/^[-.%a-zA-Z0-9]{1,128}$/u,ue=/^[-.%a-zA-Z0-9]{1,78}$/u,le=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})$/u,de=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})\/(?<tokenId>[-.%a-zA-Z0-9]{1,78})$/u,fe=(te("CaipChainId",re),te("CaipNamespace",ne),te("CaipReference",oe),te("CaipAccountId",se),te("CaipAccountAddress",ae),te("CaipAssetNamespace",ie),te("CaipAssetReference",ce),te("CaipTokenId",ue),te("CaipAssetType",le));te("CaipAssetId",de),te("CaipAssetTypeOrId",/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})(\/(?<tokenId>[-.%a-zA-Z0-9]{1,78}))?$/u);var pe;function he(e){const t=le.exec(e);if(!t?.groups)throw new Error("Invalid CAIP asset type.");return{assetNamespace:t.groups.assetNamespace,assetReference:t.groups.assetReference,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}}!function(e){e.Bip122="bip122",e.Solana="solana",e.Tron="tron",e.Eip155="eip155",e.Wallet="wallet"}(pe=pe||(pe={}));var ge=r(5250);function ye(e){return e instanceof Map||e instanceof Set?e.size:e.length}function me(e,t,r={}){const{exclusive:n}=r;return Te(e,"min",(r=>n?r>t:r>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${r}\``))}function be(e){return Te(e,"nonempty",(t=>ye(t)>0||`Expected a nonempty ${e.type} but received an empty one`))}function we(e,t){return Te(e,"pattern",(r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`))}function Te(e,t,r){return new I({...e,*refiner(n,o){yield*e.refiner(n,o);const s=W(r(n,o),o,e,n);for(const e of s)yield{...e,refinement:t}}})}const Ae=Q([L(["btc","eth","ltc","bch","bnb","eos","xrp","xlm","link","dot","yfi","bits","sats","sol","sei","sonic"]),L(["usd","aed","amd","ars","aud","bam","bdt","bhd","bmd","brl","cad","chf","clp","cny","cop","crc","czk","dkk","dop","eur","gbp","gel","gtq","hkd","hnl","huf","idr","ils","inr","jpy","kes","krw","kwd","lbp","lkr","mmk","mxn","myr","ngn","nok","nzd","pen","php","pkr","pln","ron","rub","sar","sek","sgd","svc","thb","try","twd","uah","vef","vnd","xdr","zar","zmw"]),L(["xag","xau"])]),ve=q(Ae,H({name:J(),ticker:Ae,value:me(G(),0),currencyType:L(["fiat","crypto","commodity"])})),Pe=H({id:J(),price:me(G(),0),marketCap:K(V(me(G(),0))),allTimeHigh:K(V(me(G(),0))),allTimeLow:K(V(me(G(),0))),totalVolume:K(V(me(G(),0))),high1d:K(V(me(G(),0))),low1d:K(V(me(G(),0))),circulatingSupply:K(V(me(G(),0))),dilutedMarketCap:K(V(me(G(),0))),marketCapPercentChange1d:K(V(G())),priceChange1d:K(V(G())),pricePercentChange1h:K(V(G())),pricePercentChange1d:K(V(G())),pricePercentChange7d:K(V(G())),pricePercentChange14d:K(V(G())),pricePercentChange30d:K(V(G())),pricePercentChange200d:K(V(G())),pricePercentChange1y:K(V(G())),bondingCurveProgressPercent:K(V(G())),liquidity:K(V(G())),totalSupply:K(V(G())),holderCount:K(V(G())),isMutable:K(V(D()))}),Ee=q(fe,V(Pe)),Ce=Ae,Be=H({assetType:fe,timePeriod:K(we(J(),/^[1-9][0-9]*[dmy]$/u)),from:K(me(G(),0)),to:K(me(G(),0)),vsCurrency:K(Ce)}),We=H({prices:U(Y([G(),G()])),marketCaps:U(Y([G(),G()])),totalVolumes:U(Y([G(),G()]))}),Se={prices:[],marketCaps:[],totalVolumes:[]},Ie={log:(console.log,(...e)=>{}),info:(console.info,(...e)=>{}),warn:(console.warn,(...e)=>{}),debug:(console.debug,(...e)=>{}),error:(console.error,(...e)=>{})};const _e={log:()=>{},info:()=>{},warn:()=>{},debug:()=>{},error:()=>{}},Oe=(e,t)=>new Proxy(e,{get(e,r){const n=e[r];return"function"==typeof n?(r,...o)=>n.call(e,t,r,...o):n}}),Re=Ie,Me=(e,t)=>`${e}:${t.map((e=>JSON.stringify(e))).join(":")}`;var xe=function(){return xe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},xe.apply(this,arguments)},Fe="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";(()=>{const e=Array(256).fill(-1);for(let t=0;t<58;++t)e[Fe.charCodeAt(t)]=t})();var ke,Ne,Ue,De=e=>{if(!e||"string"!=typeof e)throw new Error(`Expected base58 string but got “${e}”`);if(e.match(/[IOl0]/gmu))throw new Error(`Invalid base58 character “${e.match(/[IOl0]/gmu)}”`);const t=e.match(/^1+/gmu),r=t?t[0].length:0,n=(e.length-r)*(Math.log(58)/Math.log(256))+1>>>0;return new Uint8Array([...new Uint8Array(r),...e.match(/.{1}/gmu).map((e=>Fe.indexOf(e))).reduce(((e,t)=>e.map((e=>{const r=58*e+t;return t=r>>8,r}))),new Uint8Array(n)).reverse().filter((o=!1,e=>o=o||e))]);var o},Le=(ke=function(e,t){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 o(e){const t=e>>25;return(33554431&e)<<5^996825010&-(1&t)^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=o(t)^n>>5}t=o(t);for(let r=0;r<e.length;++r){const n=e.charCodeAt(r);t=o(t)^31&n}return t}function a(e,t,r,n){let o=0,s=0;const a=(1<<r)-1,i=[];for(let n=0;n<e.length;++n)for(o=o<<t|e[n],s+=t;s>=r;)s-=r,i.push(o>>s&a);if(n)s>0&&i.push(o<<r-s&a);else{if(s>=t)return"Excess padding";if(o<<r-s&a)return"Non-zero padding"}return i}function i(e){return a(e,8,5,!0)}function c(e){const t=a(e,5,8,!1);if(Array.isArray(t))return t}function u(e){const t=a(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}function l(e){let t;function a(e,r){if(r=r||90,e.length<8)return e+" too short";if(e.length>r)return"Exceeds length limit";const a=e.toLowerCase(),i=e.toUpperCase();if(e!==a&&e!==i)return"Mixed-case string "+e;const c=(e=a).lastIndexOf("1");if(-1===c)return"No separator character for "+e;if(0===c)return"Missing prefix for "+e;const u=e.slice(0,c),l=e.slice(c+1);if(l.length<6)return"Data too short";let d=s(u);if("string"==typeof d)return d;const f=[];for(let e=0;e<l.length;++e){const t=l.charAt(e),r=n[t];if(void 0===r)return"Unknown character "+t;d=o(d)^r,e+6>=l.length||f.push(r)}return d!==t?"Invalid checksum for "+e:{prefix:u,words:f}}return t="bech32"===e?1:734539939,{decodeUnsafe:function(e,t){const r=a(e,t);if("object"==typeof r)return r},decode:function(e,t){const r=a(e,t);if("object"==typeof r)return r;throw new Error(r)},encode:function(e,n,a){if(a=a||90,e.length+7+n.length>a)throw new TypeError("Exceeds length limit");let i=s(e=e.toLowerCase());if("string"==typeof i)throw new Error(i);let c=e+"1";for(let e=0;e<n.length;++e){const t=n[e];if(t>>5)throw new Error("Non 5-bit word");i=o(i)^t,c+=r.charAt(t)}for(let e=0;e<6;++e)i=o(i);i^=t;for(let e=0;e<6;++e)c+=r.charAt(i>>5*(5-e)&31);return c},toWords:i,fromWordsUnsafe:c,fromWords:u}}t.bech32=l("bech32"),t.bech32m=l("bech32m")},ke(Ne={exports:{}},Ne.exports),Ne.exports);(Ue=Le)&&Ue.__esModule&&Object.prototype.hasOwnProperty.call(Ue,"default")&&Ue.default;var $e=Le.bech32m,ze=Le.bech32;const je=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];class Ve{constructor(){this.A=1779033703,this.B=-1150833019,this.C=1013904242,this.D=-1521486534,this.E=1359893119,this.F=-1694144372,this.G=528734635,this.H=1541459225,this._size=0,this._sp=0,(!He||Ke>=8e3)&&(He=new ArrayBuffer(8e3),Ke=0),this._byte=new Uint8Array(He,Ke,80),this._word=new Int32Array(He,Ke,20),Ke+=80}update(e){if("string"==typeof e)return this._utf8(e);if(null==e)throw new TypeError("Invalid type: "+typeof e);const t=e.byteOffset,r=e.byteLength;let n=r/64|0,o=0;if(n&&!(3&t)&&!(this._size%64)){const r=new Int32Array(e.buffer,t,16*n);for(;n--;)this._int32(r,o>>2),o+=64;this._size+=o}if(1!==e.BYTES_PER_ELEMENT&&e.buffer){const n=new Uint8Array(e.buffer,t+o,r-o);return this._uint8(n)}return o===r?this:this._uint8(e,o)}_uint8(e,t){const{_byte:r,_word:n}=this,o=e.length;for(t|=0;t<o;){const s=this._size%64;let a=s;for(;t<o&&a<64;)r[a++]=e[t++];a>=64&&this._int32(n),this._size+=a-s}return this}_utf8(e){const{_byte:t,_word:r}=this,n=e.length;let o=this._sp;for(let s=0;s<n;){const a=this._size%64;let i=a;for(;s<n&&i<64;){let r=0|e.charCodeAt(s++);r<128?t[i++]=r:r<2048?(t[i++]=192|r>>>6,t[i++]=128|63&r):r<55296||r>57343?(t[i++]=224|r>>>12,t[i++]=128|r>>>6&63,t[i++]=128|63&r):o?(r=((1023&o)<<10)+(1023&r)+65536,t[i++]=240|r>>>18,t[i++]=128|r>>>12&63,t[i++]=128|r>>>6&63,t[i++]=128|63&r,o=0):o=r}i>=64&&(this._int32(r),r[0]=r[16]),this._size+=i-a}return this._sp=o,this}_int32(e,t){let{A:r,B:n,C:o,D:s,E:a,F:i,G:c,H:u}=this,l=0;for(t|=0;l<16;)Ge[l++]=qe(e[t++]);for(l=16;l<64;l++)Ge[l]=tt(Ge[l-2])+Ge[l-7]+et(Ge[l-15])+Ge[l-16]|0;for(l=0;l<64;l++){const e=u+Qe(a)+Je(a,i,c)+je[l]+Ge[l]|0,t=Xe(r)+Ye(r,n,o)|0;u=c,c=i,i=a,a=s+e|0,s=o,o=n,n=r,r=e+t|0}this.A=r+this.A|0,this.B=n+this.B|0,this.C=o+this.C|0,this.D=s+this.D|0,this.E=a+this.E|0,this.F=i+this.F|0,this.G=c+this.G|0,this.H=u+this.H|0}digest(e){const{_byte:t,_word:r}=this;let n=this._size%64|0;for(t[n++]=128;3&n;)t[n++]=0;if(n>>=2,n>14){for(;n<16;)r[n++]=0;n=0,this._int32(r)}for(;n<16;)r[n++]=0;const o=8*this._size,s=(4294967295&o)>>>0,a=(o-s)/4294967296;return a&&(r[14]=qe(a)),s&&(r[15]=qe(s)),this._int32(r),"hex"===e?this._hex():this._bin()}_hex(){const{A:e,B:t,C:r,D:n,E:o,F:s,G:a,H:i}=this;return Ze(e)+Ze(t)+Ze(r)+Ze(n)+Ze(o)+Ze(s)+Ze(a)+Ze(i)}_bin(){const{A:e,B:t,C:r,D:n,E:o,F:s,G:a,H:i,_byte:c,_word:u}=this;return u[0]=qe(e),u[1]=qe(t),u[2]=qe(r),u[3]=qe(n),u[4]=qe(o),u[5]=qe(s),u[6]=qe(a),u[7]=qe(i),c.slice(0,32)}}const Ge=new Int32Array(64);let He,Ke=0;const Ze=e=>(e+4294967296).toString(16).substr(-8),qe=254===new Uint8Array(new Uint16Array([65279]).buffer)[0]?e=>e:e=>e<<24&4278190080|e<<8&16711680|e>>8&65280|e>>24&255,Je=(e,t,r)=>r^e&(t^r),Ye=(e,t,r)=>e&t|r&(e|t),Xe=e=>(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),Qe=e=>(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7),et=e=>(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3,tt=e=>(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10;var rt,nt,ot=function(e){return(new Ve).update(e).digest()};!function(e){e.mainnet="mainnet",e.testnet="testnet",e.regtest="regtest"}(rt||(rt={})),function(e){e.p2pkh="p2pkh",e.p2sh="p2sh",e.p2wpkh="p2wpkh",e.p2wsh="p2wsh",e.p2tr="p2tr"}(nt||(nt={}));var st={0:{type:nt.p2pkh,network:rt.mainnet},111:{type:nt.p2pkh,network:rt.testnet},5:{type:nt.p2sh,network:rt.mainnet},196:{type:nt.p2sh,network:rt.testnet}},at=function(e){var t,r=e.substr(0,2).toLowerCase();if("bc"===r||"tb"===r)return function(e){var t;try{t=e.startsWith("bc1p")||e.startsWith("tb1p")||e.startsWith("bcrt1p")?$e.decode(e):ze.decode(e)}catch(e){throw new Error("Invalid address")}var r={bc:rt.mainnet,tb:rt.testnet,bcrt:rt.regtest}[t.prefix];if(void 0===r)throw new Error("Invalid address");var n=t.words[0];if(n<0||n>16)throw new Error("Invalid address");return{bech32:!0,network:r,address:e,type:20===ze.fromWords(t.words.slice(1)).length?nt.p2wpkh:1===n?nt.p2tr:nt.p2wsh}}(e);try{t=De(e)}catch(e){throw new Error("Invalid address")}var n=t.length;if(25!==n)throw new Error("Invalid address");var o=t[0],s=t.slice(n-4,n),a=t.slice(0,n-4),i=ot(ot(a)).slice(0,4);if(s.some((function(e,t){return e!==i[t]})))throw new Error("Invalid address");if(!Object.keys(st).map(Number).includes(o))throw new Error("Invalid address");return xe(xe({},st[o]),{address:e,bech32:!1})};function it(e,t){return k(e,(e=>"string"==typeof e&&t.test(e)))}const ct=it("UuidV4",/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu),ut=ct,lt=k("Url",(e=>{try{const t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch{return!1}})),dt=it("StringNumber",/^\d+(\.\d+)?$/u);function ft(e){return H(e)}function pt(e){return e.path[e.path.length-1]in e.branch[e.branch.length-2]}function ht(e){return new I({...e,validator:(t,r)=>!pt(r)||e.validator(t,r),refiner:(t,r)=>!pt(r)||e.refiner(t,r)})}function gt(e){return new I({type:"union",schema:null,*entries(t,r){yield*e(t).entries(t,r)},*refiner(t,r){yield*e(t).refiner(t,r)},coercer:(t,r)=>e(t).coercer(t,r),validator:(t,r)=>e(t).validator(t,r)})}function yt(e,t,r){return new I({...e,coercer:(n,o)=>x(n,t)?e.coercer(r(n,o),o):e.coercer(n,o)})}var mt;!function(e){e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date"}(mt=mt||(mt={}));const bt=e=>H(e);function wt({path:e,branch:t}){const r=e[e.length-1];return n=t[t.length-2],o=r,Object.hasOwnProperty.call(n,o);var n,o}function Tt(e){return new I({...e,type:`optional ${e.type}`,validator:(t,r)=>!wt(r)||e.validator(t,r),refiner:(t,r)=>!wt(r)||e.refiner(t,r)})}function At(e){if(null===e||"boolean"==typeof e||"string"==typeof e)return!0;if("number"==typeof e&&Number.isFinite(e))return!0;if("object"==typeof e){let t=!0;if(Array.isArray(e)){for(let r=0;r<e.length;r++)if(!At(e[r])){t=!1;break}return t}const r=Object.entries(e);for(let e=0;e<r.length;e++)if("string"!=typeof r[e][0]||!At(r[e][1])){t=!1;break}return t}return!1}const vt=k("JSON",(e=>At(e))),Pt=yt(vt,Te(N(),"JSON",(e=>x(e,vt))),(e=>JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t})))));const Et=z("2.0"),Ct=V(Q([G(),J()])),Bt=bt({code:$(),message:J(),data:Tt(Pt),stack:Tt(J())}),Wt=Q([q(J(),Pt),U(Pt)]);bt({id:Ct,jsonrpc:Et,method:J(),params:Tt(Wt)}),bt({jsonrpc:Et,method:J(),params:Tt(Wt)});H({id:Ct,jsonrpc:Et,result:K(ee()),error:K(Bt)});const St=bt({id:Ct,jsonrpc:Et,result:Pt}),It=bt({id:Ct,jsonrpc:Et,error:Bt});Q([St,It]);const _t=ft({jsonrpc:z("2.0"),id:Q([J(),G(),z(null)]),method:J(),params:ht(Q([U(Pt),q(J(),Pt)]))});var Ot;!function(e){e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date"}(Ot=Ot||(Ot={}));function Rt(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}}const Mt=e=>H(e);function xt({path:e,branch:t}){const r=e[e.length-1];return n=t[t.length-2],o=r,Object.hasOwnProperty.call(n,o);var n,o}function Ft(e){return new I({...e,type:`optional ${e.type}`,validator:(t,r)=>!xt(r)||e.validator(t,r),refiner:(t,r)=>!xt(r)||e.refiner(t,r)})}function kt(e){if(null===e||"boolean"==typeof e||"string"==typeof e)return!0;if("number"==typeof e&&Number.isFinite(e))return!0;if("object"==typeof e){let t=!0;if(Array.isArray(e)){for(let r=0;r<e.length;r++)if(!kt(e[r])){t=!1;break}return t}const r=Object.entries(e);for(let e=0;e<r.length;e++)if("string"!=typeof r[e][0]||!kt(r[e][1])){t=!1;break}return t}return!1}const Nt=k("JSON",(e=>kt(e))),Ut=yt(Nt,Te(N(),"JSON",(e=>x(e,Nt))),(e=>JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t})))));const Dt=z("2.0"),Lt=V(Q([G(),J()])),$t=Mt({code:$(),message:J(),data:Ft(Ut),stack:Ft(J())}),zt=Q([q(J(),Ut),U(Ut)]);Mt({id:Lt,jsonrpc:Dt,method:J(),params:Ft(zt)}),Mt({jsonrpc:Dt,method:J(),params:Ft(zt)});H({id:Lt,jsonrpc:Dt,result:K(ee()),error:K($t)});const jt=Mt({id:Lt,jsonrpc:Dt,result:Ut}),Vt=Mt({id:Lt,jsonrpc:Dt,error:$t});Q([jt,Vt]);var Gt;!function(e){e.Mnemonic="mnemonic",e.PrivateKey="private-key"}(Gt||(Gt={}));const Ht=H({type:z(`${Gt.Mnemonic}`),id:J(),derivationPath:J(),groupIndex:G()}),Kt=H({type:z(`${Gt.PrivateKey}`)}),Zt=gt((e=>Rt(e)&&e.type===Gt.PrivateKey?Kt:Ht)),qt=(Jt=[q(J(),Ut),(Yt={entropy:ht(Zt),exportable:ht(D())},X(Yt))],new I({type:"intersection",schema:null,*entries(e,t){for(const{entries:r}of Jt)yield*r(e,t)},*validator(e,t){for(const{validator:r}of Jt)yield*r(e,t)},*refiner(e,t){for(const{refiner:r}of Jt)yield*r(e,t)}}));var Jt,Yt;function Xt(e,t){return k(e,(e=>"string"==typeof e&&t.test(e)))}const Qt=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,er=/^[-a-z0-9]{3,8}$/u,tr=/^[-_a-zA-Z0-9]{1,32}$/u,rr=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,nr=/^[-.%a-zA-Z0-9]{1,128}$/u,or=/^[-a-z0-9]{3,8}$/u,sr=/^[-.%a-zA-Z0-9]{1,128}$/u,ar=/^[-.%a-zA-Z0-9]{1,78}$/u,ir=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})$/u,cr=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})\/(?<tokenId>[-.%a-zA-Z0-9]{1,78})$/u,ur=Xt("CaipChainId",Qt),lr=(Xt("CaipNamespace",er),Xt("CaipReference",tr),Xt("CaipAccountId",rr)),dr=(Xt("CaipAccountAddress",nr),Xt("CaipAssetNamespace",or),Xt("CaipAssetReference",sr),Xt("CaipTokenId",ar),Xt("CaipAssetType",ir)),fr=Xt("CaipAssetId",cr),pr=Xt("CaipAssetTypeOrId",/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})(\/(?<tokenId>[-.%a-zA-Z0-9]{1,78}))?$/u);var hr,gr,yr,mr,br,wr;!function(e){e.Bip122="bip122",e.Solana="solana",e.Eip155="eip155",e.Wallet="wallet"}(hr=hr||(hr={})),function(e){e.Eoa="eip155:eoa",e.Erc4337="eip155:erc4337"}(gr||(gr={})),function(e){e.P2pkh="bip122:p2pkh",e.P2sh="bip122:p2sh",e.P2wpkh="bip122:p2wpkh",e.P2tr="bip122:p2tr"}(yr||(yr={})),function(e){e.DataAccount="solana:data-account"}(mr||(mr={})),function(e){e.Eoa="tron:eoa"}(br||(br={})),function(e){e.Account="any:account"}(wr||(wr={}));const Tr=L([`${gr.Eoa}`,`${gr.Erc4337}`,`${yr.P2pkh}`,`${yr.P2sh}`,`${yr.P2wpkh}`,`${yr.P2tr}`,`${mr.DataAccount}`,`${br.Eoa}`,`${wr.Account}`]),Ar=ft({id:ut,type:L([`${gr.Eoa}`,`${gr.Erc4337}`,`${yr.P2pkh}`,`${yr.P2sh}`,`${yr.P2wpkh}`,`${yr.P2tr}`,`${mr.DataAccount}`,`${br.Eoa}`,`${wr.Account}`]),address:J(),scopes:be(U(ur)),options:qt,methods:U(J())}),vr=(H({address:lr}),ft({unit:J(),amount:dt})),Pr=ft({fungible:z(!0),type:dr,...vr.schema}),Er=ft({fungible:z(!1),id:fr}),Cr=gt((e=>Rt(e)&&!e.fungible?Er:Pr)),Br=ft({amount:dt,unit:J()}),Wr=Xt("DerivationPath",/^m(?:\/\d+'?)+$/u);var Sr;!function(e){e.Bip44="bip44"}(Sr||(Sr={}));const Ir=H({type:z(`${Sr.Bip44}`),scopes:U(ur),derivationPath:Wr}),_r=(q(J(),Ut),ft({id:ct,scope:J(),account:ct,origin:J(),request:ft({method:J(),params:ht(Q([U(Ut),q(J(),Ut)]))})})),Or=(Q([ft({pending:z(!0),redirect:ht(ft({message:ht(J()),url:ht(J())}))}),ft({pending:z(!1),result:Ut})]),ft({address:J(),asset:V(Cr)}));var Rr;!function(e){e.Base="base",e.Priority="priority"}(Rr||(Rr={}));const Mr=ft({type:L([`${Rr.Base}`,`${Rr.Priority}`]),asset:Cr});var xr,Fr;!function(e){e.Submitted="submitted",e.Unconfirmed="unconfirmed",e.Confirmed="confirmed",e.Failed="failed"}(xr||(xr={})),function(e){e.Send="send",e.Receive="receive",e.Swap="swap",e.BridgeSend="bridge:send",e.BridgeReceive="bridge:receive",e.StakeDeposit="stake:deposit",e.StakeWithdraw="stake:withdraw",e.Unknown="unknown"}(Fr||(Fr={}));const kr=ft({status:L([`${xr.Submitted}`,`${xr.Unconfirmed}`,`${xr.Confirmed}`,`${xr.Failed}`]),timestamp:V(G())}),Nr=ft({id:J(),chain:ur,account:ct,status:L([`${xr.Submitted}`,`${xr.Unconfirmed}`,`${xr.Confirmed}`,`${xr.Failed}`]),timestamp:V(G()),type:L([`${Fr.Send}`,`${Fr.Receive}`,`${Fr.Swap}`,`${Fr.BridgeSend}`,`${Fr.BridgeReceive}`,`${Fr.StakeDeposit}`,`${Fr.StakeWithdraw}`,`${Fr.Unknown}`]),from:U(Or),to:U(Or),fees:U(Mr),events:U(kr)}),Ur=(ft({data:U(Nr),next:V(J())}),ft({limit:G(),next:ht(V(J()))})),Dr=ft({metamask:ht(ft({correlationId:ct}))});var Lr;!function(e){e.Hexadecimal="hexadecimal",e.Base58="base58"}(Lr||(Lr={}));const $r=L([`${Lr.Hexadecimal}`,`${Lr.Base58}`]),zr=H({encoding:$r,type:Z(Tr)}),jr=H({encoding:$r});H({scopes:be(U(ur)),bip44:Z(H({derivePath:D(),deriveIndex:D(),discover:D()})),privateKey:Z(H({importFormats:Z(U(zr)),exportFormats:Z(U(jr))}))});var Vr;!function(e){e.Hd="hd",e.PrivateKey="private-key",e.Qr="qr",e.Snap="snap",e.Ledger="ledger",e.Lattice="lattice",e.Trezor="trezor",e.OneKey="onekey"}(Vr||(Vr={}));const Gr=H({type:z("bip44:derive-path"),entropySource:J(),derivationPath:Wr}),Hr=H({type:z("bip44:derive-index"),entropySource:J(),groupIndex:G()}),Kr=H({type:z("bip44:discover"),entropySource:J(),groupIndex:G()}),Zr=H({type:z("private-key:import"),privateKey:J(),encoding:$r,accountType:Z(Tr)});var qr;!function(e){e.Bip44DerivePath="bip44:derive-path",e.Bip44DeriveIndex="bip44:derive-index",e.Bip44Discover="bip44:discover",e.PrivateKeyImport="private-key:import"}(qr||(qr={}));gt((e=>{const t=e?.type;switch(t){case qr.Bip44DerivePath:return Gr;case qr.Bip44DeriveIndex:return Hr;case qr.Bip44Discover:return Kr;case qr.PrivateKeyImport:return Zr;default:return Gr}})),H({type:z("private-key"),privateKey:J(),encoding:$r}),H({type:z("private-key"),encoding:$r});var Jr;!function(e){e.PrivateKey="private-key"}(Jr||(Jr={}));var Yr;!function(e){e.Mainnet="bip122:000000000019d6689c085ae165831e93",e.Testnet="bip122:000000000933ea01ad0ee984209779ba",e.Testnet4="bip122:00000000da84f2bafbbc53dee25a72ae",e.Signet="bip122:00000008819873e925422c1ff0f99f7c",e.Regtest="bip122:regtest"}(Yr||(Yr={}));const Xr=(e,t)=>{try{return at(e).type===t||new Error(`Invalid ${t} address`)}catch(e){return new Error(`Failed to decode ${t} address: ${e.message}`)}},Qr=Te(J(),"BtcP2pkhAddressStruct",(e=>Xr(e,nt.p2pkh))),en=Te(J(),"BtcP2shAddressStruct",(e=>Xr(e,nt.p2sh))),tn=Te(J(),"BtcP2wpkhAddressStruct",(e=>Xr(e,nt.p2wpkh))),rn=Te(J(),"BtcP2trAddressStruct",(e=>Xr(e,nt.p2tr)));var nn;!function(e){e.SignPsbt="signPsbt",e.ComputeFee="computeFee",e.FillPsbt="fillPsbt",e.BroadcastPsbt="broadcastPsbt",e.SendTransfer="sendTransfer",e.GetUtxo="getUtxo",e.ListUtxos="listUtxos",e.PublicDescriptor="publicDescriptor",e.SignMessage="signMessage"}(nn||(nn={}));const on=ft({...Ar.schema,scopes:be(U(ur)),methods:U(L(Object.values(nn)))});ft({...on.schema,address:Qr,type:z(`${yr.P2pkh}`)}),ft({...on.schema,address:en,type:z(`${yr.P2sh}`)}),ft({...on.schema,address:tn,type:z(`${yr.P2wpkh}`)}),ft({...on.schema,address:rn,type:z(`${yr.P2tr}`)});var sn;!function(e){e.Devnet="solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",e.Mainnet="solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",e.Testnet="solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z"}(sn||(sn={}));const an=Xt("SolAddress",/^[1-9A-HJ-NP-Za-km-z]{32,44}$/iu);var cn;!function(e){e.SendAndConfirmTransaction="sendAndConfirmTransaction",e.SignAndSendTransaction="signAndSendTransaction",e.SignTransaction="signTransaction",e.SignMessage="signMessage",e.SignIn="signIn"}(cn||(cn={}));ft({...Ar.schema,address:an,type:z(`${mr.DataAccount}`),scopes:be(U(ur)),methods:U(L(Object.values(cn)))});var un;!function(e){e.Eoa="eip155:0",e.Mainnet="eip155:1",e.Testnet="eip155:11155111"}(un||(un={}));const ln=Xt("EthBytes",/^0x[0-9a-f]*$/iu),dn=Xt("EthAddress",/^0x[0-9a-f]{40}$/iu),fn=Xt("EthUint256",/^0x([1-9a-f][0-9a-f]*|0)$/iu);var pn;!function(e){e.PersonalSign="personal_sign",e.Sign="eth_sign",e.SignTransaction="eth_signTransaction",e.SignTypedDataV1="eth_signTypedData_v1",e.SignTypedDataV3="eth_signTypedData_v3",e.SignTypedDataV4="eth_signTypedData_v4",e.PrepareUserOperation="eth_prepareUserOperation",e.PatchUserOperation="eth_patchUserOperation",e.SignUserOperation="eth_signUserOperation"}(pn||(pn={}));ft({...Ar.schema,address:dn,type:z(`${gr.Eoa}`),scopes:be(U(z(un.Eoa))),methods:U(L([`${pn.PersonalSign}`,`${pn.Sign}`,`${pn.SignTransaction}`,`${pn.SignTypedDataV1}`,`${pn.SignTypedDataV3}`,`${pn.SignTypedDataV4}`]))}),ft({...Ar.schema,address:dn,type:z(`${gr.Erc4337}`),scopes:be(U(ur)),methods:U(L([`${pn.PersonalSign}`,`${pn.Sign}`,`${pn.SignTypedDataV1}`,`${pn.SignTypedDataV3}`,`${pn.SignTypedDataV4}`,`${pn.PrepareUserOperation}`,`${pn.PatchUserOperation}`,`${pn.SignUserOperation}`]))}),ft({sender:dn,nonce:fn,initCode:ln,callData:ln,callGasLimit:fn,verificationGasLimit:fn,preVerificationGas:fn,maxFeePerGas:fn,maxPriorityFeePerGas:fn,paymasterAndData:ln,signature:ln}),ft({to:dn,value:fn,data:ln}),ft({nonce:fn,initCode:ln,callData:ln,gasLimits:ht(ft({callGasLimit:fn,verificationGasLimit:fn,preVerificationGas:fn})),dummyPaymasterAndData:ln,dummySignature:ln,bundlerUrl:lt}),ft({paymasterAndData:ln,callGasLimit:ht(fn),verificationGasLimit:ht(fn),preVerificationGas:ht(fn)});var hn;!function(e){e.Mainnet="tron:728126428",e.Nile="tron:3448148188",e.Shasta="tron:2494104990"}(hn||(hn={}));const gn=Xt("TrxAddress",/^T[1-9A-HJ-NP-Za-km-z]{33}$/iu);var yn;!function(e){e.SignMessage="signMessage",e.SignTransaction="signTransaction",e.SignMessageV2="signMessageV2",e.VerifyMessageV2="verifyMessageV2"}(yn||(yn={}));ft({...Ar.schema,address:gn,type:z(`${br.Eoa}`),scopes:be(U(ur)),methods:U(L(Object.values(yn)))});var mn;!function(e){e.ListAccounts="keyring_listAccounts",e.GetAccount="keyring_getAccount",e.CreateAccount="keyring_createAccount",e.DiscoverAccounts="keyring_discoverAccounts",e.ListAccountAssets="keyring_listAccountAssets",e.ListAccountTransactions="keyring_listAccountTransactions",e.GetAccountBalances="keyring_getAccountBalances",e.ResolveAccountAddress="keyring_resolveAccountAddress",e.FilterAccountChains="keyring_filterAccountChains",e.UpdateAccount="keyring_updateAccount",e.DeleteAccount="keyring_deleteAccount",e.ExportAccount="keyring_exportAccount",e.ListRequests="keyring_listRequests",e.GetRequest="keyring_getRequest",e.SubmitRequest="keyring_submitRequest",e.ApproveRequest="keyring_approveRequest",e.RejectRequest="keyring_rejectRequest",e.SetSelectedAccounts="keyring_setSelectedAccounts"}(mn||(mn={}));const bn={jsonrpc:z("2.0"),id:Q([J(),G(),z(null)])},wn=ft({...bn,method:z("keyring_listAccounts")}),Tn=(U(Ar),ft({...bn,method:z("keyring_getAccount"),params:ft({id:ct})})),An=ft({...bn,method:z("keyring_createAccount"),params:ft({options:q(J(),Ut)})}),vn=ft({...bn,method:z("keyring_setSelectedAccounts"),params:ft({accounts:U(J())})}),Pn=(z(null),ft({...bn,method:z("keyring_discoverAccounts"),params:ft({scopes:U(ur),entropySource:J(),groupIndex:G()})})),En=(U(Ir),ft({...bn,method:z("keyring_listAccountTransactions"),params:ft({id:ct,pagination:Ur})})),Cn=ft({...bn,method:z("keyring_listAccountAssets"),params:ft({id:ct})}),Bn=U(pr),Wn=ft({...bn,method:z(`${mn.GetAccountBalances}`),params:ft({id:ct,assets:U(dr)})}),Sn=(q(dr,Br),ft({...bn,method:z("keyring_resolveAccountAddress"),params:ft({scope:ur,request:_t})})),In=(V(ft({address:lr})),ft({...bn,method:z("keyring_filterAccountChains"),params:ft({id:ct,chains:U(J())})})),_n=(U(J()),ft({...bn,method:z("keyring_updateAccount"),params:ft({account:Ar})})),On=(z(null),ft({...bn,method:z("keyring_deleteAccount"),params:ft({id:ct})})),Rn=(z(null),ft({...bn,method:z("keyring_exportAccount"),params:ft({id:ct})})),Mn=ft({...bn,method:z("keyring_listRequests")}),xn=(U(_r),ft({...bn,method:z("keyring_getRequest"),params:ft({id:ct})})),Fn=ft({...bn,method:z("keyring_submitRequest"),params:_r}),kn=ft({...bn,method:z("keyring_approveRequest"),params:ft({id:ct,data:q(J(),Ut)})}),Nn=(z(null),ft({...bn,method:z("keyring_rejectRequest"),params:ft({id:ct})}));z(null);var Un;!function(e){e.AccountCreated="notify:accountCreated",e.AccountUpdated="notify:accountUpdated",e.AccountDeleted="notify:accountDeleted",e.RequestApproved="notify:requestApproved",e.RequestRejected="notify:requestRejected",e.AccountBalancesUpdated="notify:accountBalancesUpdated",e.AccountAssetListUpdated="notify:accountAssetListUpdated",e.AccountTransactionsUpdated="notify:accountTransactionsUpdated"}(Un||(Un={}));ft({method:z(`${Un.AccountCreated}`),params:ft({account:Ar,accountNameSuggestion:ht(J()),displayConfirmation:ht(D()),displayAccountNameSuggestion:ht(D()),...Dr.schema})}),ft({method:z(`${Un.AccountUpdated}`),params:ft({account:Ar})}),ft({method:z(`${Un.AccountDeleted}`),params:ft({id:ct})}),ft({method:z(`${Un.RequestApproved}`),params:ft({id:ct,result:Ut})}),ft({method:z(`${Un.RequestRejected}`),params:ft({id:ct})}),ft({method:z(`${Un.AccountBalancesUpdated}`),params:ft({balances:q(ut,q(dr,vr))})}),ft({method:z(`${Un.AccountTransactionsUpdated}`),params:ft({transactions:q(ut,U(Nr))})}),ft({method:z(`${Un.AccountAssetListUpdated}`),params:ft({assets:q(ut,ft({added:U(pr),removed:U(pr)}))})});var Dn=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Ln=Math.ceil,$n=Math.floor,zn="[BigNumber Error] ",jn=zn+"Number primitive has more than 15 significant digits: ",Vn=1e14,Gn=14,Hn=9007199254740991,Kn=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Zn=1e7,qn=1e9;function Jn(e){var t=0|e;return e>0||e===t?t:t-1}function Yn(e){for(var t,r,n=1,o=e.length,s=e[0]+"";n<o;){for(t=e[n++]+"",r=Gn-t.length;r--;t="0"+t);s+=t}for(o=s.length;48===s.charCodeAt(--o););return s.slice(0,o+1||1)}function Xn(e,t){var r,n,o=e.c,s=t.c,a=e.s,i=t.s,c=e.e,u=t.e;if(!a||!i)return null;if(r=o&&!o[0],n=s&&!s[0],r||n)return r?n?0:-i:a;if(a!=i)return a;if(r=a<0,n=c==u,!o||!s)return n?0:!o^r?1:-1;if(!n)return c>u^r?1:-1;for(i=(c=o.length)<(u=s.length)?c:u,a=0;a<i;a++)if(o[a]!=s[a])return o[a]>s[a]^r?1:-1;return c==u?0:c>u^r?1:-1}function Qn(e,t,r,n){if(e<t||e>r||e!==$n(e))throw Error(zn+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function eo(e){var t=e.c.length-1;return Jn(e.e/Gn)==t&&e.c[t]%2!=0}function to(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function ro(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var no=function e(t){var r,n,o,s,a,i,c,u,l,d,f=B.prototype={constructor:B,toString:null,valueOf:null},p=new B(1),h=20,g=4,y=-7,m=21,b=-1e7,w=1e7,T=!1,A=1,v=0,P={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},E="0123456789abcdefghijklmnopqrstuvwxyz",C=!0;function B(e,t){var r,s,a,i,c,u,l,d,f=this;if(!(f instanceof B))return new B(e,t);if(null==t){if(e&&!0===e._isBigNumber)return f.s=e.s,void(!e.c||e.e>w?f.c=f.e=null:e.e<b?f.c=[f.e=0]:(f.e=e.e,f.c=e.c.slice()));if((u="number"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(i=0,c=e;c>=10;c/=10,i++);return void(i>w?f.c=f.e=null:(f.e=i,f.c=[e]))}d=String(e)}else{if(!Dn.test(d=String(e)))return o(f,d,u);f.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(i=d.indexOf("."))>-1&&(d=d.replace(".","")),(c=d.search(/e/i))>0?(i<0&&(i=c),i+=+d.slice(c+1),d=d.substring(0,c)):i<0&&(i=d.length)}else{if(Qn(t,2,E.length,"Base"),10==t&&C)return _(f=new B(e),h+f.e+1,g);if(d=String(e),u="number"==typeof e){if(0*e!=0)return o(f,d,u,t);if(f.s=1/e<0?(d=d.slice(1),-1):1,B.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throw Error(jn+e)}else f.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(r=E.slice(0,t),i=c=0,l=d.length;c<l;c++)if(r.indexOf(s=d.charAt(c))<0){if("."==s){if(c>i){i=l;continue}}else if(!a&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){a=!0,c=-1,i=0;continue}return o(f,String(e),u,t)}u=!1,(i=(d=n(d,t,10,f.s)).indexOf("."))>-1?d=d.replace(".",""):i=d.length}for(c=0;48===d.charCodeAt(c);c++);for(l=d.length;48===d.charCodeAt(--l););if(d=d.slice(c,++l)){if(l-=c,u&&B.DEBUG&&l>15&&(e>Hn||e!==$n(e)))throw Error(jn+f.s*e);if((i=i-c-1)>w)f.c=f.e=null;else if(i<b)f.c=[f.e=0];else{if(f.e=i,f.c=[],c=(i+1)%Gn,i<0&&(c+=Gn),c<l){for(c&&f.c.push(+d.slice(0,c)),l-=Gn;c<l;)f.c.push(+d.slice(c,c+=Gn));c=Gn-(d=d.slice(c)).length}else c-=l;for(;c--;d+="0");f.c.push(+d)}}else f.c=[f.e=0]}function W(e,t,r,n){var o,s,a,i,c;if(null==r?r=g:Qn(r,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)c=Yn(e.c),c=1==n||2==n&&(a<=y||a>=m)?to(c,a):ro(c,a,"0");else if(s=(e=_(new B(e),t,r)).e,i=(c=Yn(e.c)).length,1==n||2==n&&(t<=s||s<=y)){for(;i<t;c+="0",i++);c=to(c,s)}else if(t-=a+(2===n&&s>a),c=ro(c,s,"0"),s+1>i){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=s-i)>0)for(s+1==i&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function S(e,t){for(var r,n,o=1,s=new B(e[0]);o<e.length;o++)(!(n=new B(e[o])).s||(r=Xn(s,n))===t||0===r&&s.s===t)&&(s=n);return s}function I(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*Gn-1)>w?e.c=e.e=null:r<b?e.c=[e.e=0]:(e.e=r,e.c=t),e}function _(e,t,r,n){var o,s,a,i,c,u,l,d=e.c,f=Kn;if(d){e:{for(o=1,i=d[0];i>=10;i/=10,o++);if((s=t-o)<0)s+=Gn,a=t,c=d[u=0],l=$n(c/f[o-a-1]%10);else if((u=Ln((s+1)/Gn))>=d.length){if(!n)break e;for(;d.length<=u;d.push(0));c=l=0,o=1,a=(s%=Gn)-Gn+1}else{for(c=i=d[u],o=1;i>=10;i/=10,o++);l=(a=(s%=Gn)-Gn+o)<0?0:$n(c/f[o-a-1]%10)}if(n=n||t<0||null!=d[u+1]||(a<0?c:c%f[o-a-1]),n=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(s>0?a>0?c/f[o-a]:0:d[u-1])%10&1||r==(e.s<0?8:7)),t<1||!d[0])return d.length=0,n?(t-=e.e+1,d[0]=f[(Gn-t%Gn)%Gn],e.e=-t||0):d[0]=e.e=0,e;if(0==s?(d.length=u,i=1,u--):(d.length=u+1,i=f[Gn-s],d[u]=a>0?$n(c/f[o-a]%f[a])*i:0),n)for(;;){if(0==u){for(s=1,a=d[0];a>=10;a/=10,s++);for(a=d[0]+=i,i=1;a>=10;a/=10,i++);s!=i&&(e.e++,d[0]==Vn&&(d[0]=1));break}if(d[u]+=i,d[u]!=Vn)break;d[u--]=0,i=1}for(s=d.length;0===d[--s];d.pop());}e.e>w?e.c=e.e=null:e.e<b&&(e.c=[e.e=0])}return e}function O(e){var t,r=e.e;return null===r?e.toString():(t=Yn(e.c),t=r<=y||r>=m?to(t,r):ro(t,r,"0"),e.s<0?"-"+t:t)}return B.clone=e,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(zn+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(Qn(r=e[t],0,qn,t),h=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(Qn(r=e[t],0,8,t),g=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(Qn(r[0],-qn,0,t),Qn(r[1],0,qn,t),y=r[0],m=r[1]):(Qn(r,-qn,qn,t),y=-(m=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)Qn(r[0],-qn,-1,t),Qn(r[1],1,qn,t),b=r[0],w=r[1];else{if(Qn(r,-qn,qn,t),!r)throw Error(zn+t+" cannot be zero: "+r);b=-(w=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(zn+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw T=!r,Error(zn+"crypto unavailable");T=r}else T=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(Qn(r=e[t],0,9,t),A=r),e.hasOwnProperty(t="POW_PRECISION")&&(Qn(r=e[t],0,qn,t),v=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(zn+t+" not an object: "+r);P=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(zn+t+" invalid: "+r);C="0123456789"==r.slice(0,10),E=r}}return{DECIMAL_PLACES:h,ROUNDING_MODE:g,EXPONENTIAL_AT:[y,m],RANGE:[b,w],CRYPTO:T,MODULO_MODE:A,POW_PRECISION:v,FORMAT:P,ALPHABET:E}},B.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!B.DEBUG)return!0;var t,r,n=e.c,o=e.e,s=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===s||-1===s)&&o>=-qn&&o<=qn&&o===$n(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%Gn)<1&&(t+=Gn),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=Vn||r!==$n(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===s||1===s||-1===s))return!0;throw Error(zn+"Invalid BigNumber: "+e)},B.maximum=B.max=function(){return S(arguments,-1)},B.minimum=B.min=function(){return S(arguments,1)},B.random=(s=9007199254740992,a=Math.random()*s&2097151?function(){return $n(Math.random()*s)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,s,i=0,c=[],u=new B(p);if(null==e?e=h:Qn(e,0,qn),o=Ln(e/Gn),T)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));i<o;)(s=131072*t[i]+(t[i+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[i]=r[0],t[i+1]=r[1]):(c.push(s%1e14),i+=2);i=o/2}else{if(!crypto.randomBytes)throw T=!1,Error(zn+"crypto unavailable");for(t=crypto.randomBytes(o*=7);i<o;)(s=281474976710656*(31&t[i])+1099511627776*t[i+1]+4294967296*t[i+2]+16777216*t[i+3]+(t[i+4]<<16)+(t[i+5]<<8)+t[i+6])>=9e15?crypto.randomBytes(7).copy(t,i):(c.push(s%1e14),i+=7);i=o/7}if(!T)for(;i<o;)(s=a())<9e15&&(c[i++]=s%1e14);for(o=c[--i],e%=Gn,o&&e&&(s=Kn[Gn-e],c[i]=$n(o/s)*s);0===c[i];c.pop(),i--);if(i<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=Gn);for(i=1,s=c[0];s>=10;s/=10,i++);i<Gn&&(n-=Gn-i)}return u.e=n,u.c=c,u}),B.sum=function(){for(var e=1,t=arguments,r=new B(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 o,s,a=[0],i=0,c=e.length;i<c;){for(s=a.length;s--;a[s]*=t);for(a[0]+=n.indexOf(e.charAt(i++)),o=0;o<a.length;o++)a[o]>r-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/r|0,a[o]%=r)}return a.reverse()}return function(n,o,s,a,i){var c,u,l,d,f,p,y,m,b=n.indexOf("."),w=h,T=g;for(b>=0&&(d=v,v=0,n=n.replace(".",""),p=(m=new B(o)).pow(n.length-b),v=d,m.c=t(ro(Yn(p.c),p.e,"0"),10,s,e),m.e=m.c.length),l=d=(y=t(n,o,s,i?(c=E,e):(c=e,E))).length;0==y[--d];y.pop());if(!y[0])return c.charAt(0);if(b<0?--l:(p.c=y,p.e=l,p.s=a,y=(p=r(p,m,w,T,s)).c,f=p.r,l=p.e),b=y[u=l+w+1],d=s/2,f=f||u<0||null!=y[u+1],f=T<4?(null!=b||f)&&(0==T||T==(p.s<0?3:2)):b>d||b==d&&(4==T||f||6==T&&1&y[u-1]||T==(p.s<0?8:7)),u<1||!y[0])n=f?ro(c.charAt(1),-w,c.charAt(0)):c.charAt(0);else{if(y.length=u,f)for(--s;++y[--u]>s;)y[u]=0,u||(++l,y=[1].concat(y));for(d=y.length;!y[--d];);for(b=0,n="";b<=d;n+=c.charAt(y[b++]));n=ro(n,l,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,o,s,a,i=0,c=e.length,u=t%Zn,l=t/Zn|0;for(e=e.slice();c--;)i=((o=u*(s=e[c]%Zn)+(n=l*s+(a=e[c]/Zn|0)*u)%Zn*Zn+i)/r|0)+(n/Zn|0)+l*a,e[c]=o%r;return i&&(e=[i].concat(e)),e}function t(e,t,r,n){var o,s;if(r!=n)s=r>n?1:-1;else for(o=s=0;o<r;o++)if(e[o]!=t[o]){s=e[o]>t[o]?1:-1;break}return s}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,s,a,i){var c,u,l,d,f,p,h,g,y,m,b,w,T,A,v,P,E,C=n.s==o.s?1:-1,W=n.c,S=o.c;if(!(W&&W[0]&&S&&S[0]))return new B(n.s&&o.s&&(W?!S||W[0]!=S[0]:S)?W&&0==W[0]||!S?0*C:C/0:NaN);for(y=(g=new B(C)).c=[],C=s+(u=n.e-o.e)+1,i||(i=Vn,u=Jn(n.e/Gn)-Jn(o.e/Gn),C=C/Gn|0),l=0;S[l]==(W[l]||0);l++);if(S[l]>(W[l]||0)&&u--,C<0)y.push(1),d=!0;else{for(A=W.length,P=S.length,l=0,C+=2,(f=$n(i/(S[0]+1)))>1&&(S=e(S,f,i),W=e(W,f,i),P=S.length,A=W.length),T=P,b=(m=W.slice(0,P)).length;b<P;m[b++]=0);E=S.slice(),E=[0].concat(E),v=S[0],S[1]>=i/2&&v++;do{if(f=0,(c=t(S,m,P,b))<0){if(w=m[0],P!=b&&(w=w*i+(m[1]||0)),(f=$n(w/v))>1)for(f>=i&&(f=i-1),h=(p=e(S,f,i)).length,b=m.length;1==t(p,m,h,b);)f--,r(p,P<h?E:S,h,i),h=p.length,c=1;else 0==f&&(c=f=1),h=(p=S.slice()).length;if(h<b&&(p=[0].concat(p)),r(m,p,b,i),b=m.length,-1==c)for(;t(S,m,P,b)<1;)f++,r(m,P<b?E:S,b,i),b=m.length}else 0===c&&(f++,m=[0]);y[l++]=f,m[0]?m[b++]=W[T]||0:(m=[W[T]],b=1)}while((T++<A||null!=m[0])&&C--);d=null!=m[0],y[0]||y.splice(0,1)}if(i==Vn){for(l=1,C=y[0];C>=10;C/=10,l++);_(g,s+(g.e=l+u*Gn-1)+1,a,d)}else g.e=u,g.r=+d;return g}}(),i=/^(-?)0([xbo])(?=\w[\w.]*$)/i,c=/^([^.]+)\.$/,u=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,d=/^\s*\+(?=[\w.])|^\s+|\s+$/g,o=function(e,t,r,n){var o,s=r?t:t.replace(d,"");if(l.test(s))e.s=isNaN(s)?null:s<0?-1:1;else{if(!r&&(s=s.replace(i,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,s=s.replace(c,"$1").replace(u,"0.$1")),t!=s))return new B(s,o);if(B.DEBUG)throw Error(zn+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},f.absoluteValue=f.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},f.comparedTo=function(e,t){return Xn(this,new B(e,t))},f.decimalPlaces=f.dp=function(e,t){var r,n,o,s=this;if(null!=e)return Qn(e,0,qn),null==t?t=g:Qn(t,0,8),_(new B(s),e+s.e+1,t);if(!(r=s.c))return null;if(n=((o=r.length-1)-Jn(this.e/Gn))*Gn,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},f.dividedBy=f.div=function(e,t){return r(this,new B(e,t),h,g)},f.dividedToIntegerBy=f.idiv=function(e,t){return r(this,new B(e,t),0,1)},f.exponentiatedBy=f.pow=function(e,t){var r,n,o,s,a,i,c,u,l=this;if((e=new B(e)).c&&!e.isInteger())throw Error(zn+"Exponent not an integer: "+O(e));if(null!=t&&(t=new B(t)),a=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return u=new B(Math.pow(+O(l),a?e.s*(2-eo(e)):+O(e))),t?u.mod(t):u;if(i=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new B(NaN);(n=!i&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||a&&l.c[1]>=24e7:l.c[0]<8e13||a&&l.c[0]<=9999975e7)))return s=l.s<0&&eo(e)?-0:0,l.e>-1&&(s=1/s),new B(i?1/s:s);v&&(s=Ln(v/Gn+2))}for(a?(r=new B(.5),i&&(e.s=1),c=eo(e)):c=(o=Math.abs(+O(e)))%2,u=new B(p);;){if(c){if(!(u=u.times(l)).c)break;s?u.c.length>s&&(u.c.length=s):n&&(u=u.mod(t))}if(o){if(0===(o=$n(o/2)))break;c=o%2}else if(_(e=e.times(r),e.e+1,1),e.e>14)c=eo(e);else{if(0===(o=+O(e)))break;c=o%2}l=l.times(l),s?l.c&&l.c.length>s&&(l.c.length=s):n&&(l=l.mod(t))}return n?u:(i&&(u=p.div(u)),t?u.mod(t):s?_(u,v,g,undefined):u)},f.integerValue=function(e){var t=new B(this);return null==e?e=g:Qn(e,0,8),_(t,t.e+1,e)},f.isEqualTo=f.eq=function(e,t){return 0===Xn(this,new B(e,t))},f.isFinite=function(){return!!this.c},f.isGreaterThan=f.gt=function(e,t){return Xn(this,new B(e,t))>0},f.isGreaterThanOrEqualTo=f.gte=function(e,t){return 1===(t=Xn(this,new B(e,t)))||0===t},f.isInteger=function(){return!!this.c&&Jn(this.e/Gn)>this.c.length-2},f.isLessThan=f.lt=function(e,t){return Xn(this,new B(e,t))<0},f.isLessThanOrEqualTo=f.lte=function(e,t){return-1===(t=Xn(this,new B(e,t)))||0===t},f.isNaN=function(){return!this.s},f.isNegative=function(){return this.s<0},f.isPositive=function(){return this.s>0},f.isZero=function(){return!!this.c&&0==this.c[0]},f.minus=function(e,t){var r,n,o,s,a=this,i=a.s;if(t=(e=new B(e,t)).s,!i||!t)return new B(NaN);if(i!=t)return e.s=-t,a.plus(e);var c=a.e/Gn,u=e.e/Gn,l=a.c,d=e.c;if(!c||!u){if(!l||!d)return l?(e.s=-t,e):new B(d?a:NaN);if(!l[0]||!d[0])return d[0]?(e.s=-t,e):new B(l[0]?a:3==g?-0:0)}if(c=Jn(c),u=Jn(u),l=l.slice(),i=c-u){for((s=i<0)?(i=-i,o=l):(u=c,o=d),o.reverse(),t=i;t--;o.push(0));o.reverse()}else for(n=(s=(i=l.length)<(t=d.length))?i:t,i=t=0;t<n;t++)if(l[t]!=d[t]){s=l[t]<d[t];break}if(s&&(o=l,l=d,d=o,e.s=-e.s),(t=(n=d.length)-(r=l.length))>0)for(;t--;l[r++]=0);for(t=Vn-1;n>i;){if(l[--n]<d[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=Vn}l[n]-=d[n]}for(;0==l[0];l.splice(0,1),--u);return l[0]?I(e,l,u):(e.s=3==g?-1:1,e.c=[e.e=0],e)},f.modulo=f.mod=function(e,t){var n,o,s=this;return e=new B(e,t),!s.c||!e.s||e.c&&!e.c[0]?new B(NaN):!e.c||s.c&&!s.c[0]?new B(s):(9==A?(o=e.s,e.s=1,n=r(s,e,0,3),e.s=o,n.s*=o):n=r(s,e,0,A),(e=s.minus(n.times(e))).c[0]||1!=A||(e.s=s.s),e)},f.multipliedBy=f.times=function(e,t){var r,n,o,s,a,i,c,u,l,d,f,p,h,g,y,m=this,b=m.c,w=(e=new B(e,t)).c;if(!(b&&w&&b[0]&&w[0]))return!m.s||!e.s||b&&!b[0]&&!w||w&&!w[0]&&!b?e.c=e.e=e.s=null:(e.s*=m.s,b&&w?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=Jn(m.e/Gn)+Jn(e.e/Gn),e.s*=m.s,(c=b.length)<(d=w.length)&&(h=b,b=w,w=h,o=c,c=d,d=o),o=c+d,h=[];o--;h.push(0));for(g=Vn,y=Zn,o=d;--o>=0;){for(r=0,f=w[o]%y,p=w[o]/y|0,s=o+(a=c);s>o;)r=((u=f*(u=b[--a]%y)+(i=p*u+(l=b[a]/y|0)*f)%y*y+h[s]+r)/g|0)+(i/y|0)+p*l,h[s--]=u%g;h[s]=r}return r?++n:h.splice(0,1),I(e,h,n)},f.negated=function(){var e=new B(this);return e.s=-e.s||null,e},f.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new B(e,t)).s,!o||!t)return new B(NaN);if(o!=t)return e.s=-t,n.minus(e);var s=n.e/Gn,a=e.e/Gn,i=n.c,c=e.c;if(!s||!a){if(!i||!c)return new B(o/0);if(!i[0]||!c[0])return c[0]?e:new B(i[0]?n:0*o)}if(s=Jn(s),a=Jn(a),i=i.slice(),o=s-a){for(o>0?(a=s,r=c):(o=-o,r=i),r.reverse();o--;r.push(0));r.reverse()}for((o=i.length)-(t=c.length)<0&&(r=c,c=i,i=r,t=o),o=0;t;)o=(i[--t]=i[t]+c[t]+o)/Vn|0,i[t]=Vn===i[t]?0:i[t]%Vn;return o&&(i=[o].concat(i),++a),I(e,i,a)},f.precision=f.sd=function(e,t){var r,n,o,s=this;if(null!=e&&e!==!!e)return Qn(e,1,qn),null==t?t=g:Qn(t,0,8),_(new B(s),e,t);if(!(r=s.c))return null;if(n=(o=r.length-1)*Gn+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&s.e+1>n&&(n=s.e+1),n},f.shiftedBy=function(e){return Qn(e,-9007199254740991,Hn),this.times("1e"+e)},f.squareRoot=f.sqrt=function(){var e,t,n,o,s,a=this,i=a.c,c=a.s,u=a.e,l=h+4,d=new B("0.5");if(1!==c||!i||!i[0])return new B(!c||c<0&&(!i||i[0])?NaN:i?a:1/0);if(0==(c=Math.sqrt(+O(a)))||c==1/0?(((t=Yn(i)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=Jn((u+1)/2)-(u<0||u%2),n=new B(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new B(c+""),n.c[0])for((c=(u=n.e)+l)<3&&(c=0);;)if(s=n,n=d.times(s.plus(r(a,s,l,1))),Yn(s.c).slice(0,c)===(t=Yn(n.c)).slice(0,c)){if(n.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(_(n,n.e+h+2,1),e=!n.times(n).eq(a));break}if(!o&&(_(s,s.e+h+2,0),s.times(s).eq(a))){n=s;break}l+=4,c+=4,o=1}return _(n,n.e+h+1,g,e)},f.toExponential=function(e,t){return null!=e&&(Qn(e,0,qn),e++),W(this,e,t,1)},f.toFixed=function(e,t){return null!=e&&(Qn(e,0,qn),e=e+this.e+1),W(this,e,t)},f.toFormat=function(e,t,r){var n,o=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=P;else if("object"!=typeof r)throw Error(zn+"Argument not an object: "+r);if(n=o.toFixed(e,t),o.c){var s,a=n.split("."),i=+r.groupSize,c=+r.secondaryGroupSize,u=r.groupSeparator||"",l=a[0],d=a[1],f=o.s<0,p=f?l.slice(1):l,h=p.length;if(c&&(s=i,i=c,c=s,h-=s),i>0&&h>0){for(s=h%i||i,l=p.substr(0,s);s<h;s+=i)l+=u+p.substr(s,i);c>0&&(l+=u+p.slice(s)),f&&(l="-"+l)}n=d?l+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?d.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):d):l}return(r.prefix||"")+n+(r.suffix||"")},f.toFraction=function(e){var t,n,o,s,a,i,c,u,l,d,f,h,y=this,m=y.c;if(null!=e&&(!(c=new B(e)).isInteger()&&(c.c||1!==c.s)||c.lt(p)))throw Error(zn+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+O(c));if(!m)return new B(y);for(t=new B(p),l=n=new B(p),o=u=new B(p),h=Yn(m),a=t.e=h.length-y.e-1,t.c[0]=Kn[(i=a%Gn)<0?Gn+i:i],e=!e||c.comparedTo(t)>0?a>0?t:l:c,i=w,w=1/0,c=new B(h),u.c[0]=0;d=r(c,t,0,1),1!=(s=n.plus(d.times(o))).comparedTo(e);)n=o,o=s,l=u.plus(d.times(s=l)),u=s,t=c.minus(d.times(s=t)),c=s;return s=r(e.minus(n),o,0,1),u=u.plus(s.times(l)),n=n.plus(s.times(o)),u.s=l.s=y.s,f=r(l,o,a*=2,g).minus(y).abs().comparedTo(r(u,n,a,g).minus(y).abs())<1?[l,o]:[u,n],w=i,f},f.toNumber=function(){return+O(this)},f.toPrecision=function(e,t){return null!=e&&Qn(e,1,qn),W(this,e,t,2)},f.toString=function(e){var t,r=this,o=r.s,s=r.e;return null===s?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=s<=y||s>=m?to(Yn(r.c),s):ro(Yn(r.c),s,"0"):10===e&&C?t=ro(Yn((r=_(new B(r),h+s+1,g)).c),r.e,"0"):(Qn(e,2,E.length,"Base"),t=n(ro(Yn(r.c),s,"0"),10,e,o,!0)),o<0&&r.c[0]&&(t="-"+t)),t},f.valueOf=f.toJSON=function(){return O(this)},f._isBigNumber=!0,f[Symbol.toStringTag]="BigNumber",f[Symbol.for("nodejs.util.inspect.custom")]=f.valueOf,null!=t&&B.set(t),B}();const oo=no(0),so=no(1),ao=1e6;var io=function(e){return e[e.Mainnet=hn.Mainnet]="Mainnet",e[e.Nile=hn.Nile]="Nile",e[e.Shasta=hn.Shasta]="Shasta",e}({}),co=function(e){return e[e.TrxMainnet=`${io.Mainnet}/slip44:195`]="TrxMainnet",e[e.TrxNile=`${io.Nile}/slip44:195`]="TrxNile",e[e.TrxShasta=`${io.Shasta}/slip44:195`]="TrxShasta",e[e.UsdtMainnet=`${io.Mainnet}/trc20:TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t`]="UsdtMainnet",e[e.TrxStakedForBandwidthMainnet=`${io.Mainnet}/slip44:195-staked-for-bandwidth`]="TrxStakedForBandwidthMainnet",e[e.TrxStakedForBandwidthNile=`${io.Nile}/slip44:195-staked-for-bandwidth`]="TrxStakedForBandwidthNile",e[e.TrxStakedForBandwidthShasta=`${io.Shasta}/slip44:195-staked-for-bandwidth`]="TrxStakedForBandwidthShasta",e[e.TrxStakedForEnergyMainnet=`${io.Mainnet}/slip44:195-staked-for-energy`]="TrxStakedForEnergyMainnet",e[e.TrxStakedForEnergyNile=`${io.Nile}/slip44:195-staked-for-energy`]="TrxStakedForEnergyNile",e[e.TrxStakedForEnergyShasta=`${io.Shasta}/slip44:195-staked-for-energy`]="TrxStakedForEnergyShasta",e[e.EnergyMainnet=`${io.Mainnet}/slip44:energy`]="EnergyMainnet",e[e.EnergyNile=`${io.Nile}/slip44:energy`]="EnergyNile",e[e.EnergyShasta=`${io.Shasta}/slip44:energy`]="EnergyShasta",e[e.MaximumEnergyMainnet=`${io.Mainnet}/slip44:maximum-energy`]="MaximumEnergyMainnet",e[e.MaximumEnergyNile=`${io.Nile}/slip44:maximum-energy`]="MaximumEnergyNile",e[e.MaximumEnergyShasta=`${io.Shasta}/slip44:maximum-energy`]="MaximumEnergyShasta",e[e.BandwidthMainnet=`${io.Mainnet}/slip44:bandwidth`]="BandwidthMainnet",e[e.BandwidthNile=`${io.Nile}/slip44:bandwidth`]="BandwidthNile",e[e.BandwidthShasta=`${io.Shasta}/slip44:bandwidth`]="BandwidthShasta",e[e.MaximumBandwidthMainnet=`${io.Mainnet}/slip44:maximum-bandwidth`]="MaximumBandwidthMainnet",e[e.MaximumBandwidthNile=`${io.Nile}/slip44:maximum-bandwidth`]="MaximumBandwidthNile",e[e.MaximumBandwidthShasta=`${io.Shasta}/slip44:maximum-bandwidth`]="MaximumBandwidthShasta",e}({});const uo={fungible:!0,name:"Tron",symbol:"TRX",decimals:6,iconUrl:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png"},lo={name:"Staked for Bandwidth",symbol:"sTRX-BANDWIDTH",fungible:!0,decimals:6,iconUrl:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png"},fo={name:"Staked for Energy",symbol:"sTRX-ENERGY",fungible:!0,decimals:6,iconUrl:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png"},po={name:"Bandwidth",symbol:"BANDWIDTH",fungible:!0,decimals:0,iconUrl:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png"},ho={name:"Max Bandwidth",symbol:"MAX-BANDWIDTH",fungible:!0,decimals:0,iconUrl:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png"},go={name:"Energy",symbol:"ENERGY",fungible:!0,decimals:0,iconUrl:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png"},yo={name:"Max Energy",symbol:"MAX-ENERGY",fungible:!0,decimals:0,iconUrl:"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/info/logo.png"},mo={[co.TrxMainnet]:{id:co.TrxMainnet,...uo},[co.TrxNile]:{id:co.TrxNile,...uo},[co.TrxShasta]:{id:co.TrxShasta,...uo},[co.TrxStakedForBandwidthMainnet]:{id:co.TrxStakedForBandwidthMainnet,...lo},[co.TrxStakedForBandwidthNile]:{id:co.TrxStakedForBandwidthNile,...lo},[co.TrxStakedForBandwidthShasta]:{id:co.TrxStakedForBandwidthShasta,...lo},[co.TrxStakedForEnergyMainnet]:{id:co.TrxStakedForEnergyMainnet,...fo},[co.TrxStakedForEnergyNile]:{id:co.TrxStakedForEnergyNile,...fo},[co.TrxStakedForEnergyShasta]:{id:co.TrxStakedForEnergyShasta,...fo},[co.BandwidthMainnet]:{id:co.BandwidthMainnet,...po},[co.BandwidthNile]:{id:co.BandwidthNile,...po},[co.BandwidthShasta]:{id:co.BandwidthShasta,...po},[co.MaximumBandwidthMainnet]:{id:co.MaximumBandwidthMainnet,...ho},[co.MaximumBandwidthNile]:{id:co.MaximumBandwidthNile,...ho},[co.MaximumBandwidthShasta]:{id:co.MaximumBandwidthShasta,...ho},[co.EnergyMainnet]:{id:co.EnergyMainnet,...go},[co.EnergyNile]:{id:co.EnergyNile,...go},[co.EnergyShasta]:{id:co.EnergyShasta,...go},[co.MaximumEnergyMainnet]:{id:co.MaximumEnergyMainnet,...yo},[co.MaximumEnergyNile]:{id:co.MaximumEnergyNile,...yo},[co.MaximumEnergyShasta]:{id:co.MaximumEnergyShasta,...yo}},bo={[io.Mainnet]:{caip2Id:io.Mainnet,cluster:"mainnet",name:"Tron Mainnet",nativeToken:mo[co.TrxMainnet],stakedForBandwidth:mo[co.TrxStakedForBandwidthMainnet],stakedForEnergy:mo[co.TrxStakedForEnergyMainnet],bandwidth:mo[co.BandwidthMainnet],maximumBandwidth:mo[co.MaximumBandwidthMainnet],energy:mo[co.EnergyMainnet],maximumEnergy:mo[co.MaximumEnergyMainnet]},[io.Nile]:{caip2Id:io.Nile,cluster:"devnet",name:"Tron Nile",nativeToken:mo[co.TrxNile],stakedForBandwidth:mo[co.TrxStakedForBandwidthNile],stakedForEnergy:mo[co.TrxStakedForEnergyNile],bandwidth:mo[co.BandwidthNile],maximumBandwidth:mo[co.MaximumBandwidthNile],energy:mo[co.EnergyNile],maximumEnergy:mo[co.MaximumEnergyNile]},[io.Shasta]:{caip2Id:io.Shasta,cluster:"testnet",name:"Tron Shasta",nativeToken:mo[co.TrxShasta],stakedForBandwidth:mo[co.TrxStakedForBandwidthShasta],stakedForEnergy:mo[co.TrxStakedForEnergyShasta],bandwidth:mo[co.BandwidthShasta],maximumBandwidth:mo[co.MaximumBandwidthShasta],energy:mo[co.EnergyShasta],maximumEnergy:mo[co.MaximumEnergyShasta]}},wo=[co.TrxStakedForBandwidthMainnet,co.TrxStakedForBandwidthNile,co.TrxStakedForBandwidthShasta,co.TrxStakedForEnergyMainnet,co.TrxStakedForEnergyNile,co.TrxStakedForEnergyShasta,co.BandwidthMainnet,co.BandwidthNile,co.BandwidthShasta,co.MaximumBandwidthMainnet,co.MaximumBandwidthNile,co.MaximumBandwidthShasta,co.EnergyMainnet,co.EnergyNile,co.EnergyShasta,co.MaximumEnergyMainnet,co.MaximumEnergyNile,co.MaximumEnergyShasta],To=[co.TrxMainnet,co.TrxNile,co.TrxShasta,...wo];function Ao(e){return e&&"string"==typeof e?e.replace(/[\u0000-\u0008\u000A-\u001F\u007F]/gu,""):""}const vo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";class Po{encode(e){let t,r,n,o,s,a,i,c="",u=0;for(;u<e.length;)t=e.charCodeAt(u++),r=e.charCodeAt(u++),n=e.charCodeAt(u++),o=t>>2,s=(3&t)<<4|r>>4,a=(15&r)<<2|n>>6,i=63&n,isNaN(r)?a=i=64:isNaN(n)&&(i=64),c=c+vo.charAt(o)+vo.charAt(s)+vo.charAt(a)+vo.charAt(i);return c}encodeIgnoreUtf8(e){let t,r,n,o,s,a,i,c="",u=0;for(;u<e.length;)t=e[u++],r=e[u++],n=e[u++],o=t>>2,s=(3&t)<<4|r>>4,a=(15&r)<<2|n>>6,i=63&n,isNaN(r)?a=i=64:isNaN(n)&&(i=64),c=c+vo.charAt(o)+vo.charAt(s)+vo.charAt(a)+vo.charAt(i);return c}decode(e){let t,r,n,o,s,a,i,c="",u=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");u<e.length;)o=vo.indexOf(e.charAt(u++)),s=vo.indexOf(e.charAt(u++)),a=vo.indexOf(e.charAt(u++)),i=vo.indexOf(e.charAt(u++)),t=o<<2|s>>4,r=(15&s)<<4|a>>2,n=(3&a)<<6|i,c+=String.fromCharCode(t),64!=a&&(c+=String.fromCharCode(r)),64!=i&&(c+=String.fromCharCode(n));return this._utf8_decode(c)}decodeToByteArray(e){let t,r,n,o,s,a,i,c="",u=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");u<e.length;)o=vo.indexOf(e.charAt(u++)),s=vo.indexOf(e.charAt(u++)),a=vo.indexOf(e.charAt(u++)),i=vo.indexOf(e.charAt(u++)),t=o<<2|s>>4,r=(15&s)<<4|a>>2,n=(3&a)<<6|i,c+=String.fromCharCode(t),64!=a&&(c+=String.fromCharCode(r)),64!=i&&(c+=String.fromCharCode(n));return this._out2ByteArray(c)}_out2ByteArray(e){const t=new Array(e.length);let r=0,n=0;for(;r<e.length;)n=e.charCodeAt(r),t[r]=n,r++;return t}_utf8_encode(e){e=e.replace(/\r\n/g,"\n");let t="";for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t}_utf8_decode(e){let t="",r=0,n=0,o=0,s=0;for(;r<e.length;)n=e.charCodeAt(r),n<128?(t+=String.fromCharCode(n),r++):n>191&&n<224?(o=e.charCodeAt(r+1),t+=String.fromCharCode((31&n)<<6|63&o),r+=2):(o=e.charCodeAt(r+1),s=e.charCodeAt(r+2),t+=String.fromCharCode((15&n)<<12|(63&o)<<6|63&s),r+=3);return t}}function Eo(e){if(e<0||e>255)throw new Error("Input must be a byte");const t="0123456789ABCDEF";let r="";return r+=t.charAt(e>>4),r+=t.charAt(15&e),r}function Co(e){let t="";for(let r=0;r<e.length;r++){const n=e[r].toString(2),o=n.match(/^1+?(?=0)/);if(o&&8===n.length){const n=o[0].length;let s=e[r].toString(2).slice(7-n);for(let t=1;t<n;t++)s+=e[t+r].toString(2).slice(2);t+=String.fromCharCode(parseInt(s,2)),r+=n-1}else t+=String.fromCharCode(e[r])}return t}function Bo(e){const t=e.replace(/^0x/,"").split("");let r="";for(let e=0;e<t.length/2;e++){const n=`0x${t[2*e]}${t[2*e+1]}`;r+=String.fromCharCode(parseInt(n))}return r}function Wo(e){let t="";for(let r=0;r<e.length;r++)t+=Eo(e[r]);return t}function So(e){return(new Po).decodeToByteArray(e)}function Io(e){return(new Po).encodeIgnoreUtf8(e)}const _o=34,Oo="41",Ro=65,Mo=/^(41)/,xo="m/44'/195'",Fo=xo+"/0'/0/0";function ko(e){return Co(e)}function No(e,t,r=!1){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(r){if(e[n]!=t[n])return!1}else if(JSON.stringify(e[n])!=JSON.stringify(t[n]))return!1;return!0}function Uo(e){const t=[],r=e.length;let n;for(let o=0;o<r;o++)n=e.charCodeAt(o),n>=65536&&n<=1114111?(t.push(n>>18&7|240),t.push(n>>12&63|128),t.push(n>>6&63|128),t.push(63&n|128)):n>=2048&&n<=65535?(t.push(n>>12&15|224),t.push(n>>6&63|128),t.push(63&n|128)):n>=128&&n<=2047?(t.push(n>>6&31|192),t.push(63&n|128)):t.push(255&n);return t}function Do(e){let t;if(e>="A"&&e<="F"?t=e.charCodeAt(0)-"A".charCodeAt(0)+10:e>="a"&&e<="f"?t=e.charCodeAt(0)-"a".charCodeAt(0)+10:e>="0"&&e<="9"&&(t=e.charCodeAt(0)-"0".charCodeAt(0)),"number"==typeof t)return t;throw new Error("The passed hex char is not a valid hex char")}function Lo(e){return e>="A"&&e<="F"||e>="a"&&e<="f"||e>="0"&&e<="9"?1:0}function $o(e,t=!1){let r=e.length;t&&r%2&&(e=`0${e}`,r++);const n=[];let o=0,s=0,a=0;for(let t=0;t<r;t++){const r=e.charAt(t);if(!Lo(r))throw new Error("The passed hex char is not a valid hex string");o<<=4,o+=Do(r),s++,0==s%2&&(n[a++]=o,o=0)}return n}function zo(e){if(!/^\d{4}-\d{2}-\d{2}( \d{2}-\d{2}-\d{2}|)/.test(e))throw new Error("The passed date string is not valid");const t=e.split(" "),r=t[0].split("-"),n=parseInt(r[0],10),o=parseInt(r[1],10)-1,s=parseInt(r[2],10);if(t.length>1){const e=t[1].split("-"),r=parseInt(e[0],10),a=parseInt(e[1],10),i=parseInt(e[2],10);return new Date(n,o,s,r,a,i)}return new Date(n,o,s)}function jo(e){return e>="0"&&e<="9"?1:0}function Vo(e){if(null==e)return-1;if(0==e.length||""==e)return-1;let t=0;if(40==e.length)for(;t<40;t++){if(!Lo(e.charAt(t)))break}if(40==t)return 1;for(t=0;t<e.length;t++){if(!jo(e.charAt(t)))break}if(t==e.length)return 2;for(t=0;t<e.length;t++){if(e.charAt(t)>" ")return 3}return-1}const Go="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",Ho={};for(let e=0;e<Go.length;e++)Ho[Go.charAt(e)]=e;const Ko=58;function Zo(e){if(0===e.length)return"";let t,r;const n=[0];for(t=0;t<e.length;t++){for(r=0;r<n.length;r++)n[r]<<=8;n[0]+=e[t];let o=0;for(r=0;r<n.length;++r)n[r]+=o,o=n[r]/Ko|0,n[r]%=Ko;for(;o;)n.push(o%Ko),o=o/Ko|0}for(t=0;0===e[t]&&t<e.length-1;t++)n.push(0);return n.reverse().map((e=>Go[e])).join("")}function qo(e){if(0===e.length)return[];let t,r;const n=[0];for(t=0;t<e.length;t++){const o=e[t];if(!(o in Ho))throw new Error("Non-base58 character");for(r=0;r<n.length;r++)n[r]*=Ko;n[0]+=Ho[o];let s=0;for(r=0;r<n.length;++r)n[r]+=s,s=n[r]>>8,n[r]&=255;for(;s;)n.push(255&s),s>>=8}for(t=0;"1"===e[t]&&t<e.length-1;t++)n.push(0);return n.reverse()}const Jo="0x0000000000000000000000000000000000000000000000000000000000000000",Yo="6.13.5";function Xo(e,t,r){const n=t.split("|").map((e=>e.trim()));for(let r=0;r<n.length;r++)switch(t){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof e===t)return}const o=new Error(`invalid value for type ${t}`);throw o.code="INVALID_ARGUMENT",o.argument=`value.${r}`,o.value=e,o}async function Qo(e){const t=Object.keys(e),r=await Promise.all(t.map((t=>Promise.resolve(e[t]))));return r.reduce(((e,r,n)=>(e[t[n]]=r,e)),{})}function es(e,t,r){for(let n in t){let o=t[n];const s=r?r[n]:null;s&&Xo(o,s,n),Object.defineProperty(e,n,{enumerable:!0,value:o,writable:!1})}}function ts(e){if(null==e)return"null";if(Array.isArray(e))return"[ "+e.map(ts).join(", ")+" ]";if(e instanceof Uint8Array){const t="0123456789abcdef";let r="0x";for(let n=0;n<e.length;n++)r+=t[e[n]>>4],r+=t[15&e[n]];return r}if("object"==typeof e&&"function"==typeof e.toJSON)return ts(e.toJSON());switch(typeof e){case"boolean":case"symbol":case"number":return e.toString();case"bigint":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const t=Object.keys(e);return t.sort(),"{ "+t.map((t=>`${ts(t)}: ${ts(e[t])}`)).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function rs(e,t){return e&&e.code===t}function ns(e,t,r){let n,o=e;{const n=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${ts(r)}`);for(const e in r){if("shortMessage"===e)continue;const t=r[e];n.push(e+"="+ts(t))}}n.push(`code=${t}`),n.push(`version=${Yo}`),n.length&&(e+=" ("+n.join(", ")+")")}switch(t){case"INVALID_ARGUMENT":n=new TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":n=new RangeError(e);break;default:n=new Error(e)}return es(n,{code:t}),r&&Object.assign(n,r),null==n.shortMessage&&es(n,{shortMessage:o}),n}function os(e,t,r,n){if(!e)throw ns(t,r,n)}function ss(e,t,r,n){os(e,t,"INVALID_ARGUMENT",{argument:r,value:n})}function as(e,t,r){null==r&&(r=""),r&&(r=": "+r),os(e>=t,"missing argument"+r,"MISSING_ARGUMENT",{count:e,expectedCount:t}),os(e<=t,"too many arguments"+r,"UNEXPECTED_ARGUMENT",{count:e,expectedCount:t})}const is=["NFD","NFC","NFKD","NFKC"].reduce(((e,t)=>{try{if("test"!=="test".normalize(t))throw new Error("bad");if("NFD"===t){const e=String.fromCharCode(233).normalize("NFD");if(e!==String.fromCharCode(101,769))throw new Error("broken")}e.push(t)}catch(e){}return e}),[]);function cs(e){os(is.indexOf(e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:e}})}function us(e,t,r){if(null==r&&(r=""),e!==t){let e=r,t="new";r&&(e+=".",t+=" "+r),os(!1,`private constructor; use ${e}from* methods`,"UNSUPPORTED_OPERATION",{operation:t})}}function ls(e,t,r){if(e instanceof Uint8Array)return r?new Uint8Array(e):e;if("string"==typeof e&&e.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const t=new Uint8Array((e.length-2)/2);let r=2;for(let n=0;n<t.length;n++)t[n]=parseInt(e.substring(r,r+2),16),r+=2;return t}ss(!1,"invalid BytesLike value",t||"value",e)}function ds(e,t){return ls(e,t,!1)}function fs(e,t){return ls(e,t,!0)}function ps(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(("number"!=typeof t||e.length===2+2*t)&&(!0!==t||e.length%2==0))}function hs(e){return ps(e,!0)||e instanceof Uint8Array}const gs="0123456789abcdef";function ys(e){const t=ds(e);let r="0x";for(let e=0;e<t.length;e++){const n=t[e];r+=gs[(240&n)>>4]+gs[15&n]}return r}function ms(e){return"0x"+e.map((e=>ys(e).substring(2))).join("")}function bs(e){return ps(e,!0)?(e.length-2)/2:ds(e).length}function ws(e,t,r){const n=ds(e);return null!=r&&r>n.length&&os(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r}),ys(n.slice(null==t?0:t,null==r?n.length:r))}function Ts(e,t,r){const n=ds(e);os(t>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:t,offset:t+1});const o=new Uint8Array(t);return o.fill(0),r?o.set(n,t-n.length):o.set(n,0),ys(o)}function As(e,t){return Ts(e,t,!0)}const vs=BigInt(0),Ps=BigInt(1),Es=9007199254740991;function Cs(e,t){let r=Ws(e,"value");const n=BigInt(Os(t,"width")),o=Ps<<n-Ps;if(r<vs){r=-r,os(r<=o,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:e});return(~r&(Ps<<n)-Ps)+Ps}return os(r<o,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:e}),r}function Bs(e,t){const r=Ss(e,"value"),n=BigInt(Os(t,"bits"));return r&(Ps<<n)-Ps}function Ws(e,t){switch(typeof e){case"bigint":return e;case"number":return ss(Number.isInteger(e),"underflow",t||"value",e),ss(e>=-Es&&e<=Es,"overflow",t||"value",e),BigInt(e);case"string":try{if(""===e)throw new Error("empty string");return"-"===e[0]&&"-"!==e[1]?-BigInt(e.substring(1)):BigInt(e)}catch(r){ss(!1,`invalid BigNumberish string: ${r.message}`,t||"value",e)}}ss(!1,"invalid BigNumberish value",t||"value",e)}function Ss(e,t){const r=Ws(e,t);return os(r>=vs,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),r}const Is="0123456789abcdef";function _s(e){if(e instanceof Uint8Array){let t="0x0";for(const r of e)t+=Is[r>>4],t+=Is[15&r];return BigInt(t)}return Ws(e)}function Os(e,t){switch(typeof e){case"bigint":return ss(e>=-Es&&e<=Es,"overflow",t||"value",e),Number(e);case"number":return ss(Number.isInteger(e),"underflow",t||"value",e),ss(e>=-Es&&e<=Es,"overflow",t||"value",e),e;case"string":try{if(""===e)throw new Error("empty string");return Os(BigInt(e),t)}catch(r){ss(!1,`invalid numeric string: ${r.message}`,t||"value",e)}}ss(!1,"invalid numeric value",t||"value",e)}function Rs(e,t){let r=Ss(e,"value").toString(16);if(null==t)r.length%2&&(r="0"+r);else{const n=Os(t,"width");for(os(2*n>=r.length,`value exceeds width (${n} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:e});r.length<2*n;)r="0"+r}return"0x"+r}function Ms(e){const t=Ss(e,"value");if(t===vs)return new Uint8Array([]);let r=t.toString(16);r.length%2&&(r="0"+r);const n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){const t=2*e;n[e]=parseInt(r.substring(t,t+2),16)}return n}function xs(e){let t=ys(hs(e)?e:Ms(e)).substring(2);for(;t.startsWith("0");)t=t.substring(1);return""===t&&(t="0"),"0x"+t}const Fs=BigInt(0),ks=BigInt(1),Ns=BigInt(2),Us=BigInt(27),Ds=BigInt(28),Ls=BigInt(35),$s={};function zs(e){return As(Ms(e),32)}class js{#e;#t;#r;#n;get r(){return this.#e}set r(e){ss(32===bs(e),"invalid r","value",e),this.#e=ys(e)}get s(){return this.#t}set s(e){ss(32===bs(e),"invalid s","value",e);const t=ys(e);ss(parseInt(t.substring(0,3))<8,"non-canonical s","value",t),this.#t=t}get v(){return this.#r}set v(e){const t=Os(e,"value");ss(27===t||28===t,"invalid v","v",e),this.#r=t}get networkV(){return this.#n}get legacyChainId(){const e=this.networkV;return null==e?null:js.getChainId(e)}get yParity(){return 27===this.v?0:1}get yParityAndS(){const e=ds(this.s);return this.yParity&&(e[0]|=128),ys(e)}get compactSerialized(){return ms([this.r,this.yParityAndS])}get serialized(){return ms([this.r,this.s,this.yParity?"0x1c":"0x1b"])}constructor(e,t,r,n){us(e,$s,"Signature"),this.#e=t,this.#t=r,this.#r=n,this.#n=null}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new js($s,this.r,this.s,this.v);return this.networkV&&(e.#n=this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:null!=e?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const t=Ws(e,"v");return t==Us||t==Ds?Fs:(ss(t>=Ls,"invalid EIP-155 v","v",e),(t-Ls)/Ns)}static getChainIdV(e,t){return Ws(e)*Ns+BigInt(35+t-27)}static getNormalizedV(e){const t=Ws(e);return t===Fs||t===Us?27:t===ks||t===Ds?28:(ss(t>=Ls,"invalid v","v",e),t&ks?27:28)}static from(e){function t(t,r){ss(t,r,"signature",e)}if(null==e)return new js($s,Jo,Jo,27);if("string"==typeof e){const r=ds(e,"signature");if(64===r.length){const e=ys(r.slice(0,32)),t=r.slice(32,64),n=128&t[0]?28:27;return t[0]&=127,new js($s,e,ys(t),n)}if(65===r.length){const e=ys(r.slice(0,32)),n=r.slice(32,64);t(!(128&n[0]),"non-canonical s");const o=js.getNormalizedV(r[64]);return new js($s,e,ys(n),o)}t(!1,"invalid raw signature length")}if(e instanceof js)return e.clone();const r=e.r;t(null!=r,"missing r");const n=zs(r),o=function(e,r){if(null!=e)return zs(e);if(null!=r){t(ps(r,32),"invalid yParityAndS");const e=ds(r);return e[0]&=127,ys(e)}t(!1,"missing s")}(e.s,e.yParityAndS);t(!(128&ds(o)[0]),"non-canonical s");const{networkV:s,v:a}=function(e,r,n){if(null!=e){const t=Ws(e);return{networkV:t>=Ls?t:void 0,v:js.getNormalizedV(t)}}if(null!=r)return t(ps(r,32),"invalid yParityAndS"),{v:128&ds(r)[0]?28:27};if(null!=n){switch(Os(n,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}t(!1,"invalid yParity")}t(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),i=new js($s,n,o,a);return s&&(i.#n=s),t(null==e.yParity||Os(e.yParity,"sig.yParity")===i.yParity,"yParity mismatch"),t(null==e.yParityAndS||e.yParityAndS===i.yParityAndS,"yParityAndS mismatch"),i}}function Vs(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function Gs(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function Hs(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");Vs(e.outputLen),Vs(e.blockLen)}function Ks(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Zs(e,t){Gs(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const qs=e=>e instanceof Uint8Array,Js=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),Ys=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Xs=(e,t)=>e<<32-t|e>>>t;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));const Qs=async()=>{};async function ea(e,t,r){let n=Date.now();for(let o=0;o<e;o++){r(o);const e=Date.now()-n;e>=0&&e<t||(await Qs(),n+=e)}}function ta(e){if("string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),!qs(e))throw new Error("expected Uint8Array, got "+typeof e);return e}class ra{clone(){return this._cloneInto()}}const na={}.toString;function oa(e,t){if(void 0!==t&&"[object Object]"!==na.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)}function sa(e){const t=t=>e().update(ta(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}class aa extends ra{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,Hs(e);const r=ta(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,o=new Uint8Array(n);o.set(r.length>n?e.create().update(r).digest():r);for(let e=0;e<o.length;e++)o[e]^=54;this.iHash.update(o),this.oHash=e.create();for(let e=0;e<o.length;e++)o[e]^=106;this.oHash.update(o),o.fill(0)}update(e){return Ks(this),this.iHash.update(e),this}digestInto(e){Ks(this),Gs(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:o,blockLen:s,outputLen:a}=this;return e.finished=n,e.destroyed=o,e.blockLen=s,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const ia=(e,t,r)=>new aa(e,t).update(r).digest();function ca(e,t,r,n){Hs(e);const o=oa({dkLen:32,asyncTick:10},n),{c:s,dkLen:a,asyncTick:i}=o;if(Vs(s),Vs(a),Vs(i),s<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const c=ta(t),u=ta(r),l=new Uint8Array(a),d=ia.create(e,c),f=d._cloneInto().update(u);return{c:s,dkLen:a,asyncTick:i,DK:l,PRF:d,PRFSalt:f}}function ua(e,t,r,n,o){return e.destroy(),t.destroy(),n&&n.destroy(),o.fill(0),r}function la(e,t,r,n){const{c:o,dkLen:s,DK:a,PRF:i,PRFSalt:c}=ca(e,t,r,n);let u;const l=new Uint8Array(4),d=Ys(l),f=new Uint8Array(i.outputLen);for(let e=1,t=0;t<s;e++,t+=i.outputLen){const r=a.subarray(t,t+i.outputLen);d.setInt32(0,e,!1),(u=c._cloneInto(u)).update(l).digestInto(f),r.set(f.subarray(0,r.length));for(let e=1;e<o;e++){i._cloneInto(u).update(f).digestInto(f);for(let e=0;e<r.length;e++)r[e]^=f[e]}}return ua(i,c,a,u,f)}ia.create=(e,t)=>new aa(e,t);class da extends ra{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Ys(this.buffer)}update(e){Ks(this);const{view:t,buffer:r,blockLen:n}=this,o=(e=ta(e)).length;for(let s=0;s<o;){const a=Math.min(n-this.pos,o-s);if(a!==n)r.set(e.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===n&&(this.process(t,0),this.pos=0);else{const t=Ys(e);for(;n<=o-s;s+=n)this.process(t,s)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){Ks(this),Zs(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:o}=this;let{pos:s}=this;t[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>n-s&&(this.process(r,0),s=0);for(let e=s;e<n;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const o=BigInt(32),s=BigInt(4294967295),a=Number(r>>o&s),i=Number(r&s),c=n?4:0,u=n?0:4;e.setUint32(t+c,a,n),e.setUint32(t+u,i,n)}(r,n-8,BigInt(8*this.length),o),this.process(r,0);const a=Ys(e),i=this.outputLen;if(i%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=i/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)a.setUint32(4*e,u[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:o,destroyed:s,pos:a}=this;return e.length=n,e.pos=a,e.finished=o,e.destroyed=s,n%t&&e.buffer.set(r),e}}const fa=(e,t,r)=>e&t^~e&r,pa=(e,t,r)=>e&t^e&r^t&r,ha=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ga=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ya=new Uint32Array(64);class ma extends da{constructor(){super(64,32,8,!1),this.A=0|ga[0],this.B=0|ga[1],this.C=0|ga[2],this.D=0|ga[3],this.E=0|ga[4],this.F=0|ga[5],this.G=0|ga[6],this.H=0|ga[7]}get(){const{A:e,B:t,C:r,D:n,E:o,F:s,G:a,H:i}=this;return[e,t,r,n,o,s,a,i]}set(e,t,r,n,o,s,a,i){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|s,this.G=0|a,this.H=0|i}process(e,t){for(let r=0;r<16;r++,t+=4)ya[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=ya[e-15],r=ya[e-2],n=Xs(t,7)^Xs(t,18)^t>>>3,o=Xs(r,17)^Xs(r,19)^r>>>10;ya[e]=o+ya[e-7]+n+ya[e-16]|0}let{A:r,B:n,C:o,D:s,E:a,F:i,G:c,H:u}=this;for(let e=0;e<64;e++){const t=u+(Xs(a,6)^Xs(a,11)^Xs(a,25))+fa(a,i,c)+ha[e]+ya[e]|0,l=(Xs(r,2)^Xs(r,13)^Xs(r,22))+pa(r,n,o)|0;u=c,c=i,i=a,a=s+t|0,s=o,o=n,n=r,r=t+l|0}r=r+this.A|0,n=n+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,i=i+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(r,n,o,s,a,i,c,u)}roundClean(){ya.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const ba=sa((()=>new ma)),wa=BigInt(2**32-1),Ta=BigInt(32);function Aa(e,t=!1){return t?{h:Number(e&wa),l:Number(e>>Ta&wa)}:{h:0|Number(e>>Ta&wa),l:0|Number(e&wa)}}function va(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:s,l:a}=Aa(e[o],t);[r[o],n[o]]=[s,a]}return[r,n]}const Pa=(e,t,r)=>e<<r|t>>>32-r,Ea=(e,t,r)=>t<<r|e>>>32-r,Ca=(e,t,r)=>t<<r-32|e>>>64-r,Ba=(e,t,r)=>e<<r-32|t>>>64-r;const Wa={fromBig:Aa,split:va,toBig:(e,t)=>BigInt(e>>>0)<<Ta|BigInt(t>>>0),shrSH:(e,t,r)=>e>>>r,shrSL:(e,t,r)=>e<<32-r|t>>>r,rotrSH:(e,t,r)=>e>>>r|t<<32-r,rotrSL:(e,t,r)=>e<<32-r|t>>>r,rotrBH:(e,t,r)=>e<<64-r|t>>>r-32,rotrBL:(e,t,r)=>e>>>r-32|t<<64-r,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:Pa,rotlSL:Ea,rotlBH:Ca,rotlBL:Ba,add:function(e,t,r,n){const o=(t>>>0)+(n>>>0);return{h:e+r+(o/2**32|0)|0,l:0|o}},add3L:(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),add3H:(e,t,r,n)=>t+r+n+(e/2**32|0)|0,add4L:(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),add4H:(e,t,r,n,o)=>t+r+n+o+(e/2**32|0)|0,add5H:(e,t,r,n,o,s)=>t+r+n+o+s+(e/2**32|0)|0,add5L:(e,t,r,n,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(o>>>0)},Sa=Wa,[Ia,_a]=Sa.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))),Oa=new Uint32Array(80),Ra=new Uint32Array(80);class Ma extends da{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:r,Bl:n,Ch:o,Cl:s,Dh:a,Dl:i,Eh:c,El:u,Fh:l,Fl:d,Gh:f,Gl:p,Hh:h,Hl:g}=this;return[e,t,r,n,o,s,a,i,c,u,l,d,f,p,h,g]}set(e,t,r,n,o,s,a,i,c,u,l,d,f,p,h,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|o,this.Cl=0|s,this.Dh=0|a,this.Dl=0|i,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|d,this.Gh=0|f,this.Gl=0|p,this.Hh=0|h,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)Oa[r]=e.getUint32(t),Ra[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|Oa[e-15],r=0|Ra[e-15],n=Sa.rotrSH(t,r,1)^Sa.rotrSH(t,r,8)^Sa.shrSH(t,r,7),o=Sa.rotrSL(t,r,1)^Sa.rotrSL(t,r,8)^Sa.shrSL(t,r,7),s=0|Oa[e-2],a=0|Ra[e-2],i=Sa.rotrSH(s,a,19)^Sa.rotrBH(s,a,61)^Sa.shrSH(s,a,6),c=Sa.rotrSL(s,a,19)^Sa.rotrBL(s,a,61)^Sa.shrSL(s,a,6),u=Sa.add4L(o,c,Ra[e-7],Ra[e-16]),l=Sa.add4H(u,n,i,Oa[e-7],Oa[e-16]);Oa[e]=0|l,Ra[e]=0|u}let{Ah:r,Al:n,Bh:o,Bl:s,Ch:a,Cl:i,Dh:c,Dl:u,Eh:l,El:d,Fh:f,Fl:p,Gh:h,Gl:g,Hh:y,Hl:m}=this;for(let e=0;e<80;e++){const t=Sa.rotrSH(l,d,14)^Sa.rotrSH(l,d,18)^Sa.rotrBH(l,d,41),b=Sa.rotrSL(l,d,14)^Sa.rotrSL(l,d,18)^Sa.rotrBL(l,d,41),w=l&f^~l&h,T=d&p^~d&g,A=Sa.add5L(m,b,T,_a[e],Ra[e]),v=Sa.add5H(A,y,t,w,Ia[e],Oa[e]),P=0|A,E=Sa.rotrSH(r,n,28)^Sa.rotrBH(r,n,34)^Sa.rotrBH(r,n,39),C=Sa.rotrSL(r,n,28)^Sa.rotrBL(r,n,34)^Sa.rotrBL(r,n,39),B=r&o^r&a^o&a,W=n&s^n&i^s&i;y=0|h,m=0|g,h=0|f,g=0|p,f=0|l,p=0|d,({h:l,l:d}=Sa.add(0|c,0|u,0|v,0|P)),c=0|a,u=0|i,a=0|o,i=0|s,o=0|r,s=0|n;const S=Sa.add3L(P,C,W);r=Sa.add3H(S,v,E,B),n=0|S}({h:r,l:n}=Sa.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l:s}=Sa.add(0|this.Bh,0|this.Bl,0|o,0|s)),({h:a,l:i}=Sa.add(0|this.Ch,0|this.Cl,0|a,0|i)),({h:c,l:u}=Sa.add(0|this.Dh,0|this.Dl,0|c,0|u)),({h:l,l:d}=Sa.add(0|this.Eh,0|this.El,0|l,0|d)),({h:f,l:p}=Sa.add(0|this.Fh,0|this.Fl,0|f,0|p)),({h,l:g}=Sa.add(0|this.Gh,0|this.Gl,0|h,0|g)),({h:y,l:m}=Sa.add(0|this.Hh,0|this.Hl,0|y,0|m)),this.set(r,n,o,s,a,i,c,u,l,d,f,p,h,g,y,m)}roundClean(){Oa.fill(0),Ra.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const xa=sa((()=>new Ma));const Fa=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}(),ka=Fa.crypto||Fa.msCrypto;function Na(e){switch(e){case"sha256":return ba.create();case"sha512":return xa.create()}ss(!1,"invalid hashing algorithm name","algorithm",e)}const Ua=function(e){return Na("sha256").update(e).digest()},Da=function(e){return Na("sha512").update(e).digest()};let La=Ua,$a=Da,za=!1,ja=!1;function Va(e){const t=ds(e,"data");return ys(La(t))}function Ga(e){const t=ds(e,"data");return ys($a(t))}Va._=Ua,Va.lock=function(){za=!0},Va.register=function(e){if(za)throw new Error("sha256 is locked");La=e},Object.freeze(Va),Ga._=Da,Ga.lock=function(){ja=!0},Ga.register=function(e){if(ja)throw new Error("sha512 is locked");$a=e},Object.freeze(Va);let Ha=!1;const Ka=function(e,t,r,n,o){return function(e,t,r,n,o){const s={sha256:ba,sha512:xa}[o];return ss(null!=s,"invalid pbkdf2 algorithm","algorithm",o),la(s,e,t,{c:r,dkLen:n})}(e,t,r,n,o)};let Za=Ka;function qa(e,t,r,n,o){const s=ds(e,"password"),a=ds(t,"salt");return ys(Za(s,a,r,n,o))}function Ja(e,t,r,n,o){if("BAD_PREFIX"===e||"UNEXPECTED_CONTINUE"===e){let e=0;for(let n=t+1;n<r.length&&r[n]>>6==2;n++)e++;return e}return"OVERRUN"===e?r.length-t-1:0}qa._=Ka,qa.lock=function(){Ha=!0},qa.register=function(e){if(Ha)throw new Error("pbkdf2 is locked");Za=e},Object.freeze(qa);const Ya=Object.freeze({error:function(e,t,r,n,o){ss(!1,`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:Ja,replace:function(e,t,r,n,o){return"OVERLONG"===e?(ss("number"==typeof o,"invalid bad code point for replacement","badCodepoint",o),n.push(o),0):(n.push(65533),Ja(e,t,r))}});function Xa(e,t){null==t&&(t=Ya.error);const r=ds(e,"bytes"),n=[];let o=0;for(;o<r.length;){const e=r[o++];if(!(e>>7)){n.push(e);continue}let s=null,a=null;if(192==(224&e))s=1,a=127;else if(224==(240&e))s=2,a=2047;else{if(240!=(248&e)){o+=t(128==(192&e)?"UNEXPECTED_CONTINUE":"BAD_PREFIX",o-1,r,n);continue}s=3,a=65535}if(o-1+s>=r.length){o+=t("OVERRUN",o-1,r,n);continue}let i=e&(1<<8-s-1)-1;for(let e=0;e<s;e++){let e=r[o];if(128!=(192&e)){o+=t("MISSING_CONTINUE",o,r,n),i=null;break}i=i<<6|63&e,o++}null!==i&&(i>1114111?o+=t("OUT_OF_RANGE",o-1-s,r,n,i):i>=55296&&i<=57343?o+=t("UTF16_SURROGATE",o-1-s,r,n,i):i<=a?o+=t("OVERLONG",o-1-s,r,n,i):n.push(i))}return n}function Qa(e,t){ss("string"==typeof e,"invalid string value","str",e),null!=t&&(cs(t),e=e.normalize(t));let r=[];for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<128)r.push(n);else if(n<2048)r.push(n>>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const o=e.charCodeAt(t);ss(t<e.length&&56320==(64512&o),"invalid surrogate pair","str",e);const s=65536+((1023&n)<<10)+(1023&o);r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(63&s|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return new Uint8Array(r)}function ei(e,t){return Xa(e,t).map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}const[ti,ri,ni]=[[],[],[]],oi=BigInt(0),si=BigInt(1),ai=BigInt(2),ii=BigInt(7),ci=BigInt(256),ui=BigInt(113);for(let e=0,t=si,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],ti.push(2*(5*n+r)),ri.push((e+1)*(e+2)/2%64);let o=oi;for(let e=0;e<7;e++)t=(t<<si^(t>>ii)*ui)%ci,t&ai&&(o^=si<<(si<<BigInt(e))-si);ni.push(o)}const[li,di]=va(ni,!0),fi=(e,t,r)=>r>32?Ca(e,t,r):Pa(e,t,r),pi=(e,t,r)=>r>32?Ba(e,t,r):Ea(e,t,r);class hi extends ra{constructor(e,t,r,n=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Vs(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Js(this.state)}keccak(){!function(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,o=(t+2)%10,s=r[o],a=r[o+1],i=fi(s,a,1)^r[n],c=pi(s,a,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=i,e[t+r+1]^=c}let t=e[2],o=e[3];for(let r=0;r<24;r++){const n=ri[r],s=fi(t,o,n),a=pi(t,o,n),i=ti[r];t=e[i],o=e[i+1],e[i]=s,e[i+1]=a}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=li[n],e[1]^=di[n]}r.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){Ks(this);const{blockLen:t,state:r}=this,n=(e=ta(e)).length;for(let o=0;o<n;){const s=Math.min(t-this.pos,n-o);for(let t=0;t<s;t++)r[this.pos++]^=e[o++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,128&t&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){Ks(this,!1),Gs(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,o=e.length;n<o;){this.posOut>=r&&this.keccak();const s=Math.min(r-this.posOut,o-n);e.set(t.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Vs(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Zs(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:o,enableXOF:s}=this;return e||(e=new hi(t,r,n,s,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=r,e.outputLen=n,e.enableXOF=s,e.destroyed=this.destroyed,e}}const gi=(e,t,r)=>sa((()=>new hi(t,e,r))),yi=gi(1,136,32);let mi=!1;const bi=function(e){return yi(e)};let wi=bi;function Ti(e){const t=ds(e,"data");return ys(wi(t))}function Ai(e){return Ti(Qa(e))}Ti._=bi,Ti.lock=function(){mi=!0},Ti.register=function(e){if(mi)throw new TypeError("keccak256 is locked");wi=e},Object.freeze(Ti);const vi=" !#$%&'()*+,-./<=>?@[]^_`{|}~",Pi=/^[a-z]*$/i;function Ei(e,t){let r=97;return e.reduce(((e,n)=>(n===t?r++:n.match(Pi)?e.push(String.fromCharCode(r)+n):(r=97,e.push(n)),e)),[])}function Ci(e){return ss("0"===e[0],"unsupported auwl data","data",e),function(e,t){for(let r=28;r>=0;r--)e=e.split(vi[r]).join(t.substring(2*r,2*r+2));const r=[],n=e.replace(/(:|([0-9])|([A-Z][a-z]*))/g,((e,t,n,o)=>{if(n)for(let e=parseInt(n);e>=0;e--)r.push(";");else r.push(t.toLowerCase());return""}));if(n)throw new Error(`leftovers: ${JSON.stringify(n)}`);return Ei(Ei(r,";"),":")}(e.substring(59),e.substring(1,59))}class Bi{locale;constructor(e){es(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}class Wi extends Bi{#o;#s;constructor(e,t,r){super(e),this.#o=t,this.#s=r,this.#a=null}get _data(){return this.#o}_decodeWords(){return Ci(this.#o)}#a;#i(){if(null==this.#a){const e=this._decodeWords();if(Ai(e.join("\n")+"\n")!==this.#s)throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);this.#a=e}return this.#a}getWord(e){const t=this.#i();return ss(e>=0&&e<t.length,`invalid word index: ${e}`,"index",e),t[e]}getWordIndex(e){return this.#i().indexOf(e)}}let Si=null;class Ii extends Wi{constructor(){super("en","0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN<aNn RRelyRga(R*lSeS-SketTt!3A^AnAutyCau'ComeEfF%eG(Ha=H(dLie=LowLtN^Nef./TrayTt Twe&Y#d3Cyc!DKeNdOlogyRdR`Tt _{AdeAmeAnketA,EakE[IndOodO[omOu'UeUrUsh_rdAtDyIlMbNeNusOkO,Rd R(gRrowSsTtomUn)XY_{etA(AndA[A=EadEezeI{Id+IefIghtIngIskOccoliOk&OnzeOomO` OwnUsh2Bb!DdyD+tFf$oIldLbLkL!tNd!Nk Rd&Rg R,SS(e[SyTt Y Zz:Bba+B(B!CtusGeKe~LmM aMpNN$N)lNdyNn#NoeNvasNy#Pab!P.$Pta(RRb#RdRgoRpetRryRtSeShS(o/!Su$TT$ogT^Teg%yTt!UghtU'Ut]Ve3Il(gL yM|NsusNturyRe$Rta(_irAlkAmp]An+AosApt Ar+A'AtEapE{Ee'EfErryE,I{&IefIldIm}yOi)Oo'R#-U{!UnkUrn0G?Nnam#Rc!Tiz&TyVil_imApArifyAwAyE<ErkEv I{I|IffImbIn-IpO{OgO'O`OudOwnUbUmpU, Ut^_^A,C#utDeFfeeIlInL!@L%LumnMb(eMeMf%tM-Mm#Mp<yNc tNdu@NfirmNg*[N}@Nsid NtrolNv()OkOlPp PyR$ReRnR*@/Tt#U^UntryUp!Ur'Us(V Yo>_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M<dMi'Ni$Nti,NyP?tP&dPos.P`PutyRi=ScribeS tSignSkSpair/royTailTe@VelopVi)Vo>3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-Eg<tEm|Eph<tEvat%I>Se0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-P<dPe@Pi*Pla(Po'P*[T&dTra0EEbrow:Br-CeCultyDeIntI`~L'MeMilyMousNNcyNtasyRmSh]TT$Th TigueUltV%.e3Atu*Bru?yD $EEdElMa!N)/iv$T^V W3B Ct]EldGu*LeLmLt N$NdNeNg NishReRmR,Sc$ShTT}[X_gAmeAshAtAv%EeIghtIpOatO{O%Ow UidUshY_mCusGIlLd~owOdOtR)Re,R+tRkRtu}RumRw?dSsil/ UndX_gi!AmeEqu|EshI&dIn+OgOntO,OwnOz&U.2ElNNnyRna)RyTu*:D+tInLaxy~ yMePRa+Rba+Rd&Rl-Rm|SSpTeTh U+Ze3N $NiusN*Nt!Nu(e/u*2O,0AntFtGg!Ng RaffeRlVe_dAn)A*A[IdeImp'ObeOomOryO=OwUe_tDde[LdOdO'RillaSpelSsipV nWn_bA)A(AntApeA[Av.yEatE&IdIefItOc yOupOwUnt_rdE[IdeIltIt?N3M:B.IrLfMm M, NdPpyRb%RdRshR=,TVeWkZ?d3AdAl`ArtAvyD+hogIght~oLmetLpNRo3Dd&Gh~NtPRe/%y5BbyCkeyLdLeLiday~owMeNeyOdPeRnRr%R'Sp.$/TelUrV 5BGeM<Mb!M%Nd*dNgryNtRd!RryRtSb<d3Brid:1EOn0EaEntifyLe2N%e4LLeg$L}[0A+Ita>M&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryF<tFl-tF%mHa!H .Iti$Je@JuryMa>N Noc|PutQuiryS<eSe@SideSpi*/$lTa@T e,ToVe,V.eVol=3On0L<dOla>Sue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurE<Tob 0Or1FF Fi)T&2L1Ay0DI=Ymp-0It0CeEI#L(eLy1EnEraIn]Po'T]1An+B.Ch?dD D(?yG<I|Ig($Ph<0Tr-h0H 0Tdo%T TputTside0AlEnEr0NN 0Yg&0/ 0O}:CtDd!GeIrLa)LmNdaNelN-N` P RadeR|RkRrotRtySsT^ThTi|TrolTt nU'VeYm|3A)AnutArAs<tL-<NN$tyNcilOp!Pp Rfe@Rm.Rs#T2O}OtoRa'Ys-$0AnoCn-Ctu*E)GGe#~LotNkO} Pe/olT^Zza_)A}tA,-A>AyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOg<OtOwUsh0AllArtI!OkeOo`0A{AkeApIffOw0ApCc Ci$CkDaFtL?Ldi LidLut]L=Me#eNgOnRryRtUlUndUpUr)U`0A)A*Ati$AwnEakEci$EedEllEndH eI)Id IkeInIr.L.OilOns%O#OrtOtRayReadR(gY0Ua*UeezeUir*l_b!AdiumAffA+AirsAmpAndArtA>AyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NN<tNnisNtRm/Xt_nkAtEmeEnE%yE*EyIngIsOughtReeRi=RowUmbUnd 0CketDeG LtMb MeNyPRedSsueT!5A,BaccoDayDdl EGe` I!tK&MatoM%rowNeNgueNightOlO`PP-Pp!R^RnadoRtoi'SsT$Uri,W?dW WnY_{AdeAff-Ag-A(Ansf ApAshA=lAyEatEeEndI$IbeI{Igg ImIpOphyOub!U{UeUlyUmpetU,U`Y2BeIt]Mb!NaN}lRkeyRnRt!1El=EntyI)InI,O1PeP-$:5Ly5B*lla0Ab!Awa*C!Cov D DoFairFoldHappyIf%mIqueItIv 'KnownLo{TilUsu$Veil1Da>GradeHoldOnP Set1B<Ge0A+EEdEfulE![U$0Il.y:C<tCuumGueLidL!yL=NNishP%Rious/Ult3H-!L=tNd%Ntu*NueRbRifyRs]RyS'lT <3Ab!Br<tCiousCt%yDeoEw~a+Nta+Ol(Rtu$RusSaS.Su$T$Vid5C$I)IdLc<oLumeTeYa+:GeG#ItLk~LnutNtRfa*RmRri%ShSp/eT VeY3Al`Ap#ArA'lA` BDd(gEk&dIrdLcome/T_!AtEatEelEnE*IpIsp 0DeD`FeLd~NNdowNeNgNkNn Nt ReSdomSeShT}[5LfM<Nd OdOlRdRkRldRryR`_pE{E,!I,I>Ong::Rd3Ar~ow9UUngU`:3BraRo9NeO","0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60")}static wordlist(){return null==Si&&(Si=new Ii),Si}}function _i(e){return(1<<e)-1<<8-e&255}function Oi(e,t){cs("NFKD"),null==t&&(t=Ii.wordlist());const r=t.split(e);ss(r.length%3==0&&r.length>=12&&r.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");const n=new Uint8Array(Math.ceil(11*r.length/8));let o=0;for(let e=0;e<r.length;e++){let s=t.getWordIndex(r[e].normalize("NFKD"));ss(s>=0,`invalid mnemonic word at index ${e}`,"mnemonic","[ REDACTED ]");for(let e=0;e<11;e++)s&1<<10-e&&(n[o>>3]|=1<<7-o%8),o++}const s=32*r.length/3,a=_i(r.length/3);return ss((ds(Va(n.slice(0,s/8)))[0]&a)===(n[n.length-1]&a),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),ys(n.slice(0,s/8))}function Ri(e,t){ss(e.length%4==0&&e.length>=16&&e.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),null==t&&(t=Ii.wordlist());const r=[0];let n=11;for(let t=0;t<e.length;t++)n>8?(r[r.length-1]<<=8,r[r.length-1]|=e[t],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[t]>>8-n,r.push(e[t]&((1<<8-n)-1&255)),n+=3);const o=e.length/4,s=parseInt(Va(e).substring(2,4),16)&_i(o);return r[r.length-1]<<=o,r[r.length-1]|=s>>8-o,t.join(r.map((e=>t.getWord(e))))}const Mi={};class xi{phrase;password;wordlist;entropy;constructor(e,t,r,n,o){null==n&&(n=""),null==o&&(o=Ii.wordlist()),us(e,Mi,"Mnemonic"),es(this,{phrase:r,password:n,wordlist:o,entropy:t})}computeSeed(){const e=Qa("mnemonic"+this.password,"NFKD");return qa(Qa(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,t,r){const n=Oi(e,r);return e=Ri(ds(n),r),new xi(Mi,n,e,t,r)}static fromEntropy(e,t,r){const n=ds(e,"entropy"),o=Ri(n,r);return new xi(Mi,ys(n),o,t,r)}static entropyToPhrase(e,t){return Ri(ds(e,"entropy"),t)}static phraseToEntropy(e,t){return Oi(e,t)}static isValidMnemonic(e,t){try{return Oi(e,t),!0}catch(e){}return!1}}let Fi=!1;const ki=function(e,t,r){return function(e,t){const r={sha256:ba,sha512:xa}[e];return ss(null!=r,"invalid hmac algorithm","algorithm",e),ia.create(r,t)}(e,t).update(r).digest()};let Ni=ki;function Ui(e,t,r){const n=ds(t,"key"),o=ds(r,"data");return ys(Ni(e,n,o))}Ui._=ki,Ui.lock=function(){Fi=!0},Ui.register=function(e){if(Fi)throw new Error("computeHmac is locked");Ni=e},Object.freeze(Ui);const Di=BigInt(0),Li=BigInt(36);function $i(e){const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const n=ds(Ti(r));for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const zi={};for(let e=0;e<10;e++)zi[String(e)]=String(e);for(let e=0;e<26;e++)zi[String.fromCharCode(65+e)]=String(10+e);const ji=15;function Vi(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>zi[e])).join("");for(;t.length>=ji;){let e=t.substring(0,ji);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}const Gi=function(){const e={};for(let t=0;t<36;t++){e["0123456789abcdefghijklmnopqrstuvwxyz"[t]]=BigInt(t)}return e}();function Hi(e){if(ss("string"==typeof e,"invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith("0x")||(e="0x"+e);const t=$i(e);return ss(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===e,"bad address checksum","address",e),t}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){ss(e.substring(2,4)===Vi(e),"bad icap checksum","address",e);let t=function(e){e=e.toLowerCase();let t=Di;for(let r=0;r<e.length;r++)t=t*Li+Gi[e[r]];return t}(e.substring(4)).toString(16);for(;t.length<40;)t="0"+t;return $i("0x"+t)}ss(!1,"invalid address","address",e)}function Ki(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function Zi(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function qi(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");Ki(e.outputLen),Ki(e.blockLen)}function Ji(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Yi(e,t){Zi(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const Xi="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,Qi=e=>e instanceof Uint8Array,ec=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),tc=(e,t)=>e<<32-t|e>>>t;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function rc(e){if("string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),!Qi(e))throw new Error("expected Uint8Array, got "+typeof e);return e}class nc{clone(){return this._cloneInto()}}function oc(e=32){if(Xi&&"function"==typeof Xi.getRandomValues)return Xi.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}class sc extends nc{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=ec(this.buffer)}update(e){Ji(this);const{view:t,buffer:r,blockLen:n}=this,o=(e=rc(e)).length;for(let s=0;s<o;){const a=Math.min(n-this.pos,o-s);if(a!==n)r.set(e.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===n&&(this.process(t,0),this.pos=0);else{const t=ec(e);for(;n<=o-s;s+=n)this.process(t,s)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){Ji(this),Yi(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:o}=this;let{pos:s}=this;t[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>n-s&&(this.process(r,0),s=0);for(let e=s;e<n;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const o=BigInt(32),s=BigInt(4294967295),a=Number(r>>o&s),i=Number(r&s),c=n?4:0,u=n?0:4;e.setUint32(t+c,a,n),e.setUint32(t+u,i,n)}(r,n-8,BigInt(8*this.length),o),this.process(r,0);const a=ec(e),i=this.outputLen;if(i%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=i/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)a.setUint32(4*e,u[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:o,destroyed:s,pos:a}=this;return e.length=n,e.pos=a,e.finished=o,e.destroyed=s,n%t&&e.buffer.set(r),e}}const ac=(e,t,r)=>e&t^~e&r,ic=(e,t,r)=>e&t^e&r^t&r,cc=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),uc=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),lc=new Uint32Array(64);class dc extends sc{constructor(){super(64,32,8,!1),this.A=0|uc[0],this.B=0|uc[1],this.C=0|uc[2],this.D=0|uc[3],this.E=0|uc[4],this.F=0|uc[5],this.G=0|uc[6],this.H=0|uc[7]}get(){const{A:e,B:t,C:r,D:n,E:o,F:s,G:a,H:i}=this;return[e,t,r,n,o,s,a,i]}set(e,t,r,n,o,s,a,i){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|s,this.G=0|a,this.H=0|i}process(e,t){for(let r=0;r<16;r++,t+=4)lc[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=lc[e-15],r=lc[e-2],n=tc(t,7)^tc(t,18)^t>>>3,o=tc(r,17)^tc(r,19)^r>>>10;lc[e]=o+lc[e-7]+n+lc[e-16]|0}let{A:r,B:n,C:o,D:s,E:a,F:i,G:c,H:u}=this;for(let e=0;e<64;e++){const t=u+(tc(a,6)^tc(a,11)^tc(a,25))+ac(a,i,c)+cc[e]+lc[e]|0,l=(tc(r,2)^tc(r,13)^tc(r,22))+ic(r,n,o)|0;u=c,c=i,i=a,a=s+t|0,s=o,o=n,n=r,r=t+l|0}r=r+this.A|0,n=n+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,i=i+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(r,n,o,s,a,i,c,u)}roundClean(){lc.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const fc=function(e){const t=t=>e().update(rc(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}((()=>new dc)),pc=(BigInt(0),BigInt(1)),hc=BigInt(2),gc=e=>e instanceof Uint8Array,yc=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function mc(e){if(!gc(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=yc[e[r]];return t}function bc(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}function wc(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){const n=2*t,o=e.slice(n,n+2),s=Number.parseInt(o,16);if(Number.isNaN(s)||s<0)throw new Error("Invalid byte sequence");r[t]=s}return r}function Tc(e){return bc(mc(e))}function Ac(e){if(!gc(e))throw new Error("Uint8Array expected");return bc(mc(Uint8Array.from(e).reverse()))}function vc(e,t){return wc(e.toString(16).padStart(2*t,"0"))}function Pc(e,t){return vc(e,t).reverse()}function Ec(e,t,r){let n;if("string"==typeof t)try{n=wc(t)}catch(r){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else{if(!gc(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const o=n.length;if("number"==typeof r&&o!==r)throw new Error(`${e} expected ${r} bytes, got ${o}`);return n}function Cc(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let r=0;return e.forEach((e=>{if(!gc(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t}const Bc=e=>(hc<<BigInt(e-1))-pc,Wc=e=>new Uint8Array(e),Sc=e=>Uint8Array.from(e);function Ic(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=Wc(e),o=Wc(e),s=0;const a=()=>{n.fill(1),o.fill(0),s=0},i=(...e)=>r(o,n,...e),c=(e=Wc())=>{o=i(Sc([0]),e),n=i(),0!==e.length&&(o=i(Sc([1]),e),n=i())},u=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e<t;){n=i();const t=n.slice();r.push(t),e+=n.length}return Cc(...r)};return(e,t)=>{let r;for(a(),c(e);!(r=t(u()));)c();return a(),r}}const _c={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function Oc(e,t,r={}){const n=(t,r,n)=>{const o=_c[r];if("function"!=typeof o)throw new Error(`Invalid validator "${r}", expected function`);const s=e[t];if(!(n&&void 0===s||o(s,e)))throw new Error(`Invalid param ${String(t)}=${s} (${typeof s}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}const Rc=BigInt(0),Mc=BigInt(1),xc=BigInt(2),Fc=BigInt(3),kc=BigInt(4),Nc=BigInt(5),Uc=BigInt(8);BigInt(9),BigInt(16);function Dc(e,t){const r=e%t;return r>=Rc?r:t+r}function Lc(e,t,r){if(r<=Rc||t<Rc)throw new Error("Expected power/modulo > 0");if(r===Mc)return Rc;let n=Mc;for(;t>Rc;)t&Mc&&(n=n*e%r),e=e*e%r,t>>=Mc;return n}function $c(e,t,r){let n=e;for(;t-- >Rc;)n*=n,n%=r;return n}function zc(e,t){if(e===Rc||t<=Rc)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=Dc(e,t),n=t,o=Rc,s=Mc,a=Mc,i=Rc;for(;r!==Rc;){const e=n/r,t=n%r,c=o-a*e,u=s-i*e;n=r,r=t,o=a,s=i,a=c,i=u}if(n!==Mc)throw new Error("invert: does not exist");return Dc(o,t)}function jc(e){if(e%kc===Fc){const t=(e+Mc)/kc;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}if(e%Uc===Nc){const t=(e-Nc)/Uc;return function(e,r){const n=e.mul(r,xc),o=e.pow(n,t),s=e.mul(r,o),a=e.mul(e.mul(s,xc),o),i=e.mul(s,e.sub(a,e.ONE));if(!e.eql(e.sqr(i),r))throw new Error("Cannot find square root");return i}}return function(e){const t=(e-Mc)/xc;let r,n,o;for(r=e-Mc,n=0;r%xc===Rc;r/=xc,n++);for(o=xc;o<e&&Lc(o,t,e)!==e-Mc;o++);if(1===n){const t=(e+Mc)/kc;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}const s=(r+Mc)/xc;return function(e,a){if(e.pow(a,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let i=n,c=e.pow(e.mul(e.ONE,o),r),u=e.pow(a,s),l=e.pow(a,r);for(;!e.eql(l,e.ONE);){if(e.eql(l,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(l);t<i&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const r=e.pow(c,Mc<<BigInt(i-t-1));c=e.sqr(r),u=e.mul(u,r),l=e.mul(l,c),i=t}return u}}(e)}const Vc=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Gc(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function Hc(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function Kc(e){const t=Hc(e);return t+Math.ceil(t/2)}class Zc extends nc{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,qi(e);const r=rc(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,o=new Uint8Array(n);o.set(r.length>n?e.create().update(r).digest():r);for(let e=0;e<o.length;e++)o[e]^=54;this.iHash.update(o),this.oHash=e.create();for(let e=0;e<o.length;e++)o[e]^=106;this.oHash.update(o),o.fill(0)}update(e){return Ji(this),this.iHash.update(e),this}digestInto(e){Ji(this),Zi(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:o,blockLen:s,outputLen:a}=this;return e.finished=n,e.destroyed=o,e.blockLen=s,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const qc=(e,t,r)=>new Zc(e,t).update(r).digest();qc.create=(e,t)=>new Zc(e,t);const Jc=BigInt(0),Yc=BigInt(1);function Xc(e){return function(e){const t=Vc.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});Oc(e,t)}(e.Fp),Oc(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Gc(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const{Ph:Qc,aT:eu}=a,tu={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:t}=tu;if(e.length<2||2!==e[0])throw new t("Invalid signature integer tag");const r=e[1],n=e.subarray(2,r+2);if(!r||n.length!==r)throw new t("Invalid signature integer: wrong length");if(128&n[0])throw new t("Invalid signature integer: negative");if(0===n[0]&&!(128&n[1]))throw new t("Invalid signature integer: unnecessary leading zero");return{d:Qc(n),l:e.subarray(r+2)}},toSig(e){const{Err:t}=tu,r="string"==typeof e?eu(e):e;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let n=r.length;if(n<2||48!=r[0])throw new t("Invalid signature tag");if(r[1]!==n-2)throw new t("Invalid signature: incorrect length");const{d:o,l:s}=tu._parseInt(r.subarray(2)),{d:a,l:i}=tu._parseInt(s);if(i.length)throw new t("Invalid signature: left bytes after parsing");return{r:o,s:a}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),o=t(r(e.r)),s=n.length/2,a=o.length/2,i=r(s),c=r(a);return`30${r(a+s+4)}02${c}${o}02${i}${n}`}},ru=BigInt(0),nu=BigInt(1),ou=(BigInt(2),BigInt(3));BigInt(4);function su(e){const t=function(e){const t=Xc(e);Oc(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,n=t.toBytes||((e,t,n)=>{const o=t.toAffine();return Cc(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),o=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function s(e){const{a:n,b:o}=t,s=r.sqr(e),a=r.mul(s,e);return r.add(r.add(a,r.mul(e,n)),o)}if(!r.eql(r.sqr(t.Gy),s(t.Gx)))throw new Error("bad generator point: equation left != right");function a(e){return"bigint"==typeof e&&ru<e&&e<t.n}function i(e){if(!a(e))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(e){const{allowedPrivateKeyLengths:r,nByteLength:n,wrapPrivateKey:o,n:s}=t;if(r&&"bigint"!=typeof e){if(e instanceof Uint8Array&&(e=mc(e)),"string"!=typeof e||!r.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*n,"0")}let a;try{a="bigint"==typeof e?e:Tc(Ec("private key",e,n))}catch(t){throw new Error(`private key must be ${n} bytes, hex or bigint, not ${typeof e}`)}return o&&(a=Dc(a,s)),i(a),a}const u=new Map;function l(e){if(!(e instanceof d))throw new Error("ProjectivePoint expected")}class d{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw new Error("x required");if(null==t||!r.isValid(t))throw new Error("y required");if(null==n||!r.isValid(n))throw new Error("z required")}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof d)throw new Error("projective point not allowed");const o=e=>r.eql(e,r.ZERO);return o(t)&&o(n)?d.ZERO:new d(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(d.fromAffine)}static fromHex(e){const t=d.fromAffine(o(Ec("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(c(e))}_setWindowSize(e){this._WINDOW_SIZE=e,u.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error("bad point: x or y not FE");const o=r.sqr(n),a=s(e);if(!r.eql(o,a))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){l(e);const{px:t,py:n,pz:o}=this,{px:s,py:a,pz:i}=e,c=r.eql(r.mul(t,i),r.mul(s,o)),u=r.eql(r.mul(n,i),r.mul(a,o));return c&&u}negate(){return new d(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,o=r.mul(n,ou),{px:s,py:a,pz:i}=this;let c=r.ZERO,u=r.ZERO,l=r.ZERO,f=r.mul(s,s),p=r.mul(a,a),h=r.mul(i,i),g=r.mul(s,a);return g=r.add(g,g),l=r.mul(s,i),l=r.add(l,l),c=r.mul(e,l),u=r.mul(o,h),u=r.add(c,u),c=r.sub(p,u),u=r.add(p,u),u=r.mul(c,u),c=r.mul(g,c),l=r.mul(o,l),h=r.mul(e,h),g=r.sub(f,h),g=r.mul(e,g),g=r.add(g,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,h),f=r.mul(f,g),u=r.add(u,f),h=r.mul(a,i),h=r.add(h,h),f=r.mul(h,g),c=r.sub(c,f),l=r.mul(h,p),l=r.add(l,l),l=r.add(l,l),new d(c,u,l)}add(e){l(e);const{px:n,py:o,pz:s}=this,{px:a,py:i,pz:c}=e;let u=r.ZERO,f=r.ZERO,p=r.ZERO;const h=t.a,g=r.mul(t.b,ou);let y=r.mul(n,a),m=r.mul(o,i),b=r.mul(s,c),w=r.add(n,o),T=r.add(a,i);w=r.mul(w,T),T=r.add(y,m),w=r.sub(w,T),T=r.add(n,s);let A=r.add(a,c);return T=r.mul(T,A),A=r.add(y,b),T=r.sub(T,A),A=r.add(o,s),u=r.add(i,c),A=r.mul(A,u),u=r.add(m,b),A=r.sub(A,u),p=r.mul(h,T),u=r.mul(g,b),p=r.add(u,p),u=r.sub(m,p),p=r.add(m,p),f=r.mul(u,p),m=r.add(y,y),m=r.add(m,y),b=r.mul(h,b),T=r.mul(g,T),m=r.add(m,b),b=r.sub(y,b),b=r.mul(h,b),T=r.add(T,b),y=r.mul(m,T),f=r.add(f,y),y=r.mul(A,T),u=r.mul(w,u),u=r.sub(u,y),y=r.mul(w,m),p=r.mul(A,p),p=r.add(p,y),new d(u,f,p)}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return p.wNAFCached(this,u,e,(e=>{const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(d.fromAffine)}))}multiplyUnsafe(e){const n=d.ZERO;if(e===ru)return n;if(i(e),e===nu)return this;const{endo:o}=t;if(!o)return p.unsafeLadder(this,e);let{k1neg:s,k1:a,k2neg:c,k2:u}=o.splitScalar(e),l=n,f=n,h=this;for(;a>ru||u>ru;)a&nu&&(l=l.add(h)),u&nu&&(f=f.add(h)),h=h.double(),a>>=nu,u>>=nu;return s&&(l=l.negate()),c&&(f=f.negate()),f=new d(r.mul(f.px,o.beta),f.py,f.pz),l.add(f)}multiply(e){i(e);let n,o,s=e;const{endo:a}=t;if(a){const{k1neg:e,k1:t,k2neg:i,k2:c}=a.splitScalar(s);let{p:u,f:l}=this.wNAF(t),{p:f,f:h}=this.wNAF(c);u=p.constTimeNegate(e,u),f=p.constTimeNegate(i,f),f=new d(r.mul(f.px,a.beta),f.py,f.pz),n=u.add(f),o=l.add(h)}else{const{p:e,f:t}=this.wNAF(s);n=e,o=t}return d.normalizeZ([n,o])[0]}multiplyAndAddUnsafe(e,t,r){const n=d.BASE,o=(e,t)=>t!==ru&&t!==nu&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),s=o(this,t).add(o(e,r));return s.is0()?void 0:s}toAffine(e){const{px:t,py:n,pz:o}=this,s=this.is0();null==e&&(e=s?r.ONE:r.inv(o));const a=r.mul(t,e),i=r.mul(n,e),c=r.mul(o,e);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error("invZ was invalid");return{x:a,y:i}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===nu)return!0;if(r)return r(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===nu?this:r?r(d,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),n(d,this,e)}toHex(e=!0){return mc(this.toRawBytes(e))}}d.BASE=new d(t.Gx,t.Gy,r.ONE),d.ZERO=new d(r.ZERO,r.ONE,r.ZERO);const f=t.nBitLength,p=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,o=t;for(;r>Jc;)r&Yc&&(n=n.add(o)),o=o.double(),r>>=Yc;return n},precomputeWindow(e,t){const{windows:r,windowSize:o}=n(t),s=[];let a=e,i=a;for(let e=0;e<r;e++){i=a,s.push(i);for(let e=1;e<o;e++)i=i.add(a),s.push(i);a=i.double()}return s},wNAF(t,o,s){const{windows:a,windowSize:i}=n(t);let c=e.ZERO,u=e.BASE;const l=BigInt(2**t-1),d=2**t,f=BigInt(t);for(let e=0;e<a;e++){const t=e*i;let n=Number(s&l);s>>=f,n>i&&(n-=d,s+=Yc);const a=t,p=t+Math.abs(n)-1,h=e%2!=0,g=n<0;0===n?u=u.add(r(h,o[a])):c=c.add(r(g,o[p]))}return{p:c,f:u}},wNAFCached(e,t,r,n){const o=e._WINDOW_SIZE||1;let s=t.get(e);return s||(s=this.precomputeWindow(e,o),1!==o&&t.set(e,n(s))),this.wNAF(o,s,r)}}}(d,t.endo?Math.ceil(f/2):f);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:a}}function au(e){const t=function(e){const t=Xc(e);return Oc(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n}=t,o=r.BYTES+1,s=2*r.BYTES+1;function a(e){return Dc(e,n)}function i(e){return zc(e,n)}const{ProjectivePoint:c,normPrivateKeyToScalar:u,weierstrassEquation:l,isWithinCurveOrder:d}=su({...t,toBytes(e,t,n){const o=t.toAffine(),s=r.toBytes(o.x),a=Cc;return n?a(Uint8Array.from([t.hasEvenY()?2:3]),s):a(Uint8Array.from([4]),s,r.toBytes(o.y))},fromBytes(e){const t=e.length,n=e[0],a=e.subarray(1);if(t!==o||2!==n&&3!==n){if(t===s&&4===n){return{x:r.fromBytes(a.subarray(0,r.BYTES)),y:r.fromBytes(a.subarray(r.BYTES,2*r.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${o} compressed bytes or ${s} uncompressed bytes`)}{const e=Tc(a);if(!(ru<(i=e)&&i<r.ORDER))throw new Error("Point is not on curve");const t=l(e);let o=r.sqrt(t);return!(1&~n)!==((o&nu)===nu)&&(o=r.neg(o)),{x:e,y:o}}var i}}),f=e=>mc(vc(e,t.nByteLength));function p(e){return e>n>>nu}const h=(e,t,r)=>Tc(e.slice(t,r));class g{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const r=t.nByteLength;return e=Ec("compactSignature",e,2*r),new g(h(e,0,r),h(e,r,2*r))}static fromDER(e){const{r:t,s:r}=tu.toSig(Ec("DER",e));return new g(t,r)}assertValidity(){if(!d(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!d(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new g(this.r,this.s,e)}recoverPublicKey(e){const{r:n,s:o,recovery:s}=this,u=w(Ec("msgHash",e));if(null==s||![0,1,2,3].includes(s))throw new Error("recovery id invalid");const l=2===s||3===s?n+t.n:n;if(l>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const d=1&s?"03":"02",p=c.fromHex(d+f(l)),h=i(l),g=a(-u*h),y=a(o*h),m=c.BASE.multiplyAndAddUnsafe(p,g,y);if(!m)throw new Error("point at infinify");return m.assertValidity(),m}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new g(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return wc(this.toDERHex())}toDERHex(){return tu.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return wc(this.toCompactHex())}toCompactHex(){return f(this.r)+f(this.s)}}const y={isValidPrivateKey(e){try{return u(e),!0}catch(e){return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const e=Kc(t.n);return function(e,t,r=!1){const n=e.length,o=Hc(t),s=Kc(t);if(n<16||n<s||n>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${n}`);const a=Dc(r?Tc(e):Ac(e),t-Mc)+Mc;return r?Pc(a,o):vc(a,o)}(t.randomBytes(e),t.n)},precompute:(e=8,t=c.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function m(e){const t=e instanceof Uint8Array,r="string"==typeof e,n=(t||r)&&e.length;return t?n===o||n===s:r?n===2*o||n===2*s:e instanceof c}const b=t.bits2int||function(e){const r=Tc(e),n=8*e.length-t.nBitLength;return n>0?r>>BigInt(n):r},w=t.bits2int_modN||function(e){return a(b(e))},T=Bc(t.nBitLength);function A(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(ru<=e&&e<T))throw new Error(`bigint expected < 2^${t.nBitLength}`);return vc(e,t.nByteLength)}function v(e,n,o=P){if(["recovered","canonical"].some((e=>e in o)))throw new Error("sign() legacy options not supported");const{hash:s,randomBytes:l}=t;let{lowS:f,prehash:h,extraEntropy:y}=o;null==f&&(f=!0),e=Ec("msgHash",e),h&&(e=Ec("prehashed msgHash",s(e)));const m=w(e),T=u(n),v=[A(T),A(m)];if(null!=y){const e=!0===y?l(r.BYTES):y;v.push(Ec("extraEntropy",e))}const E=Cc(...v),C=m;return{seed:E,k2sig:function(e){const t=b(e);if(!d(t))return;const r=i(t),n=c.BASE.multiply(t).toAffine(),o=a(n.x);if(o===ru)return;const s=a(r*a(C+o*T));if(s===ru)return;let u=(n.x===o?0:2)|Number(n.y&nu),l=s;return f&&p(s)&&(l=function(e){return p(e)?a(-e):e}(s),u^=1),new g(o,l,u)}}}const P={lowS:t.lowS,prehash:!1},E={lowS:t.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return c.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(m(e))throw new Error("first arg must be private key");if(!m(t))throw new Error("second arg must be public key");return c.fromHex(t).multiply(u(e)).toRawBytes(r)},sign:function(e,r,n=P){const{seed:o,k2sig:s}=v(e,r,n),a=t;return Ic(a.hash.outputLen,a.nByteLength,a.hmac)(o,s)},verify:function(e,r,n,o=E){const s=e;if(r=Ec("msgHash",r),n=Ec("publicKey",n),"strict"in o)throw new Error("options.strict was renamed to lowS");const{lowS:u,prehash:l}=o;let d,f;try{if("string"==typeof s||s instanceof Uint8Array)try{d=g.fromDER(s)}catch(e){if(!(e instanceof tu.Err))throw e;d=g.fromCompact(s)}else{if("object"!=typeof s||"bigint"!=typeof s.r||"bigint"!=typeof s.s)throw new Error("PARSE");{const{r:e,s:t}=s;d=new g(e,t)}}f=c.fromHex(n)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&d.hasHighS())return!1;l&&(r=t.hash(r));const{r:p,s:h}=d,y=w(r),m=i(h),b=a(y*m),T=a(p*m),A=c.BASE.multiplyAndAddUnsafe(f,b,T)?.toAffine();return!!A&&a(A.x)===p},ProjectivePoint:c,Signature:g,utils:y}}function iu(e){return{hash:e,hmac:(t,...r)=>qc(e,t,function(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let r=0;return e.forEach((e=>{if(!Qi(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t}(...r)),randomBytes:oc}}const cu=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),uu=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),lu=BigInt(1),du=BigInt(2),fu=(e,t)=>(e+t/du)/t;function pu(e){const t=cu,r=BigInt(3),n=BigInt(6),o=BigInt(11),s=BigInt(22),a=BigInt(23),i=BigInt(44),c=BigInt(88),u=e*e*e%t,l=u*u*e%t,d=$c(l,r,t)*l%t,f=$c(d,r,t)*l%t,p=$c(f,du,t)*u%t,h=$c(p,o,t)*p%t,g=$c(h,s,t)*h%t,y=$c(g,i,t)*g%t,m=$c(y,c,t)*y%t,b=$c(m,i,t)*g%t,w=$c(b,r,t)*l%t,T=$c(w,a,t)*h%t,A=$c(T,n,t)*u%t,v=$c(A,du,t);if(!hu.eql(hu.sqr(v),e))throw new Error("Cannot find square root");return v}const hu=function(e,t,r=!1,n={}){if(e<=Rc)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:o,nByteLength:s}=Gc(e,t);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const a=jc(e),i=Object.freeze({ORDER:e,BITS:o,BYTES:s,MASK:Bc(o),ZERO:Rc,ONE:Mc,create:t=>Dc(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return Rc<=t&&t<e},is0:e=>e===Rc,isOdd:e=>(e&Mc)===Mc,neg:t=>Dc(-t,e),eql:(e,t)=>e===t,sqr:t=>Dc(t*t,e),add:(t,r)=>Dc(t+r,e),sub:(t,r)=>Dc(t-r,e),mul:(t,r)=>Dc(t*r,e),pow:(e,t)=>function(e,t,r){if(r<Rc)throw new Error("Expected power > 0");if(r===Rc)return e.ONE;if(r===Mc)return t;let n=e.ONE,o=t;for(;r>Rc;)r&Mc&&(n=e.mul(n,o)),o=e.sqr(o),r>>=Mc;return n}(i,e,t),div:(t,r)=>Dc(t*zc(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>zc(t,e),sqrt:n.sqrt||(e=>a(i,e)),invertBatch:e=>function(e,t){const r=new Array(t.length),n=t.reduce(((t,n,o)=>e.is0(n)?t:(r[o]=t,e.mul(t,n))),e.ONE),o=e.inv(n);return t.reduceRight(((t,n,o)=>e.is0(n)?t:(r[o]=e.mul(t,r[o]),e.mul(t,n))),o),r}(i,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?Pc(e,s):vc(e,s),fromBytes:e=>{if(e.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${e.length}`);return r?Ac(e):Tc(e)}});return Object.freeze(i)}(cu,void 0,void 0,{sqrt:pu}),gu=function(e,t){const r=t=>au({...e,...iu(t)});return Object.freeze({...r(t),create:r})}({a:BigInt(0),b:BigInt(7),Fp:hu,n:uu,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=uu,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-lu*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,a=BigInt("0x100000000000000000000000000000000"),i=fu(s*e,t),c=fu(-n*e,t);let u=Dc(e-i*r-c*o,t),l=Dc(-i*n-c*s,t);const d=u>a,f=l>a;if(d&&(u=t-u),f&&(l=t-l),u>a||l>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:d,k1:u,k2neg:f,k2:l}}}},fc);BigInt(0);gu.ProjectivePoint;class yu{#c;constructor(e){ss(32===bs(e),"invalid private key","privateKey","[REDACTED]"),this.#c=ys(e)}get privateKey(){return this.#c}get publicKey(){return yu.computePublicKey(this.#c)}get compressedPublicKey(){return yu.computePublicKey(this.#c,!0)}sign(e){ss(32===bs(e),"invalid digest length","digest",e);const t=gu.sign(fs(e),fs(this.#c),{lowS:!0});return js.from({r:Rs(t.r,32),s:Rs(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){const t=yu.computePublicKey(e);return ys(gu.getSharedSecret(fs(this.#c),ds(t),!1))}static computePublicKey(e,t){let r=ds(e,"key");if(32===r.length){return ys(gu.getPublicKey(r,!!t))}if(64===r.length){const e=new Uint8Array(65);e[0]=4,e.set(r,1),r=e}return ys(gu.ProjectivePoint.fromHex(r).toRawBytes(t))}static recoverPublicKey(e,t){ss(32===bs(e),"invalid digest length","digest",e);const r=js.from(t);let n=gu.Signature.fromCompact(fs(ms([r.r,r.s])));n=n.addRecoveryBit(r.yParity);const o=n.recoverPublicKey(fs(e));return ss(null!=o,"invalid signautre for digest","signature",t),"0x"+o.toHex(!1)}static addPoints(e,t,r){const n=gu.ProjectivePoint.fromHex(yu.computePublicKey(e).substring(2)),o=gu.ProjectivePoint.fromHex(yu.computePublicKey(t).substring(2));return"0x"+n.add(o).toHex(!!r)}}function mu(e){let t;return t="string"==typeof e?yu.computePublicKey(e,!1):e.publicKey,Hi(Ti("0x"+t.substring(4)).substring(26))}function bu(e,t){return mu(yu.recoverPublicKey(e,t))}const wu=32,Tu=new Uint8Array(wu),Au=["then"],vu={},Pu=new WeakMap;function Eu(e){return Pu.get(e)}function Cu(e,t){Pu.set(e,t)}function Bu(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);throw r.error=t,r}function Wu(e,t,r){return e.indexOf(null)>=0?t.map(((e,t)=>e instanceof Su?Wu(Eu(e),e,r):e)):e.reduce(((e,n,o)=>{let s=t.getValue(n);return n in e||(r&&s instanceof Su&&(s=Wu(Eu(s),s,r)),e[n]=s),e}),{})}class Su extends Array{#u;constructor(...e){const t=e[0];let r=e[1],n=(e[2]||[]).slice(),o=!0;t!==vu&&(r=e,n=[],o=!1),super(r.length),r.forEach(((e,t)=>{this[t]=e}));const s=n.reduce(((e,t)=>("string"==typeof t&&e.set(t,(e.get(t)||0)+1),e)),new Map);if(Cu(this,Object.freeze(r.map(((e,t)=>{const r=n[t];return null!=r&&1===s.get(r)?r:null})))),this.#u=[],null==this.#u&&this.#u,!o)return;Object.freeze(this);const a=new Proxy(this,{get:(e,t,r)=>{if("string"==typeof t){if(t.match(/^[0-9]+$/)){const r=Os(t,"%index");if(r<0||r>=this.length)throw new RangeError("out of result range");const n=e[r];return n instanceof Error&&Bu(`index ${r}`,n),n}if(Au.indexOf(t)>=0)return Reflect.get(e,t,r);const n=e[t];if(n instanceof Function)return function(...t){return n.apply(this===r?e:this,t)};if(!(t in e))return e.getValue.apply(this===r?e:this,[t])}return Reflect.get(e,t,r)}});return Cu(a,Eu(this)),a}toArray(e){const t=[];return this.forEach(((r,n)=>{r instanceof Error&&Bu(`index ${n}`,r),e&&r instanceof Su&&(r=r.toArray(e)),t.push(r)})),t}toObject(e){const t=Eu(this);return t.reduce(((r,n,o)=>(os(null!=n,`value at index ${o} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),Wu(t,this,e))),{})}slice(e,t){null==e&&(e=0),e<0&&(e+=this.length)<0&&(e=0),null==t&&(t=this.length),t<0&&(t+=this.length)<0&&(t=0),t>this.length&&(t=this.length);const r=Eu(this),n=[],o=[];for(let s=e;s<t;s++)n.push(this[s]),o.push(r[s]);return new Su(vu,n,o)}filter(e,t){const r=Eu(this),n=[],o=[];for(let s=0;s<this.length;s++){const a=this[s];a instanceof Error&&Bu(`index ${s}`,a),e.call(t,a,s,this)&&(n.push(a),o.push(r[s]))}return new Su(vu,n,o)}map(e,t){const r=[];for(let n=0;n<this.length;n++){const o=this[n];o instanceof Error&&Bu(`index ${n}`,o),r.push(e.call(t,o,n,this))}return r}getValue(e){const t=Eu(this).indexOf(e);if(-1===t)return;const r=this[t];return r instanceof Error&&Bu(`property ${JSON.stringify(e)}`,r.error),r}static fromItems(e,t){return new Su(vu,e,t)}}function Iu(e){let t=Ms(e);return os(t.length<=wu,"value out-of-bounds","BUFFER_OVERRUN",{buffer:t,length:wu,offset:t.length}),t.length!==wu&&(t=fs(ms([Tu.slice(t.length%wu),t]))),t}class _u{name;type;localName;dynamic;constructor(e,t,r,n){es(this,{name:e,type:t,localName:r,dynamic:n},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(e,t){ss(!1,e,this.localName,t)}}class Ou{#o;#l;constructor(){this.#o=[],this.#l=0}get data(){return ms(this.#o)}get length(){return this.#l}#d(e){return this.#o.push(e),this.#l+=e.length,e.length}appendWriter(e){return this.#d(fs(e.data))}writeBytes(e){let t=fs(e);const r=t.length%wu;return r&&(t=fs(ms([t,Tu.slice(r)]))),this.#d(t)}writeValue(e){return this.#d(Iu(e))}writeUpdatableValue(){const e=this.#o.length;return this.#o.push(Tu),this.#l+=wu,t=>{this.#o[e]=Iu(t)}}}class Ru{allowLoose;#o;#f;#p;#h;#g;constructor(e,t,r){es(this,{allowLoose:!!t}),this.#o=fs(e),this.#p=0,this.#h=null,this.#g=null!=r?r:1024,this.#f=0}get data(){return ys(this.#o)}get dataLength(){return this.#o.length}get consumed(){return this.#f}get bytes(){return new Uint8Array(this.#o)}#y(e){if(this.#h)return this.#h.#y(e);this.#p+=e,os(this.#g<1||this.#p<=this.#g*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#g} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:fs(this.#o),offset:this.#f,length:e,info:{bytesRead:this.#p,dataLength:this.dataLength}})}#m(e,t,r){let n=Math.ceil(t/wu)*wu;return this.#f+n>this.#o.length&&(this.allowLoose&&r&&this.#f+t<=this.#o.length?n=t:os(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:fs(this.#o),length:this.#o.length,offset:this.#f+n})),this.#o.slice(this.#f,this.#f+n)}subReader(e){const t=new Ru(this.#o.slice(this.#f+e),this.allowLoose,this.#g);return t.#h=this,t}readBytes(e,t){let r=this.#m(0,e,!!t);return this.#y(e),this.#f+=r.length,r.slice(0,e)}readValue(){return _s(this.readBytes(wu))}readIndex(){return Os(_s(this.readBytes(wu)))}}const Mu={};function xu(e,t){let r=!1;return t<0&&(r=!0,t*=-1),new Nu(Mu,`${r?"":"u"}int${t}`,e,{signed:r,width:t})}function Fu(e,t){return new Nu(Mu,`bytes${t||""}`,e,{size:t})}const ku=Symbol.for("_ethers_typed");class Nu{type;value;#b;_typedSymbol;constructor(e,t,r,n){null==n&&(n=null),us(Mu,e,"Typed"),es(this,{_typedSymbol:ku,type:t,value:r}),this.#b=n,this.format()}format(){if("array"===this.type)throw new Error("");if("dynamicArray"===this.type)throw new Error("");return"tuple"===this.type?`tuple(${this.value.map((e=>e.format())).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return"string"===this.type}get tupleName(){if("tuple"!==this.type)throw TypeError("not a tuple");return this.#b}get arrayLength(){if("array"!==this.type)throw TypeError("not an array");return!0===this.#b?-1:!1===this.#b?this.value.length:null}static from(e,t){return new Nu(Mu,e,t)}static uint8(e){return xu(e,8)}static uint16(e){return xu(e,16)}static uint24(e){return xu(e,24)}static uint32(e){return xu(e,32)}static uint40(e){return xu(e,40)}static uint48(e){return xu(e,48)}static uint56(e){return xu(e,56)}static uint64(e){return xu(e,64)}static uint72(e){return xu(e,72)}static uint80(e){return xu(e,80)}static uint88(e){return xu(e,88)}static uint96(e){return xu(e,96)}static uint104(e){return xu(e,104)}static uint112(e){return xu(e,112)}static uint120(e){return xu(e,120)}static uint128(e){return xu(e,128)}static uint136(e){return xu(e,136)}static uint144(e){return xu(e,144)}static uint152(e){return xu(e,152)}static uint160(e){return xu(e,160)}static uint168(e){return xu(e,168)}static uint176(e){return xu(e,176)}static uint184(e){return xu(e,184)}static uint192(e){return xu(e,192)}static uint200(e){return xu(e,200)}static uint208(e){return xu(e,208)}static uint216(e){return xu(e,216)}static uint224(e){return xu(e,224)}static uint232(e){return xu(e,232)}static uint240(e){return xu(e,240)}static uint248(e){return xu(e,248)}static uint256(e){return xu(e,256)}static uint(e){return xu(e,256)}static int8(e){return xu(e,-8)}static int16(e){return xu(e,-16)}static int24(e){return xu(e,-24)}static int32(e){return xu(e,-32)}static int40(e){return xu(e,-40)}static int48(e){return xu(e,-48)}static int56(e){return xu(e,-56)}static int64(e){return xu(e,-64)}static int72(e){return xu(e,-72)}static int80(e){return xu(e,-80)}static int88(e){return xu(e,-88)}static int96(e){return xu(e,-96)}static int104(e){return xu(e,-104)}static int112(e){return xu(e,-112)}static int120(e){return xu(e,-120)}static int128(e){return xu(e,-128)}static int136(e){return xu(e,-136)}static int144(e){return xu(e,-144)}static int152(e){return xu(e,-152)}static int160(e){return xu(e,-160)}static int168(e){return xu(e,-168)}static int176(e){return xu(e,-176)}static int184(e){return xu(e,-184)}static int192(e){return xu(e,-192)}static int200(e){return xu(e,-200)}static int208(e){return xu(e,-208)}static int216(e){return xu(e,-216)}static int224(e){return xu(e,-224)}static int232(e){return xu(e,-232)}static int240(e){return xu(e,-240)}static int248(e){return xu(e,-248)}static int256(e){return xu(e,-256)}static int(e){return xu(e,-256)}static bytes1(e){return Fu(e,1)}static bytes2(e){return Fu(e,2)}static bytes3(e){return Fu(e,3)}static bytes4(e){return Fu(e,4)}static bytes5(e){return Fu(e,5)}static bytes6(e){return Fu(e,6)}static bytes7(e){return Fu(e,7)}static bytes8(e){return Fu(e,8)}static bytes9(e){return Fu(e,9)}static bytes10(e){return Fu(e,10)}static bytes11(e){return Fu(e,11)}static bytes12(e){return Fu(e,12)}static bytes13(e){return Fu(e,13)}static bytes14(e){return Fu(e,14)}static bytes15(e){return Fu(e,15)}static bytes16(e){return Fu(e,16)}static bytes17(e){return Fu(e,17)}static bytes18(e){return Fu(e,18)}static bytes19(e){return Fu(e,19)}static bytes20(e){return Fu(e,20)}static bytes21(e){return Fu(e,21)}static bytes22(e){return Fu(e,22)}static bytes23(e){return Fu(e,23)}static bytes24(e){return Fu(e,24)}static bytes25(e){return Fu(e,25)}static bytes26(e){return Fu(e,26)}static bytes27(e){return Fu(e,27)}static bytes28(e){return Fu(e,28)}static bytes29(e){return Fu(e,29)}static bytes30(e){return Fu(e,30)}static bytes31(e){return Fu(e,31)}static bytes32(e){return Fu(e,32)}static address(e){return new Nu(Mu,"address",e)}static bool(e){return new Nu(Mu,"bool",!!e)}static bytes(e){return new Nu(Mu,"bytes",e)}static string(e){return new Nu(Mu,"string",e)}static array(e,t){throw new Error("not implemented yet")}static tuple(e,t){throw new Error("not implemented yet")}static overrides(e){return new Nu(Mu,"overrides",Object.assign({},e))}static isTyped(e){return e&&"object"==typeof e&&"_typedSymbol"in e&&e._typedSymbol===ku}static dereference(e,t){if(Nu.isTyped(e)){if(e.type!==t)throw new Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}}class Uu extends _u{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){let r=Nu.dereference(t,"string");try{r=Hi(r)}catch(e){return this._throwError(e.message,t)}return e.writeValue(r)}decode(e){return Hi(Rs(e.readValue(),20))}}class Du extends _u{coder;constructor(e){super(e.name,e.type,"_",e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}function Lu(e,t,r){let n=[];if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let e={};n=t.map((t=>{const n=t.localName;return os(n,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:r}),os(!e[n],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:r}),e[n]=!0,r[n]}))}else ss(!1,"invalid tuple value","tuple",r);ss(t.length===n.length,"types/value length mismatch","tuple",r);let o=new Ou,s=new Ou,a=[];t.forEach(((e,t)=>{let r=n[t];if(e.dynamic){let t=s.length;e.encode(s,r);let n=o.writeUpdatableValue();a.push((e=>{n(e+t)}))}else e.encode(o,r)})),a.forEach((e=>{e(o.length)}));let i=e.appendWriter(o);return i+=e.appendWriter(s),i}function $u(e,t){let r=[],n=[],o=e.subReader(0);return t.forEach((t=>{let s=null;if(t.dynamic){let r=e.readIndex(),n=o.subReader(r);try{s=t.decode(n)}catch(e){if(rs(e,"BUFFER_OVERRUN"))throw e;s=e,s.baseType=t.name,s.name=t.localName,s.type=t.type}}else try{s=t.decode(e)}catch(e){if(rs(e,"BUFFER_OVERRUN"))throw e;s=e,s.baseType=t.name,s.name=t.localName,s.type=t.type}if(null==s)throw new Error("investigate");r.push(s),n.push(t.localName||null)})),Su.fromItems(r,n)}class zu extends _u{coder;length;constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),es(this,{coder:e,length:t})}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;r<this.length;r++)t.push(e);return t}encode(e,t){const r=Nu.dereference(t,"array");Array.isArray(r)||this._throwError("expected array value",r);let n=this.length;-1===n&&(n=r.length,e.writeValue(r.length)),as(r.length,n,"coder array"+(this.localName?" "+this.localName:""));let o=[];for(let e=0;e<r.length;e++)o.push(this.coder);return Lu(e,o,r)}decode(e){let t=this.length;-1===t&&(t=e.readIndex(),os(t*wu<=e.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:e.bytes,offset:t*wu,length:e.dataLength}));let r=[];for(let e=0;e<t;e++)r.push(new Du(this.coder));return $u(e,r)}}class ju extends _u{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,t){const r=Nu.dereference(t,"bool");return e.writeValue(r?1:0)}decode(e){return!!e.readValue()}}class Vu extends _u{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){t=fs(t);let r=e.writeValue(t.length);return r+=e.writeBytes(t),r}decode(e){return e.readBytes(e.readIndex(),!0)}}class Gu extends Vu{constructor(e){super("bytes",e)}decode(e){return ys(super.decode(e))}}class Hu extends _u{size;constructor(e,t){let r="bytes"+String(e);super(r,r,t,!1),es(this,{size:e},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(e,t){let r=fs(Nu.dereference(t,this.type));return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}decode(e){return ys(e.readBytes(this.size))}}const Ku=new Uint8Array([]);class Zu extends _u{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes(Ku)}decode(e){return e.readBytes(0),null}}const qu=BigInt(0),Ju=BigInt(1),Yu=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class Xu extends _u{size;signed;constructor(e,t,r){const n=(t?"int":"uint")+8*e;super(n,n,r,!1),es(this,{size:e,signed:t},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(e,t){let r=Ws(Nu.dereference(t,this.type)),n=Bs(Yu,256);if(this.signed){let e=Bs(n,8*this.size-1);(r>e||r<-(e+Ju))&&this._throwError("value out-of-bounds",t),r=Cs(r,256)}else(r<qu||r>Bs(n,8*this.size))&&this._throwError("value out-of-bounds",t);return e.writeValue(r)}decode(e){let t=Bs(e.readValue(),8*this.size);return this.signed&&(t=function(e,t){const r=Ss(e,"value"),n=BigInt(Os(t,"width"));if(os(r>>n===vs,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:e}),r>>n-Ps)return-((~r&(Ps<<n)-Ps)+Ps);return r}(t,8*this.size)),t}}class Qu extends Vu{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,Qa(Nu.dereference(t,"string")))}decode(e){return ei(super.decode(e))}}class el extends _u{coders;constructor(e,t){let r=!1;const n=[];e.forEach((e=>{e.dynamic&&(r=!0),n.push(e.type)}));super("tuple","tuple("+n.join(",")+")",t,r),es(this,{coders:Object.freeze(e.slice())})}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let o=r.localName;o&&1===t[o]&&("length"===o&&(o="_length"),null==e[o]&&(e[o]=e[n]))})),Object.freeze(e)}encode(e,t){const r=Nu.dereference(t,"tuple");return Lu(e,this.coders,r)}decode(e){return $u(e,this.coders)}}function tl(e){const t=new Set;return e.forEach((e=>t.add(e))),Object.freeze(t)}tl("external public payable override".split(" "));const rl="constant external internal payable private public pure view override",nl=(tl(rl.split(" ")),"constructor error event fallback function receive struct"),ol=(tl(nl.split(" ")),"calldata memory storage payable indexed"),sl=tl(ol.split(" ")),al=tl([nl,ol,"tuple returns",rl].join(" ").split(" ")),il={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},cl=new RegExp("^(\\s*)"),ul=new RegExp("^([0-9]+)"),ll=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),dl=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),fl=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class pl{#f;#w;get offset(){return this.#f}get length(){return this.#w.length-this.#f}constructor(e){this.#f=0,this.#w=e.slice()}clone(){return new pl(this.#w)}reset(){this.#f=0}#T(e=0,t=0){return new pl(this.#w.slice(e,t).map((t=>Object.freeze(Object.assign({},t,{match:t.match-e,linkBack:t.linkBack-e,linkNext:t.linkNext-e})))))}popKeyword(e){const t=this.peek();if("KEYWORD"!==t.type||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const t=this.peek();throw new Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=this.#T(this.#f+1,e.match+1);return this.#f=e.match+1,t}popParams(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=[];for(;this.#f<e.match-1;){const e=this.peek().linkNext;t.push(this.#T(this.#f+1,e)),this.#f=e}return this.#f=e.match+1,t}peek(){if(this.#f>=this.#w.length)throw new Error("out-of-bounds");return this.#w[this.#f]}peekKeyword(e){const t=this.peekType("KEYWORD");return null!=t&&e.has(t)?t:null}peekType(e){if(0===this.length)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return this.#f++,e}toString(){const e=[];for(let t=this.#f;t<this.#w.length;t++){const r=this.#w[t];e.push(`${r.type}:${r.text}`)}return`<TokenString ${e.join(" ")}>`}}function hl(e){const t=[],r=t=>{const r=s<e.length?JSON.stringify(e[s]):"$EOI";throw new Error(`invalid token ${r} at ${s}: ${t}`)};let n=[],o=[],s=0;for(;s<e.length;){let a=e.substring(s),i=a.match(cl);i&&(s+=i[1].length,a=e.substring(s));const c={depth:n.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:s,value:-1};t.push(c);let u=il[a[0]]||"";if(u){if(c.type=u,c.text=a[0],s++,"OPEN_PAREN"===u)n.push(t.length-1),o.push(t.length-1);else if("CLOSE_PAREN"==u)0===n.length&&r("no matching open bracket"),c.match=n.pop(),t[c.match].match=t.length-1,c.depth--,c.linkBack=o.pop(),t[c.linkBack].linkNext=t.length-1;else if("COMMA"===u)c.linkBack=o.pop(),t[c.linkBack].linkNext=t.length-1,o.push(t.length-1);else if("OPEN_BRACKET"===u)c.type="BRACKET";else if("CLOSE_BRACKET"===u){let e=t.pop().text;if(t.length>0&&"NUMBER"===t[t.length-1].type){const r=t.pop().text;e=r+e,t[t.length-1].value=Os(r)}if(0===t.length||"BRACKET"!==t[t.length-1].type)throw new Error("missing opening bracket");t[t.length-1].text+=e}}else if(i=a.match(ll),i){if(c.text=i[1],s+=c.text.length,al.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(fl)){c.type="TYPE";continue}c.type="ID"}else{if(i=a.match(ul),!i)throw new Error(`unexpected token ${JSON.stringify(a[0])} at position ${s}`);c.text=i[1],c.type="NUMBER",s+=c.text.length}}return new pl(t.map((e=>Object.freeze(e))))}function gl(e,t){const r=new Set;for(;;){const n=e.peekType("KEYWORD");if(null==n||t&&!t.has(n))break;if(e.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}const yl=new RegExp(/^(.*)\[([0-9]*)\]$/);function ml(e){const t=e.match(fl);if(ss(t,"invalid type","type",e),"uint"===e)return"uint256";if("int"===e)return"int256";if(t[2]){const r=parseInt(t[2]);ss(0!==r&&r<=32,"invalid bytes length","type",e)}else if(t[3]){const r=parseInt(t[3]);ss(0!==r&&r<=256&&r%8==0,"invalid numeric width","type",e)}return e}const bl={},wl=Symbol.for("_ethers_internal"),Tl="_ParamTypeInternal";class Al{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,r,n,o,s,a,i){if(us(e,bl,"ParamType"),Object.defineProperty(this,wl,{value:Tl}),s&&(s=Object.freeze(s.slice())),"array"===n){if(null==a||null==i)throw new Error("")}else if(null!=a||null!=i)throw new Error("");if("tuple"===n){if(null==s)throw new Error("")}else if(null!=s)throw new Error("");es(this,{name:t,type:r,baseType:n,indexed:o,components:s,arrayLength:a,arrayChildren:i})}format(e){if(null==e&&(e="sighash"),"json"===e){const t=this.name||"";if(this.isArray()){const e=JSON.parse(this.arrayChildren.format("json"));return e.name=t,e.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(e)}const r={type:"tuple"===this.baseType?"tuple":this.type,name:t};return"boolean"==typeof this.indexed&&(r.indexed=this.indexed),this.isTuple()&&(r.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(r)}let t="";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?t+="("+this.components.map((t=>t.format(e))).join("full"===e?", ":",")+")":t+=this.type,"sighash"!==e&&(!0===this.indexed&&(t+=" indexed"),"full"===e&&this.name&&(t+=" "+this.name)),t}isArray(){return"array"===this.baseType}isTuple(){return"tuple"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw new Error("array is wrong length");const r=this;return e.map((e=>r.arrayChildren.walk(e,t)))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const r=this;return e.map(((e,n)=>r.components[n].walk(e,t)))}return t(this.type,e)}#A(e,t,r,n){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw new Error("array is wrong length");const o=this.arrayChildren,s=t.slice();return s.forEach(((t,n)=>{o.#A(e,t,r,(e=>{s[n]=e}))})),void n(s)}if(this.isTuple()){const o=this.components;let s;if(Array.isArray(t))s=t.slice();else{if(null==t||"object"!=typeof t)throw new Error("invalid tuple value");s=o.map((e=>{if(!e.name)throw new Error("cannot use object value with unnamed components");if(!(e.name in t))throw new Error(`missing value for component ${e.name}`);return t[e.name]}))}if(s.length!==this.components.length)throw new Error("array is wrong length");return s.forEach(((t,n)=>{o[n].#A(e,t,r,(e=>{s[n]=e}))})),void n(s)}const o=r(this.type,t);o.then?e.push(async function(){n(await o)}()):n(o)}async walkAsync(e,t){const r=[],n=[e];return this.#A(r,e,t,(e=>{n[0]=e})),r.length&&await Promise.all(r),n[0]}static from(e,t){if(Al.isParamType(e))return e;if("string"==typeof e)try{return Al.from(hl(e),t)}catch(t){ss(!1,"invalid param type","obj",e)}else if(e instanceof pl){let r="",n="",o=null;gl(e,tl(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(n="tuple",o=e.popParams().map((e=>Al.from(e))),r=`tuple(${o.map((e=>e.format())).join(",")})`):(r=ml(e.popType("TYPE")),n=r);let s=null,a=null;for(;e.length&&e.peekType("BRACKET");){const t=e.pop();s=new Al(bl,"",r,n,null,o,a,s),a=t.value,r+=t.text,n="array",o=null}let i=null;if(gl(e,sl).has("indexed")){if(!t)throw new Error("");i=!0}const c=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new Al(bl,c,r,n,i,o,a,s)}const r=e.name;ss(!r||"string"==typeof r&&r.match(dl),"invalid name","obj.name",r);let n=e.indexed;null!=n&&(ss(t,"parameter cannot be indexed","obj.indexed",e.indexed),n=!!n);let o=e.type,s=o.match(yl);if(s){const t=parseInt(s[2]||"-1"),a=Al.from({type:s[1],components:e.components});return new Al(bl,r||"",o,"array",n,null,t,a)}if("tuple"===o||o.startsWith("tuple(")||o.startsWith("(")){const t=null!=e.components?e.components.map((e=>Al.from(e))):null;return new Al(bl,r||"",o,"tuple",n,t,null,null)}return o=ml(e.type),new Al(bl,r||"",o,o,n,null,null,null)}static isParamType(e){return e&&e[wl]===Tl}}const vl=new Map;vl.set(0,"GENERIC_PANIC"),vl.set(1,"ASSERT_FALSE"),vl.set(17,"OVERFLOW"),vl.set(18,"DIVIDE_BY_ZERO"),vl.set(33,"ENUM_RANGE_ERROR"),vl.set(34,"BAD_STORAGE_DATA"),vl.set(49,"STACK_UNDERFLOW"),vl.set(50,"ARRAY_RANGE_ERROR"),vl.set(65,"OUT_OF_MEMORY"),vl.set(81,"UNINITIALIZED_FUNCTION_CALL");const Pl=new RegExp(/^bytes([0-9]*)$/),El=new RegExp(/^(u?int)([0-9]*)$/);let Cl=null,Bl=1024;class Wl{#v(e){if(e.isArray())return new zu(this.#v(e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new el(e.components.map((e=>this.#v(e))),e.name);switch(e.baseType){case"address":return new Uu(e.name);case"bool":return new ju(e.name);case"string":return new Qu(e.name);case"bytes":return new Gu(e.name);case"":return new Zu(e.name)}let t=e.type.match(El);if(t){let r=parseInt(t[2]||"256");return ss(0!==r&&r<=256&&r%8==0,"invalid "+t[1]+" bit length","param",e),new Xu(r/8,"int"===t[1],e.name)}if(t=e.type.match(Pl),t){let r=parseInt(t[1]);return ss(0!==r&&r<=32,"invalid bytes length","param",e),new Hu(r,e.name)}ss(!1,"invalid type","type",e.type)}getDefaultValue(e){const t=e.map((e=>this.#v(Al.from(e))));return new el(t,"_").defaultValue()}encode(e,t){as(t.length,e.length,"types/values length mismatch");const r=e.map((e=>this.#v(Al.from(e)))),n=new el(r,"_"),o=new Ou;return n.encode(o,t),o.data}decode(e,t,r){const n=e.map((e=>this.#v(Al.from(e))));return new el(n,"_").decode(new Ru(t,r,Bl))}static _setDefaultMaxInflation(e){ss("number"==typeof e&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),Bl=e}static defaultAbiCoder(){return null==Cl&&(Cl=new Wl),Cl}static getBuiltinCallException(e,t,r){return function(e,t,r,n){let o="missing revert data",s=null,a=null;if(r){o="execution reverted";const e=ds(r);if(r=ys(r),0===e.length)o+=" (no data present; likely require(false) occurred",s="require(false)";else if(e.length%32!=4)o+=" (could not decode reason; invalid data length)";else if("0x08c379a0"===ys(e.slice(0,4)))try{s=n.decode(["string"],e.slice(4))[0],a={signature:"Error(string)",name:"Error",args:[s]},o+=`: ${JSON.stringify(s)}`}catch(e){o+=" (could not decode reason; invalid string data)"}else if("0x4e487b71"===ys(e.slice(0,4)))try{const t=Number(n.decode(["uint256"],e.slice(4))[0]);a={signature:"Panic(uint256)",name:"Panic",args:[t]},s=`Panic due to ${vl.get(t)||"UNKNOWN"}(${t})`,o+=`: ${s}`}catch(e){o+=" (could not decode panic code)"}else o+=" (unknown custom error)"}const i={to:t.to?Hi(t.to):null,data:t.data||"0x"};return t.from&&(i.from=Hi(t.from)),ns(o,"CALL_EXCEPTION",{action:e,data:r,reason:s,transaction:i,invocation:null,revert:a})}(e,t,r,Wl.defaultAbiCoder())}}const Sl=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Il=Uint8Array.from({length:16},((e,t)=>t)),_l=Il.map((e=>(9*e+5)%16));let Ol=[Il],Rl=[_l];for(let e=0;e<4;e++)for(let t of[Ol,Rl])t.push(t[e].map((e=>Sl[e])));const Ml=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map((e=>new Uint8Array(e))),xl=Ol.map(((e,t)=>e.map((e=>Ml[t][e])))),Fl=Rl.map(((e,t)=>e.map((e=>Ml[t][e])))),kl=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),Nl=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),Ul=(e,t)=>e<<t|e>>>32-t;function Dl(e,t,r,n){return 0===e?t^r^n:1===e?t&r|~t&n:2===e?(t|~r)^n:3===e?t&n|r&~n:t^(r|~n)}const Ll=new Uint32Array(16);class $l extends da{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:t,h2:r,h3:n,h4:o}=this;return[e,t,r,n,o]}set(e,t,r,n,o){this.h0=0|e,this.h1=0|t,this.h2=0|r,this.h3=0|n,this.h4=0|o}process(e,t){for(let r=0;r<16;r++,t+=4)Ll[r]=e.getUint32(t,!0);let r=0|this.h0,n=r,o=0|this.h1,s=o,a=0|this.h2,i=a,c=0|this.h3,u=c,l=0|this.h4,d=l;for(let e=0;e<5;e++){const t=4-e,f=kl[e],p=Nl[e],h=Ol[e],g=Rl[e],y=xl[e],m=Fl[e];for(let t=0;t<16;t++){const n=Ul(r+Dl(e,o,a,c)+Ll[h[t]]+f,y[t])+l|0;r=l,l=c,c=0|Ul(a,10),a=o,o=n}for(let e=0;e<16;e++){const r=Ul(n+Dl(t,s,i,u)+Ll[g[e]]+p,m[e])+d|0;n=d,d=u,u=0|Ul(i,10),i=s,s=r}}this.set(this.h1+a+u|0,this.h2+c+d|0,this.h3+l+n|0,this.h4+r+s|0,this.h0+o+i|0)}roundClean(){Ll.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const zl=sa((()=>new $l));let jl=!1;const Vl=function(e){return zl(e)};let Gl=Vl;function Hl(e){const t=ds(e,"data");return ys(Gl(t))}Hl._=Vl,Hl.lock=function(){jl=!0},Hl.register=function(e){if(jl)throw new TypeError("ripemd160 is locked");Gl=e},Object.freeze(Hl);let Kl=!1;const Zl=function(e){return new Uint8Array(function(e){os(null!=ka,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),ss(Number.isInteger(e)&&e>0&&e<=1024,"invalid length","length",e);const t=new Uint8Array(e);return ka.getRandomValues(t),t}(e))};let ql=Zl;function Jl(e){return ql(e)}async function Yl(e,t){const r=await t;return null!=r&&"0x0000000000000000000000000000000000000000"!==r||(os("string"!=typeof e,"unconfigured name","UNCONFIGURED_NAME",{value:e}),ss(!1,"invalid AddressLike value; did not resolve to a value address","target",e)),Hi(r)}function Xl(e,t){return"string"==typeof e?e.match(/^0x[0-9a-f]{40}$/i)?Hi(e):(os(null!=t,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),Yl(e,t.resolveName(e))):(r=e)&&"function"==typeof r.getAddress?Yl(e,e.getAddress()):e&&"function"==typeof e.then?Yl(e,e):void ss(!1,"unsupported addressable value","target",e);var r}Jl._=Zl,Jl.lock=function(){Kl=!0},Jl.register=function(e){if(Kl)throw new Error("randomBytes is locked");ql=e},Object.freeze(Jl);const Ql="0x0000000000000000000000000000000000000000";function ed(e){let t=e.toString(16);for(;t.length<2;)t="0"+t;return"0x"+t}function td(e,t,r){let n=0;for(let o=0;o<r;o++)n=256*n+e[t+o];return n}function rd(e,t,r,n){const o=[];for(;r<t+1+n;){const s=nd(e,r);o.push(s.result),os((r+=s.consumed)<=t+1+n,"child data too short","BUFFER_OVERRUN",{buffer:e,length:n,offset:t})}return{consumed:1+n,result:o}}function nd(e,t){os(0!==e.length,"data too short","BUFFER_OVERRUN",{buffer:e,length:0,offset:1});const r=t=>{os(t<=e.length,"data short segment too short","BUFFER_OVERRUN",{buffer:e,length:e.length,offset:t})};if(e[t]>=248){const n=e[t]-247;r(t+1+n);const o=td(e,t+1,n);return r(t+1+n+o),rd(e,t,t+1+n,n+o)}if(e[t]>=192){const n=e[t]-192;return r(t+1+n),rd(e,t,t+1,n)}if(e[t]>=184){const n=e[t]-183;r(t+1+n);const o=td(e,t+1,n);r(t+1+n+o);return{consumed:1+n+o,result:ys(e.slice(t+1+n,t+1+n+o))}}if(e[t]>=128){const n=e[t]-128;r(t+1+n);return{consumed:1+n,result:ys(e.slice(t+1,t+1+n))}}return{consumed:1,result:ed(e[t])}}function od(e){const t=ds(e,"data"),r=nd(t,0);return ss(r.consumed===t.length,"unexpected junk after rlp payload","data",e),r.result}function sd(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function ad(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(ad(e))})),t.length<=55)return t.unshift(192+t.length),t;const r=sd(t.length);return r.unshift(247+r.length),r.concat(t)}const t=Array.prototype.slice.call(ds(e,"object"));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const r=sd(t.length);return r.unshift(183+r.length),r.concat(t)}const id="0123456789abcdef";function cd(e){let t="0x";for(const r of ad(e))t+=id[r>>4],t+=id[15&r];return t}function ud(e,t){return{address:Hi(e),storageKeys:t.map(((e,t)=>(ss(ps(e,32),"invalid slot",`storageKeys[${t}]`,e),e.toLowerCase())))}}function ld(e){if(Array.isArray(e))return e.map(((t,r)=>Array.isArray(t)?(ss(2===t.length,"invalid slot set",`value[${r}]`,t),ud(t[0],t[1])):(ss(null!=t&&"object"==typeof t,"invalid address-slot set","value",e),ud(t.address,t.storageKeys))));ss(null!=e&&"object"==typeof e,"invalid access list","value",e);const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return ud(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}const dd=BigInt(0),fd=BigInt(2),pd=BigInt(27),hd=BigInt(28),gd=BigInt(35),yd=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),md=131072;function bd(e,t){let r=e.toString(16);for(;r.length<2;)r="0"+r;return r+=Va(t).substring(4),"0x"+r}function wd(e){return"0x"===e?null:Hi(e)}function Td(e,t){try{return ld(e)}catch(r){ss(!1,r.message,t,e)}}function Ad(e,t){return"0x"===e?0:Os(e,t)}function vd(e,t){if("0x"===e)return dd;const r=Ws(e,t);return ss(r<=yd,"value exceeds uint size",t,r),r}function Pd(e,t){const r=Ws(e,"value"),n=Ms(r);return ss(n.length<=32,"value too large",`tx.${t}`,r),n}function Ed(e){return ld(e).map((e=>[e.address,e.storageKeys]))}function Cd(e,t){ss(Array.isArray(e),`invalid ${t}`,"value",e);for(let t=0;t<e.length;t++)ss(ps(e[t],32),"invalid ${ param } hash",`value[${t}]`,e[t]);return e}function Bd(e,t){let r;try{if(r=Ad(t[0],"yParity"),0!==r&&1!==r)throw new Error("bad yParity")}catch(e){ss(!1,"invalid yParity","yParity",t[0])}const n=As(t[1],32),o=As(t[2],32),s=js.from({r:n,s:o,yParity:r});e.signature=s}class Wd{#P;#E;#o;#C;#B;#W;#S;#I;#_;#O;#R;#M;#x;#F;#k;#N;get type(){return this.#P}set type(e){switch(e){case null:this.#P=null;break;case 0:case"legacy":this.#P=0;break;case 1:case"berlin":case"eip-2930":this.#P=1;break;case 2:case"london":case"eip-1559":this.#P=2;break;case 3:case"cancun":case"eip-4844":this.#P=3;break;default:ss(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844"}return null}get to(){const e=this.#E;return null==e&&3===this.type?Ql:e}set to(e){this.#E=null==e?null:Hi(e)}get nonce(){return this.#C}set nonce(e){this.#C=Os(e,"value")}get gasLimit(){return this.#B}set gasLimit(e){this.#B=Ws(e)}get gasPrice(){const e=this.#W;return null!=e||0!==this.type&&1!==this.type?e:dd}set gasPrice(e){this.#W=null==e?null:Ws(e,"gasPrice")}get maxPriorityFeePerGas(){const e=this.#S;return null==e?2===this.type||3===this.type?dd:null:e}set maxPriorityFeePerGas(e){this.#S=null==e?null:Ws(e,"maxPriorityFeePerGas")}get maxFeePerGas(){const e=this.#I;return null==e?2===this.type||3===this.type?dd:null:e}set maxFeePerGas(e){this.#I=null==e?null:Ws(e,"maxFeePerGas")}get data(){return this.#o}set data(e){this.#o=ys(e)}get value(){return this.#_}set value(e){this.#_=Ws(e,"value")}get chainId(){return this.#O}set chainId(e){this.#O=Ws(e)}get signature(){return this.#R||null}set signature(e){this.#R=null==e?null:js.from(e)}get accessList(){const e=this.#M||null;return null==e?1===this.type||2===this.type||3===this.type?[]:null:e}set accessList(e){this.#M=null==e?null:ld(e)}get maxFeePerBlobGas(){const e=this.#x;return null==e&&3===this.type?dd:e}set maxFeePerBlobGas(e){this.#x=null==e?null:Ws(e,"maxFeePerBlobGas")}get blobVersionedHashes(){let e=this.#F;return null==e&&3===this.type?[]:e}set blobVersionedHashes(e){if(null!=e){ss(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let t=0;t<e.length;t++)ss(ps(e[t],32),"invalid blobVersionedHash",`value[${t}]`,e[t])}this.#F=e}get blobs(){return null==this.#N?null:this.#N.map((e=>Object.assign({},e)))}set blobs(e){if(null==e)return void(this.#N=null);const t=[],r=[];for(let n=0;n<e.length;n++){const o=e[n];if(hs(o)){os(this.#k,"adding a raw blob requires a KZG library","UNSUPPORTED_OPERATION",{operation:"set blobs()"});let e=ds(o);if(ss(e.length<=md,"blob is too large",`blobs[${n}]`,o),e.length!==md){const t=new Uint8Array(md);t.set(e),e=t}const s=this.#k.blobToKzgCommitment(e),a=ys(this.#k.computeBlobKzgProof(e,s));t.push({data:ys(e),commitment:ys(s),proof:a}),r.push(bd(1,s))}else{const e=ys(o.commitment);t.push({data:ys(o.data),commitment:e,proof:ys(o.proof)}),r.push(bd(1,e))}}this.#N=t,this.#F=r}get kzg(){return this.#k}set kzg(e){this.#k=e}constructor(){this.#P=null,this.#E=null,this.#C=0,this.#B=dd,this.#W=null,this.#S=null,this.#I=null,this.#o="0x",this.#_=dd,this.#O=dd,this.#R=null,this.#M=null,this.#x=null,this.#F=null,this.#N=null,this.#k=null}get hash(){return null==this.signature?null:Ti(this.#U(!0,!1))}get unsignedHash(){return Ti(this.unsignedSerialized)}get from(){return null==this.signature?null:bu(this.unsignedHash,this.signature)}get fromPublicKey(){return null==this.signature?null:yu.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return null!=this.signature}#U(e,t){os(!e||null!=this.signature,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const r=e?this.signature:null;switch(this.inferType()){case 0:return function(e,t){const r=[Pd(e.nonce,"nonce"),Pd(e.gasPrice||0,"gasPrice"),Pd(e.gasLimit,"gasLimit"),e.to||"0x",Pd(e.value,"value"),e.data];let n=dd;if(e.chainId!=dd)n=Ws(e.chainId,"tx.chainId"),ss(!t||null==t.networkV||t.legacyChainId===n,"tx.chainId/sig.v mismatch","sig",t);else if(e.signature){const t=e.signature.legacyChainId;null!=t&&(n=t)}if(!t)return n!==dd&&(r.push(Ms(n)),r.push("0x"),r.push("0x")),cd(r);let o=BigInt(27+t.yParity);return n!==dd?o=js.getChainIdV(n,t.v):BigInt(t.v)!==o&&ss(!1,"tx.chainId/sig.v mismatch","sig",t),r.push(Ms(o)),r.push(Ms(t.r)),r.push(Ms(t.s)),cd(r)}(this,r);case 1:return function(e,t){const r=[Pd(e.chainId,"chainId"),Pd(e.nonce,"nonce"),Pd(e.gasPrice||0,"gasPrice"),Pd(e.gasLimit,"gasLimit"),e.to||"0x",Pd(e.value,"value"),e.data,Ed(e.accessList||[])];return t&&(r.push(Pd(t.yParity,"recoveryParam")),r.push(Ms(t.r)),r.push(Ms(t.s))),ms(["0x01",cd(r)])}(this,r);case 2:return function(e,t){const r=[Pd(e.chainId,"chainId"),Pd(e.nonce,"nonce"),Pd(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Pd(e.maxFeePerGas||0,"maxFeePerGas"),Pd(e.gasLimit,"gasLimit"),e.to||"0x",Pd(e.value,"value"),e.data,Ed(e.accessList||[])];return t&&(r.push(Pd(t.yParity,"yParity")),r.push(Ms(t.r)),r.push(Ms(t.s))),ms(["0x02",cd(r)])}(this,r);case 3:return function(e,t,r){const n=[Pd(e.chainId,"chainId"),Pd(e.nonce,"nonce"),Pd(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Pd(e.maxFeePerGas||0,"maxFeePerGas"),Pd(e.gasLimit,"gasLimit"),e.to||Ql,Pd(e.value,"value"),e.data,Ed(e.accessList||[]),Pd(e.maxFeePerBlobGas||0,"maxFeePerBlobGas"),Cd(e.blobVersionedHashes||[],"blobVersionedHashes")];return t&&(n.push(Pd(t.yParity,"yParity")),n.push(Ms(t.r)),n.push(Ms(t.s)),r)?ms(["0x03",cd([n,r.map((e=>e.data)),r.map((e=>e.commitment)),r.map((e=>e.proof))])]):ms(["0x03",cd(n)])}(this,r,t?this.blobs:null)}os(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get serialized(){return this.#U(!0,!0)}get unsignedSerialized(){return this.#U(!1,!1)}inferType(){const e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){const e=null!=this.gasPrice,t=null!=this.maxFeePerGas||null!=this.maxPriorityFeePerGas,r=null!=this.accessList,n=null!=this.#x||this.#F;null!=this.maxFeePerGas&&null!=this.maxPriorityFeePerGas&&os(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),os(!t||0!==this.type&&1!==this.type,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),os(0!==this.type||!r,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const o=[];return null!=this.type?o.push(this.type):t?o.push(2):e?(o.push(1),r||o.push(0)):r?(o.push(1),o.push(2)):(n&&this.to||(o.push(0),o.push(1),o.push(2)),o.push(3)),o.sort(),o}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}clone(){return Wd.from(this)}toJSON(){const e=e=>null==e?null:e.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(null==e)return new Wd;if("string"==typeof e){const t=ds(e);if(t[0]>=127)return Wd.from(function(e){const t=od(e);ss(Array.isArray(t)&&(9===t.length||6===t.length),"invalid field count for legacy transaction","data",e);const r={type:0,nonce:Ad(t[0],"nonce"),gasPrice:vd(t[1],"gasPrice"),gasLimit:vd(t[2],"gasLimit"),to:wd(t[3]),value:vd(t[4],"value"),data:ys(t[5]),chainId:dd};if(6===t.length)return r;const n=vd(t[6],"v"),o=vd(t[7],"r"),s=vd(t[8],"s");if(o===dd&&s===dd)r.chainId=n;else{let e=(n-gd)/fd;e<dd&&(e=dd),r.chainId=e,ss(e!==dd||n===pd||n===hd,"non-canonical legacy v","v",t[6]),r.signature=js.from({r:As(t[7],32),s:As(t[8],32),v:n})}return r}(t));switch(t[0]){case 1:return Wd.from(function(e){const t=od(ds(e).slice(1));ss(Array.isArray(t)&&(8===t.length||11===t.length),"invalid field count for transaction type: 1","data",ys(e));const r={type:1,chainId:vd(t[0],"chainId"),nonce:Ad(t[1],"nonce"),gasPrice:vd(t[2],"gasPrice"),gasLimit:vd(t[3],"gasLimit"),to:wd(t[4]),value:vd(t[5],"value"),data:ys(t[6]),accessList:Td(t[7],"accessList")};return 8===t.length||Bd(r,t.slice(8)),r}(t));case 2:return Wd.from(function(e){const t=od(ds(e).slice(1));ss(Array.isArray(t)&&(9===t.length||12===t.length),"invalid field count for transaction type: 2","data",ys(e));const r={type:2,chainId:vd(t[0],"chainId"),nonce:Ad(t[1],"nonce"),maxPriorityFeePerGas:vd(t[2],"maxPriorityFeePerGas"),maxFeePerGas:vd(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:vd(t[4],"gasLimit"),to:wd(t[5]),value:vd(t[6],"value"),data:ys(t[7]),accessList:Td(t[8],"accessList")};return 9===t.length||Bd(r,t.slice(9)),r}(t));case 3:return Wd.from(function(e){let t=od(ds(e).slice(1)),r="3",n=null;if(4===t.length&&Array.isArray(t[0])){r="3 (network format)";const e=t[1],o=t[2],s=t[3];ss(Array.isArray(e),"invalid network format: blobs not an array","fields[1]",e),ss(Array.isArray(o),"invalid network format: commitments not an array","fields[2]",o),ss(Array.isArray(s),"invalid network format: proofs not an array","fields[3]",s),ss(e.length===o.length,"invalid network format: blobs/commitments length mismatch","fields",t),ss(e.length===s.length,"invalid network format: blobs/proofs length mismatch","fields",t),n=[];for(let r=0;r<t[1].length;r++)n.push({data:e[r],commitment:o[r],proof:s[r]});t=t[0]}ss(Array.isArray(t)&&(11===t.length||14===t.length),`invalid field count for transaction type: ${r}`,"data",ys(e));const o={type:3,chainId:vd(t[0],"chainId"),nonce:Ad(t[1],"nonce"),maxPriorityFeePerGas:vd(t[2],"maxPriorityFeePerGas"),maxFeePerGas:vd(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:vd(t[4],"gasLimit"),to:wd(t[5]),value:vd(t[6],"value"),data:ys(t[7]),accessList:Td(t[8],"accessList"),maxFeePerBlobGas:vd(t[9],"maxFeePerBlobGas"),blobVersionedHashes:t[10]};n&&(o.blobs=n),ss(null!=o.to,`invalid address for transaction type: ${r}`,"data",e),ss(Array.isArray(o.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",e);for(let t=0;t<o.blobVersionedHashes.length;t++)ss(ps(o.blobVersionedHashes[t],32),`invalid blobVersionedHash at index ${t}: must be length 32`,"data",e);return 11===t.length||Bd(o,t.slice(11)),o}(t))}os(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const t=new Wd;return null!=e.type&&(t.type=e.type),null!=e.to&&(t.to=e.to),null!=e.nonce&&(t.nonce=e.nonce),null!=e.gasLimit&&(t.gasLimit=e.gasLimit),null!=e.gasPrice&&(t.gasPrice=e.gasPrice),null!=e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas),null!=e.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null!=e.maxFeePerBlobGas&&(t.maxFeePerBlobGas=e.maxFeePerBlobGas),null!=e.data&&(t.data=e.data),null!=e.value&&(t.value=e.value),null!=e.chainId&&(t.chainId=e.chainId),null!=e.signature&&(t.signature=js.from(e.signature)),null!=e.accessList&&(t.accessList=e.accessList),null!=e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes),null!=e.kzg&&(t.kzg=e.kzg),null!=e.blobs&&(t.blobs=e.blobs),null!=e.hash&&(ss(t.isSigned(),"unsigned transaction cannot define '.hash'","tx",e),ss(t.hash===e.hash,"hash mismatch","tx",e)),null!=e.from&&(ss(t.isSigned(),"unsigned transaction cannot define '.from'","tx",e),ss(t.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),t}}BigInt(0);function Sd(e){const t={};e.to&&(t.to=e.to),e.from&&(t.from=e.from),e.data&&(t.data=ys(e.data));const r="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const n of r)n in e&&null!=e[n]&&(t[n]=Ws(e[n],`request.${n}`));const n="type,nonce".split(/,/);for(const r of n)r in e&&null!=e[r]&&(t[r]=Os(e[r],`request.${r}`));return e.accessList&&(t.accessList=ld(e.accessList)),"blockTag"in e&&(t.blockTag=e.blockTag),"enableCcipRead"in e&&(t.enableCcipRead=!!e.enableCcipRead),"customData"in e&&(t.customData=e.customData),"blobVersionedHashes"in e&&e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.slice()),"kzg"in e&&(t.kzg=e.kzg),"blobs"in e&&e.blobs&&(t.blobs=e.blobs.map((e=>hs(e)?ys(e):Object.assign({},e)))),t}Symbol.iterator;Symbol.iterator;function Id(e,t){if(e.provider)return e.provider;os(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:t})}async function _d(e,t){let r=Sd(t);if(null!=r.to&&(r.to=Xl(r.to,e)),null!=r.from){const t=r.from;r.from=Promise.all([e.getAddress(),Xl(t,e)]).then((([e,t])=>(ss(e.toLowerCase()===t.toLowerCase(),"transaction from mismatch","tx.from",t),e)))}else r.from=e.getAddress();return await Qo(r)}class Od{provider;constructor(e){es(this,{provider:e||null})}async getNonce(e){return Id(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await _d(this,e)}async populateTransaction(e){const t=Id(this,"populateTransaction"),r=await _d(this,e);null==r.nonce&&(r.nonce=await this.getNonce("pending")),null==r.gasLimit&&(r.gasLimit=await this.estimateGas(r));const n=await this.provider.getNetwork();if(null!=r.chainId){ss(Ws(r.chainId)===n.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else r.chainId=n.chainId;const o=null!=r.maxFeePerGas||null!=r.maxPriorityFeePerGas;if(null==r.gasPrice||2!==r.type&&!o?0!==r.type&&1!==r.type||!o||ss(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e):ss(!1,"eip-1559 transaction do not support gasPrice","tx",e),2!==r.type&&null!=r.type||null==r.maxFeePerGas||null==r.maxPriorityFeePerGas)if(0===r.type||1===r.type){const e=await t.getFeeData();os(null!=e.gasPrice,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice)}else{const e=await t.getFeeData();if(null==r.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(r.type=2,null!=r.gasPrice){const e=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=e,r.maxPriorityFeePerGas=e}else null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(os(!o,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice),r.type=0):os(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else 2!==r.type&&3!==r.type||(null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else r.type=2;return await Qo(r)}async estimateGas(e){return Id(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return Id(this,"call").call(await this.populateCall(e))}async resolveName(e){const t=Id(this,"resolveName");return await t.resolveName(e)}async sendTransaction(e){const t=Id(this,"sendTransaction"),r=await this.populateTransaction(e);delete r.from;const n=Wd.from(r);return await t.broadcastTransaction(await this.signTransaction(n))}}class Rd extends Od{address;constructor(e,t){super(t),es(this,{address:e})}async getAddress(){return this.address}connect(e){return new Rd(this.address,e)}#D(e,t){os(!1,`VoidSigner cannot sign ${e}`,"UNSUPPORTED_OPERATION",{operation:t})}async signTransaction(e){this.#D("transactions","signTransaction")}async signMessage(e){this.#D("messages","signMessage")}async signTypedData(e,t,r){this.#D("typed-data","signTypedData")}}const Md="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";let xd=null;function Fd(e){if(null==xd){xd={};for(let e=0;e<58;e++)xd[Md[e]]=BigInt(e)}const t=xd[e];return ss(null!=t,"invalid base58 value","letter",e),t}const kd=BigInt(0),Nd=BigInt(58);function Ud(e){return"string"==typeof e&&(e=Qa(e)),Ti(ms([Qa("Ethereum Signed Message:\n"),Qa(String(e.length)),e]))}const Dd=new Uint8Array(32);Dd.fill(0);const Ld=BigInt(-1),$d=BigInt(0),zd=BigInt(1),jd=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const Vd=Rs(zd,32),Gd=Rs($d,32),Hd={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Kd=["name","version","chainId","verifyingContract","salt"];function Zd(e){return function(t){return ss("string"==typeof t,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const qd={name:Zd("name"),version:Zd("version"),chainId:function(e){const t=Ws(e,"domain.chainId");return ss(t>=0,"invalid chain ID","domain.chainId",e),Number.isSafeInteger(t)?Number(t):xs(t)},verifyingContract:function(e){try{return Hi(e).toLowerCase()}catch(e){}ss(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){const t=ds(e,"domain.salt");return ss(32===t.length,'invalid domain value "salt"',"domain.salt",e),ys(t)}};function Jd(e){{const t=e.match(/^(u?)int(\d+)$/);if(t){const r=""===t[1],n=parseInt(t[2]);ss(n%8==0&&0!==n&&n<=256&&t[2]===String(n),"invalid numeric width","type",e);const o=Bs(jd,r?n-1:n),s=r?(o+zd)*Ld:$d;return function(t){const n=Ws(t,"value");return ss(n>=s&&n<=o,`value out-of-bounds for ${e}`,"value",n),Rs(r?Cs(n,256):n,32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return ss(0!==r&&r<=32&&t[1]===String(r),"invalid bytes width","type",e),function(t){return ss(ds(t).length===r,`invalid length for ${e}`,"value",t),function(e){const t=ds(e),r=t.length%32;return r?ms([t,Dd.slice(r)]):ys(t)}(t)}}}switch(e){case"address":return function(e){return As(Hi(e),32)};case"bool":return function(e){return e?Vd:Gd};case"bytes":return function(e){return Ti(e)};case"string":return function(e){return Ai(e)}}return null}function Yd(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}function Xd(e){const t=e.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:e}}class Qd{primaryType;#L;get types(){return JSON.parse(this.#L)}#$;#z;constructor(e){this.#$=new Map,this.#z=new Map;const t=new Map,r=new Map,n=new Map,o={};Object.keys(e).forEach((s=>{o[s]=e[s].map((({name:t,type:r})=>{let{base:n,index:o}=Xd(r);return"int"!==n||e.int||(n="int256"),"uint"!==n||e.uint||(n="uint256"),{name:t,type:n+(o||"")}})),t.set(s,new Set),r.set(s,[]),n.set(s,new Set)})),this.#L=JSON.stringify(o);for(const n in o){const s=new Set;for(const a of o[n]){ss(!s.has(a.name),`duplicate variable name ${JSON.stringify(a.name)} in ${JSON.stringify(n)}`,"types",e),s.add(a.name);const o=Xd(a.type).base;ss(o!==n,`circular type reference to ${JSON.stringify(o)}`,"types",e);Jd(o)||(ss(r.has(o),`unknown type ${JSON.stringify(o)}`,"types",e),r.get(o).push(n),t.get(n).add(o))}}const s=Array.from(r.keys()).filter((e=>0===r.get(e).length));ss(0!==s.length,"missing primary type","types",e),ss(1===s.length,`ambiguous primary types or unused types: ${s.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),es(this,{primaryType:s[0]}),function o(s,a){ss(!a.has(s),`circular type reference to ${JSON.stringify(s)}`,"types",e),a.add(s);for(const e of t.get(s))if(r.has(e)){o(e,a);for(const t of a)n.get(t).add(e)}a.delete(s)}(this.primaryType,new Set);for(const[e,t]of n){const r=Array.from(t);r.sort(),this.#$.set(e,Yd(e,o[e])+r.map((e=>Yd(e,o[e]))).join(""))}}getEncoder(e){let t=this.#z.get(e);return t||(t=this.#j(e),this.#z.set(e,t)),t}#j(e){{const t=Jd(e);if(t)return t}const t=Xd(e).array;if(t){const e=t.prefix,r=this.getEncoder(e);return n=>{ss(-1===t.count||t.count===n.length,`array length mismatch; expected length ${t.count}`,"value",n);let o=n.map(r);return this.#$.has(e)&&(o=o.map(Ti)),Ti(ms(o))}}const r=this.types[e];if(r){const t=Ai(this.#$.get(e));return e=>{const n=r.map((({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this.#$.has(r)?Ti(n):n}));return n.unshift(t),ms(n)}}ss(!1,`unknown type: ${e}`,"type",e)}encodeType(e){const t=this.#$.get(e);return ss(t,`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return Ti(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(Jd(e))return r(e,t);const n=Xd(e).array;if(n)return ss(-1===n.count||n.count===t.length,`array length mismatch; expected length ${n.count}`,"value",t),t.map((e=>this._visit(n.prefix,e,r)));const o=this.types[e];if(o)return o.reduce(((e,{name:n,type:o})=>(e[n]=this._visit(o,t[n],r),e)),{});ss(!1,`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new Qd(e)}static getPrimaryType(e){return Qd.from(e).primaryType}static hashStruct(e,t,r){return Qd.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){if(null==e[r])continue;const n=Hd[r];ss(n,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>Kd.indexOf(e.name)-Kd.indexOf(t.name))),Qd.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return ms(["0x1901",Qd.hashDomain(e),Qd.from(t).hash(r)])}static hash(e,t,r){return Ti(Qd.encode(e,t,r))}static async resolveNames(e,t,r,n){e=Object.assign({},e);for(const t in e)null==e[t]&&delete e[t];const o={};e.verifyingContract&&!ps(e.verifyingContract,20)&&(o[e.verifyingContract]="0x");const s=Qd.from(t);s.visit(r,((e,t)=>("address"!==e||ps(t,20)||(o[t]="0x"),t)));for(const e in o)o[e]=await n(e);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),{domain:e,value:r=s.visit(r,((e,t)=>"address"===e&&o[t]?o[t]:t))}}static getPayload(e,t,r){Qd.hashDomain(e);const n={},o=[];Kd.forEach((t=>{const r=e[t];null!=r&&(n[t]=qd[t](r),o.push({name:t,type:Hd[t]}))}));const s=Qd.from(t);t=s.types;const a=Object.assign({},t);return ss(null==a.EIP712Domain,"types must not contain EIP712Domain type","types.EIP712Domain",t),a.EIP712Domain=o,s.encode(r),{types:a,domain:n,primaryType:s.primaryType,message:s.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return ys(ds(t));if(e.match(/^u?int/))return Ws(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return ss("string"==typeof t,"invalid string","value",t),t}ss(!1,"unsupported type","type",e)}))}}}class ef extends Od{address;#V;constructor(e,t){super(t),ss(e&&"function"==typeof e.sign,"invalid private key","privateKey","[ REDACTED ]"),this.#V=e;es(this,{address:mu(this.signingKey.publicKey)})}get signingKey(){return this.#V}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(e){return new ef(this.#V,e)}async signTransaction(e){e=Sd(e);const{to:t,from:r}=await Qo({to:e.to?Xl(e.to,this.provider):void 0,from:e.from?Xl(e.from,this.provider):void 0});null!=t&&(e.to=t),null!=r&&(e.from=r),null!=e.from&&(ss(Hi(e.from)===this.address,"transaction from address mismatch","tx.from",e.from),delete e.from);const n=Wd.from(e);return n.signature=this.signingKey.sign(n.unsignedHash),n.serialized}async signMessage(e){return this.signMessageSync(e)}signMessageSync(e){return this.signingKey.sign(Ud(e)).serialized}async signTypedData(e,t,r){const n=await Qd.resolveNames(e,t,r,(async e=>{os(null!=this.provider,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:e}});const t=await this.provider.resolveName(e);return os(null!=t,"unconfigured ENS name","UNCONFIGURED_NAME",{value:e}),t}));return this.signingKey.sign(Qd.hash(n.domain,t,n.value)).serialized}}var tf,rf,nf,of=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},sf=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r};const af={16:10,24:12,32:14},cf=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],uf=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],lf=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],df=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],ff=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],pf=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],hf=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],gf=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],yf=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],mf=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],bf=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],wf=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],Tf=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],Af=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],vf=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function Pf(e){const t=[];for(let r=0;r<e.length;r+=4)t.push(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]);return t}class Ef{get key(){return of(this,tf,"f").slice()}constructor(e){if(tf.set(this,void 0),rf.set(this,void 0),nf.set(this,void 0),!(this instanceof Ef))throw Error("AES must be instanitated with `new`");sf(this,tf,new Uint8Array(e),"f");const t=af[this.key.length];if(null==t)throw new TypeError("invalid key size (must be 16, 24 or 32 bytes)");sf(this,nf,[],"f"),sf(this,rf,[],"f");for(let e=0;e<=t;e++)of(this,nf,"f").push([0,0,0,0]),of(this,rf,"f").push([0,0,0,0]);const r=4*(t+1),n=this.key.length/4,o=Pf(this.key);let s;for(let e=0;e<n;e++)s=e>>2,of(this,nf,"f")[s][e%4]=o[e],of(this,rf,"f")[t-s][e%4]=o[e];let a,i=0,c=n;for(;c<r;){if(a=o[n-1],o[0]^=uf[a>>16&255]<<24^uf[a>>8&255]<<16^uf[255&a]<<8^uf[a>>24&255]^cf[i]<<24,i+=1,8!=n)for(let e=1;e<n;e++)o[e]^=o[e-1];else{for(let e=1;e<n/2;e++)o[e]^=o[e-1];a=o[n/2-1],o[n/2]^=uf[255&a]^uf[a>>8&255]<<8^uf[a>>16&255]<<16^uf[a>>24&255]<<24;for(let e=n/2+1;e<n;e++)o[e]^=o[e-1]}let e,s,u=0;for(;u<n&&c<r;)e=c>>2,s=c%4,of(this,nf,"f")[e][s]=o[u],of(this,rf,"f")[t-e][s]=o[u++],c++}for(let e=1;e<t;e++)for(let t=0;t<4;t++)a=of(this,rf,"f")[e][t],of(this,rf,"f")[e][t]=wf[a>>24&255]^Tf[a>>16&255]^Af[a>>8&255]^vf[255&a]}encrypt(e){if(16!=e.length)throw new TypeError("invalid plaintext size (must be 16 bytes)");const t=of(this,nf,"f").length-1,r=[0,0,0,0];let n=Pf(e);for(let e=0;e<4;e++)n[e]^=of(this,nf,"f")[0][e];for(let e=1;e<t;e++){for(let t=0;t<4;t++)r[t]=df[n[t]>>24&255]^ff[n[(t+1)%4]>>16&255]^pf[n[(t+2)%4]>>8&255]^hf[255&n[(t+3)%4]]^of(this,nf,"f")[e][t];n=r.slice()}const o=new Uint8Array(16);let s=0;for(let e=0;e<4;e++)s=of(this,nf,"f")[t][e],o[4*e]=255&(uf[n[e]>>24&255]^s>>24),o[4*e+1]=255&(uf[n[(e+1)%4]>>16&255]^s>>16),o[4*e+2]=255&(uf[n[(e+2)%4]>>8&255]^s>>8),o[4*e+3]=255&(uf[255&n[(e+3)%4]]^s);return o}decrypt(e){if(16!=e.length)throw new TypeError("invalid ciphertext size (must be 16 bytes)");const t=of(this,rf,"f").length-1,r=[0,0,0,0];let n=Pf(e);for(let e=0;e<4;e++)n[e]^=of(this,rf,"f")[0][e];for(let e=1;e<t;e++){for(let t=0;t<4;t++)r[t]=gf[n[t]>>24&255]^yf[n[(t+3)%4]>>16&255]^mf[n[(t+2)%4]>>8&255]^bf[255&n[(t+1)%4]]^of(this,rf,"f")[e][t];n=r.slice()}const o=new Uint8Array(16);let s=0;for(let e=0;e<4;e++)s=of(this,rf,"f")[t][e],o[4*e]=255&(lf[n[e]>>24&255]^s>>24),o[4*e+1]=255&(lf[n[(e+3)%4]>>16&255]^s>>16),o[4*e+2]=255&(lf[n[(e+2)%4]>>8&255]^s>>8),o[4*e+3]=255&(lf[255&n[(e+1)%4]]^s);return o}}tf=new WeakMap,rf=new WeakMap,nf=new WeakMap;class Cf{constructor(e,t,r){if(r&&!(this instanceof r))throw new Error(`${e} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new Ef(t)},name:{enumerable:!0,value:e}})}}new WeakMap,new WeakMap;var Bf,Wf=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};new WeakMap,Bf=new WeakMap,new WeakSet;var Sf,If,_f,Of=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},Rf=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class Mf extends Cf{constructor(e,t){super("CTR",e,Mf),Sf.set(this,void 0),If.set(this,void 0),_f.set(this,void 0),Of(this,_f,new Uint8Array(16),"f"),Rf(this,_f,"f").fill(0),Of(this,Sf,Rf(this,_f,"f"),"f"),Of(this,If,16,"f"),null==t&&(t=1),"number"==typeof t?this.setCounterValue(t):this.setCounterBytes(t)}get counter(){return new Uint8Array(Rf(this,_f,"f"))}setCounterValue(e){if(!Number.isInteger(e)||e<0||e>Number.MAX_SAFE_INTEGER)throw new TypeError("invalid counter initial integer value");for(let t=15;t>=0;--t)Rf(this,_f,"f")[t]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(16!==e.length)throw new TypeError("invalid counter initial Uint8Array value length");Rf(this,_f,"f").set(e)}increment(){for(let e=15;e>=0;e--){if(255!==Rf(this,_f,"f")[e]){Rf(this,_f,"f")[e]++;break}Rf(this,_f,"f")[e]=0}}encrypt(e){var t,r;const n=new Uint8Array(e);for(let e=0;e<n.length;e++)16===Rf(this,If,"f")&&(Of(this,Sf,this.aes.encrypt(Rf(this,_f,"f")),"f"),Of(this,If,0,"f"),this.increment()),n[e]^=Rf(this,Sf,"f")[(Of(this,If,(r=Rf(this,If,"f"),t=r++,r),"f"),t)];return n}decrypt(e){return this.encrypt(e)}}Sf=new WeakMap,If=new WeakMap,_f=new WeakMap;new WeakMap,new WeakMap,new WeakMap;const xf=(e,t)=>e<<t|e>>>32-t;function Ff(e,t,r,n,o,s){let a=e[t++]^r[n++],i=e[t++]^r[n++],c=e[t++]^r[n++],u=e[t++]^r[n++],l=e[t++]^r[n++],d=e[t++]^r[n++],f=e[t++]^r[n++],p=e[t++]^r[n++],h=e[t++]^r[n++],g=e[t++]^r[n++],y=e[t++]^r[n++],m=e[t++]^r[n++],b=e[t++]^r[n++],w=e[t++]^r[n++],T=e[t++]^r[n++],A=e[t++]^r[n++],v=a,P=i,E=c,C=u,B=l,W=d,S=f,I=p,_=h,O=g,R=y,M=m,x=b,F=w,k=T,N=A;for(let e=0;e<8;e+=2)B^=xf(v+x|0,7),_^=xf(B+v|0,9),x^=xf(_+B|0,13),v^=xf(x+_|0,18),O^=xf(W+P|0,7),F^=xf(O+W|0,9),P^=xf(F+O|0,13),W^=xf(P+F|0,18),k^=xf(R+S|0,7),E^=xf(k+R|0,9),S^=xf(E+k|0,13),R^=xf(S+E|0,18),C^=xf(N+M|0,7),I^=xf(C+N|0,9),M^=xf(I+C|0,13),N^=xf(M+I|0,18),P^=xf(v+C|0,7),E^=xf(P+v|0,9),C^=xf(E+P|0,13),v^=xf(C+E|0,18),S^=xf(W+B|0,7),I^=xf(S+W|0,9),B^=xf(I+S|0,13),W^=xf(B+I|0,18),M^=xf(R+O|0,7),_^=xf(M+R|0,9),O^=xf(_+M|0,13),R^=xf(O+_|0,18),x^=xf(N+k|0,7),F^=xf(x+N|0,9),k^=xf(F+x|0,13),N^=xf(k+F|0,18);o[s++]=a+v|0,o[s++]=i+P|0,o[s++]=c+E|0,o[s++]=u+C|0,o[s++]=l+B|0,o[s++]=d+W|0,o[s++]=f+S|0,o[s++]=p+I|0,o[s++]=h+_|0,o[s++]=g+O|0,o[s++]=y+R|0,o[s++]=m+M|0,o[s++]=b+x|0,o[s++]=w+F|0,o[s++]=T+k|0,o[s++]=A+N|0}function kf(e,t,r,n,o){let s=n+0,a=n+16*o;for(let n=0;n<16;n++)r[a+n]=e[t+16*(2*o-1)+n];for(let n=0;n<o;n++,s+=16,t+=16)Ff(r,a,e,t,r,s),n>0&&(a+=16),Ff(r,s,e,t+=16,r,a)}function Nf(e,t,r){const n=oa({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:o,r:s,p:a,dkLen:i,asyncTick:c,maxmem:u,onProgress:l}=n;if(Vs(o),Vs(s),Vs(a),Vs(i),Vs(c),Vs(u),void 0!==l&&"function"!=typeof l)throw new Error("progressCb should be function");const d=128*s,f=d/4;if(o<=1||o&o-1||o>=2**(d/8)||o>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(a<0||a>137438953440/d)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(i<0||i>137438953440)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const p=d*(o+a);if(p>u)throw new Error(`Scrypt: parameters too large, ${p} (128 * r * (N + p)) > ${u} (maxmem)`);const h=la(ba,e,t,{c:1,dkLen:d*a}),g=Js(h),y=Js(new Uint8Array(d*o)),m=Js(new Uint8Array(d));let b=()=>{};if(l){const e=2*o*a,t=Math.max(Math.floor(e/1e4),1);let r=0;b=()=>{r++,!l||r%t&&r!==e||l(r/e)}}return{N:o,r:s,p:a,dkLen:i,blockSize32:f,V:y,B32:g,B:h,tmp:m,blockMixCb:b,asyncTick:c}}function Uf(e,t,r,n,o){const s=la(ba,e,r,{c:1,dkLen:t});return r.fill(0),n.fill(0),o.fill(0),s}let Df=!1,Lf=!1;const $f=async function(e,t,r,n,o,s,a){return await async function(e,t,r){const{N:n,r:o,p:s,dkLen:a,blockSize32:i,V:c,B32:u,B:l,tmp:d,blockMixCb:f,asyncTick:p}=Nf(e,t,r);for(let e=0;e<s;e++){const t=i*e;for(let e=0;e<i;e++)c[e]=u[t+e];let r=0;await ea(n-1,p,(()=>{kf(c,r,c,r+=i,o),f()})),kf(c,(n-1)*i,u,t,o),f(),await ea(n,p,(()=>{const e=u[t+i-16]%n;for(let r=0;r<i;r++)d[r]=u[t+r]^c[e*i+r];kf(d,0,u,t,o),f()}))}return Uf(e,a,l,c,d)}(e,t,{N:r,r:n,p:o,dkLen:s,onProgress:a})},zf=function(e,t,r,n,o,s){return function(e,t,r){const{N:n,r:o,p:s,dkLen:a,blockSize32:i,V:c,B32:u,B:l,tmp:d,blockMixCb:f}=Nf(e,t,r);for(let e=0;e<s;e++){const t=i*e;for(let e=0;e<i;e++)c[e]=u[t+e];for(let e=0,t=0;e<n-1;e++)kf(c,t,c,t+=i,o),f();kf(c,(n-1)*i,u,t,o),f();for(let e=0;e<n;e++){const e=u[t+i-16]%n;for(let r=0;r<i;r++)d[r]=u[t+r]^c[e*i+r];kf(d,0,u,t,o),f()}}return Uf(e,a,l,c,d)}(e,t,{N:r,r:n,p:o,dkLen:s})};let jf=$f,Vf=zf;async function Gf(e,t,r,n,o,s,a){const i=ds(e,"passwd"),c=ds(t,"salt");return ys(await jf(i,c,r,n,o,s,a))}function Hf(e,t,r,n,o,s){const a=ds(e,"passwd"),i=ds(t,"salt");return ys(Vf(a,i,r,n,o,s))}function Kf(e){const t=ds(e,"randomBytes");t[6]=15&t[6]|64,t[8]=63&t[8]|128;const r=ys(t);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}function Zf(e,t){for(e=String(e);e.length<t;)e="0"+e;return e}function qf(e){return"string"==typeof e?Qa(e,"NFKC"):fs(e)}Gf._=$f,Gf.lock=function(){Lf=!0},Gf.register=function(e){if(Lf)throw new Error("scrypt is locked");jf=e},Object.freeze(Gf),Hf._=zf,Hf.lock=function(){Df=!0},Hf.register=function(e){if(Df)throw new Error("scryptSync is locked");Vf=e},Object.freeze(Hf);const Jf="m/44'/60'/0'/0/0";function Yf(e){const t=null!=e.salt?ds(e.salt,"options.salt"):Jl(32);let r=1<<17,n=8,o=1;return e.scrypt&&(e.scrypt.N&&(r=e.scrypt.N),e.scrypt.r&&(n=e.scrypt.r),e.scrypt.p&&(o=e.scrypt.p)),ss("number"==typeof r&&r>0&&Number.isSafeInteger(r)&&(BigInt(r)&BigInt(r-1))===BigInt(0),"invalid scrypt N parameter","options.N",r),ss("number"==typeof n&&n>0&&Number.isSafeInteger(n),"invalid scrypt r parameter","options.r",n),ss("number"==typeof o&&o>0&&Number.isSafeInteger(o),"invalid scrypt p parameter","options.p",o),{name:"scrypt",dkLen:32,salt:t,N:r,r:n,p:o}}function Xf(e,t,r,n){const o=ds(r.privateKey,"privateKey"),s=null!=n.iv?ds(n.iv,"options.iv"):Jl(16);ss(16===s.length,"invalid options.iv length","options.iv",n.iv);const a=null!=n.uuid?ds(n.uuid,"options.uuid"):Jl(16);ss(16===a.length,"invalid options.uuid length","options.uuid",n.iv);const i=e.slice(0,16),c=e.slice(16,32),u=ds(new Mf(i,s).encrypt(o)),l=Ti(ms([c,u])),d={address:r.address.substring(2).toLowerCase(),id:Kf(a),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:ys(s).substring(2)},ciphertext:ys(u).substring(2),kdf:"scrypt",kdfparams:{salt:ys(t.salt).substring(2),n:t.N,dklen:32,p:t.p,r:t.r},mac:l.substring(2)}};if(r.mnemonic){const t=null!=n.client?n.client:`ethers/${Yo}`,o=r.mnemonic.path||Jf,s=r.mnemonic.locale||"en",a=e.slice(32,64),i=ds(r.mnemonic.entropy,"account.mnemonic.entropy"),c=Jl(16),u=ds(new Mf(a,c).encrypt(i)),l=new Date,f="UTC--"+(l.getUTCFullYear()+"-"+Zf(l.getUTCMonth()+1,2)+"-"+Zf(l.getUTCDate(),2)+"T"+Zf(l.getUTCHours(),2)+"-"+Zf(l.getUTCMinutes(),2)+"-"+Zf(l.getUTCSeconds(),2)+".0Z")+"--"+d.address;d["x-ethers"]={client:t,gethFilename:f,path:o,locale:s,mnemonicCounter:ys(c).substring(2),mnemonicCiphertext:ys(u).substring(2),version:"0.1"}}return JSON.stringify(d)}const Qf="m/44'/60'/0'/0/0",ep=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),tp=2147483648,rp=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");function np(e,t){let r="";for(;e;)r="0123456789abcdef"[e%16]+r,e=Math.trunc(e/16);for(;r.length<2*t;)r="0"+r;return"0x"+r}function op(e){const t=ds(e);return function(e){const t=ds(e);let r=_s(t),n="";for(;r;)n=Md[Number(r%Nd)]+n,r/=Nd;for(let e=0;e<t.length&&!t[e];e++)n=Md[0]+n;return n}(ms([t,ws(Va(Va(t)),0,4)]))}const sp={};function ap(e,t,r,n){const o=new Uint8Array(37);e&tp?(os(null!=n,"cannot derive child of neutered node","UNSUPPORTED_OPERATION",{operation:"deriveChild"}),o.set(ds(n),1)):o.set(ds(r));for(let t=24;t>=0;t-=8)o[33+(t>>3)]=e>>24-t&255;const s=ds(Ui("sha512",t,o));return{IL:s.slice(0,32),IR:s.slice(32)}}function ip(e,t){const r=t.split("/");ss(r.length>0,"invalid path","path",t),"m"===r[0]&&(ss(0===e.depth,`cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${e.depth}`,"path",t),r.shift());let n=e;for(let e=0;e<r.length;e++){const t=r[e];if(t.match(/^[0-9]+'$/)){const r=parseInt(t.substring(0,t.length-1));ss(r<tp,"invalid path index",`path[${e}]`,t),n=n.deriveChild(tp+r)}else if(t.match(/^[0-9]+$/)){const r=parseInt(t);ss(r<tp,"invalid path index",`path[${e}]`,t),n=n.deriveChild(r)}else ss(!1,"invalid path component",`path[${e}]`,t)}return n}class cp extends ef{publicKey;fingerprint;parentFingerprint;mnemonic;chainCode;path;index;depth;constructor(e,t,r,n,o,s,a,i,c){super(t,c),us(e,sp,"HDNodeWallet"),es(this,{publicKey:t.compressedPublicKey});es(this,{parentFingerprint:r,fingerprint:ws(Hl(Va(this.publicKey)),0,4),chainCode:n,path:o,index:s,depth:a}),es(this,{mnemonic:i})}connect(e){return new cp(sp,this.signingKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.mnemonic,e)}#G(){const e={address:this.address,privateKey:this.privateKey},t=this.mnemonic;return this.path&&t&&"en"===t.wordlist.locale&&""===t.password&&(e.mnemonic={path:this.path,locale:"en",entropy:t.entropy}),e}async encrypt(e,t){return await async function(e,t,r){null==r&&(r={});const n=qf(t),o=Yf(r);return Xf(ds(await Gf(n,o.salt,o.N,o.r,o.p,64,r.progressCallback)),o,e,r)}(this.#G(),e,{progressCallback:t})}encryptSync(e){return function(e,t,r){null==r&&(r={});const n=qf(t),o=Yf(r);return Xf(ds(Hf(n,o.salt,o.N,o.r,o.p,64)),o,e,r)}(this.#G(),e)}get extendedKey(){return os(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),op(ms(["0x0488ADE4",np(this.depth,1),this.parentFingerprint,np(this.index,4),this.chainCode,ms(["0x00",this.privateKey])]))}hasPath(){return null!=this.path}neuter(){return new up(sp,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.provider)}deriveChild(e){const t=Os(e,"index");ss(t<=4294967295,"invalid index","index",t);let r=this.path;r&&(r+="/"+(2147483647&t),t&tp&&(r+="'"));const{IR:n,IL:o}=ap(t,this.chainCode,this.publicKey,this.privateKey),s=new yu(Rs((_s(o)+BigInt(this.privateKey))%rp,32));return new cp(sp,s,this.fingerprint,ys(n),r,t,this.depth+1,this.mnemonic,this.provider)}derivePath(e){return ip(this,e)}static#H(e,t){ss(hs(e),"invalid seed","seed","[REDACTED]");const r=ds(e,"seed");ss(r.length>=16&&r.length<=64,"invalid seed","seed","[REDACTED]");const n=ds(Ui("sha512",ep,r)),o=new yu(ys(n.slice(0,32)));return new cp(sp,o,"0x00000000",ys(n.slice(32)),"m",0,0,t,null)}static fromExtendedKey(e){const t=Ms(function(e){let t=kd;for(let r=0;r<e.length;r++)t*=Nd,t+=Fd(e[r]);return t}(e));ss(82===t.length||op(t.slice(0,78))===e,"invalid extended key","extendedKey","[ REDACTED ]");const r=t[4],n=ys(t.slice(5,9)),o=parseInt(ys(t.slice(9,13)).substring(2),16),s=ys(t.slice(13,45)),a=t.slice(45,78);switch(ys(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":{const e=ys(a);return new up(sp,mu(e),e,n,s,null,o,r,null)}case"0x0488ade4":case"0x04358394 ":if(0!==a[0])break;return new cp(sp,new yu(a.slice(1)),n,s,null,o,r,null,null)}ss(!1,"invalid extended key prefix","extendedKey","[ REDACTED ]")}static createRandom(e,t,r){null==e&&(e=""),null==t&&(t=Qf),null==r&&(r=Ii.wordlist());const n=xi.fromEntropy(Jl(16),e,r);return cp.#H(n.computeSeed(),n).derivePath(t)}static fromMnemonic(e,t){return t||(t=Qf),cp.#H(e.computeSeed(),e).derivePath(t)}static fromPhrase(e,t,r,n){null==t&&(t=""),null==r&&(r=Qf),null==n&&(n=Ii.wordlist());const o=xi.fromPhrase(e,t,n);return cp.#H(o.computeSeed(),o).derivePath(r)}static fromSeed(e){return cp.#H(e,null)}}class up extends Rd{publicKey;fingerprint;parentFingerprint;chainCode;path;index;depth;constructor(e,t,r,n,o,s,a,i,c){super(t,c),us(e,sp,"HDNodeVoidWallet"),es(this,{publicKey:r});es(this,{publicKey:r,fingerprint:ws(Hl(Va(r)),0,4),parentFingerprint:n,chainCode:o,path:s,index:a,depth:i})}connect(e){return new up(sp,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,e)}get extendedKey(){return os(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),op(ms(["0x0488B21E",np(this.depth,1),this.parentFingerprint,np(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return null!=this.path}deriveChild(e){const t=Os(e,"index");ss(t<=4294967295,"invalid index","index",t);let r=this.path;r&&(r+="/"+(2147483647&t),t&tp&&(r+="'"));const{IR:n,IL:o}=ap(t,this.chainCode,this.publicKey,null),s=yu.addPoints(o,this.publicKey,!0),a=mu(s);return new up(sp,a,s,this.fingerprint,ys(n),r,t,this.depth+1,this.provider)}derivePath(e){return ip(this,e)}}const lp={en:Ii.wordlist()};var dp;function fp(e){const t=new Set;return e.forEach((e=>t.add(e))),Object.freeze(t)}const pp="constant external internal payable private public pure view",hp=fp(pp.split(" ")),gp="constructor error event fallback function receive struct",yp=fp(gp.split(" ")),mp="calldata memory storage payable indexed",bp=fp(mp.split(" ")),wp=fp([gp,mp,"tuple returns",pp].join(" ").split(" ")),Tp={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},Ap=new RegExp("^(\\s*)"),vp=new RegExp("^([0-9]+)"),Pp=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),Ep=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),Cp=new RegExp("^(trcToken|address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class Bp{#f;#w;get offset(){return this.#f}get length(){return this.#w.length-this.#f}constructor(e){this.#f=0,this.#w=e.slice()}clone(){return new dp(this.#w)}reset(){this.#f=0}#T(e=0,t=0){return new dp(this.#w.slice(e,t).map((t=>Object.freeze(Object.assign({},t,{match:t.match-e,linkBack:t.linkBack-e,linkNext:t.linkNext-e})))))}popKeyword(e){const t=this.peek();if("KEYWORD"!==t.type||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e)throw new Error(`expected ${e}; got ${JSON.stringify(this.peek())}`);return this.pop().text}popParen(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=this.#T(this.#f+1,e.match+1);return this.#f=e.match+1,t}popParams(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=[];for(;this.#f<e.match-1;){const e=this.peek().linkNext;t.push(this.#T(this.#f+1,e)),this.#f=e}return this.#f=e.match+1,t}peek(){if(this.#f>=this.#w.length)throw new Error("out-of-bounds");return this.#w[this.#f]}peekKeyword(e){const t=this.peekType("KEYWORD");return null!=t&&e.has(t)?t:null}peekType(e){if(0===this.length)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return this.#f++,e}toString(){const e=[];for(let t=this.#f;t<this.#w.length;t++){const r=this.#w[t];e.push(`${r.type}:${r.text}`)}return`<TokenString ${e.join(" ")}>`}}function Wp(e){const t=[],r=t=>{const r=s<e.length?JSON.stringify(e[s]):"$EOI";throw new Error(`invalid token ${r} at ${s}: ${t}`)},n=[],o=[];let s=0;for(;s<e.length;){let a=e.substring(s),i=a.match(Ap);i&&(s+=i[1].length,a=e.substring(s));const c={depth:n.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:s,value:-1};t.push(c);const u=Tp[a[0]]||"";if(u){if(c.type=u,c.text=a[0],s++,"OPEN_PAREN"===u)n.push(t.length-1),o.push(t.length-1);else if("CLOSE_PAREN"==u)0===n.length&&r("no matching open bracket"),c.match=n.pop(),t[c.match].match=t.length-1,c.depth--,c.linkBack=o.pop(),t[c.linkBack].linkNext=t.length-1;else if("COMMA"===u)c.linkBack=o.pop(),t[c.linkBack].linkNext=t.length-1,o.push(t.length-1);else if("OPEN_BRACKET"===u)c.type="BRACKET";else if("CLOSE_BRACKET"===u){let e=t.pop().text;if(t.length>0&&"NUMBER"===t[t.length-1].type){const r=t.pop().text;e=r+e,t[t.length-1].value=Os(r)}if(0===t.length||"BRACKET"!==t[t.length-1].type)throw new Error("missing opening bracket");t[t.length-1].text+=e}}else if(i=a.match(Pp),i){if(c.text=i[1],s+=c.text.length,wp.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(Cp)){c.type="TYPE";continue}c.type="ID"}else{if(i=a.match(vp),!i)throw new Error(`unexpected token ${JSON.stringify(a[0])} at position ${s}`);c.text=i[1],c.type="NUMBER",s+=c.text.length}}return new Bp(t.map((e=>Object.freeze(e))))}function Sp(e,t){const r=[];for(const n in t.keys())e.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(", ")}`)}function Ip(e,t){if(t.peekKeyword(yp)){const r=t.pop().text;if(r!==e)throw new Error(`expected ${e}, got ${r}`)}return t.popType("ID")}function _p(e,t){const r=new Set;for(;;){const n=e.peekType("KEYWORD");if(null==n||t&&!t.has(n))break;if(e.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function Op(e){const t=_p(e,hp);return Sp(t,fp("constant payable nonpayable".split(" "))),Sp(t,fp("pure view payable nonpayable".split(" "))),t.has("view")?"view":t.has("pure")?"pure":t.has("payable")?"payable":t.has("nonpayable")?"nonpayable":t.has("constant")?"view":"nonpayable"}function Rp(e,t){return e.popParams().map((e=>Hp.from(e,t)))}function Mp(e){if(e.peekType("AT")){if(e.pop(),e.peekType("NUMBER"))return Ws(e.pop().text);throw new Error("invalid gas")}return null}function xp(e){if(e.length)throw new Error(`unexpected tokens: ${e.toString()}`)}dp=Bp;const Fp=new RegExp(/^(.*)\[([0-9]*)\]$/);function kp(e){const t=e.match(Cp);if(ss(t,"invalid type","type",e),"uint"===e)return"uint256";if("int"===e)return"int256";if(t[2]){const r=parseInt(t[2]);ss(0!==r&&r<=32,"invalid bytes length","type",e)}else if(t[3]){const r=parseInt(t[3]);ss(0!==r&&r<=256&&r%8==0,"invalid numeric width","type",e)}return e}const Np={},Up=Symbol.for("_ethers_internal"),Dp="_ParamTypeInternal",Lp="_ErrorInternal",$p="_EventInternal",zp="_ConstructorInternal",jp="_FallbackInternal",Vp="_FunctionInternal",Gp="_StructInternal";class Hp{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,r,n,o,s,a,i){if(us(e,Np,"ParamType"),Object.defineProperty(this,Up,{value:Dp}),s&&(s=Object.freeze(s.slice())),"array"===n){if(null==a||null==i)throw new Error("")}else if(null!=a||null!=i)throw new Error("");if("tuple"===n){if(null==s)throw new Error("")}else if(null!=s)throw new Error("");es(this,{name:t,type:r,baseType:n,indexed:o,components:s,arrayLength:a,arrayChildren:i})}format(e){if(null==e&&(e="sighash"),"json"===e){const t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.isTuple()&&(t.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(t)}let t="";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?("sighash"!==e&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join("full"===e?", ":",")+")"):t+=this.type,"sighash"!==e&&(!0===this.indexed&&(t+=" indexed"),"full"===e&&this.name&&(t+=" "+this.name)),t}isArray(){return"array"===this.baseType}isTuple(){return"tuple"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw new Error("array is wrong length");return e.map((e=>this.arrayChildren?.walk(e,t)))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");return e.map(((e,r)=>this.components?.[r].walk(e,t)))}return t(this.type,e)}#A(e,t,r,n){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw new Error("array is wrong length");const o=this.arrayChildren,s=t.slice();return s.forEach(((t,n)=>{o.#A(e,t,r,(e=>{s[n]=e}))})),void n(s)}if(this.isTuple()){const o=this.components;let s;if(Array.isArray(t))s=t.slice();else{if(null==t||"object"!=typeof t)throw new Error("invalid tuple value");s=o.map((e=>{if(!e.name)throw new Error("cannot use object value with unnamed components");if(!(e.name in t))throw new Error(`missing value for component ${e.name}`);return t[e.name]}))}if(s.length!==this.components.length)throw new Error("array is wrong length");return s.forEach(((t,n)=>{o[n].#A(e,t,r,(e=>{s[n]=e}))})),void n(s)}const o=r(this.type,t);o.then?e.push(async function(){n(await o)}()):n(o)}async walkAsync(e,t){const r=[],n=[e];return this.#A(r,e,t,(e=>{n[0]=e})),r.length&&await Promise.all(r),n[0]}static from(e,t){if(Hp.isParamType(e))return e;if("string"==typeof e)return Hp.from(Wp(e),t);if(e instanceof Bp){let r="",n="",o=null;_p(e,fp(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(n="tuple",o=e.popParams().map((e=>Hp.from(e))),r=`tuple(${o.map((e=>e.format())).join(",")})`):(r=kp(e.popType("TYPE")),n=r);let s=null,a=null;for(;e.length&&e.peekType("BRACKET");){const t=e.pop();s=new Hp(Np,"",r,n,null,o,a,s),a=t.value,r+=t.text,n="array",o=null}let i=null;if(_p(e,bp).has("indexed")){if(!t)throw new Error("");i=!0}const c=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new Hp(Np,c,r,n,i,o,a,s)}const r=e.name;ss(!r||"string"==typeof r&&r.match(Ep),"invalid name","obj.name",r);let n=e.indexed;null!=n&&(ss(t,"parameter cannot be indexed","obj.indexed",e.indexed),n=!!n);let o=e.type;const s=o.match(Fp);if(s){const t=parseInt(s[2]||"-1"),a=Hp.from({type:s[1],components:e.components});return new Hp(Np,r||"",o,"array",n,null,t,a)}if("tuple"===o||o.startsWith("tuple(")||o.startsWith("(")){const t=null!=e.components?e.components.map((e=>Hp.from(e))):null;return new Hp(Np,r||"",o,"tuple",n,t,null,null)}return o=kp(e.type),new Hp(Np,r||"",o,o,n,null,null,null)}static isParamType(e){return e&&e[Up]===Dp}}class Kp{type;inputs;constructor(e,t,r){us(e,Np,"Fragment"),es(this,{type:t,inputs:r=Object.freeze(r.slice())})}static from(e){if("string"==typeof e){try{Kp.from(JSON.parse(e))}catch(e){}return Kp.from(Wp(e))}if(e instanceof Bp){switch(e.peekKeyword(yp)){case"constructor":return Xp.from(e);case"error":return Jp.from(e);case"event":return Yp.from(e);case"fallback":case"receive":return Qp.from(e);case"function":return eh.from(e);case"struct":return th.from(e)}}else if("object"==typeof e){switch(e.type){case"constructor":return Xp.from(e);case"error":return Jp.from(e);case"event":return Yp.from(e);case"fallback":case"receive":return Qp.from(e);case"function":return eh.from(e);case"struct":return th.from(e)}os(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}ss(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return Xp.isFragment(e)}static isError(e){return Jp.isFragment(e)}static isEvent(e){return Yp.isFragment(e)}static isFunction(e){return eh.isFragment(e)}static isStruct(e){return th.isFragment(e)}}class Zp extends Kp{name;constructor(e,t,r,n){super(e,t,n),ss("string"==typeof r&&r.match(Ep),"invalid identifier","name",r),n=Object.freeze(n.slice()),es(this,{name:r})}}function qp(e,t){return"("+t.map((t=>t.format(e))).join("full"===e?", ":",")+")"}class Jp extends Zp{constructor(e,t,r){super(e,"error",t,r),Object.defineProperty(this,Up,{value:Lp})}get selector(){return Ai(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("error"),t.push(this.name+qp(e,this.inputs)),t.join(" ")}static from(e){if(Jp.isFragment(e))return e;if("string"==typeof e)return Jp.from(Wp(e));if(e instanceof Bp){const t=Ip("error",e),r=Rp(e);return xp(e),new Jp(Np,t,r)}return new Jp(Np,e.name,e.inputs?e.inputs.map(Hp.from):[])}static isFragment(e){return e&&e[Up]===Lp}}class Yp extends Zp{anonymous;constructor(e,t,r,n){super(e,"event",t,r),Object.defineProperty(this,Up,{value:$p}),es(this,{anonymous:n})}get topicHash(){return Ai(this.format("sighash"))}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("event"),t.push(this.name+qp(e,this.inputs)),"sighash"!==e&&this.anonymous&&t.push("anonymous"),t.join(" ")}static getTopicHash(e,t){t=(t||[]).map((e=>Hp.from(e)));return new Yp(Np,e,t,!1).topicHash}static from(e){if(Yp.isFragment(e))return e;if("string"==typeof e)return Yp.from(Wp(e));if(e instanceof Bp){const t=Ip("event",e),r=Rp(e,!0),n=!!_p(e,fp(["anonymous"])).has("anonymous");return xp(e),new Yp(Np,t,r,n)}return new Yp(Np,e.name,e.inputs?e.inputs.map((e=>Hp.from(e,!0))):[],!!e.anonymous)}static isFragment(e){return e&&e[Up]===$p}}class Xp extends Kp{payable;gas;constructor(e,t,r,n,o){super(e,t,r),Object.defineProperty(this,Up,{value:zp}),es(this,{payable:n,gas:o})}format(e){if(os(null!=e&&"sighash"!==e,"cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),"json"===e)return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[`constructor${qp(e,this.inputs)}`];return t.push(this.payable?"payable":"nonpayable"),null!=this.gas&&t.push(`@${this.gas.toString()}`),t.join(" ")}static from(e){if(Xp.isFragment(e))return e;if("string"==typeof e)return Xp.from(Wp(e));if(e instanceof Bp){_p(e,fp(["constructor"]));const t=Rp(e),r=!!_p(e,fp(["payable"])).has("payable"),n=Mp(e);return xp(e),new Xp(Np,"constructor",t,r,n)}return new Xp(Np,"constructor",e.inputs?e.inputs.map(Hp.from):[],!!e.payable,null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[Up]===zp}}class Qp extends Kp{payable;constructor(e,t,r){super(e,"fallback",t),Object.defineProperty(this,Up,{value:jp}),es(this,{payable:r})}format(e){const t=0===this.inputs.length?"receive":"fallback";if("json"===e){const e=this.payable?"payable":"nonpayable";return JSON.stringify({type:t,stateMutability:e})}return`${t}()${this.payable?" payable":""}`}static from(e){if(Qp.isFragment(e))return e;if("string"==typeof e)return Qp.from(Wp(e));if(e instanceof Bp){const t=e.toString();ss(e.peekKeyword(fp(["fallback","receive"])),"type must be fallback or receive","obj",t);if("receive"===e.popKeyword(fp(["fallback","receive"]))){const t=Rp(e);return ss(0===t.length,"receive cannot have arguments","obj.inputs",t),_p(e,fp(["payable"])),xp(e),new Qp(Np,[],!0)}let r=Rp(e);r.length?ss(1===r.length&&"bytes"===r[0].type,"invalid fallback inputs","obj.inputs",r.map((e=>e.format("minimal"))).join(", ")):r=[Hp.from("bytes")];const n=Op(e);if(ss("nonpayable"===n||"payable"===n,"fallback cannot be constants","obj.stateMutability",n),_p(e,fp(["returns"])).has("returns")){const t=Rp(e);ss(1===t.length&&"bytes"===t[0].type,"invalid fallback outputs","obj.outputs",t.map((e=>e.format("minimal"))).join(", "))}return xp(e),new Qp(Np,r,"payable"===n)}if("receive"===e.type)return new Qp(Np,[],!0);if("fallback"===e.type){const t=[Hp.from("bytes")],r="payable"===e.stateMutability;return new Qp(Np,t,r)}ss(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[Up]===jp}}class eh extends Zp{constant;outputs;stateMutability;payable;gas;constructor(e,t,r,n,o,s){super(e,"function",t,n),Object.defineProperty(this,Up,{value:Vp});es(this,{constant:"view"===r||"pure"===r,gas:s,outputs:o=Object.freeze(o.slice()),payable:"payable"===r,stateMutability:r})}get selector(){return Ai(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("function"),t.push(this.name+qp(e,this.inputs)),"sighash"!==e&&("nonpayable"!==this.stateMutability&&t.push(this.stateMutability),this.outputs&&this.outputs.length&&(t.push("returns"),t.push(qp(e,this.outputs))),null!=this.gas&&t.push(`@${this.gas.toString()}`)),t.join(" ")}static getSelector(e,t){t=(t||[]).map((e=>Hp.from(e)));return new eh(Np,e,"view",t,[],null).selector}static from(e){if(eh.isFragment(e))return e;if("string"==typeof e)return eh.from(Wp(e));if(e instanceof Bp){const t=Ip("function",e),r=Rp(e),n=Op(e);let o=[];_p(e,fp(["returns"])).has("returns")&&(o=Rp(e));const s=Mp(e);return xp(e),new eh(Np,t,n,r,o,s)}let t=e.stateMutability;return null==t&&(t="payable","boolean"==typeof e.constant?(t="view",e.constant||(t="payable","boolean"!=typeof e.payable||e.payable||(t="nonpayable"))):"boolean"!=typeof e.payable||e.payable||(t="nonpayable")),new eh(Np,e.name,t,e.inputs?e.inputs.map(Hp.from):[],e.outputs?e.outputs.map(Hp.from):[],null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[Up]===Vp}}class th extends Zp{constructor(e,t,r){super(e,"struct",t,r),Object.defineProperty(this,Up,{value:Gp})}format(){throw new Error("@TODO")}static from(e){if("string"==typeof e)return th.from(Wp(e));if(e instanceof Bp){const t=Ip("struct",e),r=Rp(e);return xp(e),new th(Np,t,r)}return new th(Np,e.name,e.inputs?e.inputs.map(Hp.from):[])}static isFragment(e){return e&&e[Up]===Gp}}class rh{fragment;name;signature;topic;args;constructor(e,t,r){const n=e.name,o=e.format();es(this,{fragment:e,name:n,signature:o,topic:t,args:r})}}class nh{fragment;name;args;signature;selector;value;constructor(e,t,r,n){const o=e.name,s=e.format();es(this,{fragment:e,name:o,args:r,signature:s,selector:t,value:n})}}class oh{fragment;name;args;signature;selector;constructor(e,t,r){const n=e.name,o=e.format();es(this,{fragment:e,name:n,args:r,signature:o,selector:t})}}class sh{hash;_isIndexed;static isIndexed(e){return!(!e||!e._isIndexed)}constructor(e){es(this,{hash:e,_isIndexed:!0})}}const ah={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},ih={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:e=>`reverted with reason string ${JSON.stringify(e)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:e=>{let t="unknown panic code";return e>=0&&e<=255&&ah[e.toString()]&&(t=ah[e.toString()]),`reverted with panic code 0x${e.toString(16)} (${t})`}}};class ch{fragments;deploy;fallback;receive;#K;#Z;#q;#J;constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,this.#q=new Map,this.#K=new Map,this.#Z=new Map;const r=[];for(const e of t)try{r.push(Kp.from(e))}catch(e){console.log("EE",e)}es(this,{fragments:Object.freeze(r)});let n=null,o=!1;this.#J=this.getAbiCoder(),this.fragments.forEach(((e,t)=>{let r;switch(e.type){case"constructor":return this.deploy?void console.log("duplicate definition - constructor"):void es(this,{deploy:e});case"fallback":return void(0===e.inputs.length?o=!0:(ss(!n||e.payable!==n.payable,"conflicting fallback fragments",`fragments[${t}]`,e),n=e,o=n.payable));case"function":r=this.#q;break;case"event":r=this.#Z;break;case"error":r=this.#K;break;default:return}const s=e.format();r.has(s)||r.set(s,e)})),this.deploy||es(this,{deploy:Xp.from("constructor()")}),es(this,{fallback:n,receive:o})}format(e){const t=e?"minimal":"full",r=this.fragments.map((e=>e.format(t)));return r}formatJson(){const e=this.fragments.map((e=>e.format("json")));return JSON.stringify(e.map((e=>JSON.parse(e))))}getAbiCoder(){return Wl.defaultAbiCoder()}#Y(e,t,r){if(ps(e)){const t=e.toLowerCase();for(const e of this.#q.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){const n=[];for(const[t,r]of this.#q)t.split("(")[0]===e&&n.push(r);if(t){const e=t.length>0?t[t.length-1]:null;let r=t.length,o=!0;Nu.isTyped(e)&&"overrides"===e.type&&(o=!1,r--);for(let e=n.length-1;e>=0;e--){const t=n[e].inputs.length;t===r||o&&t===r-1||n.splice(e,1)}for(let e=n.length-1;e>=0;e--){const r=n[e].inputs;for(let o=0;o<t.length;o++)if(Nu.isTyped(t[o])){if(o>=r.length){if("overrides"===t[o].type)continue;n.splice(e,1);break}if(t[o].type!==r[o].baseType){n.splice(e,1);break}}}}if(1===n.length&&t&&t.length!==n[0].inputs.length){const e=t[t.length-1];(null==e||Array.isArray(e)||"object"!=typeof e)&&n.splice(0,1)}if(0===n.length)return null;if(n.length>1&&r){const t=n.map((e=>JSON.stringify(e.format()))).join(", ");ss(!1,`ambiguous function description (i.e. matches ${t})`,"key",e)}return n[0]}const n=this.#q.get(eh.from(e).format());return n||null}getFunctionName(e){const t=this.#Y(e,null,!1);return ss(t,"no matching function","key",e),t.name}hasFunction(e){return!!this.#Y(e,null,!1)}getFunction(e,t){return this.#Y(e,t||null,!0)}forEachFunction(e){const t=Array.from(this.#q.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r<t.length;r++){const n=t[r];e(this.#q.get(n),r)}}#X(e,t,r){if(ps(e)){const t=e.toLowerCase();for(const e of this.#Z.values())if(t===e.topicHash)return e;return null}if(-1===e.indexOf("(")){const n=[];for(const[t,r]of this.#Z)t.split("(")[0]===e&&n.push(r);if(t){for(let e=n.length-1;e>=0;e--)n[e].inputs.length<t.length&&n.splice(e,1);for(let e=n.length-1;e>=0;e--){const r=n[e].inputs;for(let o=0;o<t.length;o++)if(Nu.isTyped(t[o])&&t[o].type!==r[o].baseType){n.splice(e,1);break}}}if(0===n.length)return null;if(n.length>1&&r){const t=n.map((e=>JSON.stringify(e.format()))).join(", ");ss(!1,`ambiguous event description (i.e. matches ${t})`,"key",e)}return n[0]}const n=this.#Z.get(Yp.from(e).format());return n||null}getEventName(e){const t=this.#X(e,null,!1);return ss(t,"no matching event","key",e),t.name}hasEvent(e){return!!this.#X(e,null,!1)}getEvent(e,t){return this.#X(e,t||null,!0)}forEachEvent(e){const t=Array.from(this.#Z.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r<t.length;r++){const n=t[r];e(this.#Z.get(n),r)}}getError(e,t){if(ps(e)){const t=e.toLowerCase();if(ih[t])return Jp.from(ih[t].signature);for(const e of this.#K.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){const t=[];for(const[r,n]of this.#K)r.split("(")[0]===e&&t.push(n);if(0===t.length)return"Error"===e?Jp.from("error Error(string)"):"Panic"===e?Jp.from("error Panic(uint256)"):null;if(t.length>1){const r=t.map((e=>JSON.stringify(e.format()))).join(", ");ss(!1,`ambiguous error description (i.e. ${r})`,"name",e)}return t[0]}if("Error(string)"===(e=Jp.from(e).format()))return Jp.from("error Error(string)");if("Panic(uint256)"===e)return Jp.from("error Panic(uint256)");const r=this.#K.get(e);return r||null}forEachError(e){const t=Array.from(this.#K.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r<t.length;r++){const n=t[r];e(this.#K.get(n),r)}}_decodeParams(e,t){return this.#J.decode(e,t)}_encodeParams(e,t){return this.#J.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){if("string"==typeof e){const t=this.getError(e);ss(t,"unknown error","fragment",e),e=t}return ss(ws(t,0,4)===e.selector,`data signature does not match error ${e.name}.`,"data",t),this._decodeParams(e.inputs,ws(t,4))}encodeErrorResult(e,t){if("string"==typeof e){const t=this.getError(e);ss(t,"unknown error","fragment",e),e=t}return ms([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionData(e,t){if("string"==typeof e){const t=this.getFunction(e);ss(t,"unknown function","fragment",e),e=t}return ss(ws(t,0,4)===e.selector,`data signature does not match function ${e.name}.`,"data",t),this._decodeParams(e.inputs,ws(t,4))}encodeFunctionData(e,t){if("string"==typeof e){const t=this.getFunction(e);ss(t,"unknown function","fragment",e),e=t}return ms([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionResult(e,t){if("string"==typeof e){const t=this.getFunction(e);ss(t,"unknown function","fragment",e),e=t}let r="invalid length for result data";const n=fs(t);if(n.length%32==0)try{return this.#J.decode(e.outputs,n)}catch(e){r="could not decode result data"}os(!1,r,"BAD_DATA",{value:ys(n),info:{method:e.name,signature:e.format()}})}makeError(e,t){const r=ds(e,"data"),n=Wl.getBuiltinCallException("call",t,r);if(n.message.startsWith("execution reverted (unknown custom error)")){const e=ys(r.slice(0,4)),t=this.getError(e);if(t)try{const e=this.#J.decode(t.inputs,r.slice(4));n.revert={name:t.name,signature:t.format(),args:e},n.reason=n.revert.signature,n.message=`execution reverted: ${n.reason}`}catch(e){n.message="execution reverted (coult not decode custom error)"}}const o=this.parseTransaction(t);return o&&(n.invocation={method:o.name,signature:o.signature,args:o.args}),n}encodeFunctionResult(e,t){if("string"==typeof e){const t=this.getFunction(e);ss(t,"unknown function","fragment",e),e=t}return ys(this.#J.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){if("string"==typeof e){const t=this.getEvent(e);ss(t,"unknown event","eventFragment",e),e=t}os(t.length<=e.inputs.length,`too many arguments for ${e.format()}`,"UNEXPECTED_ARGUMENT",{count:t.length,expectedCount:e.inputs.length});const r=[];e.anonymous||r.push(e.topicHash);const n=(e,t)=>"string"===e.type?Ai(t):"bytes"===e.type?Ti(ys(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=Rs(t)),"address"===e.type&&this.#J.encode(["address"],[t]),As(ys(t),32));for(t.forEach(((t,o)=>{const s=e.inputs[o];s.indexed?null==t?r.push(null):"array"===s.baseType||"tuple"===s.baseType?ss(!1,"filtering with tuples or arrays not supported","contract."+s.name,t):Array.isArray(t)?r.push(t.map((e=>n(s,e)))):r.push(n(s,t)):ss(null==t,"cannot filter non-indexed parameters; must be null","contract."+s.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){if("string"==typeof e){const t=this.getEvent(e);ss(t,"unknown event","eventFragment",e),e=t}const r=[],n=[],o=[];return e.anonymous||r.push(e.topicHash),ss(t.length===e.inputs.length,"event arguments/values mismatch","values",t),e.inputs.forEach(((e,s)=>{const a=t[s];if(e.indexed)if("string"===e.type)r.push(Ai(a));else if("bytes"===e.type)r.push(Ti(a));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this.#J.encode([e.type],[a]))}else n.push(e),o.push(a)})),{data:this.#J.encode(n,o),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e){const t=this.getEvent(e);ss(t,"unknown event","eventFragment",e),e=t}if(null!=r&&!e.anonymous){const t=e.topicHash;ss(ps(r[0],32)&&r[0].toLowerCase()===t,"fragment/topic mismatch","topics[0]",r[0]),r=r.slice(1)}const n=[],o=[],s=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(Hp.from({type:"bytes32",name:e.name})),s.push(!0)):(n.push(e),s.push(!1)):(o.push(e),s.push(!1))}));const a=null!=r?this.#J.decode(n,ms(r)):null,i=this.#J.decode(o,t,!0),c=[],u=[];let l=0,d=0;return e.inputs.forEach(((e,t)=>{let r=null;if(e.indexed)if(null==a)r=new sh(null);else if(s[t])r=new sh(a[d++]);else try{r=a[d++]}catch(e){r=e}else try{r=i[l++]}catch(e){r=e}c.push(r),u.push(e.name||null)})),Su.fromItems(c,u)}parseTransaction(e){const t=ds(e.data,"tx.data"),r=Ws(null!=e.value?e.value:0,"tx.value"),n=this.getFunction(ys(t.slice(0,4)));if(!n)return null;const o=this.#J.decode(n.inputs,t.slice(4));return new nh(n,n.selector,o,r)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new rh(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){const t=ys(e),r=this.getError(ws(t,0,4));if(!r)return null;const n=this.#J.decode(r.inputs,ws(t,4));return new oh(r,r.selector,n)}static from(e){return e instanceof ch?e:"string"==typeof e?new ch(JSON.parse(e)):"function"==typeof e.format?new ch(e.format("json")):new ch(e)}}var uh=r(1048).hp;const lh=e=>js.from(e),dh=e=>js.from(e).serialized,fh=e=>ds(e),ph={sighash:"sighash",minimal:"minimal",full:"full",json:"json"},hh=xi.isValidMnemonic;function gh(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function yh(e,...t){if(!function(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function mh(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");gh(e.outputLen),gh(e.blockLen)}function bh(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function wh(e,t){yh(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Ui.register(((e,t,r)=>Ui._(e,uh.from(t),uh.from(r))));const Th="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;const Ah=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),vh=(e,t)=>e<<32-t|e>>>t;new Uint8Array(new Uint32Array([287454020]).buffer)[0];Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function Ph(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),yh(e),e}class Eh{clone(){return this._cloneInto()}}function Ch(e=32){if(Th&&"function"==typeof Th.getRandomValues)return Th.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}const Bh=(e,t,r)=>e&t^~e&r,Wh=(e,t,r)=>e&t^e&r^t&r;class Sh extends Eh{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Ah(this.buffer)}update(e){bh(this);const{view:t,buffer:r,blockLen:n}=this,o=(e=Ph(e)).length;for(let s=0;s<o;){const a=Math.min(n-this.pos,o-s);if(a!==n)r.set(e.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===n&&(this.process(t,0),this.pos=0);else{const t=Ah(e);for(;n<=o-s;s+=n)this.process(t,s)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){bh(this),wh(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:o}=this;let{pos:s}=this;t[s++]=128,this.buffer.subarray(s).fill(0),this.padOffset>n-s&&(this.process(r,0),s=0);for(let e=s;e<n;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const o=BigInt(32),s=BigInt(4294967295),a=Number(r>>o&s),i=Number(r&s),c=n?4:0,u=n?0:4;e.setUint32(t+c,a,n),e.setUint32(t+u,i,n)}(r,n-8,BigInt(8*this.length),o),this.process(r,0);const a=Ah(e),i=this.outputLen;if(i%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=i/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)a.setUint32(4*e,u[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:o,destroyed:s,pos:a}=this;return e.length=n,e.pos=a,e.finished=o,e.destroyed=s,n%t&&e.buffer.set(r),e}}const Ih=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),_h=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Oh=new Uint32Array(64);class Rh extends Sh{constructor(){super(64,32,8,!1),this.A=0|_h[0],this.B=0|_h[1],this.C=0|_h[2],this.D=0|_h[3],this.E=0|_h[4],this.F=0|_h[5],this.G=0|_h[6],this.H=0|_h[7]}get(){const{A:e,B:t,C:r,D:n,E:o,F:s,G:a,H:i}=this;return[e,t,r,n,o,s,a,i]}set(e,t,r,n,o,s,a,i){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|s,this.G=0|a,this.H=0|i}process(e,t){for(let r=0;r<16;r++,t+=4)Oh[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=Oh[e-15],r=Oh[e-2],n=vh(t,7)^vh(t,18)^t>>>3,o=vh(r,17)^vh(r,19)^r>>>10;Oh[e]=o+Oh[e-7]+n+Oh[e-16]|0}let{A:r,B:n,C:o,D:s,E:a,F:i,G:c,H:u}=this;for(let e=0;e<64;e++){const t=u+(vh(a,6)^vh(a,11)^vh(a,25))+Bh(a,i,c)+Ih[e]+Oh[e]|0,l=(vh(r,2)^vh(r,13)^vh(r,22))+Wh(r,n,o)|0;u=c,c=i,i=a,a=s+t|0,s=o,o=n,n=r,r=t+l|0}r=r+this.A|0,n=n+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,i=i+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(r,n,o,s,a,i,c,u)}roundClean(){Oh.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Mh=function(e){const t=t=>e().update(Ph(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}((()=>new Rh));class xh extends Eh{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,mh(e);const r=Ph(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,o=new Uint8Array(n);o.set(r.length>n?e.create().update(r).digest():r);for(let e=0;e<o.length;e++)o[e]^=54;this.iHash.update(o),this.oHash=e.create();for(let e=0;e<o.length;e++)o[e]^=106;this.oHash.update(o),o.fill(0)}update(e){return bh(this),this.iHash.update(e),this}digestInto(e){bh(this),yh(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:o,blockLen:s,outputLen:a}=this;return e.finished=n,e.destroyed=o,e.blockLen=s,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Fh=(e,t,r)=>new xh(e,t).update(r).digest();Fh.create=(e,t)=>new xh(e,t);const kh=BigInt(1),Nh=BigInt(2);function Uh(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function Dh(e){if(!Uh(e))throw new Error("Uint8Array expected")}const Lh=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function $h(e){Dh(e);let t="";for(let r=0;r<e.length;r++)t+=Lh[e[r]];return t}function zh(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}const jh={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function Vh(e){return e>=jh._0&&e<=jh._9?e-jh._0:e>=jh._A&&e<=jh._F?e-(jh._A-10):e>=jh._a&&e<=jh._f?e-(jh._a-10):void 0}function Gh(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let t=0,o=0;t<r;t++,o+=2){const r=Vh(e.charCodeAt(o)),s=Vh(e.charCodeAt(o+1));if(void 0===r||void 0===s){const t=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+o)}n[t]=16*r+s}return n}function Hh(e){return zh($h(e))}function Kh(e){return Dh(e),zh($h(Uint8Array.from(e).reverse()))}function Zh(e,t){return Gh(e.toString(16).padStart(2*t,"0"))}function qh(e,t){return Zh(e,t).reverse()}function Jh(e,t,r){let n;if("string"==typeof t)try{n=Gh(t)}catch(r){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else{if(!Uh(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const o=n.length;if("number"==typeof r&&o!==r)throw new Error(`${e} expected ${r} bytes, got ${o}`);return n}function Yh(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];Dh(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const o=e[t];r.set(o,n),n+=o.length}return r}const Xh=e=>(Nh<<BigInt(e-1))-kh,Qh=e=>new Uint8Array(e),eg=e=>Uint8Array.from(e);function tg(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=Qh(e),o=Qh(e),s=0;const a=()=>{n.fill(1),o.fill(0),s=0},i=(...e)=>r(o,n,...e),c=(e=Qh())=>{o=i(eg([0]),e),n=i(),0!==e.length&&(o=i(eg([1]),e),n=i())},u=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e<t;){n=i();const t=n.slice();r.push(t),e+=n.length}return Yh(...r)};return(e,t)=>{let r;for(a(),c(e);!(r=t(u()));)c();return a(),r}}const rg={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||Uh(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function ng(e,t,r={}){const n=(t,r,n)=>{const o=rg[r];if("function"!=typeof o)throw new Error(`Invalid validator "${r}", expected function`);const s=e[t];if(!(n&&void 0===s||o(s,e)))throw new Error(`Invalid param ${String(t)}=${s} (${typeof s}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}const og=BigInt(0),sg=BigInt(1),ag=BigInt(2),ig=BigInt(3),cg=BigInt(4),ug=BigInt(5),lg=BigInt(8);BigInt(9),BigInt(16);function dg(e,t){const r=e%t;return r>=og?r:t+r}function fg(e,t,r){if(r<=og||t<og)throw new Error("Expected power/modulo > 0");if(r===sg)return og;let n=sg;for(;t>og;)t&sg&&(n=n*e%r),e=e*e%r,t>>=sg;return n}function pg(e,t,r){let n=e;for(;t-- >og;)n*=n,n%=r;return n}function hg(e,t){if(e===og||t<=og)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=dg(e,t),n=t,o=og,s=sg,a=sg,i=og;for(;r!==og;){const e=n/r,t=n%r,c=o-a*e,u=s-i*e;n=r,r=t,o=a,s=i,a=c,i=u}if(n!==sg)throw new Error("invert: does not exist");return dg(o,t)}function gg(e){if(e%cg===ig){const t=(e+sg)/cg;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}if(e%lg===ug){const t=(e-ug)/lg;return function(e,r){const n=e.mul(r,ag),o=e.pow(n,t),s=e.mul(r,o),a=e.mul(e.mul(s,ag),o),i=e.mul(s,e.sub(a,e.ONE));if(!e.eql(e.sqr(i),r))throw new Error("Cannot find square root");return i}}return function(e){const t=(e-sg)/ag;let r,n,o;for(r=e-sg,n=0;r%ag===og;r/=ag,n++);for(o=ag;o<e&&fg(o,t,e)!==e-sg;o++);if(1===n){const t=(e+sg)/cg;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}const s=(r+sg)/ag;return function(e,a){if(e.pow(a,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let i=n,c=e.pow(e.mul(e.ONE,o),r),u=e.pow(a,s),l=e.pow(a,r);for(;!e.eql(l,e.ONE);){if(e.eql(l,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(l);t<i&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const r=e.pow(c,sg<<BigInt(i-t-1));c=e.sqr(r),u=e.mul(u,r),l=e.mul(l,c),i=t}return u}}(e)}const yg=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function mg(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function bg(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function wg(e){const t=bg(e);return t+Math.ceil(t/2)}const Tg=BigInt(0),Ag=BigInt(1);function vg(e){return function(e){const t=yg.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});ng(e,t)}(e.Fp),ng(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...mg(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const{Ph:Pg,aT:Eg}=c,Cg={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:t}=Cg;if(e.length<2||2!==e[0])throw new t("Invalid signature integer tag");const r=e[1],n=e.subarray(2,r+2);if(!r||n.length!==r)throw new t("Invalid signature integer: wrong length");if(128&n[0])throw new t("Invalid signature integer: negative");if(0===n[0]&&!(128&n[1]))throw new t("Invalid signature integer: unnecessary leading zero");return{d:Pg(n),l:e.subarray(r+2)}},toSig(e){const{Err:t}=Cg,r="string"==typeof e?Eg(e):e;Dh(r);let n=r.length;if(n<2||48!=r[0])throw new t("Invalid signature tag");if(r[1]!==n-2)throw new t("Invalid signature: incorrect length");const{d:o,l:s}=Cg._parseInt(r.subarray(2)),{d:a,l:i}=Cg._parseInt(s);if(i.length)throw new t("Invalid signature: left bytes after parsing");return{r:o,s:a}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),o=t(r(e.r)),s=n.length/2,a=o.length/2,i=r(s),c=r(a);return`30${r(a+s+4)}02${c}${o}02${i}${n}`}},Bg=BigInt(0),Wg=BigInt(1),Sg=(BigInt(2),BigInt(3));BigInt(4);function Ig(e){const t=function(e){const t=vg(e);ng(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,n=t.toBytes||((e,t,n)=>{const o=t.toAffine();return Yh(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),o=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function s(e){const{a:n,b:o}=t,s=r.sqr(e),a=r.mul(s,e);return r.add(r.add(a,r.mul(e,n)),o)}if(!r.eql(r.sqr(t.Gy),s(t.Gx)))throw new Error("bad generator point: equation left != right");function a(e){return"bigint"==typeof e&&Bg<e&&e<t.n}function i(e){if(!a(e))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(e){const{allowedPrivateKeyLengths:r,nByteLength:n,wrapPrivateKey:o,n:s}=t;if(r&&"bigint"!=typeof e){if(Uh(e)&&(e=$h(e)),"string"!=typeof e||!r.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*n,"0")}let a;try{a="bigint"==typeof e?e:Hh(Jh("private key",e,n))}catch(t){throw new Error(`private key must be ${n} bytes, hex or bigint, not ${typeof e}`)}return o&&(a=dg(a,s)),i(a),a}const u=new Map;function l(e){if(!(e instanceof d))throw new Error("ProjectivePoint expected")}class d{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw new Error("x required");if(null==t||!r.isValid(t))throw new Error("y required");if(null==n||!r.isValid(n))throw new Error("z required")}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof d)throw new Error("projective point not allowed");const o=e=>r.eql(e,r.ZERO);return o(t)&&o(n)?d.ZERO:new d(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(d.fromAffine)}static fromHex(e){const t=d.fromAffine(o(Jh("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(c(e))}_setWindowSize(e){this._WINDOW_SIZE=e,u.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error("bad point: x or y not FE");const o=r.sqr(n),a=s(e);if(!r.eql(o,a))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){l(e);const{px:t,py:n,pz:o}=this,{px:s,py:a,pz:i}=e,c=r.eql(r.mul(t,i),r.mul(s,o)),u=r.eql(r.mul(n,i),r.mul(a,o));return c&&u}negate(){return new d(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,o=r.mul(n,Sg),{px:s,py:a,pz:i}=this;let c=r.ZERO,u=r.ZERO,l=r.ZERO,f=r.mul(s,s),p=r.mul(a,a),h=r.mul(i,i),g=r.mul(s,a);return g=r.add(g,g),l=r.mul(s,i),l=r.add(l,l),c=r.mul(e,l),u=r.mul(o,h),u=r.add(c,u),c=r.sub(p,u),u=r.add(p,u),u=r.mul(c,u),c=r.mul(g,c),l=r.mul(o,l),h=r.mul(e,h),g=r.sub(f,h),g=r.mul(e,g),g=r.add(g,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,h),f=r.mul(f,g),u=r.add(u,f),h=r.mul(a,i),h=r.add(h,h),f=r.mul(h,g),c=r.sub(c,f),l=r.mul(h,p),l=r.add(l,l),l=r.add(l,l),new d(c,u,l)}add(e){l(e);const{px:n,py:o,pz:s}=this,{px:a,py:i,pz:c}=e;let u=r.ZERO,f=r.ZERO,p=r.ZERO;const h=t.a,g=r.mul(t.b,Sg);let y=r.mul(n,a),m=r.mul(o,i),b=r.mul(s,c),w=r.add(n,o),T=r.add(a,i);w=r.mul(w,T),T=r.add(y,m),w=r.sub(w,T),T=r.add(n,s);let A=r.add(a,c);return T=r.mul(T,A),A=r.add(y,b),T=r.sub(T,A),A=r.add(o,s),u=r.add(i,c),A=r.mul(A,u),u=r.add(m,b),A=r.sub(A,u),p=r.mul(h,T),u=r.mul(g,b),p=r.add(u,p),u=r.sub(m,p),p=r.add(m,p),f=r.mul(u,p),m=r.add(y,y),m=r.add(m,y),b=r.mul(h,b),T=r.mul(g,T),m=r.add(m,b),b=r.sub(y,b),b=r.mul(h,b),T=r.add(T,b),y=r.mul(m,T),f=r.add(f,y),y=r.mul(A,T),u=r.mul(w,u),u=r.sub(u,y),y=r.mul(w,m),p=r.mul(A,p),p=r.add(p,y),new d(u,f,p)}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return p.wNAFCached(this,u,e,(e=>{const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(d.fromAffine)}))}multiplyUnsafe(e){const n=d.ZERO;if(e===Bg)return n;if(i(e),e===Wg)return this;const{endo:o}=t;if(!o)return p.unsafeLadder(this,e);let{k1neg:s,k1:a,k2neg:c,k2:u}=o.splitScalar(e),l=n,f=n,h=this;for(;a>Bg||u>Bg;)a&Wg&&(l=l.add(h)),u&Wg&&(f=f.add(h)),h=h.double(),a>>=Wg,u>>=Wg;return s&&(l=l.negate()),c&&(f=f.negate()),f=new d(r.mul(f.px,o.beta),f.py,f.pz),l.add(f)}multiply(e){i(e);let n,o,s=e;const{endo:a}=t;if(a){const{k1neg:e,k1:t,k2neg:i,k2:c}=a.splitScalar(s);let{p:u,f:l}=this.wNAF(t),{p:f,f:h}=this.wNAF(c);u=p.constTimeNegate(e,u),f=p.constTimeNegate(i,f),f=new d(r.mul(f.px,a.beta),f.py,f.pz),n=u.add(f),o=l.add(h)}else{const{p:e,f:t}=this.wNAF(s);n=e,o=t}return d.normalizeZ([n,o])[0]}multiplyAndAddUnsafe(e,t,r){const n=d.BASE,o=(e,t)=>t!==Bg&&t!==Wg&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),s=o(this,t).add(o(e,r));return s.is0()?void 0:s}toAffine(e){const{px:t,py:n,pz:o}=this,s=this.is0();null==e&&(e=s?r.ONE:r.inv(o));const a=r.mul(t,e),i=r.mul(n,e),c=r.mul(o,e);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error("invZ was invalid");return{x:a,y:i}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===Wg)return!0;if(r)return r(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===Wg?this:r?r(d,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),n(d,this,e)}toHex(e=!0){return $h(this.toRawBytes(e))}}d.BASE=new d(t.Gx,t.Gy,r.ONE),d.ZERO=new d(r.ZERO,r.ONE,r.ZERO);const f=t.nBitLength,p=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,o=t;for(;r>Tg;)r&Ag&&(n=n.add(o)),o=o.double(),r>>=Ag;return n},precomputeWindow(e,t){const{windows:r,windowSize:o}=n(t),s=[];let a=e,i=a;for(let e=0;e<r;e++){i=a,s.push(i);for(let e=1;e<o;e++)i=i.add(a),s.push(i);a=i.double()}return s},wNAF(t,o,s){const{windows:a,windowSize:i}=n(t);let c=e.ZERO,u=e.BASE;const l=BigInt(2**t-1),d=2**t,f=BigInt(t);for(let e=0;e<a;e++){const t=e*i;let n=Number(s&l);s>>=f,n>i&&(n-=d,s+=Ag);const a=t,p=t+Math.abs(n)-1,h=e%2!=0,g=n<0;0===n?u=u.add(r(h,o[a])):c=c.add(r(g,o[p]))}return{p:c,f:u}},wNAFCached(e,t,r,n){const o=e._WINDOW_SIZE||1;let s=t.get(e);return s||(s=this.precomputeWindow(e,o),1!==o&&t.set(e,n(s))),this.wNAF(o,s,r)}}}(d,t.endo?Math.ceil(f/2):f);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:a}}function _g(e){const t=function(e){const t=vg(e);return ng(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n}=t,o=r.BYTES+1,s=2*r.BYTES+1;function a(e){return dg(e,n)}function i(e){return hg(e,n)}const{ProjectivePoint:c,normPrivateKeyToScalar:u,weierstrassEquation:l,isWithinCurveOrder:d}=Ig({...t,toBytes(e,t,n){const o=t.toAffine(),s=r.toBytes(o.x),a=Yh;return n?a(Uint8Array.from([t.hasEvenY()?2:3]),s):a(Uint8Array.from([4]),s,r.toBytes(o.y))},fromBytes(e){const t=e.length,n=e[0],a=e.subarray(1);if(t!==o||2!==n&&3!==n){if(t===s&&4===n){return{x:r.fromBytes(a.subarray(0,r.BYTES)),y:r.fromBytes(a.subarray(r.BYTES,2*r.BYTES))}}throw new Error(`Point of length ${t} was invalid. Expected ${o} compressed bytes or ${s} uncompressed bytes`)}{const e=Hh(a);if(!(Bg<(i=e)&&i<r.ORDER))throw new Error("Point is not on curve");const t=l(e);let o;try{o=r.sqrt(t)}catch(e){const t=e instanceof Error?": "+e.message:"";throw new Error("Point is not on curve"+t)}return!(1&~n)!==((o&Wg)===Wg)&&(o=r.neg(o)),{x:e,y:o}}var i}}),f=e=>$h(Zh(e,t.nByteLength));function p(e){return e>n>>Wg}const h=(e,t,r)=>Hh(e.slice(t,r));class g{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const r=t.nByteLength;return e=Jh("compactSignature",e,2*r),new g(h(e,0,r),h(e,r,2*r))}static fromDER(e){const{r:t,s:r}=Cg.toSig(Jh("DER",e));return new g(t,r)}assertValidity(){if(!d(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!d(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new g(this.r,this.s,e)}recoverPublicKey(e){const{r:n,s:o,recovery:s}=this,u=w(Jh("msgHash",e));if(null==s||![0,1,2,3].includes(s))throw new Error("recovery id invalid");const l=2===s||3===s?n+t.n:n;if(l>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const d=1&s?"03":"02",p=c.fromHex(d+f(l)),h=i(l),g=a(-u*h),y=a(o*h),m=c.BASE.multiplyAndAddUnsafe(p,g,y);if(!m)throw new Error("point at infinify");return m.assertValidity(),m}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new g(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return Gh(this.toDERHex())}toDERHex(){return Cg.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Gh(this.toCompactHex())}toCompactHex(){return f(this.r)+f(this.s)}}const y={isValidPrivateKey(e){try{return u(e),!0}catch(e){return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const e=wg(t.n);return function(e,t,r=!1){const n=e.length,o=bg(t),s=wg(t);if(n<16||n<s||n>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${n}`);const a=dg(r?Hh(e):Kh(e),t-sg)+sg;return r?qh(a,o):Zh(a,o)}(t.randomBytes(e),t.n)},precompute:(e=8,t=c.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function m(e){const t=Uh(e),r="string"==typeof e,n=(t||r)&&e.length;return t?n===o||n===s:r?n===2*o||n===2*s:e instanceof c}const b=t.bits2int||function(e){const r=Hh(e),n=8*e.length-t.nBitLength;return n>0?r>>BigInt(n):r},w=t.bits2int_modN||function(e){return a(b(e))},T=Xh(t.nBitLength);function A(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(Bg<=e&&e<T))throw new Error(`bigint expected < 2^${t.nBitLength}`);return Zh(e,t.nByteLength)}function v(e,n,o=P){if(["recovered","canonical"].some((e=>e in o)))throw new Error("sign() legacy options not supported");const{hash:s,randomBytes:l}=t;let{lowS:f,prehash:h,extraEntropy:y}=o;null==f&&(f=!0),e=Jh("msgHash",e),h&&(e=Jh("prehashed msgHash",s(e)));const m=w(e),T=u(n),v=[A(T),A(m)];if(null!=y&&!1!==y){const e=!0===y?l(r.BYTES):y;v.push(Jh("extraEntropy",e))}const E=Yh(...v),C=m;return{seed:E,k2sig:function(e){const t=b(e);if(!d(t))return;const r=i(t),n=c.BASE.multiply(t).toAffine(),o=a(n.x);if(o===Bg)return;const s=a(r*a(C+o*T));if(s===Bg)return;let u=(n.x===o?0:2)|Number(n.y&Wg),l=s;return f&&p(s)&&(l=function(e){return p(e)?a(-e):e}(s),u^=1),new g(o,l,u)}}}const P={lowS:t.lowS,prehash:!1},E={lowS:t.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return c.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(m(e))throw new Error("first arg must be private key");if(!m(t))throw new Error("second arg must be public key");return c.fromHex(t).multiply(u(e)).toRawBytes(r)},sign:function(e,r,n=P){const{seed:o,k2sig:s}=v(e,r,n),a=t;return tg(a.hash.outputLen,a.nByteLength,a.hmac)(o,s)},verify:function(e,r,n,o=E){const s=e;if(r=Jh("msgHash",r),n=Jh("publicKey",n),"strict"in o)throw new Error("options.strict was renamed to lowS");const{lowS:u,prehash:l}=o;let d,f;try{if("string"==typeof s||Uh(s))try{d=g.fromDER(s)}catch(e){if(!(e instanceof Cg.Err))throw e;d=g.fromCompact(s)}else{if("object"!=typeof s||"bigint"!=typeof s.r||"bigint"!=typeof s.s)throw new Error("PARSE");{const{r:e,s:t}=s;d=new g(e,t)}}f=c.fromHex(n)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&d.hasHighS())return!1;l&&(r=t.hash(r));const{r:p,s:h}=d,y=w(r),m=i(h),b=a(y*m),T=a(p*m),A=c.BASE.multiplyAndAddUnsafe(f,b,T)?.toAffine();return!!A&&a(A.x)===p},ProjectivePoint:c,Signature:g,utils:y}}function Og(e){return{hash:e,hmac:(t,...r)=>Fh(e,t,function(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];yh(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const o=e[t];r.set(o,n),n+=o.length}return r}(...r)),randomBytes:Ch}}const Rg=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Mg=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),xg=BigInt(1),Fg=BigInt(2),kg=(e,t)=>(e+t/Fg)/t;function Ng(e){const t=Rg,r=BigInt(3),n=BigInt(6),o=BigInt(11),s=BigInt(22),a=BigInt(23),i=BigInt(44),c=BigInt(88),u=e*e*e%t,l=u*u*e%t,d=pg(l,r,t)*l%t,f=pg(d,r,t)*l%t,p=pg(f,Fg,t)*u%t,h=pg(p,o,t)*p%t,g=pg(h,s,t)*h%t,y=pg(g,i,t)*g%t,m=pg(y,c,t)*y%t,b=pg(m,i,t)*g%t,w=pg(b,r,t)*l%t,T=pg(w,a,t)*h%t,A=pg(T,n,t)*u%t,v=pg(A,Fg,t);if(!Ug.eql(Ug.sqr(v),e))throw new Error("Cannot find square root");return v}const Ug=function(e,t,r=!1,n={}){if(e<=og)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:o,nByteLength:s}=mg(e,t);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const a=gg(e),i=Object.freeze({ORDER:e,BITS:o,BYTES:s,MASK:Xh(o),ZERO:og,ONE:sg,create:t=>dg(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return og<=t&&t<e},is0:e=>e===og,isOdd:e=>(e&sg)===sg,neg:t=>dg(-t,e),eql:(e,t)=>e===t,sqr:t=>dg(t*t,e),add:(t,r)=>dg(t+r,e),sub:(t,r)=>dg(t-r,e),mul:(t,r)=>dg(t*r,e),pow:(e,t)=>function(e,t,r){if(r<og)throw new Error("Expected power > 0");if(r===og)return e.ONE;if(r===sg)return t;let n=e.ONE,o=t;for(;r>og;)r&sg&&(n=e.mul(n,o)),o=e.sqr(o),r>>=sg;return n}(i,e,t),div:(t,r)=>dg(t*hg(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>hg(t,e),sqrt:n.sqrt||(e=>a(i,e)),invertBatch:e=>function(e,t){const r=new Array(t.length),n=t.reduce(((t,n,o)=>e.is0(n)?t:(r[o]=t,e.mul(t,n))),e.ONE),o=e.inv(n);return t.reduceRight(((t,n,o)=>e.is0(n)?t:(r[o]=e.mul(t,r[o]),e.mul(t,n))),o),r}(i,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?qh(e,s):Zh(e,s),fromBytes:e=>{if(e.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${e.length}`);return r?Kh(e):Hh(e)}});return Object.freeze(i)}(Rg,void 0,void 0,{sqrt:Ng}),Dg=function(e,t){const r=t=>_g({...e,...Og(t)});return Object.freeze({...r(t),create:r})}({a:BigInt(0),b:BigInt(7),Fp:Ug,n:Mg,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=Mg,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-xg*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,a=BigInt("0x100000000000000000000000000000000"),i=kg(s*e,t),c=kg(-n*e,t);let u=dg(e-i*r-c*o,t),l=dg(-i*n-c*s,t);const d=u>a,f=l>a;if(d&&(u=t-u),f&&(l=t-l),u>a||l>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:d,k1:u,k2neg:f,k2:l}}}},Mh);BigInt(0);Dg.ProjectivePoint;var Lg=r(1048).hp;function $g(e){const t=oy(e);let r=oy(t).slice(0,4);return r=e.concat(r),Zo(r)}function zg(e){if("string"!=typeof e)return!1;if(e.length<=4)return!1;let t=qo(e);if(e.length<=4)return!1;const r=t.length-4,n=t.slice(r);t=t.slice(0,r);const o=oy(t),s=oy(o).slice(0,4);if(n[0]==s[0]&&n[1]==s[1]&&n[2]==s[2]&&n[3]==s[3])return t;throw new Error("Invalid address provided")}function jg(e,t){"string"==typeof e&&(e=$o(e));const r=ny($o(t.txID),e);return Array.isArray(t.signature)?t.signature.includes(r)||t.signature.push(r):t.signature=[r],t}function Vg(e,t){e="0x"+e.replace(/^0x/,""),t="0x"+t.replace(/^0x/,"");const r=bu(fh(e),js.from(t));return Oo+r.substring(2)}function Gg(e){return btoa(String.fromCharCode(...e))}function Hg(e,t){"string"==typeof e&&(e=$o(e));return ny(oy(t),e)}function Kg(e){const t=So(e);return globalThis.proto.protocol.Transaction.deserializeBinary(t).getRawData().serializeBinary()}function Zg(){let e=Wo(Dg.utils.randomPrivateKey());return e=e.padStart(64,"0"),$o(e)}function qg(e){65===e.length&&(e=e.slice(1));const t=Ti(new Uint8Array(e)).toString().substring(2);return $o(Oo+t.substring(24))}function Jg(e){return qg(ry(e))}function Yg(e){const t=qo(e);if(t.length<=4)return!1;const r=t.slice(0,t.length-4),n=oy(r),o=oy(n);return o[0]===t[r.length]&&o[1]===t[r.length+1]&&o[2]===t[r.length+2]&&o[3]===t[r.length+3]&&r}function Xg(e){if("string"!=typeof e)return!1;if(e.length!==_o)return!1;let t=qo(e);if(25!==t.length)return!1;if(t[0]!==Ro)return!1;const r=t.slice(21);t=t.slice(0,21);const n=oy(t),o=oy(n).slice(0,4);return r[0]==o[0]&&r[1]==o[1]&&r[2]==o[2]&&r[3]==o[3]}function Qg(e){return $g(qg(ry(So(e))))}function ey(e){return Wo(qg(ry(So(e))))}function ty(e){return Io(qg(ry(So(e))))}function ry(e){const t=Dg.ProjectivePoint.fromPrivateKey(new Uint8Array(function(e){return $o(Wo(e).padStart(64,"0"))}(e))),r=t.x,n=t.y;return $o(`04${r.toString(16).padStart(64,"0")}${n.toString(16).padStart(64,"0")}`)}function ny(e,t){const r=Dg.sign(Wo(e),Wo(t)),n=r.r.toString(16),o=r.s.toString(16),s=r.recovery+27;return n.padStart(64,"0")+o.padStart(64,"0")+Eo(s)}function oy(e){return $o(Va("0x"+Wo(e)).replace(/^0x/,""))}function sy(e){return $g(Jg(So(e)))}function ay(e,t=!1){return $g(Jg($o(e,t)))}function iy(e,t=!0){return(t?"0x":"")+Ti(Lg.from(e,"utf-8")).toString().substring(2)}const cy="Invalid tron path provided";function uy(){const e=Zg(),t=ry(e),r=Jg(e);return{privateKey:Wo(e),publicKey:Wo(t),address:{base58:$g(r),hex:Wo(r)}}}function ly(e="",t=Fo,r){const n=cp.createRandom(e,t,r);return{mnemonic:n.mnemonic,privateKey:n.privateKey,publicKey:n.signingKey.publicKey,address:ay(n.privateKey.replace(/^0x/,"")),path:n.path}}function dy(e,t=Fo,r="",n=null){if(!String(t).match(/^m\/44\'\/195\'/))throw new Error(cy);const o=cp.fromMnemonic(xi.fromPhrase(e,r,n),t);return{mnemonic:o.mnemonic,privateKey:o.privateKey,publicKey:o.signingKey.publicKey,address:ay(o.privateKey.replace(/^0x/,""))}}var fy=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,py=Math.ceil,hy=Math.floor,gy="[BigNumber Error] ",yy=gy+"Number primitive has more than 15 significant digits: ",my=1e14,by=14,wy=9007199254740991,Ty=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Ay=1e7,vy=1e9;function Py(e){var t=0|e;return e>0||e===t?t:t-1}function Ey(e){for(var t,r,n=1,o=e.length,s=e[0]+"";n<o;){for(t=e[n++]+"",r=by-t.length;r--;t="0"+t);s+=t}for(o=s.length;48===s.charCodeAt(--o););return s.slice(0,o+1||1)}function Cy(e,t){var r,n,o=e.c,s=t.c,a=e.s,i=t.s,c=e.e,u=t.e;if(!a||!i)return null;if(r=o&&!o[0],n=s&&!s[0],r||n)return r?n?0:-i:a;if(a!=i)return a;if(r=a<0,n=c==u,!o||!s)return n?0:!o^r?1:-1;if(!n)return c>u^r?1:-1;for(i=(c=o.length)<(u=s.length)?c:u,a=0;a<i;a++)if(o[a]!=s[a])return o[a]>s[a]^r?1:-1;return c==u?0:c>u^r?1:-1}function By(e,t,r,n){if(e<t||e>r||e!==hy(e))throw Error(gy+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Wy(e){var t=e.c.length-1;return Py(e.e/by)==t&&e.c[t]%2!=0}function Sy(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function Iy(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var _y=function e(t){var r,n,o,s,a,i,c,u,l,d,f=B.prototype={constructor:B,toString:null,valueOf:null},p=new B(1),h=20,g=4,y=-7,m=21,b=-1e7,w=1e7,T=!1,A=1,v=0,P={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},E="0123456789abcdefghijklmnopqrstuvwxyz",C=!0;function B(e,t){var r,s,a,i,c,u,l,d,f=this;if(!(f instanceof B))return new B(e,t);if(null==t){if(e&&!0===e._isBigNumber)return f.s=e.s,void(!e.c||e.e>w?f.c=f.e=null:e.e<b?f.c=[f.e=0]:(f.e=e.e,f.c=e.c.slice()));if((u="number"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(i=0,c=e;c>=10;c/=10,i++);return void(i>w?f.c=f.e=null:(f.e=i,f.c=[e]))}d=String(e)}else{if(!fy.test(d=String(e)))return o(f,d,u);f.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(i=d.indexOf("."))>-1&&(d=d.replace(".","")),(c=d.search(/e/i))>0?(i<0&&(i=c),i+=+d.slice(c+1),d=d.substring(0,c)):i<0&&(i=d.length)}else{if(By(t,2,E.length,"Base"),10==t&&C)return _(f=new B(e),h+f.e+1,g);if(d=String(e),u="number"==typeof e){if(0*e!=0)return o(f,d,u,t);if(f.s=1/e<0?(d=d.slice(1),-1):1,B.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throw Error(yy+e)}else f.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(r=E.slice(0,t),i=c=0,l=d.length;c<l;c++)if(r.indexOf(s=d.charAt(c))<0){if("."==s){if(c>i){i=l;continue}}else if(!a&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){a=!0,c=-1,i=0;continue}return o(f,String(e),u,t)}u=!1,(i=(d=n(d,t,10,f.s)).indexOf("."))>-1?d=d.replace(".",""):i=d.length}for(c=0;48===d.charCodeAt(c);c++);for(l=d.length;48===d.charCodeAt(--l););if(d=d.slice(c,++l)){if(l-=c,u&&B.DEBUG&&l>15&&(e>wy||e!==hy(e)))throw Error(yy+f.s*e);if((i=i-c-1)>w)f.c=f.e=null;else if(i<b)f.c=[f.e=0];else{if(f.e=i,f.c=[],c=(i+1)%by,i<0&&(c+=by),c<l){for(c&&f.c.push(+d.slice(0,c)),l-=by;c<l;)f.c.push(+d.slice(c,c+=by));c=by-(d=d.slice(c)).length}else c-=l;for(;c--;d+="0");f.c.push(+d)}}else f.c=[f.e=0]}function W(e,t,r,n){var o,s,a,i,c;if(null==r?r=g:By(r,0,8),!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)c=Ey(e.c),c=1==n||2==n&&(a<=y||a>=m)?Sy(c,a):Iy(c,a,"0");else if(s=(e=_(new B(e),t,r)).e,i=(c=Ey(e.c)).length,1==n||2==n&&(t<=s||s<=y)){for(;i<t;c+="0",i++);c=Sy(c,s)}else if(t-=a,c=Iy(c,s,"0"),s+1>i){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=s-i)>0)for(s+1==i&&(c+=".");t--;c+="0");return e.s<0&&o?"-"+c:c}function S(e,t){for(var r,n,o=1,s=new B(e[0]);o<e.length;o++)(!(n=new B(e[o])).s||(r=Cy(s,n))===t||0===r&&s.s===t)&&(s=n);return s}function I(e,t,r){for(var n=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,n++);return(r=n+r*by-1)>w?e.c=e.e=null:r<b?e.c=[e.e=0]:(e.e=r,e.c=t),e}function _(e,t,r,n){var o,s,a,i,c,u,l,d=e.c,f=Ty;if(d){e:{for(o=1,i=d[0];i>=10;i/=10,o++);if((s=t-o)<0)s+=by,a=t,c=d[u=0],l=hy(c/f[o-a-1]%10);else if((u=py((s+1)/by))>=d.length){if(!n)break e;for(;d.length<=u;d.push(0));c=l=0,o=1,a=(s%=by)-by+1}else{for(c=i=d[u],o=1;i>=10;i/=10,o++);l=(a=(s%=by)-by+o)<0?0:hy(c/f[o-a-1]%10)}if(n=n||t<0||null!=d[u+1]||(a<0?c:c%f[o-a-1]),n=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(s>0?a>0?c/f[o-a]:0:d[u-1])%10&1||r==(e.s<0?8:7)),t<1||!d[0])return d.length=0,n?(t-=e.e+1,d[0]=f[(by-t%by)%by],e.e=-t||0):d[0]=e.e=0,e;if(0==s?(d.length=u,i=1,u--):(d.length=u+1,i=f[by-s],d[u]=a>0?hy(c/f[o-a]%f[a])*i:0),n)for(;;){if(0==u){for(s=1,a=d[0];a>=10;a/=10,s++);for(a=d[0]+=i,i=1;a>=10;a/=10,i++);s!=i&&(e.e++,d[0]==my&&(d[0]=1));break}if(d[u]+=i,d[u]!=my)break;d[u--]=0,i=1}for(s=d.length;0===d[--s];d.pop());}e.e>w?e.c=e.e=null:e.e<b&&(e.c=[e.e=0])}return e}function O(e){var t,r=e.e;return null===r?e.toString():(t=Ey(e.c),t=r<=y||r>=m?Sy(t,r):Iy(t,r,"0"),e.s<0?"-"+t:t)}return B.clone=e,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(gy+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(By(r=e[t],0,vy,t),h=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(By(r=e[t],0,8,t),g=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(By(r[0],-1e9,0,t),By(r[1],0,vy,t),y=r[0],m=r[1]):(By(r,-1e9,vy,t),y=-(m=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)By(r[0],-1e9,-1,t),By(r[1],1,vy,t),b=r[0],w=r[1];else{if(By(r,-1e9,vy,t),!r)throw Error(gy+t+" cannot be zero: "+r);b=-(w=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(gy+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw T=!r,Error(gy+"crypto unavailable");T=r}else T=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(By(r=e[t],0,9,t),A=r),e.hasOwnProperty(t="POW_PRECISION")&&(By(r=e[t],0,vy,t),v=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(gy+t+" not an object: "+r);P=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(gy+t+" invalid: "+r);C="0123456789"==r.slice(0,10),E=r}}return{DECIMAL_PLACES:h,ROUNDING_MODE:g,EXPONENTIAL_AT:[y,m],RANGE:[b,w],CRYPTO:T,MODULO_MODE:A,POW_PRECISION:v,FORMAT:P,ALPHABET:E}},B.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!B.DEBUG)return!0;var t,r,n=e.c,o=e.e,s=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===s||-1===s)&&o>=-1e9&&o<=vy&&o===hy(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%by)<1&&(t+=by),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=my||r!==hy(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===s||1===s||-1===s))return!0;throw Error(gy+"Invalid BigNumber: "+e)},B.maximum=B.max=function(){return S(arguments,-1)},B.minimum=B.min=function(){return S(arguments,1)},B.random=(s=9007199254740992,a=Math.random()*s&2097151?function(){return hy(Math.random()*s)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,s,i=0,c=[],u=new B(p);if(null==e?e=h:By(e,0,vy),o=py(e/by),T)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));i<o;)(s=131072*t[i]+(t[i+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[i]=r[0],t[i+1]=r[1]):(c.push(s%1e14),i+=2);i=o/2}else{if(!crypto.randomBytes)throw T=!1,Error(gy+"crypto unavailable");for(t=crypto.randomBytes(o*=7);i<o;)(s=281474976710656*(31&t[i])+1099511627776*t[i+1]+4294967296*t[i+2]+16777216*t[i+3]+(t[i+4]<<16)+(t[i+5]<<8)+t[i+6])>=9e15?crypto.randomBytes(7).copy(t,i):(c.push(s%1e14),i+=7);i=o/7}if(!T)for(;i<o;)(s=a())<9e15&&(c[i++]=s%1e14);for(o=c[--i],e%=by,o&&e&&(s=Ty[by-e],c[i]=hy(o/s)*s);0===c[i];c.pop(),i--);if(i<0)c=[n=0];else{for(n=-1;0===c[0];c.splice(0,1),n-=by);for(i=1,s=c[0];s>=10;s/=10,i++);i<by&&(n-=by-i)}return u.e=n,u.c=c,u}),B.sum=function(){for(var e=1,t=arguments,r=new B(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 o,s,a=[0],i=0,c=e.length;i<c;){for(s=a.length;s--;a[s]*=t);for(a[0]+=n.indexOf(e.charAt(i++)),o=0;o<a.length;o++)a[o]>r-1&&(null==a[o+1]&&(a[o+1]=0),a[o+1]+=a[o]/r|0,a[o]%=r)}return a.reverse()}return function(n,o,s,a,i){var c,u,l,d,f,p,y,m,b=n.indexOf("."),w=h,T=g;for(b>=0&&(d=v,v=0,n=n.replace(".",""),p=(m=new B(o)).pow(n.length-b),v=d,m.c=t(Iy(Ey(p.c),p.e,"0"),10,s,e),m.e=m.c.length),l=d=(y=t(n,o,s,i?(c=E,e):(c=e,E))).length;0==y[--d];y.pop());if(!y[0])return c.charAt(0);if(b<0?--l:(p.c=y,p.e=l,p.s=a,y=(p=r(p,m,w,T,s)).c,f=p.r,l=p.e),b=y[u=l+w+1],d=s/2,f=f||u<0||null!=y[u+1],f=T<4?(null!=b||f)&&(0==T||T==(p.s<0?3:2)):b>d||b==d&&(4==T||f||6==T&&1&y[u-1]||T==(p.s<0?8:7)),u<1||!y[0])n=f?Iy(c.charAt(1),-w,c.charAt(0)):c.charAt(0);else{if(y.length=u,f)for(--s;++y[--u]>s;)y[u]=0,u||(++l,y=[1].concat(y));for(d=y.length;!y[--d];);for(b=0,n="";b<=d;n+=c.charAt(y[b++]));n=Iy(n,l,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,o,s,a,i=0,c=e.length,u=t%Ay,l=t/Ay|0;for(e=e.slice();c--;)i=((o=u*(s=e[c]%Ay)+(n=l*s+(a=e[c]/Ay|0)*u)%Ay*Ay+i)/r|0)+(n/Ay|0)+l*a,e[c]=o%r;return i&&(e=[i].concat(e)),e}function t(e,t,r,n){var o,s;if(r!=n)s=r>n?1:-1;else for(o=s=0;o<r;o++)if(e[o]!=t[o]){s=e[o]>t[o]?1:-1;break}return s}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]<t[r]?1:0,e[r]=o*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,o,s,a,i){var c,u,l,d,f,p,h,g,y,m,b,w,T,A,v,P,E,C=n.s==o.s?1:-1,W=n.c,S=o.c;if(!(W&&W[0]&&S&&S[0]))return new B(n.s&&o.s&&(W?!S||W[0]!=S[0]:S)?W&&0==W[0]||!S?0*C:C/0:NaN);for(y=(g=new B(C)).c=[],C=s+(u=n.e-o.e)+1,i||(i=my,u=Py(n.e/by)-Py(o.e/by),C=C/by|0),l=0;S[l]==(W[l]||0);l++);if(S[l]>(W[l]||0)&&u--,C<0)y.push(1),d=!0;else{for(A=W.length,P=S.length,l=0,C+=2,(f=hy(i/(S[0]+1)))>1&&(S=e(S,f,i),W=e(W,f,i),P=S.length,A=W.length),T=P,b=(m=W.slice(0,P)).length;b<P;m[b++]=0);E=S.slice(),E=[0].concat(E),v=S[0],S[1]>=i/2&&v++;do{if(f=0,(c=t(S,m,P,b))<0){if(w=m[0],P!=b&&(w=w*i+(m[1]||0)),(f=hy(w/v))>1)for(f>=i&&(f=i-1),h=(p=e(S,f,i)).length,b=m.length;1==t(p,m,h,b);)f--,r(p,P<h?E:S,h,i),h=p.length,c=1;else 0==f&&(c=f=1),h=(p=S.slice()).length;if(h<b&&(p=[0].concat(p)),r(m,p,b,i),b=m.length,-1==c)for(;t(S,m,P,b)<1;)f++,r(m,P<b?E:S,b,i),b=m.length}else 0===c&&(f++,m=[0]);y[l++]=f,m[0]?m[b++]=W[T]||0:(m=[W[T]],b=1)}while((T++<A||null!=m[0])&&C--);d=null!=m[0],y[0]||y.splice(0,1)}if(i==my){for(l=1,C=y[0];C>=10;C/=10,l++);_(g,s+(g.e=l+u*by-1)+1,a,d)}else g.e=u,g.r=+d;return g}}(),i=/^(-?)0([xbo])(?=\w[\w.]*$)/i,c=/^([^.]+)\.$/,u=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,d=/^\s*\+(?=[\w.])|^\s+|\s+$/g,o=function(e,t,r,n){var o,s=r?t:t.replace(d,"");if(l.test(s))e.s=isNaN(s)?null:s<0?-1:1;else{if(!r&&(s=s.replace(i,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,s=s.replace(c,"$1").replace(u,"0.$1")),t!=s))return new B(s,o);if(B.DEBUG)throw Error(gy+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},f.absoluteValue=f.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},f.comparedTo=function(e,t){return Cy(this,new B(e,t))},f.decimalPlaces=f.dp=function(e,t){var r,n,o,s=this;if(null!=e)return By(e,0,vy),null==t?t=g:By(t,0,8),_(new B(s),e+s.e+1,t);if(!(r=s.c))return null;if(n=((o=r.length-1)-Py(this.e/by))*by,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},f.dividedBy=f.div=function(e,t){return r(this,new B(e,t),h,g)},f.dividedToIntegerBy=f.idiv=function(e,t){return r(this,new B(e,t),0,1)},f.exponentiatedBy=f.pow=function(e,t){var r,n,o,s,a,i,c,u,l=this;if((e=new B(e)).c&&!e.isInteger())throw Error(gy+"Exponent not an integer: "+O(e));if(null!=t&&(t=new B(t)),a=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return u=new B(Math.pow(+O(l),a?e.s*(2-Wy(e)):+O(e))),t?u.mod(t):u;if(i=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new B(NaN);(n=!i&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||a&&l.c[1]>=24e7:l.c[0]<8e13||a&&l.c[0]<=9999975e7)))return s=l.s<0&&Wy(e)?-0:0,l.e>-1&&(s=1/s),new B(i?1/s:s);v&&(s=py(v/by+2))}for(a?(r=new B(.5),i&&(e.s=1),c=Wy(e)):c=(o=Math.abs(+O(e)))%2,u=new B(p);;){if(c){if(!(u=u.times(l)).c)break;s?u.c.length>s&&(u.c.length=s):n&&(u=u.mod(t))}if(o){if(0===(o=hy(o/2)))break;c=o%2}else if(_(e=e.times(r),e.e+1,1),e.e>14)c=Wy(e);else{if(0===(o=+O(e)))break;c=o%2}l=l.times(l),s?l.c&&l.c.length>s&&(l.c.length=s):n&&(l=l.mod(t))}return n?u:(i&&(u=p.div(u)),t?u.mod(t):s?_(u,v,g,undefined):u)},f.integerValue=function(e){var t=new B(this);return null==e?e=g:By(e,0,8),_(t,t.e+1,e)},f.isEqualTo=f.eq=function(e,t){return 0===Cy(this,new B(e,t))},f.isFinite=function(){return!!this.c},f.isGreaterThan=f.gt=function(e,t){return Cy(this,new B(e,t))>0},f.isGreaterThanOrEqualTo=f.gte=function(e,t){return 1===(t=Cy(this,new B(e,t)))||0===t},f.isInteger=function(){return!!this.c&&Py(this.e/by)>this.c.length-2},f.isLessThan=f.lt=function(e,t){return Cy(this,new B(e,t))<0},f.isLessThanOrEqualTo=f.lte=function(e,t){return-1===(t=Cy(this,new B(e,t)))||0===t},f.isNaN=function(){return!this.s},f.isNegative=function(){return this.s<0},f.isPositive=function(){return this.s>0},f.isZero=function(){return!!this.c&&0==this.c[0]},f.minus=function(e,t){var r,n,o,s,a=this,i=a.s;if(t=(e=new B(e,t)).s,!i||!t)return new B(NaN);if(i!=t)return e.s=-t,a.plus(e);var c=a.e/by,u=e.e/by,l=a.c,d=e.c;if(!c||!u){if(!l||!d)return l?(e.s=-t,e):new B(d?a:NaN);if(!l[0]||!d[0])return d[0]?(e.s=-t,e):new B(l[0]?a:3==g?-0:0)}if(c=Py(c),u=Py(u),l=l.slice(),i=c-u){for((s=i<0)?(i=-i,o=l):(u=c,o=d),o.reverse(),t=i;t--;o.push(0));o.reverse()}else for(n=(s=(i=l.length)<(t=d.length))?i:t,i=t=0;t<n;t++)if(l[t]!=d[t]){s=l[t]<d[t];break}if(s&&(o=l,l=d,d=o,e.s=-e.s),(t=(n=d.length)-(r=l.length))>0)for(;t--;l[r++]=0);for(t=99999999999999;n>i;){if(l[--n]<d[n]){for(r=n;r&&!l[--r];l[r]=t);--l[r],l[n]+=my}l[n]-=d[n]}for(;0==l[0];l.splice(0,1),--u);return l[0]?I(e,l,u):(e.s=3==g?-1:1,e.c=[e.e=0],e)},f.modulo=f.mod=function(e,t){var n,o,s=this;return e=new B(e,t),!s.c||!e.s||e.c&&!e.c[0]?new B(NaN):!e.c||s.c&&!s.c[0]?new B(s):(9==A?(o=e.s,e.s=1,n=r(s,e,0,3),e.s=o,n.s*=o):n=r(s,e,0,A),(e=s.minus(n.times(e))).c[0]||1!=A||(e.s=s.s),e)},f.multipliedBy=f.times=function(e,t){var r,n,o,s,a,i,c,u,l,d,f,p,h,g,y,m=this,b=m.c,w=(e=new B(e,t)).c;if(!(b&&w&&b[0]&&w[0]))return!m.s||!e.s||b&&!b[0]&&!w||w&&!w[0]&&!b?e.c=e.e=e.s=null:(e.s*=m.s,b&&w?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=Py(m.e/by)+Py(e.e/by),e.s*=m.s,(c=b.length)<(d=w.length)&&(h=b,b=w,w=h,o=c,c=d,d=o),o=c+d,h=[];o--;h.push(0));for(g=my,y=Ay,o=d;--o>=0;){for(r=0,f=w[o]%y,p=w[o]/y|0,s=o+(a=c);s>o;)r=((u=f*(u=b[--a]%y)+(i=p*u+(l=b[a]/y|0)*f)%y*y+h[s]+r)/g|0)+(i/y|0)+p*l,h[s--]=u%g;h[s]=r}return r?++n:h.splice(0,1),I(e,h,n)},f.negated=function(){var e=new B(this);return e.s=-e.s||null,e},f.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new B(e,t)).s,!o||!t)return new B(NaN);if(o!=t)return e.s=-t,n.minus(e);var s=n.e/by,a=e.e/by,i=n.c,c=e.c;if(!s||!a){if(!i||!c)return new B(o/0);if(!i[0]||!c[0])return c[0]?e:new B(i[0]?n:0*o)}if(s=Py(s),a=Py(a),i=i.slice(),o=s-a){for(o>0?(a=s,r=c):(o=-o,r=i),r.reverse();o--;r.push(0));r.reverse()}for((o=i.length)-(t=c.length)<0&&(r=c,c=i,i=r,t=o),o=0;t;)o=(i[--t]=i[t]+c[t]+o)/my|0,i[t]=my===i[t]?0:i[t]%my;return o&&(i=[o].concat(i),++a),I(e,i,a)},f.precision=f.sd=function(e,t){var r,n,o,s=this;if(null!=e&&e!==!!e)return By(e,1,vy),null==t?t=g:By(t,0,8),_(new B(s),e,t);if(!(r=s.c))return null;if(n=(o=r.length-1)*by+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&s.e+1>n&&(n=s.e+1),n},f.shiftedBy=function(e){return By(e,-9007199254740991,wy),this.times("1e"+e)},f.squareRoot=f.sqrt=function(){var e,t,n,o,s,a=this,i=a.c,c=a.s,u=a.e,l=h+4,d=new B("0.5");if(1!==c||!i||!i[0])return new B(!c||c<0&&(!i||i[0])?NaN:i?a:1/0);if(0==(c=Math.sqrt(+O(a)))||c==1/0?(((t=Ey(i)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=Py((u+1)/2)-(u<0||u%2),n=new B(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new B(c+""),n.c[0])for((c=(u=n.e)+l)<3&&(c=0);;)if(s=n,n=d.times(s.plus(r(a,s,l,1))),Ey(s.c).slice(0,c)===(t=Ey(n.c)).slice(0,c)){if(n.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(o||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(_(n,n.e+h+2,1),e=!n.times(n).eq(a));break}if(!o&&(_(s,s.e+h+2,0),s.times(s).eq(a))){n=s;break}l+=4,c+=4,o=1}return _(n,n.e+h+1,g,e)},f.toExponential=function(e,t){return null!=e&&(By(e,0,vy),e++),W(this,e,t,1)},f.toFixed=function(e,t){return null!=e&&(By(e,0,vy),e=e+this.e+1),W(this,e,t)},f.toFormat=function(e,t,r){var n,o=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=P;else if("object"!=typeof r)throw Error(gy+"Argument not an object: "+r);if(n=o.toFixed(e,t),o.c){var s,a=n.split("."),i=+r.groupSize,c=+r.secondaryGroupSize,u=r.groupSeparator||"",l=a[0],d=a[1],f=o.s<0,p=f?l.slice(1):l,h=p.length;if(c&&(s=i,i=c,c=s,h-=s),i>0&&h>0){for(s=h%i||i,l=p.substr(0,s);s<h;s+=i)l+=u+p.substr(s,i);c>0&&(l+=u+p.slice(s)),f&&(l="-"+l)}n=d?l+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?d.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):d):l}return(r.prefix||"")+n+(r.suffix||"")},f.toFraction=function(e){var t,n,o,s,a,i,c,u,l,d,f,h,y=this,m=y.c;if(null!=e&&(!(c=new B(e)).isInteger()&&(c.c||1!==c.s)||c.lt(p)))throw Error(gy+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+O(c));if(!m)return new B(y);for(t=new B(p),l=n=new B(p),o=u=new B(p),h=Ey(m),a=t.e=h.length-y.e-1,t.c[0]=Ty[(i=a%by)<0?by+i:i],e=!e||c.comparedTo(t)>0?a>0?t:l:c,i=w,w=1/0,c=new B(h),u.c[0]=0;d=r(c,t,0,1),1!=(s=n.plus(d.times(o))).comparedTo(e);)n=o,o=s,l=u.plus(d.times(s=l)),u=s,t=c.minus(d.times(s=t)),c=s;return s=r(e.minus(n),o,0,1),u=u.plus(s.times(l)),n=n.plus(s.times(o)),u.s=l.s=y.s,f=r(l,o,a*=2,g).minus(y).abs().comparedTo(r(u,n,a,g).minus(y).abs())<1?[l,o]:[u,n],w=i,f},f.toNumber=function(){return+O(this)},f.toPrecision=function(e,t){return null!=e&&By(e,1,vy),W(this,e,t,2)},f.toString=function(e){var t,r=this,o=r.s,s=r.e;return null===s?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=s<=y||s>=m?Sy(Ey(r.c),s):Iy(Ey(r.c),s,"0"):10===e&&C?t=Iy(Ey((r=_(new B(r),h+s+1,g)).c),r.e,"0"):(By(e,2,E.length,"Base"),t=n(Iy(Ey(r.c),s,"0"),10,e,o,!0)),o<0&&r.c[0]&&(t="-"+t)),t},f.valueOf=f.toJSON=function(){return O(this)},f._isBigNumber=!0,f[Symbol.toStringTag]="BigNumber",f[Symbol.for("nodejs.util.inspect.custom")]=f.valueOf,null!=t&&B.set(t),B}();var Oy=r(2220);function Ry(e){return"string"==typeof e&&Oy.isURL(e.toString(),{protocols:["http","https"],require_tld:!1})}function My(e){return e===Object(e)&&"[object Array]"!==Object.prototype.toString.call(e)}function xy(e){return Array.isArray(e)}function Fy(e){try{return!!JSON.parse(e)}catch(e){return!1}}function ky(e){return"boolean"==typeof e}function Ny(e){return!!e&&(e instanceof _y||e.constructor&&"BigNumber"===e.constructor.name)}function Uy(e){return"string"==typeof e||!!e&&e.constructor&&"String"===e.constructor.name}function Dy(e){return"function"==typeof e}function Ly(e){return"string"==typeof e&&!isNaN(parseInt(e,16))&&/^(0x|)[a-fA-F0-9]+$/.test(e)}function $y(e){return null!==e&&Number.isInteger(Number(e))}function zy(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function jy(e,...t){return t.length&&!t.map((t=>zy(e,t))).includes(!1)}function Vy(e){const t={block:e.block_number,timestamp:e.block_timestamp,contract:e.contract_address,name:e.event_name,transaction:e.transaction_id,result:e.result,resourceNode:e.resource_Node||(e._unconfirmed?"fullNode":"solidityNode")};return e._unconfirmed&&(t.unconfirmed=e._unconfirmed),e._fingerprint&&(t.fingerprint=e._fingerprint),t}function Gy(e,{inputs:t}){if(!e.result)return e;if(My(e.result))for(let r=0;r<t.length;r++){const n=t[r];"address"==n.type&&n.name in e.result&&(e.result[n.name]=Oo+e.result[n.name].substr(2).toLowerCase())}else xy(e.result)&&(e.result=e.result.reduce(((e,r,n)=>{const{name:o,type:s}=t[n];return"address"==s&&(r=Oo+r.substr(2).toLowerCase()),e[o]=r,e}),{}));return e}function Hy(e,t,r){let n=e.toString();for(;n.length<r;)n=t+n;return n}function Ky(e){return null!=e}async function Zy(e=1e3){return new Promise((t=>setTimeout(t,e)))}function qy(e){return Ly(e)?$g($o(e.replace(/^0x/,Oo))):e}function Jy(e){return Ly(e)?e.toLowerCase().replace(/^0x/,Oo):Wo(zg(e)).toLowerCase()}function Yy(e){if(!em(e))throw new Error(`'${e}' is not a valid address string`);return function(e){const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const n=$o(Ti(r).slice(2));for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return Oo+t.join("")}(Jy(e))}function Xy(e){if(!Ly(e)||42!==e.length)return!1;try{return Yy(e)===e}catch{return!1}}function Qy(e,t=!1){try{return ay(e,t)}catch{return!1}}function em(e){if(!e||!Uy(e))return!1;if(42===e.length)try{return em($g($o(e)))}catch(e){return!1}try{return Xg(e)}catch(e){return!1}}const tm=new Wl;function rm(e){return Jy(e).replace(Mo,"0x")}function nm(e,t,r,n=!1){if(n&&r.replace(/^0x/,"").length%64==8&&(r="0x"+r.replace(/^0x/,"").substring(8)),r.replace(/^0x/,"").length%64)throw new Error("The encoded string is not valid. Its length must be a multiple of 64.");return t=t.map((e=>(/trcToken/.test(e)&&(e=e.replace(/trcToken/,"uint256")),e))),tm.decode(t,r).reduce(((r,n,o)=>("address"==t[o]&&(n=Oo+n.substr(2).toLowerCase()),e.length?r[e[o]]=n:r.push(n),r)),e.length?{}:[])}function om(e,t){for(let r=0;r<e.length;r++)"address"===e[r]&&(t[r]=rm(t[r]));return tm.encode(e,t)}function sm(e){const t=e.match(/([a-zA-Z0-9])(\[.*\])/);return t?t[2]:""}function am(e){return(sm(e).match(/\]\[/g)||[]).length+1}function im(e,t){const r=[],n=e=>{if(e&&0===e.type.indexOf("tuple")&&e.components){return`tuple(${e.components.map((e=>n(e))).join(",")})${sm(e.type)}`}return/trcToken/.test(e.type)?e.type.replace(/trcToken/,"uint256"):e.type},o=e=>Array.isArray(e)?(e.forEach(((t,r)=>{e[r]=o(t)})),e):rm(e),s=(e,t,r)=>{r>1?t.length&&t.forEach((t=>{s(e,t,r-1)})):t.length&&r&&t.forEach((t=>{a(e,t)}))},a=(e=[],t)=>{e.length&&e.forEach(((e,r)=>{const n=e.type;if(t[r])if("address"===n)t[r]=rm(t[r]);else if("address["===n.match(/^([^\x5b]*)(\x5b|$)/)[0])o(t[r]);else if(0===n.indexOf("tuple"))if(sm(n)){const o=am(n);s(e.components,t[r],o)}else a(e.components,t[r])}))};if(e.inputs&&e.inputs.length)for(let o=0;o<e.inputs.length;o++){const s=e.inputs[o].type;"bool"===s&&"false"===t[o]&&(t[o]=!1),r.push(0===s.indexOf("tuple")?n(e.inputs[o]):s),t.length<r.length&&t.push("")}return a(e.inputs,t),(e=>{for(let t=0;t<e.length;t++){const r=e[t];/trcToken/.test(r)&&(e[t]=r.replace(/trcToken/,"uint256"))}})(r),tm.encode(r,t)}function cm(e,t){const r=e=>Array.isArray(e)?(e.forEach(((t,n)=>{e[n]=r(t)})),e):Jy(e),n=(e,t,r)=>{r>1?t.length&&t.forEach((t=>{n(e,t,r-1)})):t.length&&r&&t.forEach((t=>{a(e,t)}))},o=e=>{const t=e.name?` ${e.name}`:"";if(e&&0===e.type.indexOf("tuple")&&e.components){return`tuple(${e.components.map((e=>o(e))).join(",")})${sm(e.type)}${t}`}return/trcToken/.test(e.type)?e.type.replace(/trcToken/,"uint256")+t:e.type+t},s=(e,t,r)=>{t&&!["length"].includes(t)&&(e[t]=r)},a=(e,t)=>{e.length&&e.forEach(((e,o)=>{const{type:i,name:c}=e;if(t[o])if("address"===i)t[o]=Jy(t[o]),s(t,c,Jy(t[o]));else if("address["===i.match(/^([^\x5b]*)(\x5b|$)/)[0])r(t[o]),s(t,c,r(t[o]));else if(0===i.indexOf("tuple")){if(sm(i)){const r=am(i);n(e.components,t[o],r)}else a(e.components,t[o]);s(t,c,t[o])}else s(t,c,t[o]);else s(t,c,t[o])}))};if("outputs"in e&&e.outputs&&e.outputs.length>0){const r=[];for(let t=0;t<e.outputs.length;t++){const n=e.outputs[t].type,s=e.outputs[t].name?` ${e.outputs[t].name}`:"";r.push(0===n.indexOf("tuple")?o(e.outputs[t]):n+s)}(e=>{for(let t=0;t<e.length;t++){const r=e[t];/^trcToken/.test(r)&&(e[t]=r.replace(/^trcToken/,"uint256"))}})(r),t&&t.length||(t=new Uint8Array(32*e.outputs.length));const n=tm.decode(r,t).toArray(!0);return a(e.outputs,n),n}return[]}const um="TRON Signed Message:\n";function lm(e){return"string"==typeof e?e=Qa(e):Array.isArray(e)&&(e=new Uint8Array(e)),Ti(ms([Qa(um),Qa(String(e.length)),e]))}function dm(e,t){t.match(/^0x/)||(t="0x"+t);const r=new yu(t),n=lm(e),o=r.sign(n);return dh(o)}function fm(e,t){t.match(/^0x/)||(t="0x"+t);return $g($o(bu(lm(e),t).replace(/^0x/,Oo)))}const pm=new Uint8Array(32);pm.fill(0);const hm=BigInt(-1),gm=BigInt(0),ym=BigInt(1),mm=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");const bm=Rs(ym,32),wm=Rs(gm,32),Tm={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Am=["name","version","chainId","verifyingContract","salt"];function vm(e){return function(t){return ss("string"==typeof t,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const Pm={name:vm("name"),version:vm("version"),chainId:function(e){const t=Ws(e,"domain.chainId");return ss(t>=0,"invalid chain ID","domain.chainId",e),Number.isSafeInteger(t)?Number(t):xs(t)},verifyingContract:function(e){try{return(t=e,Jy(t)).toLowerCase()}catch(e){}var t;ss(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){const t=ds(e,"domain.salt");return ss(32===t.length,'invalid domain value "salt"',"domain.salt",e),ys(t)}};function Em(e){{const t=e.match(/^(u?)int(\d*)$/);if(t){const r=""===t[1],n=parseInt(t[2]||"256");ss(n%8==0&&0!==n&&n<=256&&(null==t[2]||t[2]===String(n)),"invalid numeric width","type",e);const o=Bs(mm,r?n-1:n),s=r?(o+ym)*hm:gm;return function(t){const n=Ws(t,"value");return ss(n>=s&&n<=o,`value out-of-bounds for ${e}`,"value",n),Rs(r?Cs(n,256):n,32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return ss(0!==r&&r<=32&&t[1]===String(r),"invalid bytes width","type",e),function(t){return ss(ds(t).length===r,`invalid length for ${e}`,"value",t),function(e){const t=ds(e),r=t.length%32;return r?ms([t,pm.slice(r)]):ys(t)}(t)}}}switch(e){case"trcToken":return Em("uint256");case"address":return function(e){return As(Jy(e).replace(Mo,"0x"),32)};case"bool":return function(e){return e?bm:wm};case"bytes":return function(e){return Ti(e)};case"string":return function(e){return Ai(e)}}return null}function Cm(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}class Bm{primaryType;#L;get types(){return JSON.parse(this.#L)}#$;#z;constructor(e){this.#L=JSON.stringify(e),this.#$=new Map,this.#z=new Map;const t=new Map,r=new Map,n=new Map;Object.keys(e).forEach((e=>{t.set(e,new Set),r.set(e,[]),n.set(e,new Set)}));for(const n in e){const o=new Set;for(const s of e[n]){ss(!o.has(s.name),`duplicate variable name ${JSON.stringify(s.name)} in ${JSON.stringify(n)}`,"types",e),o.add(s.name);const a=s.type.match(/^([^\x5b]*)(\x5b|$)/)[1]||null;ss(a!==n,`circular type reference to ${JSON.stringify(a)}`,"types",e);Em(a)||(ss(r.has(a),`unknown type ${JSON.stringify(a)}`,"types",e),r.get(a).push(n),t.get(n).add(a))}}const o=Array.from(r.keys()).filter((e=>0===r.get(e).length));ss(0!==o.length,"missing primary type","types",e),ss(1===o.length,`ambiguous primary types or unused types: ${o.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),es(this,{primaryType:o[0]}),function o(s,a){ss(!a.has(s),`circular type reference to ${JSON.stringify(s)}`,"types",e),a.add(s);for(const e of t.get(s))if(r.has(e)){o(e,a);for(const t of a)n.get(t).add(e)}a.delete(s)}(this.primaryType,new Set);for(const[t,r]of n){const n=Array.from(r);n.sort(),this.#$.set(t,Cm(t,e[t])+n.map((t=>Cm(t,e[t]))).join(""))}}getEncoder(e){let t=this.#z.get(e);return t||(t=this.#j(e),this.#z.set(e,t)),t}#j(e){{const t=Em(e);if(t)return t}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const e=t[1],r=this.getEncoder(e);return n=>{ss(!t[3]||parseInt(t[3])===n.length,`array length mismatch; expected length ${parseInt(t[3])}`,"value",n);let o=n.map(r);return this.#$.has(e)&&(o=o.map(Ti)),Ti(ms(o))}}const r=this.types[e];if(r){const t=Ai(this.#$.get(e));return e=>{const n=r.map((({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this.#$.has(r)?Ti(n):n}));return n.unshift(t),ms(n)}}ss(!1,`unknown type: ${e}`,"type",e)}encodeType(e){const t=this.#$.get(e);return ss(t,`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return Ti(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(Em(e))return r(e,t);const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n)return ss(!n[3]||parseInt(n[3])===t.length,`array length mismatch; expected length ${parseInt(n[3])}`,"value",t),t.map((e=>this._visit(n[1],e,r)));const o=this.types[e];if(o)return o.reduce(((e,{name:n,type:o})=>(e[n]=this._visit(o,t[n],r),e)),{});ss(!1,`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new Bm(e)}static getPrimaryType(e){return Bm.from(e).primaryType}static hashStruct(e,t,r){return Bm.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){if(null==e[r])continue;const n=Tm[r];ss(n,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>Am.indexOf(e.name)-Am.indexOf(t.name))),Bm.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return ms(["0x1901",Bm.hashDomain(e),Bm.from(t).hash(r)])}static hash(e,t,r){return Ti(Bm.encode(e,t,r))}static async resolveNames(e,t,r,n){e=Object.assign({},e);for(const t in e)null==e[t]&&delete e[t];const o={};e.verifyingContract&&!ps(e.verifyingContract,20)&&(o[e.verifyingContract]="0x");const s=Bm.from(t);s.visit(r,((e,t)=>("address"!==e||ps(t,20)||(o[t]="0x"),t)));for(const e in o)o[e]=await n(e);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),{domain:e,value:r=s.visit(r,((e,t)=>"address"===e&&o[t]?o[t]:t))}}static getPayload(e,t,r){Bm.hashDomain(e);const n={},o=[];Am.forEach((t=>{const r=e[t];null!=r&&(n[t]=Pm[t](r),o.push({name:t,type:Tm[t]}))}));const s=Bm.from(t),a=Object.assign({},t);return ss(null==a.EIP712Domain,"types must not contain EIP712Domain type","types.EIP712Domain",t),a.EIP712Domain=o,s.encode(r),{types:a,domain:n,primaryType:s.primaryType,message:s.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return ys(ds(t));if(e.match(/^u?int/))return Ws(t).toString();switch(e){case"trcToken":return Ws(t).toString();case"address":return t.toLowerCase();case"bool":return!!t;case"string":return ss("string"==typeof t,"invalid string","value",t),t}ss(!1,"unsupported type","type",e)}))}}}function Wm(e,t,r,n){const o=`0x${n.replace(/^0x/,"")}`,s=new yu(o),a=Bm.hash(e,t,r),i=s.sign(a);return["0x",i.r.substring(2),i.s.substring(2),Number(i.v).toString(16)].join("")}function Sm(e,t,r,n){return bu(Bm.hash(e,t,r),n)}var Im=r(5358);r(4856),r(6919),r(139),r(504),r(4781),r(4078),r(7724),r(8462),r(8099),r(5226);function _m(e,t){return function(){return e.apply(t,arguments)}}const{toString:Om}=Object.prototype,{getPrototypeOf:Rm}=Object,{iterator:Mm,toStringTag:xm}=Symbol,Fm=(km=Object.create(null),e=>{const t=Om.call(e);return km[t]||(km[t]=t.slice(8,-1).toLowerCase())});var km;const Nm=e=>(e=e.toLowerCase(),t=>Fm(t)===e),Um=e=>t=>typeof t===e,{isArray:Dm}=Array,Lm=Um("undefined");function $m(e){return null!==e&&!Lm(e)&&null!==e.constructor&&!Lm(e.constructor)&&Vm(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const zm=Nm("ArrayBuffer");const jm=Um("string"),Vm=Um("function"),Gm=Um("number"),Hm=e=>null!==e&&"object"==typeof e,Km=e=>{if("object"!==Fm(e))return!1;const t=Rm(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||xm in e||Mm in e)},Zm=Nm("Date"),qm=Nm("File"),Jm=Nm("Blob"),Ym=Nm("FileList"),Xm=Nm("URLSearchParams"),[Qm,eb,tb,rb]=["ReadableStream","Request","Response","Headers"].map(Nm);function nb(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),Dm(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if($m(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let a;for(n=0;n<s;n++)a=o[n],t.call(null,e[a],a,e)}}function ob(e,t){if($m(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const sb="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,ab=e=>!Lm(e)&&e!==sb;const ib=(cb="undefined"!=typeof Uint8Array&&Rm(Uint8Array),e=>cb&&e instanceof cb);var cb;const ub=Nm("HTMLFormElement"),lb=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),db=Nm("RegExp"),fb=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};nb(r,((r,o)=>{let s;!1!==(s=t(r,o,e))&&(n[o]=s||r)})),Object.defineProperties(e,n)};const pb=Nm("AsyncFunction"),hb=(gb="function"==typeof setImmediate,yb=Vm(sb.postMessage),gb?setImmediate:yb?(mb=`axios@${Math.random()}`,bb=[],sb.addEventListener("message",(({source:e,data:t})=>{e===sb&&t===mb&&bb.length&&bb.shift()()}),!1),e=>{bb.push(e),sb.postMessage(mb,"*")}):e=>setTimeout(e));var gb,yb,mb,bb;const wb="undefined"!=typeof queueMicrotask?queueMicrotask.bind(sb):"undefined"!=typeof process&&process.nextTick||hb,Tb={isArray:Dm,isArrayBuffer:zm,isBuffer:$m,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Vm(e.append)&&("formdata"===(t=Fm(e))||"object"===t&&Vm(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&zm(e.buffer),t},isString:jm,isNumber:Gm,isBoolean:e=>!0===e||!1===e,isObject:Hm,isPlainObject:Km,isEmptyObject:e=>{if(!Hm(e)||$m(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:Qm,isRequest:eb,isResponse:tb,isHeaders:rb,isUndefined:Lm,isDate:Zm,isFile:qm,isBlob:Jm,isRegExp:db,isFunction:Vm,isStream:e=>Hm(e)&&Vm(e.pipe),isURLSearchParams:Xm,isTypedArray:ib,isFileList:Ym,forEach:nb,merge:function e(){const{caseless:t,skipUndefined:r}=ab(this)&&this||{},n={},o=(o,s)=>{const a=t&&ob(n,s)||s;Km(n[a])&&Km(o)?n[a]=e(n[a],o):Km(o)?n[a]=e({},o):Dm(o)?n[a]=o.slice():r&&Lm(o)||(n[a]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&nb(arguments[e],o);return n},extend:(e,t,r,{allOwnKeys:n}={})=>(nb(t,((t,n)=>{r&&Vm(t)?e[n]=_m(t,r):e[n]=t}),{allOwnKeys:n}),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 o,s,a;const i={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],n&&!n(a,e,t)||i[a]||(t[a]=e[a],i[a]=!0);e=!1!==r&&Rm(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Fm,kindOfTest:Nm,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(Dm(e))return e;let t=e.length;if(!Gm(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Mm]).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:ub,hasOwnProperty:lb,hasOwnProp:lb,reduceDescriptors:fb,freezeMethods:e=>{fb(e,((t,r)=>{if(Vm(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];Vm(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 Dm(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)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:ob,global:sb,isContextDefined:ab,isSpecCompliantForm:function(e){return!!(e&&Vm(e.append)&&"FormData"===e[xm]&&e[Mm])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(Hm(e)){if(t.indexOf(e)>=0)return;if($m(e))return e;if(!("toJSON"in e)){t[n]=e;const o=Dm(e)?[]:{};return nb(e,((e,t)=>{const s=r(e,n+1);!Lm(s)&&(o[t]=s)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:pb,isThenable:e=>e&&(Hm(e)||Vm(e))&&Vm(e.then)&&Vm(e.catch),setImmediate:hb,asap:wb,isIterable:e=>null!=e&&Vm(e[Mm])};function Ab(e,t,r,n,o){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),o&&(this.response=o,this.status=o.status?o.status:null)}Tb.inherits(Ab,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:Tb.toJSONObject(this.config),code:this.code,status:this.status}}});const vb=Ab.prototype,Pb={};["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=>{Pb[e]={value:e}})),Object.defineProperties(Ab,Pb),Object.defineProperty(vb,"isAxiosError",{value:!0}),Ab.from=(e,t,r,n,o,s)=>{const a=Object.create(vb);Tb.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e));const i=e&&e.message?e.message:"Error",c=null==t&&e?e.code:t;return Ab.call(a,i,c,r,n,o),e&&null==a.cause&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",s&&Object.assign(a,s),a};const Eb=Ab;var Cb=r(1048).hp;function Bb(e){return Tb.isPlainObject(e)||Tb.isArray(e)}function Wb(e){return Tb.endsWith(e,"[]")?e.slice(0,-2):e}function Sb(e,t,r){return e?e.concat(t).map((function(e,t){return e=Wb(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const Ib=Tb.toFlatObject(Tb,{},null,(function(e){return/^is[A-Z]/.test(e)}));const _b=function(e,t,r){if(!Tb.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=Tb.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Tb.isUndefined(t[e])}))).metaTokens,o=r.visitor||u,s=r.dots,a=r.indexes,i=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Tb.isSpecCompliantForm(t);if(!Tb.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Tb.isDate(e))return e.toISOString();if(Tb.isBoolean(e))return e.toString();if(!i&&Tb.isBlob(e))throw new Eb("Blob is not supported. Use a Buffer instead.");return Tb.isArrayBuffer(e)||Tb.isTypedArray(e)?i&&"function"==typeof Blob?new Blob([e]):Cb.from(e):e}function u(e,r,o){let i=e;if(e&&!o&&"object"==typeof e)if(Tb.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(Tb.isArray(e)&&function(e){return Tb.isArray(e)&&!e.some(Bb)}(e)||(Tb.isFileList(e)||Tb.endsWith(r,"[]"))&&(i=Tb.toArray(e)))return r=Wb(r),i.forEach((function(e,n){!Tb.isUndefined(e)&&null!==e&&t.append(!0===a?Sb([r],n,s):null===a?r:r+"[]",c(e))})),!1;return!!Bb(e)||(t.append(Sb(o,r,s),c(e)),!1)}const l=[],d=Object.assign(Ib,{defaultVisitor:u,convertValue:c,isVisitable:Bb});if(!Tb.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!Tb.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),Tb.forEach(r,(function(r,s){!0===(!(Tb.isUndefined(r)||null===r)&&o.call(t,r,Tb.isString(s)?s.trim():s,n,d))&&e(r,n?n.concat(s):[s])})),l.pop()}}(e),t};function Ob(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Rb(e,t){this._pairs=[],e&&_b(e,this,t)}const Mb=Rb.prototype;Mb.append=function(e,t){this._pairs.push([e,t])},Mb.toString=function(e){const t=e?function(t){return e.call(this,t,Ob)}:Ob;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const xb=Rb;function Fb(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function kb(e,t,r){if(!t)return e;const n=r&&r.encode||Fb;Tb.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let s;if(s=o?o(t,r):Tb.isURLSearchParams(t)?t.toString():new xb(t,r).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}const Nb=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){Tb.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Ub={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Db={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:xb,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Lb="undefined"!=typeof window&&"undefined"!=typeof document,$b="object"==typeof navigator&&navigator||void 0,zb=Lb&&(!$b||["ReactNative","NativeScript","NS"].indexOf($b.product)<0),jb="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Vb=Lb&&window.location.href||"http://localhost",Gb={...y,...Db};const Hb=function(e){function t(e,r,n,o){let s=e[o++];if("__proto__"===s)return!0;const a=Number.isFinite(+s),i=o>=e.length;if(s=!s&&Tb.isArray(n)?n.length:s,i)return Tb.hasOwnProp(n,s)?n[s]=[n[s],r]:n[s]=r,!a;n[s]&&Tb.isObject(n[s])||(n[s]=[]);return t(e,r,n[s],o)&&Tb.isArray(n[s])&&(n[s]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n<o;n++)s=r[n],t[s]=e[s];return t}(n[s])),!a}if(Tb.isFormData(e)&&Tb.isFunction(e.entries)){const r={};return Tb.forEachEntry(e,((e,n)=>{t(function(e){return Tb.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null};const Kb={transitional:Ub,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=Tb.isObject(e);o&&Tb.isHTMLForm(e)&&(e=new FormData(e));if(Tb.isFormData(e))return n?JSON.stringify(Hb(e)):e;if(Tb.isArrayBuffer(e)||Tb.isBuffer(e)||Tb.isStream(e)||Tb.isFile(e)||Tb.isBlob(e)||Tb.isReadableStream(e))return e;if(Tb.isArrayBufferView(e))return e.buffer;if(Tb.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return _b(e,new Gb.classes.URLSearchParams,{visitor:function(e,t,r,n){return Gb.isNode&&Tb.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((s=Tb.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return _b(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(Tb.isString(e))try{return(t||JSON.parse)(e),Tb.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Kb.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(Tb.isResponse(e)||Tb.isReadableStream(e))return e;if(e&&Tb.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(e){if(r){if("SyntaxError"===e.name)throw Eb.from(e,Eb.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:Gb.classes.FormData,Blob:Gb.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Tb.forEach(["delete","get","head","post","put","patch"],(e=>{Kb.headers[e]={}}));const Zb=Kb,qb=Tb.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"]),Jb=Symbol("internals");function Yb(e){return e&&String(e).trim().toLowerCase()}function Xb(e){return!1===e||null==e?e:Tb.isArray(e)?e.map(Xb):String(e)}function Qb(e,t,r,n,o){return Tb.isFunction(n)?n.call(this,t,r):(o&&(t=r),Tb.isString(t)?Tb.isString(n)?-1!==t.indexOf(n):Tb.isRegExp(n)?n.test(t):void 0:void 0)}class ew{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=Yb(t);if(!o)throw new Error("header name must be a non-empty string");const s=Tb.findKey(n,o);(!s||void 0===n[s]||!0===r||void 0===r&&!1!==n[s])&&(n[s||t]=Xb(e))}const s=(e,t)=>Tb.forEach(e,((e,r)=>o(e,r,t)));if(Tb.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(Tb.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&qb[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t);else if(Tb.isObject(e)&&Tb.isIterable(e)){let r,n,o={};for(const t of e){if(!Tb.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?Tb.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}s(o,t)}else null!=e&&o(t,e,r);return this}get(e,t){if(e=Yb(e)){const r=Tb.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(Tb.isFunction(t))return t.call(this,e,r);if(Tb.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Yb(e)){const r=Tb.findKey(this,e);return!(!r||void 0===this[r]||t&&!Qb(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=Yb(e)){const o=Tb.findKey(r,e);!o||t&&!Qb(0,r[o],o,t)||(delete r[o],n=!0)}}return Tb.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!Qb(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return Tb.forEach(this,((n,o)=>{const s=Tb.findKey(r,o);if(s)return t[s]=Xb(n),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Xb(n),r[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Tb.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Tb.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")}getSetCookie(){return this.get("set-cookie")||[]}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[Jb]=this[Jb]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=Yb(e);t[n]||(!function(e,t){const r=Tb.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return Tb.isArray(e)?e.forEach(n):n(e),this}}ew.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Tb.reduceDescriptors(ew.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),Tb.freezeMethods(ew);const tw=ew;function rw(e,t){const r=this||Zb,n=t||r,o=tw.from(n.headers);let s=n.data;return Tb.forEach(e,(function(e){s=e.call(r,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function nw(e){return!(!e||!e.__CANCEL__)}function ow(e,t,r){Eb.call(this,null==e?"canceled":e,Eb.ERR_CANCELED,t,r),this.name="CanceledError"}Tb.inherits(ow,Eb,{__CANCEL__:!0});const sw=ow;function aw(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Eb("Request failed with status code "+r.status,[Eb.ERR_BAD_REQUEST,Eb.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const iw=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,s=0,a=0;return t=void 0!==t?t:1e3,function(i){const c=Date.now(),u=n[a];o||(o=c),r[s]=i,n[s]=c;let l=a,d=0;for(;l!==s;)d+=r[l++],l%=e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),c-o<t)return;const f=u&&c-u;return f?Math.round(1e3*d/f):void 0}};const cw=function(e,t){let r,n,o=0,s=1e3/t;const a=(t,s=Date.now())=>{o=s,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),i=t-o;i>=s?a(e,t):(r=e,n||(n=setTimeout((()=>{n=null,a(r)}),s-i)))},()=>r&&a(r)]},uw=(e,t,r=3)=>{let n=0;const o=iw(50,250);return cw((r=>{const s=r.loaded,a=r.lengthComputable?r.total:void 0,i=s-n,c=o(i);n=s;e({loaded:s,total:a,progress:a?s/a:void 0,bytes:i,rate:c||void 0,estimated:c&&a&&s<=a?(a-s)/c:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),r)},lw=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},dw=e=>(...t)=>Tb.asap((()=>e(...t))),fw=Gb.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Gb.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Gb.origin),Gb.navigator&&/(msie|trident)/i.test(Gb.navigator.userAgent)):()=>!0,pw=Gb.hasStandardBrowserEnv?{write(e,t,r,n,o,s){const a=[e+"="+encodeURIComponent(t)];Tb.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),Tb.isString(n)&&a.push("path="+n),Tb.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.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 hw(e,t,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const gw=e=>e instanceof tw?{...e}:e;function yw(e,t){t=t||{};const r={};function n(e,t,r,n){return Tb.isPlainObject(e)&&Tb.isPlainObject(t)?Tb.merge.call({caseless:n},e,t):Tb.isPlainObject(t)?Tb.merge({},t):Tb.isArray(t)?t.slice():t}function o(e,t,r,o){return Tb.isUndefined(t)?Tb.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function s(e,t){if(!Tb.isUndefined(t))return n(void 0,t)}function a(e,t){return Tb.isUndefined(t)?Tb.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function i(r,o,s){return s in t?n(r,o):s in e?n(void 0,r):void 0}const c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(e,t,r)=>o(gw(e),gw(t),0,!0)};return Tb.forEach(Object.keys({...e,...t}),(function(n){const s=c[n]||o,a=s(e[n],t[n],n);Tb.isUndefined(a)&&s!==i||(r[n]=a)})),r}const mw=e=>{const t=yw({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;if(t.headers=a=tw.from(a),t.url=kb(hw(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),Tb.isFormData(r))if(Gb.hasStandardBrowserEnv||Gb.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(Tb.isFunction(r.getHeaders)){const e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach((([e,r])=>{t.includes(e.toLowerCase())&&a.set(e,r)}))}if(Gb.hasStandardBrowserEnv&&(n&&Tb.isFunction(n)&&(n=n(t)),n||!1!==n&&fw(t.url))){const e=o&&s&&pw.read(s);e&&a.set(o,e)}return t},bw="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=mw(e);let o=n.data;const s=tw.from(n.headers).normalize();let a,i,c,u,l,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=n;function h(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let g=new XMLHttpRequest;function y(){if(!g)return;const n=tw.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());aw((function(e){t(e),h()}),(function(e){r(e),h()}),{data:d&&"text"!==d&&"json"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g}),g=null}g.open(n.method.toUpperCase(),n.url,!0),g.timeout=n.timeout,"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(y)},g.onabort=function(){g&&(r(new Eb("Request aborted",Eb.ECONNABORTED,e,g)),g=null)},g.onerror=function(t){const n=t&&t.message?t.message:"Network Error",o=new Eb(n,Eb.ERR_NETWORK,e,g);o.event=t||null,r(o),g=null},g.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||Ub;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Eb(t,o.clarifyTimeoutError?Eb.ETIMEDOUT:Eb.ECONNABORTED,e,g)),g=null},void 0===o&&s.setContentType(null),"setRequestHeader"in g&&Tb.forEach(s.toJSON(),(function(e,t){g.setRequestHeader(t,e)})),Tb.isUndefined(n.withCredentials)||(g.withCredentials=!!n.withCredentials),d&&"json"!==d&&(g.responseType=n.responseType),p&&([c,l]=uw(p,!0),g.addEventListener("progress",c)),f&&g.upload&&([i,u]=uw(f),g.upload.addEventListener("progress",i),g.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(a=t=>{g&&(r(!t||t.type?new sw(null,e,g):t),g.abort(),g=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const m=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);m&&-1===Gb.protocols.indexOf(m)?r(new Eb("Unsupported protocol "+m+":",Eb.ERR_BAD_REQUEST,e)):g.send(o||null)}))},ww=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,a();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Eb?t:new sw(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{s=null,o(new Eb(`timeout ${t} of ms exceeded`,Eb.ETIMEDOUT))}),t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:i}=n;return i.unsubscribe=()=>Tb.asap(a),i}},Tw=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},Aw=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},vw=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of Aw(e))yield*Tw(r,t)}(e,t);let s,a=0,i=e=>{s||(s=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return i(),void e.close();let s=n.byteLength;if(r){let e=a+=s;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw i(e),e}},cancel:e=>(i(e),o.return())},{highWaterMark:2})},{isFunction:Pw}=Tb,Ew=(({Request:e,Response:t})=>({Request:e,Response:t}))(Tb.global),{ReadableStream:Cw,TextEncoder:Bw}=Tb.global,Ww=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Sw=e=>{e=Tb.merge.call({skipUndefined:!0},Ew,e);const{fetch:t,Request:r,Response:n}=e,o=t?Pw(t):"function"==typeof fetch,s=Pw(r),a=Pw(n);if(!o)return!1;const i=o&&Pw(Cw),c=o&&("function"==typeof Bw?(u=new Bw,e=>u.encode(e)):async e=>new Uint8Array(await new r(e).arrayBuffer()));var u;const l=s&&i&&Ww((()=>{let e=!1;const t=new r(Gb.origin,{body:new Cw,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),d=a&&i&&Ww((()=>Tb.isReadableStream(new n("").body))),f={stream:d&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!f[e]&&(f[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new Eb(`Response type '${e}' is not supported`,Eb.ERR_NOT_SUPPORT,r)})}));const p=async(e,t)=>{const n=Tb.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(Tb.isBlob(e))return e.size;if(Tb.isSpecCompliantForm(e)){const t=new r(Gb.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Tb.isArrayBufferView(e)||Tb.isArrayBuffer(e)?e.byteLength:(Tb.isURLSearchParams(e)&&(e+=""),Tb.isString(e)?(await c(e)).byteLength:void 0)})(t):n};return async e=>{let{url:o,method:a,data:i,signal:c,cancelToken:u,timeout:h,onDownloadProgress:g,onUploadProgress:y,responseType:m,headers:b,withCredentials:w="same-origin",fetchOptions:T}=mw(e),A=t||fetch;m=m?(m+"").toLowerCase():"text";let v=ww([c,u&&u.toAbortSignal()],h),P=null;const E=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let C;try{if(y&&l&&"get"!==a&&"head"!==a&&0!==(C=await p(b,i))){let e,t=new r(o,{method:"POST",body:i,duplex:"half"});if(Tb.isFormData(i)&&(e=t.headers.get("content-type"))&&b.setContentType(e),t.body){const[e,r]=lw(C,uw(dw(y)));i=vw(t.body,65536,e,r)}}Tb.isString(w)||(w=w?"include":"omit");const t=s&&"credentials"in r.prototype,c={...T,signal:v,method:a.toUpperCase(),headers:b.normalize().toJSON(),body:i,duplex:"half",credentials:t?w:void 0};P=s&&new r(o,c);let u=await(s?A(P,T):A(o,c));const h=d&&("stream"===m||"response"===m);if(d&&(g||h&&E)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=u[t]}));const t=Tb.toFiniteNumber(u.headers.get("content-length")),[r,o]=g&&lw(t,uw(dw(g),!0))||[];u=new n(vw(u.body,65536,r,(()=>{o&&o(),E&&E()})),e)}m=m||"text";let B=await f[Tb.findKey(f,m)||"text"](u,e);return!h&&E&&E(),await new Promise(((t,r)=>{aw(t,r,{data:B,headers:tw.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:P})}))}catch(t){if(E&&E(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Eb("Network Error",Eb.ERR_NETWORK,e,P),{cause:t.cause||t});throw Eb.from(t,t&&t.code,e,P)}}},Iw=new Map,_w=e=>{let t=e?e.env:{};const{fetch:r,Request:n,Response:o}=t,s=[n,o,r];let a,i,c=s.length,u=Iw;for(;c--;)a=s[c],i=u.get(a),void 0===i&&u.set(a,i=c?new Map:Sw(t)),u=i;return i},Ow=(_w(),{http:null,xhr:bw,fetch:{get:_w}});Tb.forEach(Ow,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Rw=e=>`- ${e}`,Mw=e=>Tb.isFunction(e)||null===e||!1===e,xw=(e,t)=>{e=Tb.isArray(e)?e:[e];const{length:r}=e;let n,o;const s={};for(let a=0;a<r;a++){let r;if(n=e[a],o=n,!Mw(n)&&(o=Ow[(r=String(n)).toLowerCase()],void 0===o))throw new Eb(`Unknown adapter '${r}'`);if(o&&(Tb.isFunction(o)||(o=o.get(t))))break;s[r||"#"+a]=o}if(!o){const e=Object.entries(s).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let t=r?e.length>1?"since :\n"+e.map(Rw).join("\n"):" "+Rw(e[0]):"as no adapter specified";throw new Eb("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return o};function Fw(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new sw(null,e)}function kw(e){Fw(e),e.headers=tw.from(e.headers),e.data=rw.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return xw(e.adapter||Zb.adapter,e)(e).then((function(t){return Fw(e),t.data=rw.call(e,e.transformResponse,t),t.headers=tw.from(t.headers),t}),(function(t){return nw(t)||(Fw(e),t&&t.response&&(t.response.data=rw.call(e,e.transformResponse,t.response),t.response.headers=tw.from(t.response.headers))),Promise.reject(t)}))}const Nw="1.12.2",Uw={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Uw[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Dw={};Uw.transitional=function(e,t,r){function n(e,t){return"[Axios v"+Nw+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,s)=>{if(!1===e)throw new Eb(n(o," has been removed"+(t?" in "+t:"")),Eb.ERR_DEPRECATED);return t&&!Dw[o]&&(Dw[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,s)}},Uw.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};const Lw={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Eb("options must be an object",Eb.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],a=t[s];if(a){const t=e[s],r=void 0===t||a(t,s,e);if(!0!==r)throw new Eb("option "+s+" must be "+r,Eb.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Eb("Unknown option "+s,Eb.ERR_BAD_OPTION)}},validators:Uw},$w=Lw.validators;class zw{constructor(e){this.defaults=e||{},this.interceptors={request:new Nb,response:new Nb}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=yw(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Lw.assertOptions(r,{silentJSONParsing:$w.transitional($w.boolean),forcedJSONParsing:$w.transitional($w.boolean),clarifyTimeoutError:$w.transitional($w.boolean)},!1),null!=n&&(Tb.isFunction(n)?t.paramsSerializer={serialize:n}:Lw.assertOptions(n,{encode:$w.function,serialize:$w.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Lw.assertOptions(t,{baseUrl:$w.spelling("baseURL"),withXsrfToken:$w.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&Tb.merge(o.common,o[t.method]);o&&Tb.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=tw.concat(s,o);const a=[];let i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,d=0;if(!i){const e=[kw.bind(this),void 0];for(e.unshift(...a),e.push(...c),l=e.length,u=Promise.resolve(t);d<l;)u=u.then(e[d++],e[d++]);return u}l=a.length;let f=t;for(;d<l;){const e=a[d++],t=a[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{u=kw.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,l=c.length;d<l;)u=u.then(c[d++],c[d++]);return u}getUri(e){return kb(hw((e=yw(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Tb.forEach(["delete","get","head","options"],(function(e){zw.prototype[e]=function(t,r){return this.request(yw(r||{},{method:e,url:t,data:(r||{}).data}))}})),Tb.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(yw(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}zw.prototype[e]=t(),zw.prototype[e+"Form"]=t(!0)}));const jw=zw;class Vw{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,o){r.reason||(r.reason=new sw(e,n,o),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)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;const t=new Vw((function(t){e=t}));return{token:t,cancel:e}}}const Gw=Vw;const Hw={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(Hw).forEach((([e,t])=>{Hw[t]=e}));const Kw=Hw;const Zw=function e(t){const r=new jw(t),n=_m(jw.prototype.request,r);return Tb.extend(n,jw.prototype,r,{allOwnKeys:!0}),Tb.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(yw(t,r))},n}(Zb);Zw.Axios=jw,Zw.CanceledError=sw,Zw.CancelToken=Gw,Zw.isCancel=nw,Zw.VERSION=Nw,Zw.toFormData=_b,Zw.AxiosError=Eb,Zw.Cancel=Zw.CanceledError,Zw.all=function(e){return Promise.all(e)},Zw.spread=function(e){return function(t){return e.apply(null,t)}},Zw.isAxiosError=function(e){return Tb.isObject(e)&&!0===e.isAxiosError},Zw.mergeConfig=yw,Zw.AxiosHeaders=tw,Zw.formToJSON=e=>Hb(Tb.isHTMLForm(e)?new FormData(e):e),Zw.getAdapter=xw,Zw.HttpStatusCode=Kw,Zw.default=Zw;const qw=Zw;class Jw{host;timeout;user;password;headers;statusPage;instance;constructor(e,t=3e4,r="",n="",o={},s="/"){if(!Ry(e))throw new Error("Invalid URL provided to HttpProvider");if(isNaN(t)||t<0)throw new Error("Invalid timeout duration provided");if(!My(o))throw new Error("Invalid headers object provided");this.host=e,this.timeout=t,this.user=r,this.password=n,this.headers=o,this.statusPage=s,this.instance=qw.create({baseURL:e,timeout:t,headers:o,auth:r?{username:r,password:n}:void 0})}setStatusPage(e="/"){this.statusPage=e}async isConnected(e=this.statusPage){return this.request(e).then((e=>jy(e,"blockID","block_header"))).catch((()=>!1))}request(e,t={},r="get"){return r=r.toLowerCase(),this.instance.request({data:"post"==r&&Object.keys(t).length?t:null,params:"get"==r&&t,url:e,method:r}).then((({data:e})=>e))}}const Yw={HttpProvider:Jw};const Xw=r(8985);var Qw,eT,tT,rT=r(4545);class nT{invalid(e){return e.msg||`Invalid ${e.name}${"address"===e.type?" address":""} provided`}notPositive(e){return`${e.name} must be a positive integer`}notEqual(e){return e.msg||`${e.names?.[0]} can not be equal to ${e.names?.[1]}`}notValid(e){const t={};let r=!1;for(const n of e){const{name:e,names:o,value:s,type:a,gt:i,lt:c,gte:u,lte:l,optional:d}=n;if(!d||Ky(s)&&("boolean"===a||!1!==s)){switch(t[e]=n.value,a){case"address":em(s)?t[e]=Jy(s):r=!0;break;case"integer":(!$y(s)||"number"==typeof i&&s<=i||"number"==typeof c&&s>=c||"number"==typeof u&&s<u||"number"==typeof l&&s>l)&&(r=!0);break;case"positive-integer":if(!$y(s)||s<=0)throw new Error(this.notPositive(n));break;case"tokenId":case"not-empty-string":Uy(s)&&s.length||(r=!0);break;case"notEmptyObject":My(s)&&Object.keys(s).length||(r=!0);break;case"notEqual":if(o&&t[o[0]]===t[o[1]])throw new Error(this.notEqual(n));break;case"resource":["BANDWIDTH","ENERGY"].includes(s)||(r=!0);break;case"url":Ry(s)||(r=!0);break;case"hex":Ly(s)||(r=!0);break;case"array":Array.isArray(s)||(r=!0);break;case"boolean":ky(s)||(r=!0);break;case"string":(!Uy(s)||"number"==typeof i&&s.length<=i||"number"==typeof c&&s.length>=c||"number"==typeof u&&s.length<u||"number"==typeof l&&s.length>l)&&(r=!0)}if(r)throw new Error(this.invalid(n))}}return!1}}!function(e){e.AccountCreateContract="AccountCreateContract",e.TransferContract="TransferContract",e.TransferAssetContract="TransferAssetContract",e.VoteAssetContract="VoteAssetContract",e.VoteWitnessContract="VoteWitnessContract",e.WitnessCreateContract="WitnessCreateContract",e.AssetIssueContract="AssetIssueContract",e.WitnessUpdateContract="WitnessUpdateContract",e.ParticipateAssetIssueContract="ParticipateAssetIssueContract",e.AccountUpdateContract="AccountUpdateContract",e.FreezeBalanceContract="FreezeBalanceContract",e.UnfreezeBalanceContract="UnfreezeBalanceContract",e.CancelAllUnfreezeV2Contract="CancelAllUnfreezeV2Contract",e.WithdrawBalanceContract="WithdrawBalanceContract",e.UnfreezeAssetContract="UnfreezeAssetContract",e.UpdateAssetContract="UpdateAssetContract",e.ProposalCreateContract="ProposalCreateContract",e.ProposalApproveContract="ProposalApproveContract",e.ProposalDeleteContract="ProposalDeleteContract",e.SetAccountIdContract="SetAccountIdContract",e.CustomContract="CustomContract",e.CreateSmartContract="CreateSmartContract",e.TriggerSmartContract="TriggerSmartContract",e.GetContract="GetContract",e.UpdateSettingContract="UpdateSettingContract",e.ExchangeCreateContract="ExchangeCreateContract",e.ExchangeInjectContract="ExchangeInjectContract",e.ExchangeWithdrawContract="ExchangeWithdrawContract",e.ExchangeTransactionContract="ExchangeTransactionContract",e.UpdateEnergyLimitContract="UpdateEnergyLimitContract",e.AccountPermissionUpdateContract="AccountPermissionUpdateContract",e.ClearABIContract="ClearABIContract",e.UpdateBrokerageContract="UpdateBrokerageContract",e.ShieldedTransferContract="ShieldedTransferContract",e.MarketSellAssetContract="MarketSellAssetContract",e.MarketCancelOrderContract="MarketCancelOrderContract",e.FreezeBalanceV2Contract="FreezeBalanceV2Contract",e.UnfreezeBalanceV2Contract="UnfreezeBalanceV2Contract",e.WithdrawExpireUnfreezeContract="WithdrawExpireUnfreezeContract",e.DelegateResourceContract="DelegateResourceContract",e.UnDelegateResourceContract="UnDelegateResourceContract",e.UNRECOGNIZED="UNRECOGNIZED"}(Qw||(Qw={})),function(e){e[e.Owner=0]="Owner",e[e.Witness=1]="Witness",e[e.Active=2]="Active",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(eT||(eT={})),function(e){e[e.Normal=0]="Normal",e[e.AssetIssue=1]="AssetIssue",e[e.Contract=2]="Contract",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(tT||(tT={}));var oT=r(1048).hp;function sT(e){return PT.fromUtf8(e).replace(/^0x/,"")}function aT(e){return JSON.parse(JSON.stringify(e))}function iT(e={}){if(void 0===e.ref_block_bytes&&void 0===e.ref_block_hash&&void 0===e.expiration&&void 0===e.timestamp)return!1;if("string"!=typeof e.ref_block_bytes)throw new Error("Invalid ref_block_bytes provided.");if("string"!=typeof e.ref_block_hash)throw new Error("Invalid ref_block_hash provided.");if("number"!=typeof e.expiration)throw new Error("Invalid expiration provided.");if("number"!=typeof e.timestamp)throw new Error("Invalid timestamp provided.");return!0}async function cT(e,t,r,n,o={}){const s={visible:!1,txID:"",raw_data_hex:"",raw_data:{contract:[{parameter:{value:r,type_url:`type.googleapis.com/protocol.${t}`},type:t}],...iT(o)?{}:await e.trx.getCurrentRefBlockParams(),...o}};n&&(s.raw_data.contract[0].Permission_id=n);const a=mA(s);return s.txID=PA(a).replace(/^0x/,""),s.raw_data_hex=TA(a).toLowerCase(),s}function uT(e={}){const t={};return iT(e.blockHeader)&&(t.ref_block_bytes=e.blockHeader.ref_block_bytes,t.ref_block_hash=e.blockHeader.ref_block_hash,t.expiration=e.blockHeader.expiration,t.timestamp=e.blockHeader.timestamp),t}var lT=r(1048).hp;class dT{tronWeb;validator;constructor(e){if(!(e&&e instanceof PT))throw new Error("Expected instance of TronWeb");this.tronWeb=e,this.validator=new nT}async sendTrx(e,t=0,r=this.tronWeb.defaultAddress.hex,n={}){t=parseInt(t),this.validator.notValid([{name:"recipient",type:"address",value:e},{name:"origin",type:"address",value:r},{names:["recipient","origin"],type:"notEqual",msg:"Cannot transfer TRX to the same account"},{name:"amount",type:"integer",gt:0,value:t}]);const o={to_address:Jy(e),owner_address:Jy(r),amount:t},s=uT(n);return cT(this.tronWeb,Qw.TransferContract,o,n?.permissionId,s)}async sendToken(e,t=0,r,n=this.tronWeb.defaultAddress.hex,o={}){t=parseInt(t),this.validator.notValid([{name:"recipient",type:"address",value:e},{name:"origin",type:"address",value:n},{names:["recipient","origin"],type:"notEqual",msg:"Cannot transfer tokens to the same account"},{name:"amount",type:"integer",gt:0,value:t},{name:"token ID",type:"tokenId",value:r}]);const s={to_address:Jy(e),owner_address:Jy(n),asset_name:sT(r),amount:t},a=uT(o);return cT(this.tronWeb,Qw.TransferAssetContract,s,o?.permissionId,a)}async purchaseToken(e,t,r=0,n=this.tronWeb.defaultAddress.hex,o={}){this.validator.notValid([{name:"buyer",type:"address",value:n},{name:"issuer",type:"address",value:e},{names:["buyer","issuer"],type:"notEqual",msg:"Cannot purchase tokens from same account"},{name:"amount",type:"integer",gt:0,value:r},{name:"token ID",type:"tokenId",value:t}]);const s={to_address:Jy(e),owner_address:Jy(n),asset_name:sT(t),amount:parseInt(r)},a=uT(o);return cT(this.tronWeb,Qw.ParticipateAssetIssueContract,s,o?.permissionId,a)}async freezeBalance(e=0,t=3,r="BANDWIDTH",n=this.tronWeb.defaultAddress.hex,o,s={}){this.validator.notValid([{name:"origin",type:"address",value:n},{name:"receiver",type:"address",value:o,optional:!0},{name:"amount",type:"integer",gt:0,value:e},{name:"duration",type:"integer",gte:3,value:t},{name:"resource",type:"resource",value:r,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'}]);const a={owner_address:Jy(n),frozen_balance:parseInt(e),frozen_duration:parseInt(String(t))};"BANDWIDTH"!==r&&(a.resource=r),Ky(o)&&Jy(o)!==Jy(n)&&(a.receiver_address=Jy(o));const i=uT(s);return cT(this.tronWeb,Qw.FreezeBalanceContract,a,s?.permissionId,i)}async unfreezeBalance(e="BANDWIDTH",t=this.tronWeb.defaultAddress.hex,r,n={}){this.validator.notValid([{name:"origin",type:"address",value:t},{name:"receiver",type:"address",value:r,optional:!0},{name:"resource",type:"resource",value:e,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'}]);const o={owner_address:Jy(t)};"BANDWIDTH"!==e&&(o.resource=e),Ky(r)&&Jy(r)!==Jy(t)&&(o.receiver_address=Jy(r));const s=uT(n);return cT(this.tronWeb,Qw.UnfreezeBalanceContract,o,n?.permissionId,s)}async freezeBalanceV2(e=0,t="BANDWIDTH",r=this.tronWeb.defaultAddress.hex,n={}){this.validator.notValid([{name:"origin",type:"address",value:r},{name:"amount",type:"integer",gt:0,value:e},{name:"resource",type:"resource",value:t,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'}]);const o={owner_address:Jy(r),frozen_balance:parseInt(e)};"BANDWIDTH"!==t&&(o.resource=t);const s=uT(n);return cT(this.tronWeb,Qw.FreezeBalanceV2Contract,o,n?.permissionId,s)}async unfreezeBalanceV2(e=0,t="BANDWIDTH",r=this.tronWeb.defaultAddress.hex,n={}){this.validator.notValid([{name:"origin",type:"address",value:r},{name:"amount",type:"integer",gt:0,value:e},{name:"resource",type:"resource",value:t,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'}]);const o={owner_address:Jy(r),unfreeze_balance:parseInt(e)};"BANDWIDTH"!==t&&(o.resource=t);const s=uT(n);return cT(this.tronWeb,Qw.UnfreezeBalanceV2Contract,o,n?.permissionId,s)}async cancelUnfreezeBalanceV2(e=this.tronWeb.defaultAddress.hex,t={}){this.validator.notValid([{name:"origin",type:"address",value:e}]);const r={owner_address:Jy(e)},n=uT(t);return cT(this.tronWeb,Qw.CancelAllUnfreezeV2Contract,r,t?.permissionId,n)}async delegateResource(e=0,t,r="BANDWIDTH",n=this.tronWeb.defaultAddress.hex,o=!1,s,a={}){if(this.validator.notValid([{name:"amount",type:"integer",gt:0,value:e},{name:"resource",type:"resource",value:r,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'},{name:"receiver",type:"address",value:t},{name:"origin",type:"address",value:n},{name:"lock",type:"boolean",value:o},{name:"lock period",type:"integer",gte:0,value:s,optional:!0}]),Jy(t)===Jy(n))throw new Error("Receiver address must not be the same as owner address");const i={owner_address:Jy(n),receiver_address:Jy(t),balance:parseInt(e)};"BANDWIDTH"!==r&&(i.resource=r),o&&(i.lock=o,Ky(s)&&(i.lock_period=s));const c=uT(a);return cT(this.tronWeb,Qw.DelegateResourceContract,i,a?.permissionId,c)}async undelegateResource(e=0,t,r="BANDWIDTH",n=this.tronWeb.defaultAddress.hex,o={}){if(this.validator.notValid([{name:"origin",type:"address",value:n},{name:"receiver",type:"address",value:t},{name:"amount",type:"integer",gt:0,value:e},{name:"resource",type:"resource",value:r,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'}]),Jy(t)===Jy(n))throw new Error("Receiver address must not be the same as owner address");const s={owner_address:Jy(n),receiver_address:Jy(t),balance:parseInt(e)};"BANDWIDTH"!==r&&(s.resource=r);const a=uT(o);return cT(this.tronWeb,Qw.UnDelegateResourceContract,s,o?.permissionId,a)}async withdrawExpireUnfreeze(e=this.tronWeb.defaultAddress.hex,t={}){this.validator.notValid([{name:"origin",type:"address",value:e}]);const r={owner_address:Jy(e)},n=uT(t);return cT(this.tronWeb,Qw.WithdrawExpireUnfreezeContract,r,t?.permissionId,n)}async withdrawBlockRewards(e=this.tronWeb.defaultAddress.hex,t={}){this.validator.notValid([{name:"origin",type:"address",value:e}]);const r={owner_address:Jy(e)},n=uT(t);return cT(this.tronWeb,Qw.WithdrawBalanceContract,r,t?.permissionId,n)}async applyForSR(e=this.tronWeb.defaultAddress.hex,t="",r={}){this.validator.notValid([{name:"origin",type:"address",value:e},{name:"url",type:"url",value:t,msg:"Invalid url provided"},{name:"url",type:"string",value:t,lte:256,msg:"Invalid url provided"}]);const n={owner_address:Jy(e),url:sT(t)},o=uT(r);return cT(this.tronWeb,Qw.WitnessCreateContract,n,r?.permissionId,o)}async vote(e={},t=this.tronWeb.defaultAddress.hex,r={}){this.validator.notValid([{name:"voter",type:"address",value:t},{name:"votes",type:"notEmptyObject",value:e}]);const n=Object.entries(e);for(const[e,t]of n)this.validator.notValid([{name:"SR",type:"address",value:e},{name:"vote count",type:"integer",gt:0,value:t,msg:"Invalid vote count provided for SR: "+e}]);const o=n.map((([e,t])=>({vote_address:Jy(e),vote_count:parseInt(t)}))),s={owner_address:Jy(t),votes:o},a=uT(r);return cT(this.tronWeb,Qw.VoteWitnessContract,s,r?.permissionId,a)}async createSmartContract(e={},t=this.tronWeb.defaultAddress.hex){const r=e.feeLimit||this.tronWeb.feeLimit;let n=e.userFeePercentage;"number"==typeof n||n||(n=100);const o=e.originEnergyLimit||1e7,s=e.callValue||0,a=e.tokenValue,i=e.tokenId||e.token_id;let{abi:c}=e;const{parameters:u=[]}=e;let l="";const{bytecode:d=!1,name:f=""}=e;if(c&&Uy(c))try{c=JSON.parse(c)}catch{throw new Error("Invalid options.abi provided")}const p=c;let h=p;if(p.entrys&&(h=p.entrys),!xy(h))throw new Error("Invalid options.abi provided");const g=h.some((e=>"constructor"===e.type&&"payable"===e.stateMutability.toLowerCase()));if(this.validator.notValid([{name:"bytecode",type:"hex",value:d},{name:"feeLimit",type:"integer",value:r,gt:0},{name:"callValue",type:"integer",value:s,gte:0},{name:"userFeePercentage",type:"integer",value:n,gte:0,lte:100},{name:"originEnergyLimit",type:"integer",value:o,gte:0,lte:1e7},{name:"parameters",type:"array",value:u},{name:"issuer",type:"address",value:t},{name:"tokenValue",type:"integer",value:a,gte:0,optional:!0},{name:"tokenId",type:"integer",value:i,gte:0,optional:!0}]),!g&&(s>0||a>0))throw new Error("When contract is not payable, options.callValue and options.tokenValue must be 0");const{rawParameter:y,funcABIV2:m,parametersV2:b}=e;if(y&&Uy(y))l=y.replace(/^(0x)/,"");else if(m)l=im(m,b).replace(/^(0x)/,"");else{let e=h.find((e=>"constructor"===e.type));if(void 0!==e&&e){const t=new Wl,r=[],n=[];if(e=e.inputs,u.length!=e.length)throw new Error(`constructor needs ${e.length} but ${u.length} provided`);for(let t=0;t<u.length;t++){let o=e[t].type,s=u[t];if(!o||!Uy(o)||!o.length)throw new Error("Invalid parameter type provided: "+o);const a=e=>xy(e)?e.map((e=>a(e))):Jy(e).replace(Mo,"0x");"address"===o||"address["===o.match(/^([^\x5b]*)(\x5b|$)/)?.[0]?s=a(s):/trcToken/.test(o)&&(o=o.replace(/trcToken/,"uint256")),r.push(o),n.push(s)}try{l=t.encode(r,n).replace(/^(0x)/,"")}catch(e){throw new Error(e)}}else l=""}const w={owner_address:Jy(t),fee_limit:parseInt(r),call_value:parseInt(s),consume_user_resource_percent:n,origin_energy_limit:o,abi:JSON.stringify(h),bytecode:d,parameter:l,name:f};Ky(a)&&(w.call_token_value=parseInt(a)),Ky(i)&&(w.token_id=parseInt(i));const T={};T.owner_address=w.owner_address,Ky(w.call_token_value)&&(T.call_token_value=w.call_token_value),Ky(w.token_id)&&(T.token_id=w.token_id);const A=T.new_contract={};w.abi?A.abi={entrys:JSON.parse(w.abi)}:A.abi={},w.call_value&&(A.call_value=w.call_value),A.consume_user_resource_percent=w.consume_user_resource_percent,A.origin_energy_limit=w.origin_energy_limit,A.origin_address=w.origin_address??w.owner_address,w.bytecode+w.parameter&&(A.bytecode=(w.bytecode+w.parameter).replace(/^0x/,"")),Ky(w.name)&&(A.name=w.name);const v=uT(e),P=await cT(this.tronWeb,Qw.CreateSmartContract,T,e?.permissionId,{...v,fee_limit:w.fee_limit});var E,C;return P.contract_address=(E=w.owner_address,C=P.txID,"41"+Ti(oT.from(C+E,"hex")).toString().substring(2).slice(24)),P}async triggerSmartContract(e,t,r,n,o){const s=[e,t,r,n,o];return"object"!=typeof s[2]&&(s[2]={feeLimit:s[2],callValue:s[3]},s.splice(3,1)),s[2]?.txLocal?this._triggerSmartContractLocal(...s):this._triggerSmartContract(...s)}async triggerConstantContract(e,t,r={},n=[],o=this.tronWeb.defaultAddress.hex){return r._isConstant=!0,this._triggerSmartContract(e,t,r,n,o)}async triggerConfirmedConstantContract(e,t,r={},n=[],o=this.tronWeb.defaultAddress.hex){return r._isConstant=!0,r.confirmed=!0,this._triggerSmartContract(e,t,r,n,o)}async estimateEnergy(e,t,r={},n=[],o=this.tronWeb.defaultAddress.hex){r.estimateEnergy=!0;return await this._triggerSmartContract(e,t,r,n,o)}async deployConstantContract(e={input:"",ownerAddress:""}){const{input:t,ownerAddress:r,tokenId:n,tokenValue:o,callValue:s=0}=e;this.validator.notValid([{name:"input",type:"not-empty-string",value:t},{name:"callValue",type:"integer",value:s,gte:0},{name:"owner",type:"address",value:r},{name:"tokenValue",type:"integer",value:o,gte:0,optional:!0},{name:"tokenId",type:"integer",value:n,gte:0,optional:!0}]);const a={data:t,owner_address:Jy(r),call_value:s};n&&(a.token_id=n),o&&(a.call_token_value=o);const i=`wallet${e.confirmed?"solidity":""}/estimateenergy`,c=await this.tronWeb[e.confirmed?"solidityNode":"fullNode"].request(i,a,"post");if(c.Error)throw new Error(c.Error);if(c.result&&c.result.message)throw new Error(this.tronWeb.toUtf8(c.result.message));return c}_getTriggerSmartContractArgs(e,t,r,n,o,s,a,i,c){const u={contract_address:Jy(e),owner_address:Jy(o)};if(t&&Uy(t)){let e;if(t=t.replace(/\s*/g,""),n.length){const t=new Wl;let r=[];const o=[];for(let e=0;e<n.length;e++){let{value:t}=n[e];const{type:s}=n[e];if(!s||!Uy(s)||!s.length)throw new Error("Invalid parameter type provided: "+s);const a=e=>xy(e)?e.map((e=>a(e))):Jy(e).replace(Mo,"0x");("address"===s||"address["===s.match(/^([^\x5b]*)(\x5b|$)/)?.[0])&&(t=a(t)),r.push(s),o.push(t)}try{r=r.map((e=>(/trcToken/.test(e)&&(e=e.replace(/trcToken/,"uint256")),e))),e=t.encode(r,o).replace(/^(0x)/,"")}catch(e){throw new Error(e)}}else e="";r.funcABIV2&&(e=im(r.funcABIV2,r.parametersV2).replace(/^(0x)/,"")),r.shieldedParameter&&Uy(r.shieldedParameter)&&(e=r.shieldedParameter.replace(/^(0x)/,"")),r.rawParameter&&Uy(r.rawParameter)&&(e=r.rawParameter.replace(/^(0x)/,"")),u.function_selector=t,u.parameter=e}else r.input&&(u.data=r.input);return u.call_value=parseInt(i),Ky(s)&&(u.call_token_value=parseInt(s)),Ky(a)&&(u.token_id=parseInt(a)),r._isConstant||r.estimateEnergy||(u.fee_limit=parseInt(c)),r.permissionId&&(u.Permission_id=r.permissionId),u}async _triggerSmartContractLocal(e,t,r={},n=[],o=this.tronWeb.defaultAddress.hex){const{tokenValue:s,tokenId:a,callValue:i,feeLimit:c}=Object.assign({callValue:0,feeLimit:this.tronWeb.feeLimit},r);this.validator.notValid([{name:"feeLimit",type:"integer",value:c,gt:0},{name:"callValue",type:"integer",value:i,gte:0},{name:"parameters",type:"array",value:n},{name:"contract",type:"address",value:e},{name:"issuer",type:"address",value:o,optional:!0},{name:"tokenValue",type:"integer",value:s,gte:0,optional:!0},{name:"tokenId",type:"integer",value:a,gte:0,optional:!0}]);const u=this._getTriggerSmartContractArgs(e,t,r,n,o,s,a,i,c);u.function_selector&&(u.data=Ti(lT.from(u.function_selector,"utf-8")).toString().substring(2,10)+u.parameter);const l={data:u.data,owner_address:u.owner_address,contract_address:u.contract_address};u.call_value&&(l.call_value=u.call_value),u.call_token_value&&(l.call_token_value=u.call_token_value),u.token_id&&(l.token_id=u.token_id);const d=uT(r);return{result:{result:!0},transaction:await cT(this.tronWeb,Qw.TriggerSmartContract,l,r.permissionId,{...d,fee_limit:u.fee_limit})}}async _triggerSmartContract(e,t,r={},n=[],o=this.tronWeb.defaultAddress.hex){const{tokenValue:s,tokenId:a,callValue:i,feeLimit:c}=Object.assign({callValue:0,feeLimit:this.tronWeb.feeLimit},r);this.validator.notValid([{name:"feeLimit",type:"integer",value:c,gt:0},{name:"callValue",type:"integer",value:i,gte:0},{name:"parameters",type:"array",value:n},{name:"contract",type:"address",value:e},{name:"issuer",type:"address",value:o,optional:!0},{name:"tokenValue",type:"integer",value:s,gte:0,optional:!0},{name:"tokenId",type:"integer",value:a,gte:0,optional:!0}]);const u=this._getTriggerSmartContractArgs(e,t,r,n,o,s,a,i,c);let l="triggersmartcontract";r._isConstant?l="triggerconstantcontract":r.estimateEnergy&&(l="estimateenergy"),l=`wallet${r.confirmed?"solidity":""}/${l}`;return function(e,t,r){if(e.Error)throw new Error(e.Error);if(e.result&&e.result.message)throw new Error(PT.toUtf8(e.result.message));if(!r._isConstant&&!r.estimateEnergy){if(vA(e.transaction,t,r))return e;throw new Error("Invalid transaction")}return e}(await this.tronWeb[r.confirmed?"solidityNode":"fullNode"].request(l,u,"post"),u,r)}async clearABI(e,t=this.tronWeb.defaultAddress.hex,r={}){if(!PT.isAddress(e))throw new Error("Invalid contract address provided");if(!PT.isAddress(t))throw new Error("Invalid owner address provided");const n={contract_address:Jy(e),owner_address:Jy(t)};this.tronWeb.trx.cache.contracts[e]&&delete this.tronWeb.trx.cache.contracts[e];const o=uT(r);return cT(this.tronWeb,Qw.ClearABIContract,n,r?.permissionId,o)}async updateBrokerage(e,t=this.tronWeb.defaultAddress.hex,r={}){if(!Ky(e))throw new Error("Invalid brokerage provided");if(!$y(e)||e<0||e>100)throw new Error("Brokerage must be an integer between 0 and 100");if(!PT.isAddress(t))throw new Error("Invalid owner address provided");const n={brokerage:parseInt(e),owner_address:Jy(t)},o=uT(r);return cT(this.tronWeb,Qw.UpdateBrokerageContract,n,r?.permissionId,o)}async createToken(e={},t=this.tronWeb.defaultAddress.hex){const{name:r=!1,abbreviation:n=!1,description:o="",url:s=!1,totalSupply:a=0,trxRatio:i=1,tokenRatio:c=1,saleStart:u=Date.now(),saleEnd:l=!1,freeBandwidth:d=0,freeBandwidthLimit:f=0,frozenAmount:p=0,frozenDuration:h=0,voteScore:g,precision:y}=e;if(this.validator.notValid([{name:"Supply amount",type:"positive-integer",value:a},{name:"TRX ratio",type:"positive-integer",value:i},{name:"Token ratio",type:"positive-integer",value:c},{name:"token abbreviation",type:"string",value:n,lte:32,gt:0},{name:"token name",type:"not-empty-string",value:r},{name:"token description",type:"string",value:o,lte:200},{name:"token url",type:"url",value:s},{name:"token url",type:"string",value:s,lte:256},{name:"issuer",type:"address",value:t},{name:"sale start timestamp",type:"integer",value:u,gte:Date.now()},{name:"sale end timestamp",type:"integer",value:l,gt:u},{name:"Frozen supply",type:"integer",value:p,gte:0},{name:"Frozen duration",type:"integer",value:h,gte:0}]),Ky(g)&&(!$y(g)||g<=0))throw new Error("voteScore must be a positive integer greater than 0");if(Ky(y)&&(!$y(y)||y<0||y>6))throw new Error("precision must be a positive integer >= 0 and <= 6");const m={owner_address:Jy(t),name:sT(r),abbr:sT(n),description:sT(o),url:sT(s),total_supply:parseInt(a),trx_num:parseInt(i),num:parseInt(c),start_time:parseInt(u),end_time:parseInt(l),frozen_supply:[{frozen_amount:parseInt(p),frozen_days:parseInt(h)}]};["name","abbr","description","url"].forEach((e=>{m[e]||delete m[e]})),parseInt(p)>0||delete m.frozen_supply,d&&!isNaN(parseInt(d))&&parseInt(d)>=0&&(m.free_asset_net_limit=parseInt(d)),f&&!isNaN(parseInt(f))&&parseInt(f)>=0&&(m.public_free_asset_net_limit=parseInt(f)),y&&!isNaN(parseInt(y))&&(m.precision=parseInt(y)),g&&!isNaN(parseInt(g))&&(m.vote_score=parseInt(g));const b=uT(e);return cT(this.tronWeb,Qw.AssetIssueContract,m,e?.permissionId,b)}async createAccount(e,t=this.tronWeb.defaultAddress.hex,r={}){this.validator.notValid([{name:"account",type:"address",value:e},{name:"origin",type:"address",value:t}]);const n={owner_address:Jy(t),account_address:Jy(e)},o=uT(r);return cT(this.tronWeb,Qw.AccountCreateContract,n,r?.permissionId,o)}async updateAccount(e,t=this.tronWeb.defaultAddress.hex,r={}){this.validator.notValid([{name:"Name",type:"string",lte:200,gt:0,value:e,msg:"Invalid accountName"},{name:"origin",type:"address",value:t}]);const n={account_name:sT(e),owner_address:Jy(t)},o=uT(r);return cT(this.tronWeb,Qw.AccountUpdateContract,n,r?.permissionId,o)}async setAccountId(e,t=this.tronWeb.defaultAddress.hex,r={}){e&&Uy(e)&&e.startsWith("0x")&&(e=e.slice(2)),this.validator.notValid([{name:"accountId",type:"hex",value:e},{name:"accountId",type:"string",lte:32,gte:8,value:e},{name:"origin",type:"address",value:t}]);const n={account_id:e,owner_address:Jy(t)},o=uT(r);return cT(this.tronWeb,Qw.SetAccountIdContract,n,r?.permissionId,o)}async updateToken(e={},t=this.tronWeb.defaultAddress.hex){const{description:r="",url:n=!1,freeBandwidth:o=0,freeBandwidthLimit:s=0}=e;this.validator.notValid([{name:"token description",type:"string",value:r,lte:200},{name:"token url",type:"url",value:n},{name:"token url",type:"string",value:n,lte:256},{name:"issuer",type:"address",value:t}]);const a={owner_address:Jy(t),description:sT(r),url:sT(n)};o&&!isNaN(parseInt(o))&&parseInt(o)>=0&&(a.new_limit=parseInt(o)),s&&!isNaN(parseInt(s))&&parseInt(s)>=0&&(a.new_public_limit=parseInt(s));const i=uT(e);return cT(this.tronWeb,Qw.UpdateAssetContract,a,e?.permissionId,i)}async sendAsset(e,t=0,r,n=this.tronWeb.defaultAddress.hex,o={}){return this.sendToken(e,t,r,n,o)}async purchaseAsset(e,t,r=0,n=this.tronWeb.defaultAddress.hex,o={}){return this.purchaseToken(e,t,r,n,o)}async createAsset(e,t){return this.createToken(e,t)}async updateAsset(e={},t=this.tronWeb.defaultAddress.hex){return this.updateToken(e,t)}async createProposal(e,t=this.tronWeb.defaultAddress.hex,r={}){this.validator.notValid([{name:"issuer",type:"address",value:t}]);const n="Invalid proposal parameters provided";if(!e)throw new Error(n);const o=xy(e)?e:[e];for(const e of o)if(!My(e))throw new Error(n);const s={owner_address:Jy(t),parameters:o},a=uT(r);return cT(this.tronWeb,Qw.ProposalCreateContract,s,r?.permissionId,a)}async deleteProposal(e,t=this.tronWeb.defaultAddress.hex,r={}){this.validator.notValid([{name:"issuer",type:"address",value:t},{name:"proposalID",type:"integer",value:e,gte:0}]);const n={owner_address:Jy(t),proposal_id:parseInt(e)},o=uT(r);return cT(this.tronWeb,Qw.ProposalDeleteContract,n,r?.permissionId,o)}async voteProposal(e,t=!1,r=this.tronWeb.defaultAddress.hex,n={}){this.validator.notValid([{name:"voter",type:"address",value:r},{name:"proposalID",type:"integer",value:e,gte:0},{name:"has approval",type:"boolean",value:t}]);const o={owner_address:Jy(r),proposal_id:parseInt(e),is_add_approval:t},s=uT(n);return cT(this.tronWeb,Qw.ProposalApproveContract,o,n?.permissionId,s)}async createTRXExchange(e,t,r,n=this.tronWeb.defaultAddress.hex,o={}){this.validator.notValid([{name:"owner",type:"address",value:n},{name:"token name",type:"not-empty-string",value:e},{name:"token balance",type:"positive-integer",value:t},{name:"trx balance",type:"positive-integer",value:r}]);const s={owner_address:Jy(n),first_token_id:sT(e),first_token_balance:t,second_token_id:"5f",second_token_balance:r},a=uT(o);return cT(this.tronWeb,Qw.ExchangeCreateContract,s,o?.permissionId,a)}async createTokenExchange(e,t,r,n,o=this.tronWeb.defaultAddress.hex,s={}){this.validator.notValid([{name:"owner",type:"address",value:o},{name:"first token name",type:"not-empty-string",value:e},{name:"second token name",type:"not-empty-string",value:r},{name:"first token balance",type:"positive-integer",value:t},{name:"second token balance",type:"positive-integer",value:n}]);const a={owner_address:Jy(o),first_token_id:sT(e),first_token_balance:t,second_token_id:sT(r),second_token_balance:n},i=uT(s);return cT(this.tronWeb,Qw.ExchangeCreateContract,a,s?.permissionId,i)}async injectExchangeTokens(e,t,r,n=this.tronWeb.defaultAddress.hex,o={}){this.validator.notValid([{name:"owner",type:"address",value:n},{name:"token name",type:"not-empty-string",value:t},{name:"token amount",type:"integer",value:r,gte:1},{name:"exchangeID",type:"integer",value:e,gte:0}]);const s={owner_address:Jy(n),exchange_id:parseInt(e),token_id:sT(t),quant:parseInt(r)},a=uT(o);return cT(this.tronWeb,Qw.ExchangeInjectContract,s,o?.permissionId,a)}async withdrawExchangeTokens(e,t,r,n=this.tronWeb.defaultAddress.hex,o={}){this.validator.notValid([{name:"owner",type:"address",value:n},{name:"token name",type:"not-empty-string",value:t},{name:"token amount",type:"integer",value:r,gte:1},{name:"exchangeID",type:"integer",value:e,gte:0}]);const s={owner_address:Jy(n),exchange_id:parseInt(e),token_id:sT(t),quant:parseInt(r)},a=uT(o);return cT(this.tronWeb,Qw.ExchangeWithdrawContract,s,o?.permissionId,a)}async tradeExchangeTokens(e,t,r,n,o=this.tronWeb.defaultAddress.hex,s={}){this.validator.notValid([{name:"owner",type:"address",value:o},{name:"token name",type:"not-empty-string",value:t},{name:"tokenAmountSold",type:"integer",value:r,gte:1},{name:"tokenAmountExpected",type:"integer",value:n,gte:1},{name:"exchangeID",type:"integer",value:e,gte:0}]);const a={owner_address:Jy(o),exchange_id:parseInt(e),token_id:PT.fromAscii(t).replace(/^0x/,""),quant:parseInt(r),expected:parseInt(n)},i=uT(s);return cT(this.tronWeb,Qw.ExchangeTransactionContract,a,s?.permissionId,i)}async updateSetting(e,t,r=this.tronWeb.defaultAddress.hex,n={}){this.validator.notValid([{name:"owner",type:"address",value:r},{name:"contract",type:"address",value:e},{name:"userFeePercentage",type:"integer",value:t,gte:0,lte:100}]);const o={owner_address:Jy(r),contract_address:Jy(e),consume_user_resource_percent:t},s=uT(n);return cT(this.tronWeb,Qw.UpdateSettingContract,o,n?.permissionId,s)}async updateEnergyLimit(e,t=0,r=this.tronWeb.defaultAddress.hex,n={}){this.validator.notValid([{name:"owner",type:"address",value:r},{name:"contract",type:"address",value:e},{name:"originEnergyLimit",type:"integer",value:t,gte:0,lte:1e7}]);const o={owner_address:Jy(r),contract_address:Jy(e),origin_energy_limit:t},s=uT(n);return cT(this.tronWeb,Qw.UpdateEnergyLimitContract,o,n?.permissionId,s)}checkPermissions(e,t){if(e){if(e.type!==t||!e.permission_name||!Uy(e.permission_name)||!$y(e.threshold)||e.threshold<1||!e.keys)return!1;for(const r of e.keys)if(!PT.isAddress(r.address)||!$y(r.weight)||r.weight>e.threshold||r.weight<1||2===t&&!e.operations)return!1}return!0}async updateAccountPermissions(e=this.tronWeb.defaultAddress.hex,t,r,n,o={}){if(!PT.isAddress(e))throw new Error("Invalid ownerAddress provided");if(!this.checkPermissions(t,0))throw new Error("Invalid ownerPermissions provided");if(!this.checkPermissions(r,1))throw new Error("Invalid witnessPermissions provided");Array.isArray(n)||(n=[n]);for(const e of n)if(!this.checkPermissions(e,2))throw new Error("Invalid activesPermissions provided");const s={owner_address:Jy(e)};if(t){const e=aT(t);"type"in e&&delete e.type,e.keys=e.keys?.map((({address:e,weight:t})=>({address:Jy(e),weight:t}))),s.owner=e}if(r){const e=aT(r);e.type="Witness",e.keys=e.keys.map((({address:e,weight:t})=>({address:Jy(e),weight:t}))),s.witness=e}if(n){const e=aT(n);e.forEach((e=>{e.type="Active"})),e.forEach((e=>{e.keys=e.keys.map((({address:e,weight:t})=>({address:Jy(e),weight:t})))})),s.actives=e}const a=uT(o);return cT(this.tronWeb,Qw.AccountPermissionUpdateContract,s,o?.permissionId,a)}async newTxID(e,t={}){if(t?.txLocal){const t=e.raw_data.contract[0];try{const r=await cT(this.tronWeb,t.type,t.parameter.value,t.Permission_id,{fee_limit:e.raw_data.fee_limit,data:e.raw_data.data,ref_block_bytes:e.raw_data.ref_block_bytes,ref_block_hash:e.raw_data.ref_block_hash,expiration:e.raw_data.expiration,timestamp:e.raw_data.timestamp});return r.signature=e.signature,r.visible=e.visible,r}catch(e){throw new Error("Error generating a new transaction id.")}}try{const t=await this.tronWeb.fullNode.request("wallet/getsignweight",e,"post");return"boolean"==typeof e.visible&&(t.transaction.transaction.visible=e.visible),function(e,t,r){if(e.Error)throw new Error(e.Error);if(e.result&&e.result.message)throw new Error(PT.toUtf8(e.result.message));if(vA(e,t,r))return e;throw new Error("Invalid transaction")}(t.transaction.transaction,{...e.raw_data.contract[0].parameter.value,Permission_id:e.raw_data.contract[0].Permission_id},{data:e.raw_data.data,fee_limit:e.raw_data.fee_limit})}catch(e){throw new Error("Error generating a new transaction id.")}}async alterTransaction(e,t={}){if(Reflect.has(e,"signature"))throw new Error("You can not extend the expiration of a signed transaction.");if(t.data){if("hex"===t.dataFormat||/^0x/.test(t.data)||(t.data=PT.fromUtf8(t.data)),!Ly(t.data))throw new Error("Invalid data provided");if(t.data=t.data.replace(/^0x/,""),t.data=t.data.padStart(2*Math.ceil(t.data.length/2),"0"),0===t.data.length)throw new Error("Invalid data provided");e.raw_data.data=t.data}if(t.extension){if(t.extension=parseInt(1e3*t.extension),isNaN(t.extension)||e.raw_data.expiration+t.extension<=Date.now()+3e3)throw new Error("Invalid extension provided");e.raw_data.expiration+=t.extension}return await this.newTxID(e,{txLocal:t.txLocal})}async extendExpiration(e,t,r={}){return await this.alterTransaction(e,{extension:t,txLocal:r?.txLocal})}async addUpdateData(e,t,r="utf8",n={}){return this.alterTransaction(e,{data:t,dataFormat:r,txLocal:n?.txLocal})}}const fT="TRON Signed Message:\n32",pT="Ethereum Signed Message:\n32";class hT{tronWeb;cache;validator;signMessage;sendAsset;send;sendTrx;broadcast;broadcastHex;signTransaction;constructor(e){this.tronWeb=e,this.cache={contracts:{}},this.validator=new nT,this.signMessage=this.sign,this.sendAsset=this.sendToken,this.send=this.sendTransaction,this.sendTrx=this.sendTransaction,this.broadcast=this.sendRawTransaction,this.broadcastHex=this.sendHexTransaction,this.signTransaction=this.sign}_parseToken(e){return{...e,name:this.tronWeb.toUtf8(e.name),abbr:e.abbr&&this.tronWeb.toUtf8(e.abbr),description:e.description&&this.tronWeb.toUtf8(e.description),url:e.url&&this.tronWeb.toUtf8(e.url)}}getCurrentBlock(){return this.tronWeb.fullNode.request("wallet/getnowblock")}getConfirmedCurrentBlock(){return this.tronWeb.solidityNode.request("walletsolidity/getnowblock")}async getBlock(e=this.tronWeb.defaultBlock){if(!1===e)throw new Error("No block identifier provided");return"earliest"==e&&(e=0),"latest"==e?this.getCurrentBlock():isNaN(+e)&&LA.isHex(e.toString())?this.getBlockByHash(e):this.getBlockByNumber(e)}async getBlockByHash(e){const t=await this.tronWeb.fullNode.request("wallet/getblockbyid",{value:e},"post");if(!Object.keys(t).length)throw new Error("Block not found");return t}async getBlockByNumber(e){if(!LA.isInteger(e)||e<0)throw new Error("Invalid block number provided");return this.tronWeb.fullNode.request("wallet/getblockbynum",{num:parseInt(e)},"post").then((e=>{if(!Object.keys(e).length)throw new Error("Block not found");return e}))}async getBlockTransactionCount(e=this.tronWeb.defaultBlock){const{transactions:t=[]}=await this.getBlock(e);return t.length}async getTransactionFromBlock(e=this.tronWeb.defaultBlock,t){const{transactions:r}=await this.getBlock(e);if(!r)throw new Error("Transaction not found in block");if(t>=0&&t<r.length)return r[t];throw new Error("Invalid transaction index provided")}async getTransactionsFromBlock(e=this.tronWeb.defaultBlock){const{transactions:t}=await this.getBlock(e);if(!t)throw new Error("Transaction not found in block");return t}async getTransaction(e){const t=await this.tronWeb.fullNode.request("wallet/gettransactionbyid",{value:e},"post");if(!Object.keys(t).length)throw new Error("Transaction not found");return t}async getConfirmedTransaction(e){const t=await this.tronWeb.solidityNode.request("walletsolidity/gettransactionbyid",{value:e},"post");if(!Object.keys(t).length)throw new Error("Transaction not found");return t}getUnconfirmedTransactionInfo(e){return this.tronWeb.fullNode.request("wallet/gettransactioninfobyid",{value:e},"post")}getTransactionInfo(e){return this.tronWeb.solidityNode.request("walletsolidity/gettransactioninfobyid",{value:e},"post")}getTransactionsToAddress(e=this.tronWeb.defaultAddress.hex,t=30,r=0){return this.getTransactionsRelated(Jy(e),"to",t,r)}getTransactionsFromAddress(e=this.tronWeb.defaultAddress.hex,t=30,r=0){return this.getTransactionsRelated(Jy(e),"from",t,r)}async getTransactionsRelated(e=this.tronWeb.defaultAddress.hex,t="all",r=30,n=0){if(this.tronWeb.fullnodeSatisfies(">=4.1.1"))throw new Error("This api is not supported any more");if(!["to","from","all"].includes(t))throw new Error('Invalid direction provided: Expected "to", "from" or "all"');if("all"==t){const[t,o]=await Promise.all([this.getTransactionsRelated(e,"from",r,n),this.getTransactionsRelated(e,"to",r,n)]);return[...t.map((e=>(e.direction="from",e))),...o.map((e=>(e.direction="to",e)))].sort(((e,t)=>t.raw_data.timestamp-e.raw_data.timestamp))}if(!this.tronWeb.isAddress(e))throw new Error("Invalid address provided");if(!LA.isInteger(r)||r<0||n&&r<1)throw new Error("Invalid limit provided");if(!LA.isInteger(n)||n<0)throw new Error("Invalid offset provided");return e=Jy(e),this.tronWeb.solidityNode.request(`walletextension/gettransactions${t}this`,{account:{address:e},offset:n,limit:r},"post").then((({transaction:e})=>e))}async getAccount(e=this.tronWeb.defaultAddress.hex){if(!this.tronWeb.isAddress(e))throw new Error("Invalid address provided");return e=Jy(e),this.tronWeb.solidityNode.request("walletsolidity/getaccount",{address:e},"post")}getAccountById(e){return this.getAccountInfoById(e,{confirmed:!0})}async getAccountInfoById(e,t){return this.validator.notValid([{name:"accountId",type:"hex",value:e},{name:"accountId",type:"string",lte:32,gte:8,value:e}]),e.startsWith("0x")&&(e=e.slice(2)),this.tronWeb[t.confirmed?"solidityNode":"fullNode"].request(`wallet${t.confirmed?"solidity":""}/getaccountbyid`,{account_id:e},"post")}async getBalance(e=this.tronWeb.defaultAddress.hex){const{balance:t=0}=await this.getAccount(e);return t}async getUnconfirmedAccount(e=this.tronWeb.defaultAddress.hex){if(!this.tronWeb.isAddress(e))throw new Error("Invalid address provided");return e=Jy(e),this.tronWeb.fullNode.request("wallet/getaccount",{address:e},"post")}getUnconfirmedAccountById(e){return this.getAccountInfoById(e,{confirmed:!1})}async getUnconfirmedBalance(e=this.tronWeb.defaultAddress.hex){const{balance:t=0}=await this.getUnconfirmedAccount(e);return t}async getBandwidth(e=this.tronWeb.defaultAddress.hex){if(!this.tronWeb.isAddress(e))throw new Error("Invalid address provided");return e=Jy(e),this.tronWeb.fullNode.request("wallet/getaccountnet",{address:e},"post").then((({freeNetUsed:e=0,freeNetLimit:t=0,NetUsed:r=0,NetLimit:n=0})=>t-e+(n-r)))}async getTokensIssuedByAddress(e=this.tronWeb.defaultAddress.hex){if(!this.tronWeb.isAddress(e))throw new Error("Invalid address provided");return e=Jy(e),this.tronWeb.fullNode.request("wallet/getassetissuebyaccount",{address:e},"post").then((({assetIssue:e})=>{if(!e)return{};const t=e.map((e=>this._parseToken(e))).reduce(((e,t)=>(e[t.name]=t,e)),{});return t}))}async getTokenFromID(e){if(LA.isInteger(e)&&(e=e.toString()),!LA.isString(e)||!e.length)throw new Error("Invalid token ID provided");return this.tronWeb.fullNode.request("wallet/getassetissuebyname",{value:this.tronWeb.fromUtf8(e)},"post").then((e=>{if(!e.name)throw new Error("Token does not exist");return this._parseToken(e)}))}async listNodes(){const{nodes:e=[]}=await this.tronWeb.fullNode.request("wallet/listnodes");return e.map((({address:{host:e,port:t}})=>`${this.tronWeb.toUtf8(e)}:${t}`))}async getBlockRange(e=0,t=30){if(!LA.isInteger(e)||e<0)throw new Error("Invalid start of range provided");if(!LA.isInteger(t)||t<e)throw new Error("Invalid end of range provided");if(t+1-e>100)throw new Error("Invalid range size, which should be no more than 100.");return this.tronWeb.fullNode.request("wallet/getblockbylimitnext",{startNum:parseInt(e),endNum:parseInt(t)+1},"post").then((({block:e=[]})=>e))}async listSuperRepresentatives(){const{witnesses:e=[]}=await this.tronWeb.fullNode.request("wallet/listwitnesses");return e}async listTokens(e=0,t=0){if(!LA.isInteger(e)||e<0||t&&e<1)throw new Error("Invalid limit provided");if(!LA.isInteger(t)||t<0)throw new Error("Invalid offset provided");return e?this.tronWeb.fullNode.request("wallet/getpaginatedassetissuelist",{offset:parseInt(t),limit:parseInt(e)},"post").then((({assetIssue:e=[]})=>e.map((e=>this._parseToken(e))))):this.tronWeb.fullNode.request("wallet/getassetissuelist").then((({assetIssue:e=[]})=>e.map((e=>this._parseToken(e)))))}async timeUntilNextVoteCycle(){const{num:e=-1}=await this.tronWeb.fullNode.request("wallet/getnextmaintenancetime");if(-1==e)throw new Error("Failed to get time until next vote cycle");return Math.floor(e/1e3)}async getContract(e){if(!this.tronWeb.isAddress(e))throw new Error("Invalid contract address provided");if(this.cache.contracts[e])return this.cache.contracts[e];e=Jy(e);const t=await this.tronWeb.fullNode.request("wallet/getcontract",{value:e});if(t.Error)throw new Error("Contract does not exist");return this.cache.contracts[e]=t,t}ecRecover(e){return hT.ecRecover(e)}static ecRecover(e){if(!AA(e))throw new Error("Invalid transaction");if(!e.signature?.length)throw new Error("Transaction is not signed");if(1===e.signature.length){const t=Vg(e.txID,e.signature[0]);return PT.address.fromHex(t)}return e.signature.map((t=>{const r=Vg(e.txID,t);return PT.address.fromHex(r)}))}async verifyMessage(e,t,r=this.tronWeb.defaultAddress.base58,n=!0){if(!LA.isHex(e))throw new Error("Expected hex message input");if(hT.verifySignature(e,r,t,n))return!0;throw new Error("Signature does not match")}static verifySignature(e,t,r,n=!0){e=e.replace(/^0x/,"");const o=[...Qa(n?fT:pT),...LA.code.hexStr2byteArray(e)],s=bu(Ti(new Uint8Array(o)),js.from(`0x${r.replace(/^0x/,"")}`)),a=Oo+s.substr(2);return PT.address.fromHex(a)==PT.address.fromHex(t)}async verifyMessageV2(e,t){return hT.verifyMessageV2(e,t)}static verifyMessageV2(e,t){return LA.message.verifyMessage(e,t)}verifyTypedData(e,t,r,n,o=this.tronWeb.defaultAddress.base58){if(hT.verifyTypedData(e,t,r,n,o))return!0;throw new Error("Signature does not match")}static verifyTypedData(e,t,r,n,o){const s=bu(LA.typedData.TypedDataEncoder.hash(e,t,r),js.from(`0x${n.replace(/^0x/,"")}`)),a=Oo+s.substr(2);return PT.address.fromHex(a)==PT.address.fromHex(o)}async sign(e,t=this.tronWeb.defaultPrivateKey,r=!0,n=!1){if(LA.isString(e)){if(!LA.isHex(e))throw new Error("Expected hex message input");return hT.signString(e,t,r)}if(!LA.isObject(e))throw new Error("Invalid transaction provided");if(!n&&e.signature)throw new Error("Transaction is already signed");if(!n){if(Jy(this.tronWeb.address.fromPrivateKey(t)).toLowerCase()!==Jy(e.raw_data.contract[0].parameter.value.owner_address))throw new Error("Private key does not match address in transaction");if(!AA(e))throw new Error("Invalid transaction")}return LA.crypto.signTransaction(t,e)}static signString(e,t,r=!0){e=e.replace(/^0x/,"");const n=`0x${t.replace(/^0x/,"")}`,o=new yu(n),s=[...Qa(r?fT:pT),...LA.code.hexStr2byteArray(e)],a=Ti(new Uint8Array(s)),i=o.sign(a);return["0x",i.r.substring(2),i.s.substring(2),Number(i.v).toString(16)].join("")}signMessageV2(e,t=this.tronWeb.defaultPrivateKey){return hT.signMessageV2(e,t)}static signMessageV2(e,t){return LA.message.signMessage(e,t)}_signTypedData(e,t,r,n=this.tronWeb.defaultPrivateKey){return hT._signTypedData(e,t,r,n)}static _signTypedData(e,t,r,n){return LA.typedData.signTypedData(e,t,r,n)}signTypedData(e,t,r,n=this.tronWeb.defaultPrivateKey){return hT.signTypedData(e,t,r,n)}static signTypedData(e,t,r,n){return LA.typedData.signTypedData(e,t,r,n)}async multiSign(e,t=this.tronWeb.defaultPrivateKey,r=0){if(!LA.isObject(e)||!e.raw_data||!e.raw_data.contract)throw new Error("Invalid transaction provided");if(!e.raw_data.contract[0].Permission_id&&r>0){e.raw_data.contract[0].Permission_id=r;const n=Jy(this.tronWeb.address.fromPrivateKey(t)).toLowerCase(),o=await this.getSignWeight(e,r);if("PERMISSION_ERROR"===o.result.code)throw new Error(o.result.message);let s=!1;if(o.permission.keys.map((e=>{e.address===n&&(s=!0)})),!s)throw new Error(t+" has no permission to sign");if(o.approved_list&&-1!=o.approved_list.indexOf(n))throw new Error(t+" already sign transaction");if(!o.transaction||!o.transaction.transaction)throw new Error("Invalid transaction provided");e=o.transaction.transaction,r>0&&(e.raw_data.contract[0].Permission_id=r)}if(!AA(e))throw new Error("Invalid transaction");return LA.crypto.signTransaction(t,e)}async getApprovedList(e){if(!LA.isObject(e))throw new Error("Invalid transaction provided");return this.tronWeb.fullNode.request("wallet/getapprovedlist",e,"post")}async getSignWeight(e,t){if(!LA.isObject(e)||!e.raw_data||!e.raw_data.contract)throw new Error("Invalid transaction provided");return LA.isInteger(t)?e.raw_data.contract[0].Permission_id=parseInt(t):"number"!=typeof e.raw_data.contract[0].Permission_id&&(e.raw_data.contract[0].Permission_id=0),this.tronWeb.fullNode.request("wallet/getsignweight",e,"post")}async sendRawTransaction(e){if(!LA.isObject(e))throw new Error("Invalid transaction provided");if(!e.signature||!LA.isArray(e.signature))throw new Error("Transaction is not signed");return{...await this.tronWeb.fullNode.request("wallet/broadcasttransaction",e,"post"),transaction:e}}async sendHexTransaction(e){if(!LA.isHex(e))throw new Error("Invalid hex transaction provided");const t={transaction:e},r=await this.tronWeb.fullNode.request("wallet/broadcasthex",t,"post");return r.result?{...r,transaction:JSON.parse(r.transaction),hexTransaction:e}:r}async sendTransaction(e,t,r={}){if("string"==typeof r&&(r={privateKey:r}),!this.tronWeb.isAddress(e))throw new Error("Invalid recipient provided");if(!LA.isInteger(t)||t<=0)throw new Error("Invalid amount provided");if(!(r={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...r}).privateKey&&!r.address)throw new Error("Function requires either a private key or address to be set");const n=r.privateKey?this.tronWeb.address.fromPrivateKey(r.privateKey):r.address,o=await this.tronWeb.transactionBuilder.sendTrx(e,t,n),s=await this.sign(o,r.privateKey);return await this.sendRawTransaction(s)}async sendToken(e,t,r,n={}){if("string"==typeof n&&(n={privateKey:n}),!this.tronWeb.isAddress(e))throw new Error("Invalid recipient provided");if(!LA.isInteger(t)||t<=0)throw new Error("Invalid amount provided");if(LA.isInteger(r)&&(r=r.toString()),!LA.isString(r))throw new Error("Invalid token ID provided");if(!(n={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...n}).privateKey&&!n.address)throw new Error("Function requires either a private key or address to be set");const o=n.privateKey?this.tronWeb.address.fromPrivateKey(n.privateKey):n.address,s=await this.tronWeb.transactionBuilder.sendToken(e,t,r,o),a=await this.sign(s,n.privateKey);return await this.sendRawTransaction(a)}async freezeBalance(e=0,t=3,r="BANDWIDTH",n={},o){if("string"==typeof n&&(n={privateKey:n}),!["BANDWIDTH","ENERGY"].includes(r))throw new Error('Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"');if(!LA.isInteger(e)||e<=0)throw new Error("Invalid amount provided");if(!LA.isInteger(t)||t<3)throw new Error("Invalid duration provided, minimum of 3 days");if(!(n={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...n}).privateKey&&!n.address)throw new Error("Function requires either a private key or address to be set");const s=n.privateKey?this.tronWeb.address.fromPrivateKey(n.privateKey):n.address,a=await this.tronWeb.transactionBuilder.freezeBalance(e,t,r,s,o),i=await this.sign(a,n.privateKey);return await this.sendRawTransaction(i)}async unfreezeBalance(e="BANDWIDTH",t={},r){if("string"==typeof t&&(t={privateKey:t}),!["BANDWIDTH","ENERGY"].includes(e))throw new Error('Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"');if(!(t={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...t}).privateKey&&!t.address)throw new Error("Function requires either a private key or address to be set");const n=t.privateKey?this.tronWeb.address.fromPrivateKey(t.privateKey):t.address,o=await this.tronWeb.transactionBuilder.unfreezeBalance(e,n,r),s=await this.sign(o,t.privateKey);return await this.sendRawTransaction(s)}async updateAccount(e,t={}){if("string"==typeof t&&(t={privateKey:t}),!LA.isString(e)||!e.length)throw new Error("Name must be a string");if(!(t={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...t}).privateKey&&!t.address)throw Error("Function requires either a private key or address to be set");const r=t.privateKey?this.tronWeb.address.fromPrivateKey(t.privateKey):t.address,n=await this.tronWeb.transactionBuilder.updateAccount(e,r),o=await this.sign(n,t.privateKey);return await this.sendRawTransaction(o)}async getProposal(e){if(!LA.isInteger(e)||e<0)throw new Error("Invalid proposalID provided");return this.tronWeb.fullNode.request("wallet/getproposalbyid",{id:parseInt(e)},"post")}async listProposals(){const{proposals:e=[]}=await this.tronWeb.fullNode.request("wallet/listproposals",{},"post");return e}async getChainParameters(){const{chainParameter:e=[]}=await this.tronWeb.fullNode.request("wallet/getchainparameters",{},"post");return e}async getAccountResources(e=this.tronWeb.defaultAddress.hex){if(!this.tronWeb.isAddress(e))throw new Error("Invalid address provided");return this.tronWeb.fullNode.request("wallet/getaccountresource",{address:Jy(e)},"post")}async getDelegatedResourceV2(e=this.tronWeb.defaultAddress.hex,t=this.tronWeb.defaultAddress.hex,r={confirmed:!0}){if(!this.tronWeb.isAddress(e))throw new Error("Invalid address provided");if(!this.tronWeb.isAddress(t))throw new Error("Invalid address provided");return this.tronWeb[r.confirmed?"solidityNode":"fullNode"].request(`wallet${r.confirmed?"solidity":""}/getdelegatedresourcev2`,{fromAddress:Jy(e),toAddress:Jy(t)},"post")}async getDelegatedResourceAccountIndexV2(e=this.tronWeb.defaultAddress.hex,t={confirmed:!0}){if(!this.tronWeb.isAddress(e))throw new Error("Invalid address provided");return this.tronWeb[t.confirmed?"solidityNode":"fullNode"].request(`wallet${t.confirmed?"solidity":""}/getdelegatedresourceaccountindexv2`,{value:Jy(e)},"post")}async getCanDelegatedMaxSize(e=this.tronWeb.defaultAddress.hex,t="BANDWIDTH",r={confirmed:!0}){if(!this.tronWeb.isAddress(e))throw new Error("Invalid address provided");return this.validator.notValid([{name:"resource",type:"resource",value:t,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'}]),this.tronWeb[r.confirmed?"solidityNode":"fullNode"].request(`wallet${r.confirmed?"solidity":""}/getcandelegatedmaxsize`,{owner_address:Jy(e),type:"ENERGY"===t?1:0},"post")}async getAvailableUnfreezeCount(e=this.tronWeb.defaultAddress.hex,t={confirmed:!0}){if(!this.tronWeb.isAddress(e))throw new Error("Invalid address provided");return this.tronWeb[t.confirmed?"solidityNode":"fullNode"].request(`wallet${t.confirmed?"solidity":""}/getavailableunfreezecount`,{owner_address:Jy(e)},"post")}async getCanWithdrawUnfreezeAmount(e=this.tronWeb.defaultAddress.hex,t=Date.now(),r={confirmed:!0}){if(!this.tronWeb.isAddress(e))throw new Error("Invalid address provided");if(!LA.isInteger(t)||t<0)throw new Error("Invalid timestamp provided");return this.tronWeb[r.confirmed?"solidityNode":"fullNode"].request(`wallet${r.confirmed?"solidity":""}/getcanwithdrawunfreezeamount`,{owner_address:Jy(e),timestamp:t},"post")}async getExchangeByID(e){if(!LA.isInteger(e)||e<0)throw new Error("Invalid exchangeID provided");return this.tronWeb.fullNode.request("wallet/getexchangebyid",{id:e},"post")}async listExchanges(){return this.tronWeb.fullNode.request("wallet/listexchanges",{},"post").then((({exchanges:e=[]})=>e))}async listExchangesPaginated(e=10,t=0){return this.tronWeb.fullNode.request("wallet/getpaginatedexchangelist",{limit:e,offset:t},"post").then((({exchanges:e=[]})=>e))}async getNodeInfo(){return this.tronWeb.fullNode.request("wallet/getnodeinfo",{},"post")}async getTokenListByName(e){if(LA.isInteger(e)&&(e=e.toString()),!LA.isString(e)||!e.length)throw new Error("Invalid token ID provided");return this.tronWeb.fullNode.request("wallet/getassetissuelistbyname",{value:this.tronWeb.fromUtf8(e)},"post").then((e=>{if(Array.isArray(e.assetIssue))return e.assetIssue.map((e=>this._parseToken(e)));if(!e.name)throw new Error("Token does not exist");return this._parseToken(e)}))}getTokenByID(e){if(LA.isInteger(e)&&(e=e.toString()),!LA.isString(e)||!e.length)throw new Error("Invalid token ID provided");return this.tronWeb.fullNode.request("wallet/getassetissuebyid",{value:e},"post").then((e=>{if(!e.name)throw new Error("Token does not exist");return this._parseToken(e)}))}async getReward(e,t={}){return t.confirmed=!0,this._getReward(e,t)}async getUnconfirmedReward(e,t={}){return t.confirmed=!1,this._getReward(e,t)}async getBrokerage(e,t={}){return t.confirmed=!0,this._getBrokerage(e,t)}async getUnconfirmedBrokerage(e,t={}){return t.confirmed=!1,this._getBrokerage(e,t)}async _getReward(e=this.tronWeb.defaultAddress.hex,t){this.validator.notValid([{name:"origin",type:"address",value:e}]);const r={address:Jy(e)};return this.tronWeb[t.confirmed?"solidityNode":"fullNode"].request(`wallet${t.confirmed?"solidity":""}/getReward`,r,"post").then(((e={reward:void 0})=>{if(void 0===e.reward)throw new Error("Not found.");return e.reward}))}async _getBrokerage(e=this.tronWeb.defaultAddress.hex,t){this.validator.notValid([{name:"origin",type:"address",value:e}]);const r={address:Jy(e)};return this.tronWeb[t.confirmed?"solidityNode":"fullNode"].request(`wallet${t.confirmed?"solidity":""}/getBrokerage`,r,"post").then(((e={})=>{if(void 0===e.brokerage)throw new Error("Not found.");return e.brokerage}))}async getBandwidthPrices(){return this.tronWeb.fullNode.request("wallet/getbandwidthprices",{},"post").then(((e={})=>{if(void 0===e.prices)throw new Error("Not found.");return e.prices}))}async getEnergyPrices(){return this.tronWeb.fullNode.request("wallet/getenergyprices",{},"post").then(((e={})=>{if(void 0===e.prices)throw new Error("Not found.");return e.prices}))}async getCurrentRefBlockParams(){try{const{block_header:e,blockID:t}=await this.tronWeb.fullNode.request("wallet/getblock",{detail:!1},"post"),{number:r,timestamp:n}=e.raw_data;return{ref_block_bytes:r.toString(16).slice(-4).padStart(4,"0"),ref_block_hash:t.slice(16,32),expiration:n+6e4,timestamp:n}}catch(e){throw new Error(`Unable to get params: ${e.message||e}`)}}}const gT=(e,t)=>cm(e,t);class yT{tronWeb;contract;abi;name;inputs;outputs;functionSelector;signature;defaultOptions;constructor(e,t){this.tronWeb=e.tronWeb,this.contract=e,this.abi=t,this.name=t.name||t.type,this.inputs=t.inputs||[],this.outputs=[],"outputs"in t&&t.outputs&&(this.outputs=t.outputs),this.functionSelector=(e=>{if("stateMutability"in e&&(e.stateMutability=e.stateMutability?e.stateMutability.toLowerCase():"nonpayable"),e.type=e.type?e.type.toLowerCase():"","fallback"===e.type||"receive"===e.type)return"0x";const t=new LA.ethersUtils.Interface([e]);let r;if(r="event"===e.type?t.getEvent(e.name):t.getFunction(e.name),r)return r.format("sighash");throw new Error("unknown function")})(t),this.signature=iy(this.functionSelector,!1).slice(0,8),this.defaultOptions={feeLimit:this.tronWeb.feeLimit,callValue:0,shouldPollResponse:!1}}decodeInput(e){const t=JSON.parse(JSON.stringify(this.abi));return t.outputs=t.inputs,gT(t,"0x"+e)}onMethod(...e){let t="";return this.abi&&!/event/i.test(this.abi.type)&&(t=im(this.abi,e)),{call:async(e={})=>(e={...e,rawParameter:t},await this._call([],[],e)),send:async(e={},r=this.tronWeb.defaultPrivateKey)=>(e={...e,rawParameter:t},await this._send([],[],e,r))}}async _call(e,t,r={}){if(e.length!==t.length)throw new Error("Invalid argument count provided");if(!this.contract.address)throw new Error("Smart contract is missing address");if(!this.contract.deployed)throw new Error("Calling smart contracts requires you to load the contract first");if("stateMutability"in this.abi){const{stateMutability:e}=this.abi;if(e&&!["pure","view"].includes(e.toLowerCase()))throw new Error(`Methods with state mutability "${e}" must use send()`)}r={...this.defaultOptions,from:this.tronWeb.defaultAddress.hex,...r,_isConstant:!0};const n=t.map(((t,r)=>({type:e[r],value:t}))),o=await this.tronWeb.transactionBuilder.triggerSmartContract(this.contract.address,this.functionSelector,r,n,r.from?this.tronWeb.address.toHex(r.from):void 0);if(!LA.hasProperty(o,"constant_result"))throw new Error("Failed to execute");const s=o.constant_result[0].length;if(0===s||s%64==8){let e="The call has been reverted or has thrown an error.";if(0!==s){e+=" Error message: ";let t="";const r=o.constant_result[0].substring(8);for(let e=0;e<s-8;e+=64)t+=this.tronWeb.toUtf8(r.substring(e,e+64));e+=t.replace(/(\u0000|\u000b|\f)+/g," ").replace(/ +/g," ").replace(/\s+$/g,"")}throw new Error(e)}const a=gT(this.abi,"0x"+o.constant_result[0]);return 1===a.length&&1===Object.keys(a).length?a[0]:a}async _send(e,t,r={},n=this.tronWeb.defaultPrivateKey){if(e.length!==t.length)throw new Error("Invalid argument count provided");if(!this.contract.address)throw new Error("Smart contract is missing address");if(!this.contract.deployed)throw new Error("Calling smart contracts requires you to load the contract first");const{stateMutability:o}=this.abi;if(["pure","view"].includes(o.toLowerCase()))throw new Error(`Methods with state mutability "${o}" must use call()`);["payable"].includes(o.toLowerCase())||(r.callValue=0),r={...this.defaultOptions,from:this.tronWeb.defaultAddress.hex,...r};const s=t.map(((t,r)=>({type:e[r],value:t}))),a=n?this.tronWeb.address.fromPrivateKey(n):this.tronWeb.defaultAddress.base58,i=await this.tronWeb.transactionBuilder.triggerSmartContract(this.contract.address,this.functionSelector,r,s,this.tronWeb.address.toHex(a));if(!i.result||!i.result.result)throw new Error("Unknown error: "+JSON.stringify(i,null,2));const c=await this.tronWeb.trx.sign(i.transaction,n);if(!c.signature){if(!n)throw new Error("Transaction was not signed properly");throw new Error("Invalid private key provided")}const u=await this.tronWeb.trx.sendRawTransaction(c);if(u.code){const e={error:u.code,message:u.code};u.message&&(e.message=this.tronWeb.toUtf8(u.message));const t=new Error(e.message);throw t.error=u.code,t}if(!r.shouldPollResponse)return c.txID;const l=async e=>{if(e===(r.pollTimes||20)){const e=new Error("Cannot find result in solidity node");throw e.error="Cannot find result in solidity node",e.transaction=c,e}const t=await this.tronWeb.trx.getTransactionInfo(c.txID);if(!Object.keys(t).length)return await new Promise((e=>setTimeout(e,3e3))),l(e+1);if(t.result&&"FAILED"===t.result){const e=new Error(this.tronWeb.toUtf8(t.resMessage));throw e.error=this.tronWeb.toUtf8(t.resMessage),e.transaction=c,e.output=t,e}if(!LA.hasProperty(t,"contractResult")){const e=new Error("Failed to execute: "+JSON.stringify(t,null,2));throw e.error="Failed to execute: "+JSON.stringify(t,null,2),e.transaction=c,e.output=t,e}if(r.rawResponse)return t;let n=gT(this.abi,"0x"+t.contractResult[0]);return 1===n.length&&1===Object.keys(n).length?(n=n[0],r.keepTxID?[c.txID,n]:n):r.keepTxID?[c.txID,n]:n};return l(0)}}class mT{tronWeb;abi;address;eventListener;bytecode;deployed;lastBlock;methods;methodInstances;props;constructor(e,t=[],r){if(!(e&&e instanceof PT))throw new Error("Expected instance of TronWeb");this.tronWeb=e,this.address=r,this.abi=t,this.eventListener=!1,this.bytecode=!1,this.deployed=!1,this.lastBlock=!1,this.methods={},this.methodInstances={},this.props=[],LA.address.isAddress(r)?this.deployed=!0:this.address=!1,this.loadAbi(t)}hasProperty(e){return this.hasOwnProperty(e)||this.__proto__.hasOwnProperty(e)}loadAbi(e){this.abi=e,this.methods={},this.props.forEach((e=>delete this[e])),e.forEach((e=>{if(!e.type||["constructor","error"].includes(e.type.toLowerCase()))return;const t=new yT(this,e),r=t.onMethod.bind(t),{name:n,functionSelector:o,signature:s}=t,a=n,i=o,c=s;this.methods[n]=r,this.methods[o]=r,this.methods[s]=r,this.methodInstances[a]=t,this.methodInstances[i]=t,this.methodInstances[c]=t,this.hasProperty(n)||(this[n]=r,this.props.push(n)),this.hasProperty(o)||(this[o]=r,this.props.push(o)),this.hasProperty(s)||(this[s]=r,this.props.push(s))}))}decodeInput(e){const t=e.substring(0,8),r=e.substring(8);if(!this.methodInstances[t])throw new Error("Contract method "+t+" not found");return{name:this.methodInstances[t].name,params:this.methodInstances[t].decodeInput(r)}}async new(e,t=this.tronWeb.defaultPrivateKey){const r=this.tronWeb.address.fromPrivateKey(t),n=await this.tronWeb.transactionBuilder.createSmartContract(e,r),o=await this.tronWeb.trx.sign(n,t),s=await this.tronWeb.trx.sendRawTransaction(o);if(s.code)throw{error:s.code,message:this.tronWeb.toUtf8(s.message)};await LA.sleep(3e3);const a=o.raw_data.contract[0].parameter.value.new_contract.abi.entrys||[];return this.tronWeb.contract(a,o.contract_address)}async at(e){try{const t=await this.tronWeb.trx.getContract(e);if(!t.contract_address)throw new Error("Unknown error: "+JSON.stringify(t,null,2));return this.address=t.contract_address,this.bytecode=t.bytecode,this.deployed=!0,this.loadAbi(t.abi&&t.abi.entrys?t.abi.entrys:[]),this}catch(e){if(e.toString().includes("does not exist"))throw new Error("Contract has not been deployed on the network");throw new Error(e)}}}class bT{tronWeb;pluginNoOverride;disablePlugins;constructor(e,t={}){if(!(e&&e instanceof PT))throw new Error("Expected instance of TronWeb");this.tronWeb=e,this.pluginNoOverride=["register"],this.disablePlugins=!!t.disablePlugins}register(e,t){let r={requires:"0.0.0",components:{}};const n={libs:[],plugged:[],skipped:[],error:void 0};if(this.disablePlugins)return n.error="This instance of TronWeb has plugins disabled.",n;const o=new e(this.tronWeb);if(LA.isFunction(o.pluginInterface)&&(r=o.pluginInterface(t)),!rT.satisfies(PT.version,r.requires))throw new Error("The plugin is not compatible with this version of TronWeb");if(r.fullClass){const t=o.constructor.name,r=t.substring(0,1).toLowerCase()+t.substring(1);t!==r&&(Object.assign(PT,{[t]:e}),Object.assign(this.tronWeb,{[r]:o}),n.libs.push(t))}else for(const e in r.components){if(!this.tronWeb.hasOwnProperty(e))continue;const t=r.components[e],o=this.tronWeb[e].pluginNoOverride||[];for(const r in t)"constructor"===r||this.tronWeb[e][r]&&(o.includes(r)||/^_/.test(r))?n.skipped.push(r):(this.tronWeb[e][r]=t[r].bind(this.tronWeb[e]),n.plugged.push(r))}return n}}class wT{tronWeb;constructor(e){if(!(e&&e instanceof PT))throw new Error("Expected instance of TronWeb");this.tronWeb=e}setServer(e,t="healthcheck"){if(!e)return this.tronWeb.eventServer=void 0;if(LA.isString(e)&&(e=new Jw(e)),!this.tronWeb.isValidProvider(e))throw new Error("Invalid event server provided");this.tronWeb.eventServer=e,this.tronWeb.eventServer.isConnected=()=>this.tronWeb.eventServer.request(t).then((()=>!0)).catch((()=>!1))}async getEventsByContractAddress(e,t={}){const r=Object.assign({limit:20},t),{eventName:n,blockNumber:o,onlyUnconfirmed:s,onlyConfirmed:a,minBlockTimestamp:i,maxBlockTimestamp:c,orderBy:u,fingerprint:l}=r;let{limit:d}=r;if(!this.tronWeb.eventServer)throw new Error("No event server configured");if(!this.tronWeb.isAddress(e))throw new Error("Invalid contract address provided");if(void 0!==i&&!LA.isInteger(i))throw new Error("Invalid minBlockTimestamp provided");if(void 0!==c&&!LA.isInteger(c))throw new Error("Invalid maxBlockTimestamp provided");LA.isInteger(d)&&d>200&&(console.warn("Defaulting to maximum accepted limit: 200"),d=200);const f={};n&&(f.event_name=n),o&&(f.block_number=o),"boolean"==typeof s&&(f.only_unconfirmed=s),"boolean"==typeof a&&(f.only_confirmed=a),i&&(f.min_block_timestamp=i),c&&(f.max_block_timestamp=c),u&&(f.order_by=u),l&&(f.fingerprint=l),LA.isInteger(d)&&(f.limit=d);const p=await this.tronWeb.eventServer.request(`v1/contracts/${this.tronWeb.address.fromHex(e)}/events?${new URLSearchParams(f).toString()}`);if(p.success)return p;throw new Error(p.error)}async getEventsByTransactionID(e,t={}){if(!this.tronWeb.eventServer)throw new Error("No event server configured");const r={};return"boolean"==typeof t.only_unconfirmed&&(r.only_unconfirmed=t.only_unconfirmed),"boolean"==typeof t.only_confirmed&&(r.only_confirmed=t.only_confirmed),this.tronWeb.eventServer.request(`v1/transactions/${e}/events?${new URLSearchParams(r).toString()}`).then((e=>{if(e.success)return e;throw new Error(JSON.parse(e.error).message)}))}async getEventsByBlockNumber(e,t={}){if(!this.tronWeb.eventServer)throw new Error("No event server configured");const r={};return"boolean"==typeof t.only_confirmed&&(r.only_confirmed=t.only_confirmed),t.limit&&(r.limit=t.limit),t.fingerprint&&(r.fingerprint=t.fingerprint),this.tronWeb.eventServer.request(`v1/blocks/${e}/events?${new URLSearchParams(r).toString()}`).then((e=>{if(e.success)return e;throw new Error(e.error)}))}async getEventsOfLatestBlock(e={}){if(!this.tronWeb.eventServer)throw new Error("No event server configured");const t={};return"boolean"==typeof e.only_confirmed&&(t.only_confirmed=e.only_confirmed),this.tronWeb.eventServer.request(`v1/blocks/latest/events?${new URLSearchParams(t).toString()}`).then((e=>{if(e.success)return e;throw new Error(e.error)}))}}var TT=r(1048).hp;const AT="4.7.1";function vT(e){return!(!e||"object"!=typeof e||!e.fullNode&&!e.fullHost)}class PT extends Xw{providers;BigNumber;transactionBuilder;trx;plugin;event;version;static version="6.1.0";utils;defaultBlock;defaultPrivateKey;defaultAddress;fullnodeVersion;feeLimit;fullNode;solidityNode;eventServer;constructor(e,t="",r,n=""){let o;super();let s=!1,a=!1;vT(e)?(o=e.fullNode||e.fullHost,t=e.solidityNode||e.fullHost,r=e.eventServer||e.fullHost,s=e.headers||!1,a=e.eventHeaders||s,n=e.privateKey):o=e,LA.isString(o)&&(o=new Yw.HttpProvider(o)),LA.isString(t)&&(t=new Yw.HttpProvider(t)),LA.isString(r)&&(r=new Yw.HttpProvider(r)),this.event=new wT(this),this.transactionBuilder=new dT(this),this.trx=new hT(this),this.plugin=new bT(this,{disablePlugins:!!vT(e)&&e.disablePlugins}),this.utils=LA,this.setFullNode(o),this.setSolidityNode(t),this.setEventServer(r),this.providers=Yw,this.BigNumber=_y,this.defaultBlock=!1,this.defaultPrivateKey=!1,this.defaultAddress={hex:!1,base58:!1},this.version=PT.version,this.sha3=PT.sha3,this.fromUtf8=PT.fromUtf8,this.address=PT.address,this.toAscii=PT.toAscii,this.toUtf8=PT.toUtf8,this.isAddress=PT.isAddress,this.fromAscii=PT.fromAscii,this.toHex=PT.toHex,this.toBigNumber=PT.toBigNumber,this.toDecimal=PT.toDecimal,this.fromDecimal=PT.fromDecimal,this.toSun=PT.toSun,this.fromSun=PT.fromSun,this.createAccount=PT.createAccount,this.createRandom=PT.createRandom,this.fromMnemonic=PT.fromMnemonic,n&&this.setPrivateKey(n),this.fullnodeVersion=AT,this.feeLimit=15e7,s&&this.setFullNodeHeader(s),a&&this.setEventHeader(a)}async getFullnodeVersion(){try{const e=await this.trx.getNodeInfo();this.fullnodeVersion=e.configNodeInfo.codeVersion,2===this.fullnodeVersion.split(".").length&&(this.fullnodeVersion+=".0")}catch(e){this.fullnodeVersion=AT}}setDefaultBlock(e=!1){if([!1,"latest","earliest",0].includes(e))return this.defaultBlock=e;if(!LA.isInteger(e)||!e)throw new Error("Invalid block ID provided");return this.defaultBlock=Math.abs(e)}setPrivateKey(e){try{this.setAddress(PT.address.fromPrivateKey(e))}catch{throw new Error("Invalid private key provided")}this.defaultPrivateKey=e,this.emit("privateKeyChanged",e)}setAddress(e){if(!PT.isAddress(e))throw new Error("Invalid address provided");const t=PT.address.toHex(e),r=PT.address.fromHex(e);this.defaultPrivateKey&&PT.address.fromPrivateKey(this.defaultPrivateKey)!==r&&(this.defaultPrivateKey=!1),this.defaultAddress={hex:t,base58:r},this.emit("addressChanged",{hex:t,base58:r})}fullnodeSatisfies(e){return rT.satisfies(this.fullnodeVersion,e)}isValidProvider(e){return Object.values(Yw).some((t=>e instanceof t))}setFullNode(e){if(Uy(e)&&(e=new Yw.HttpProvider(e)),!this.isValidProvider(e))throw new Error("Invalid full node provided");this.fullNode=e,this.fullNode.setStatusPage("wallet/getnowblock")}setSolidityNode(e){if(LA.isString(e)&&(e=new Yw.HttpProvider(e)),!this.isValidProvider(e))throw new Error("Invalid solidity node provided");this.solidityNode=e,this.solidityNode.setStatusPage("walletsolidity/getnowblock")}setEventServer(e,t){this.event.setServer(e,t)}setHeader(e={}){const t=new Yw.HttpProvider(this.fullNode.host,3e4,"","",e),r=new Yw.HttpProvider(this.solidityNode.host,3e4,"","",e),n=new Yw.HttpProvider(this.eventServer.host,3e4,"","",e);this.setFullNode(t),this.setSolidityNode(r),this.setEventServer(n)}setFullNodeHeader(e={}){const t=new Yw.HttpProvider(this.fullNode.host,3e4,"","",e),r=new Yw.HttpProvider(this.solidityNode.host,3e4,"","",e);this.setFullNode(t),this.setSolidityNode(r)}setEventHeader(e={}){const t=new Yw.HttpProvider(this.eventServer.host,3e4,"","",e);this.setEventServer(t)}currentProviders(){return{fullNode:this.fullNode,solidityNode:this.solidityNode,eventServer:this.eventServer}}currentProvider(){return this.currentProviders()}getEventResult(...e){return this.event.getEventsByContractAddress(...e)}getEventByTransactionID(...e){return this.event.getEventsByTransactionID(...e)}contract(e=[],t){return new mT(this,e,t)}address;static get address(){return{fromHex:e=>qy(e),toHex:e=>Jy(e),toChecksumAddress:e=>Yy(e),isChecksumAddress:e=>Xy(e),fromPrivateKey:(e,t=!1)=>Qy(e,t)}}sha3;static sha3(e,t=!0){return(t?"0x":"")+Ti(TT.from(e,"utf-8")).toString().substring(2)}toHex;static toHex(e){if(LA.isBoolean(e))return PT.fromDecimal(+e);if(LA.isBigNumber(e))return PT.fromDecimal(e);if("object"==typeof e)return PT.fromUtf8(JSON.stringify(e));if(LA.isString(e)){if(/^(-|)0x/.test(e))return e;if(!isFinite(e)||/^\s*$/.test(e))return PT.fromUtf8(e)}const t=PT.fromDecimal(e);if("0xNaN"===t)throw new Error("The passed value is not convertible to a hex string");return t}toUtf8;static toUtf8(e){if(LA.isHex(e))return e=e.replace(/^0x/,""),TT.from(e,"hex").toString("utf8");throw new Error("The passed value is not a valid hex string")}fromUtf8;static fromUtf8(e){if(!LA.isString(e))throw new Error("The passed value is not a valid utf-8 string");return"0x"+TT.from(e,"utf8").toString("hex")}toAscii;static toAscii(e){if(LA.isHex(e)){let t="",r=0;const n=e.length;for("0x"===e.substring(0,2)&&(r=2);r<n;r+=2){const n=parseInt(e.substr(r,2),16);t+=String.fromCharCode(n)}return t}throw new Error("The passed value is not a valid hex string")}fromAscii;static fromAscii(e,t){if(!LA.isString(e))throw new Error("The passed value is not a valid utf-8 string");return"0x"+TT.from(e,"ascii").toString("hex").padEnd(t,"0")}toDecimal;static toDecimal(e){return PT.toBigNumber(e).toNumber()}fromDecimal;static fromDecimal(e){const t=PT.toBigNumber(e),r=t.toString(16);return t.isLessThan(0)?"-0x"+r.substr(1):"0x"+r}fromSun;static fromSun(e){const t=PT.toBigNumber(e).div(1e6);return LA.isBigNumber(e)?t:t.toString(10)}toSun;static toSun(e){const t=PT.toBigNumber(e).times(1e6);return LA.isBigNumber(e)?t:t.toString(10)}toBigNumber;static toBigNumber(e=0){return LA.isBigNumber(e)?e:LA.isString(e)&&/^(-|)0x/.test(e)?new _y(e.replace("0x",""),16):new _y(e.toString(10),10)}isAddress;static isAddress(e=""){return em(e)}createAccount;static async createAccount(){return LA.accounts.generateAccount()}createRandom;static createRandom(...e){return LA.accounts.generateRandom(...e)}fromMnemonic;static fromMnemonic(...e){return LA.accounts.generateAccountWithMnemonic(...e)}async isConnected(){return{fullNode:await this.fullNode.isConnected(),solidityNode:await this.solidityNode.isConnected(),eventServer:this.eventServer&&await this.eventServer.isConnected()}}}const ET=PT;var CT=r(1048).hp;const{Transaction:BT,Permission:WT,Key:ST}=globalThis.TronWebProto,{TransferContract:IT,FreezeBalanceContract:_T,UnfreezeBalanceContract:OT,WithdrawBalanceContract:RT,FreezeBalanceV2Contract:MT,UnfreezeBalanceV2Contract:xT,CancelAllUnfreezeV2Contract:FT,WithdrawExpireUnfreezeContract:kT,DelegateResourceContract:NT,UnDelegateResourceContract:UT}=globalThis.TronWebProto,{TransferAssetContract:DT,ParticipateAssetIssueContract:LT,AssetIssueContract:$T,UpdateAssetContract:zT}=globalThis.TronWebProto,{TriggerSmartContract:jT,ClearABIContract:VT,UpdateEnergyLimitContract:GT,UpdateSettingContract:HT,CreateSmartContract:KT,SmartContract:ZT}=globalThis.TronWebProto,{ResourceCode:qT}=globalThis.TronWebProto,{WitnessCreateContract:JT,VoteWitnessContract:YT}=globalThis.TronWebProto,{UpdateBrokerageContract:XT}=globalThis.TronWebProto,{AccountCreateContract:QT,AccountUpdateContract:eA,SetAccountIdContract:tA,AccountPermissionUpdateContract:rA}=globalThis.TronWebProto,{ProposalCreateContract:nA,ProposalDeleteContract:oA,ProposalApproveContract:sA}=globalThis.TronWebProto,{ExchangeCreateContract:aA,ExchangeInjectContract:iA,ExchangeWithdrawContract:cA,ExchangeTransactionContract:uA}=globalThis.TronWebProto,lA=e=>e&&0!==e.length?new Uint8Array(ET.address.toHex(e).match(/.{1,2}/g).map((e=>parseInt(e,16)))):new Uint8Array([]),dA=e=>e&&0!==e.length?new Uint8Array((Ly(e)?e:ET.toHex(e)).replace(/^0x/,"").match(/.{1,2}/g).map((e=>parseInt(e,16)))):new Uint8Array([]),fA=(e,t)=>dA(t?ET.fromUtf8(e).replace(/^0x/,""):e.replace(/^0x/,"")),pA=(e,t,r,n)=>{const o=new Im.Any;o.pack(e.serializeBinary(),"protocol."+r);const s=new BT.Contract;s.setType(t),s.setParameter(o),n&&s.setPermissionId(n);const a=new BT.raw;a.addContract(s);const i=new BT;return i.setRawData(a),i},hA=(e,t)=>{const r=new jT,{owner_address:n,contract_address:o,parameter:s="",function_selector:a,call_value:i,call_token_value:c,token_id:u,data:l}=e;if(r.setOwnerAddress(lA(n)),r.setContractAddress(lA(o)),r.setCallValue(i),l)r.setData(dA(l));else if(a){const e=((e,t=!0)=>(t?"0x":"")+Ti(CT.from(e,"utf-8")).toString().substring(2))(a).substring(2,10)+s;r.setData(dA(e))}return u&&r.setTokenId(u),c&&r.setCallTokenValue(c),pA(r,BT.Contract.ContractType.TRIGGERSMARTCONTRACT,"TriggerSmartContract",t.Permission_id)},gA=(e,t)=>{const r=new rA,{owner_address:n,owner:o,witness:s,actives:a}=e;r.setOwnerAddress(lA(n));const i=e=>{const t=new WT,{type:r,id:n,permission_name:o,threshold:s,parentId:a,operations:i,keys:c}=e;return t.setType((e=>isNaN(e)?"Active"===e?2:"Witness"===e?1:0:e)(r)),t.setId(n),t.setPermissionName(o),t.setThreshold(s),a&&t.setParentId(a),i&&t.setOperations(dA(i)),c&&t.setKeysList(c.map((e=>{const t=new ST;return t.setAddress(lA(e.address)),t.setWeight(e.weight),t}))),t};return o&&r.setOwner(i(o)),s&&r.setWitness(i(s)),a&&(Array.isArray(a)?r.setActivesList(a.map((e=>i(e)))):r.setActivesList([i(a)])),pA(r,BT.Contract.ContractType.ACCOUNTPERMISSIONUPDATECONTRACT,"AccountPermissionUpdateContract",t.Permission_id)},yA=(e,t,r)=>{switch(e.type){case"TransferContract":return((e,t)=>{const{to_address:r,owner_address:n,amount:o}=e,s=new IT;return s.setToAddress(lA(r)),s.setOwnerAddress(lA(n)),s.setAmount(o),pA(s,BT.Contract.ContractType.TRANSFERCONTRACT,"TransferContract",t.Permission_id)})(t,r);case"TransferAssetContract":return((e,t)=>{const{to_address:r,owner_address:n,amount:o,asset_name:s}=e,a=new DT;return a.setToAddress(lA(r)),a.setOwnerAddress(lA(n)),a.setAssetName(fA(s,t.visible)),a.setAmount(o),pA(a,BT.Contract.ContractType.TRANSFERASSETCONTRACT,"TransferAssetContract",t.Permission_id)})(t,r);case"ParticipateAssetIssueContract":return((e,t)=>{const r=new LT;return r.setToAddress(lA(e.to_address)),r.setOwnerAddress(lA(e.owner_address)),r.setAssetName(fA(e.asset_name,t.visible)),r.setAmount(e.amount),pA(r,BT.Contract.ContractType.PARTICIPATEASSETISSUECONTRACT,"ParticipateAssetIssueContract",t.Permission_id)})(t,r);case"TriggerSmartContract":return hA(t,r);case"FreezeBalanceContract":return((e,t)=>{const r=new _T,{owner_address:n,frozen_balance:o,frozen_duration:s,resource:a,receiver_address:i}=e;return r.setOwnerAddress(lA(n)),r.setFrozenBalance(o),r.setFrozenDuration(s),a&&r.setResource(qT[a]),i&&r.setReceiverAddress(lA(i)),pA(r,BT.Contract.ContractType.FREEZEBALANCECONTRACT,"FreezeBalanceContract",t.Permission_id)})(t,r);case"UnfreezeBalanceContract":return((e,t)=>{const r=new OT,{owner_address:n,resource:o,receiver_address:s}=e;return r.setOwnerAddress(lA(n)),o&&r.setResource(qT[o]),s&&r.setReceiverAddress(lA(s)),pA(r,BT.Contract.ContractType.UNFREEZEBALANCECONTRACT,"UnfreezeBalanceContract",t.Permission_id)})(t,r);case"WithdrawBalanceContract":return((e,t)=>{const r=new RT,{owner_address:n}=e;return r.setOwnerAddress(lA(n)),pA(r,BT.Contract.ContractType.WITHDRAWBALANCECONTRACT,"WithdrawBalanceContract",t.Permission_id)})(t,r);case"FreezeBalanceV2Contract":return((e,t)=>{const r=new MT,{owner_address:n,frozen_balance:o,resource:s}=e;return r.setOwnerAddress(lA(n)),r.setFrozenBalance(o),r.setResource(qT[s]),pA(r,BT.Contract.ContractType.FREEZEBALANCEV2CONTRACT,"FreezeBalanceV2Contract",t.Permission_id)})(t,r);case"CancelAllUnfreezeV2Contract":return((e,t)=>{const r=new FT,{owner_address:n}=e;return r.setOwnerAddress(lA(n)),pA(r,BT.Contract.ContractType.CANCELALLUNFREEZEV2CONTRACT,"CancelAllUnfreezeV2Contract",t.Permission_id)})(t,r);case"UnfreezeBalanceV2Contract":return((e,t)=>{const r=new xT,{owner_address:n,unfreeze_balance:o,resource:s}=e;return r.setOwnerAddress(lA(n)),r.setUnfreezeBalance(o),r.setResource(qT[s]),pA(r,BT.Contract.ContractType.UNFREEZEBALANCEV2CONTRACT,"UnfreezeBalanceV2Contract",t.Permission_id)})(t,r);case"DelegateResourceContract":return((e,t)=>{const r=new NT,{owner_address:n,receiver_address:o,balance:s,resource:a,lock:i=!1,lock_period:c}=e;return r.setOwnerAddress(lA(n)),r.setBalance(s),r.setResource(qT[a]),r.setLock(i),r.setLockPeriod(c),r.setReceiverAddress(lA(o)),pA(r,BT.Contract.ContractType.DELEGATERESOURCECONTRACT,"DelegateResourceContract",t.Permission_id)})(t,r);case"UnDelegateResourceContract":return((e,t)=>{const r=new UT,{owner_address:n,receiver_address:o,balance:s,resource:a}=e;return r.setOwnerAddress(lA(n)),r.setBalance(s),r.setResource(qT[a]),r.setReceiverAddress(lA(o)),pA(r,BT.Contract.ContractType.UNDELEGATERESOURCECONTRACT,"UnDelegateResourceContract",t.Permission_id)})(t,r);case"WithdrawExpireUnfreezeContract":return((e,t)=>{const r=new kT,{owner_address:n}=e;return r.setOwnerAddress(lA(n)),pA(r,BT.Contract.ContractType.WITHDRAWEXPIREUNFREEZECONTRACT,"WithdrawExpireUnfreezeContract",t.Permission_id)})(t,r);case"WitnessCreateContract":return((e,t)=>{const r=new JT,{owner_address:n,url:o}=e;return r.setOwnerAddress(lA(n)),r.setUrl(dA(o.replace(/^0x/,""))),pA(r,BT.Contract.ContractType.WITNESSCREATECONTRACT,"WitnessCreateContract",t.Permission_id)})(t,r);case"VoteWitnessContract":return((e,t)=>{const r=new YT,{owner_address:n,votes:o}=e;return r.setOwnerAddress(lA(n)),o.forEach((e=>{const t=new YT.Vote,{vote_address:n,vote_count:o}=e;t.setVoteAddress(lA(n));const s=parseInt(o);t.setVoteCount(s),r.addVotes(t)})),pA(r,BT.Contract.ContractType.VOTEWITNESSCONTRACT,"VoteWitnessContract",t.Permission_id)})(t,r);case"CreateSmartContract":return((e,t)=>{const r=e?.new_contract?{owner_address:e.owner_address,call_token_value:e.call_token_value,token_id:e.token_id,...e.new_contract}:e,{owner_address:n,consume_user_resource_percent:o,origin_energy_limit:s,abi:a,bytecode:i="",parameter:c="",call_value:u,call_token_value:l,token_id:d,name:f}=r;let{origin_address:p}=r;const h=new KT;h.setOwnerAddress(lA(n)),d&&h.setTokenId(d),l&&h.setCallTokenValue(l);const g=new ZT;if(a){let e;e="string"==typeof a?JSON.parse(a):a?.entrys||[];const t=new ZT.ABI,r=e=>{const t=new ZT.ABI.Entry.Param,{indexed:r,name:n,type:o}=e;return!0===r&&t.setIndexed(!0),t.setName(n),t.setType(o),t},n=e.map((e=>{const{anonymous:t,constant:n,name:o,inputs:s,outputs:a,type:i,payable:c,stateMutability:u}=e,l=new ZT.ABI.Entry;return l.setAnonymous(t),l.setConstant(n),l.setName(o),s&&l.setInputsList(s.map((e=>r(e)))),a&&l.setOutputsList(a.map((e=>r(e)))),i&&l.setType(ZT.ABI.Entry.EntryType[i.toUpperCase()]),l.setPayable(c),u&&l.setStatemutability(ZT.ABI.Entry.StateMutabilityType[u.toUpperCase()]),l}));t.setEntrysList(n),g.setAbi(t)}if(u&&g.setCallValue(u),g.setConsumeUserResourcePercent(o),g.setOriginEnergyLimit(s),p||(p=n),g.setOriginAddress(lA(p)),i){const e=i.replace(/^0x/,"")+c.replace(/^0x/,"");g.setBytecode(dA(e))}return g.setName(f),h.setNewContract(g),pA(h,BT.Contract.ContractType.CREATESMARTCONTRACT,"CreateSmartContract",t.Permission_id)})(t,r);case"ClearABIContract":return((e,t)=>{const{contract_address:r,owner_address:n}=e,o=new VT;return o.setOwnerAddress(lA(n)),o.setContractAddress(lA(r)),pA(o,BT.Contract.ContractType.CLEARABICONTRACT,"ClearABIContract",t.Permission_id)})(t,r);case"UpdateBrokerageContract":return((e,t)=>{const{brokerage:r,owner_address:n}=e,o=new XT;return o.setOwnerAddress(lA(n)),o.setBrokerage(r),pA(o,BT.Contract.ContractType.UPDATEBROKERAGECONTRACT,"UpdateBrokerageContract",t.Permission_id)})(t,r);case"AssetIssueContract":return((e,t)=>{const{owner_address:r,name:n,abbr:o,description:s,url:a,total_supply:i,trx_num:c,num:u,start_time:l,end_time:d,precision:f,free_asset_net_limit:p,public_free_asset_net_limit:h,public_free_asset_net_usage:g=0,public_latest_free_net_time:y=0,vote_score:m=0,frozen_supply:b}=e,w=new $T;if(w.setOwnerAddress(lA(r)),n&&w.setName(dA(n.replace(/^0x/,""))),o&&w.setAbbr(dA(o.replace(/^0x/,""))),w.setTotalSupply(i),w.setNum(u),w.setEndTime(d),w.setStartTime(l),w.setTrxNum(c),w.setVoteScore(m),f&&w.setPrecision(f),y&&w.setPublicLatestFreeNetTime(y),s&&w.setDescription(dA(s.replace(/^0x/,""))),a&&w.setUrl(dA(a.replace(/^0x/,""))),w.setPublicFreeAssetNetUsage(g),w.setFreeAssetNetLimit(p),w.setPublicFreeAssetNetLimit(h),b){const e=new $T.FrozenSupply;e.setFrozenAmount(b.length?b[0].frozen_amount:b.frozen_amount),e.setFrozenDays(b.length?b[0].frozen_days:b.frozen_days),w.addFrozenSupply(e)}return pA(w,BT.Contract.ContractType.ASSETISSUECONTRACT,"AssetIssueContract",t.Permission_id)})(t,r);case"AccountCreateContract":return((e,t)=>{const r=new QT,{account_address:n,owner_address:o}=e;return r.setOwnerAddress(lA(o)),r.setAccountAddress(lA(n.replace(/^0x/,""))),pA(r,BT.Contract.ContractType.ACCOUNTCREATECONTRACT,"AccountCreateContract",t.Permission_id)})(t,r);case"AccountUpdateContract":return((e,t)=>{const r=new eA,{account_name:n,owner_address:o}=e;return r.setOwnerAddress(lA(o)),r.setAccountName(dA(n.replace(/^0x/,""))),pA(r,BT.Contract.ContractType.ACCOUNTUPDATECONTRACT,"AccountUpdateContract",t.Permission_id)})(t,r);case"SetAccountIdContract":return((e,t)=>{const r=new tA,{account_id:n,owner_address:o}=e;return r.setOwnerAddress(lA(o)),r.setAccountId(dA(n.replace(/^0x/,""))),pA(r,BT.Contract.ContractType.SETACCOUNTIDCONTRACT,"SetAccountIdContract",t.Permission_id)})(t,r);case"ProposalCreateContract":return((e,t)=>{const r=new nA,{owner_address:n,parameters:o}=e;return r.setOwnerAddress(lA(n)),o.forEach((e=>{r.getParametersMap().set(e.key,e.value)})),pA(r,BT.Contract.ContractType.PROPOSALCREATECONTRACT,"ProposalCreateContract",t.Permission_id)})(t,r);case"ProposalDeleteContract":return((e,t)=>{const r=new oA,{owner_address:n,proposal_id:o}=e;return r.setOwnerAddress(lA(n)),r.setProposalId(o),pA(r,BT.Contract.ContractType.PROPOSALDELETECONTRACT,"ProposalDeleteContract",t.Permission_id)})(t,r);case"ProposalApproveContract":return((e,t)=>{const r=new sA,{owner_address:n,proposal_id:o,is_add_approval:s}=e;return r.setOwnerAddress(lA(n)),r.setProposalId(o),r.setIsAddApproval(s),pA(r,BT.Contract.ContractType.PROPOSALAPPROVECONTRACT,"ProposalApproveContract",t.Permission_id)})(t,r);case"ExchangeCreateContract":return((e,t)=>{const r=new aA,{owner_address:n,first_token_id:o,first_token_balance:s,second_token_id:a,second_token_balance:i}=e;return r.setOwnerAddress(lA(n)),r.setFirstTokenId(fA(o,t.visible)),r.setFirstTokenBalance(s),r.setSecondTokenId(fA(a,t.visible)),r.setSecondTokenBalance(i),pA(r,BT.Contract.ContractType.EXCHANGECREATECONTRACT,"ExchangeCreateContract",t.Permission_id)})(t,r);case"ExchangeInjectContract":return((e,t)=>{const r=new iA,{owner_address:n,exchange_id:o,token_id:s,quant:a}=e;return r.setOwnerAddress(lA(n)),r.setExchangeId(o),r.setTokenId(fA(s,t.visible)),r.setQuant(a),pA(r,BT.Contract.ContractType.EXCHANGEINJECTCONTRACT,"ExchangeInjectContract",t.Permission_id)})(t,r);case"ExchangeWithdrawContract":return((e,t)=>{const r=new cA,{owner_address:n,exchange_id:o,token_id:s,quant:a}=e;return r.setOwnerAddress(lA(n)),r.setExchangeId(o),r.setTokenId(fA(s,t.visible)),r.setQuant(a),pA(r,BT.Contract.ContractType.EXCHANGEWITHDRAWCONTRACT,"ExchangeWithdrawContract",t.Permission_id)})(t,r);case"ExchangeTransactionContract":return((e,t)=>{const r=new uA,{owner_address:n,exchange_id:o,token_id:s,quant:a,expected:i}=e;return r.setOwnerAddress(lA(n)),r.setExchangeId(o),r.setTokenId(fA(s,t.visible)),r.setQuant(a),r.setExpected(i),pA(r,BT.Contract.ContractType.EXCHANGETRANSACTIONCONTRACT,"ExchangeTransactionContract",t.Permission_id)})(t,r);case"UpdateSettingContract":return((e,t)=>{const r=new HT,{owner_address:n,contract_address:o,consume_user_resource_percent:s}=e;return r.setOwnerAddress(lA(n)),r.setContractAddress(lA(o)),r.setConsumeUserResourcePercent(s),pA(r,BT.Contract.ContractType.UPDATESETTINGCONTRACT,"UpdateSettingContract",t.Permission_id)})(t,r);case"UpdateEnergyLimitContract":return((e,t)=>{const r=new GT,{owner_address:n,contract_address:o,origin_energy_limit:s}=e;return r.setOwnerAddress(lA(n)),r.setContractAddress(lA(o)),r.setOriginEnergyLimit(s),pA(r,BT.Contract.ContractType.UPDATEENERGYLIMITCONTRACT,"UpdateEnergyLimitContract",t.Permission_id)})(t,r);case"AccountPermissionUpdateContract":return gA(t,r);case"UpdateAssetContract":return((e,t)=>{const r=new zT,{owner_address:n,description:o,url:s,new_limit:a,new_public_limit:i}=e;return r.setOwnerAddress(lA(n)),o&&r.setDescription(dA(o.replace(/^0x/,""))),s&&r.setUrl(dA(s.replace(/^0x/,""))),a&&r.setNewLimit(a),i&&r.setNewPublicLimit(i),pA(r,BT.Contract.ContractType.UPDATEASSETCONTRACT,"UpdateAssetContract",t.Permission_id)})(t,r)}},mA=e=>{const t=e.raw_data,r=t.contract[0],n=r.parameter.value,o={Permission_id:r.Permission_id,visible:e.visible},s=yA(r,n,o),a=s.getRawData();return a.setRefBlockBytes(dA(t.ref_block_bytes)),a.setRefBlockHash(dA(t.ref_block_hash)),t.data&&a.setData(dA(t.data)),t.fee_limit&&a.setFeeLimit(t.fee_limit),t.expiration&&a.setExpiration(t.expiration),t.timestamp&&a.setTimestamp(t.timestamp),s.setRawData(a),s},bA=(e,t={},r={})=>{const n=e.raw_data,o=n.contract[0],s=yA(o,t,{Permission_id:t?.Permission_id}),a=s.getRawData();return a.setRefBlockBytes(dA(n.ref_block_bytes)),a.setRefBlockHash(dA(n.ref_block_hash)),r.data&&a.setData(dA(r.data.replace(/^0x/,""))),(r.fee_limit||t.fee_limit)&&a.setFeeLimit(r.fee_limit||t.fee_limit),n.expiration&&a.setExpiration(n.expiration),n.timestamp&&a.setTimestamp(n.timestamp),s.setRawData(a),s},wA=(e,t)=>{const r=t.getRawData().serializeBinary(),n=Wo(r),o=Va(r);return n.toLowerCase()===e.raw_data_hex.toLowerCase()&&o.replace(/^0x/,"").toLowerCase()===e.txID.replace(/^0x/,"").toLowerCase()},TA=e=>Wo(e.getRawData().serializeBinary()),AA=e=>{const t=mA(e);return wA(e,t)},vA=(e,t,r)=>{const n=bA(e,t,r);return wA(e,n)},PA=e=>Va(e.getRawData().serializeBinary()),{Transaction:EA}=globalThis.TronWebProto,{TransferContract:CA,WithdrawBalanceContract:BA,WitnessCreateContract:WA,FreezeBalanceV2Contract:SA,UnfreezeBalanceV2Contract:IA,CancelAllUnfreezeV2Contract:_A,WithdrawExpireUnfreezeContract:OA,DelegateResourceContract:RA,UnDelegateResourceContract:MA}=globalThis.TronWebProto,{TriggerSmartContract:xA}=globalThis.TronWebProto,FA={0:"AccountCreateContract",1:"TransferContract",2:"TransferAssetContract",4:"VoteWitnessContract",5:"WitnessCreateContract",6:"AssetIssueContract",9:"ParticipateAssetIssueContract",10:"AccountUpdateContract",11:"FreezeBalanceContract",12:"UnfreezeBalanceContract",13:"WithdrawBalanceContract",15:"UpdateAssetContract",16:"ProposalCreateContract",17:"ProposalApproveContract",18:"ProposalDeleteContract",19:"SetAccountIdContract",30:"CreateSmartContract",31:"TriggerSmartContract",33:"UpdateSettingContract",41:"ExchangeCreateContract",42:"ExchangeInjectContract",43:"ExchangeWithdrawContract",44:"ExchangeTransactionContract",45:"UpdateEnergyLimitContract",46:"AccountPermissionUpdateContract",48:"ClearABIContract",49:"UpdateBrokerageContract",54:"FreezeBalanceV2Contract",55:"UnfreezeBalanceV2Contract",56:"WithdrawExpireUnfreezeContract",57:"DelegateResourceContract",58:"UnDelegateResourceContract",59:"CancelAllUnfreezeV2Contract"},kA=e=>e.getAuthsList().map((e=>{const t=Wo(e.getPermissionName_asU8()),r=e.getAccount();return{permission_name:t,account:{name:Wo(r.getName_asU8()),address:Wo(r.getAddress_asU8())}}})),NA=(e,t)=>{const r=EA.raw.deserializeBinary($o(t)),n=r.getContractList()[0],o=n.getParameter().getValue(),s=FA[n.getType()];if(e!==s)throw new Error(`type ${e} dismatches with rawDataHex type ${s}`);return[{contract:[{parameter:{value:{},type_url:n.getParameter().getTypeUrl()},type:e,Permission_id:n.getPermissionId()}],data:Wo(r.getData()),fee_limit:r.getFeeLimit(),ref_block_bytes:Wo(r.getRefBlockBytes_asU8()),ref_block_hash:Wo(r.getRefBlockHash_asU8()),expiration:r.getExpiration(),timestamp:r.getTimestamp(),scripts:Wo(r.getScripts_asU8()),auths:kA(r)},o]},UA=e=>{switch(e){case 0:default:return"BANDWIDTH";case 1:return"ENERGY"}},DA=(e,t)=>{if(!t)throw new Error("rawDataHex cannot be empty");if(!Ly(t))throw new Error("rawDataHex is not a valid hex string");switch(e){case"TriggerSmartContract":return((e,t)=>{const[r,n]=NA(e,t),o=xA.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:Wo(o.getOwnerAddress_asU8()),contract_address:Wo(o.getContractAddress_asU8()),call_value:o.getCallValue(),data:Wo(o.getData_asU8()),call_token_value:o.getCallTokenValue(),token_id:o.getTokenId()},r})(e,t);case"FreezeBalanceV2Contract":return((e,t)=>{const[r,n]=NA(e,t),o=SA.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:Wo(o.getOwnerAddress_asU8()),frozen_balance:o.getFrozenBalance(),resource:UA(o.getResource())},r})(e,t);case"UnfreezeBalanceV2Contract":return((e,t)=>{const[r,n]=NA(e,t),o=IA.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:Wo(o.getOwnerAddress_asU8()),unfreeze_balance:o.getUnfreezeBalance(),resource:UA(o.getResource())},r})(e,t);case"CancelAllUnfreezeV2Contract":return((e,t)=>{const[r,n]=NA(e,t),o=_A.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:Wo(o.getOwnerAddress_asU8())},r})(e,t);case"DelegateResourceContract":return((e,t)=>{const[r,n]=NA(e,t),o=RA.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:Wo(o.getOwnerAddress_asU8()),balance:o.getBalance(),lock:o.getLock(),lock_period:o.getLockPeriod(),receiver_address:Wo(o.getReceiverAddress_asU8()),resource:UA(o.getResource())},r})(e,t);case"UnDelegateResourceContract":return((e,t)=>{const[r,n]=NA(e,t),o=MA.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:Wo(o.getOwnerAddress_asU8()),balance:o.getBalance(),receiver_address:Wo(o.getReceiverAddress_asU8()),resource:UA(o.getResource())},r})(e,t);case"WithdrawExpireUnfreezeContract":return((e,t)=>{const[r,n]=NA(e,t),o=OA.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:Wo(o.getOwnerAddress_asU8())},r})(e,t);case"TransferContract":return((e,t)=>{const[r,n]=NA(e,t),o=CA.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:Wo(o.getOwnerAddress_asU8()),to_address:Wo(o.getToAddress_asU8()),amount:o.getAmount()},r})(e,t);case"WithdrawBalanceContract":return((e,t)=>{const[r,n]=NA(e,t),o=BA.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:Wo(o.getOwnerAddress_asU8())},r})(e,t);case"WitnessCreateContract":return((e,t)=>{const[r,n]=NA(e,t),o=WA.deserializeBinary(n);return r.contract[0].parameter.value={owner_address:Wo(o.getOwnerAddress_asU8()),url:String.fromCharCode(...o.getUrl_asU8())},r})(e,t);default:throw new Error(`trasaction ${e} not supported`)}},LA={...d,constants:t,address:f,code:o,accounts:l,base58:s,bytes:e,crypto:u,abi:p,message:h,_TypedDataEncoder:Bm,typedData:g,transaction:m,ethersUtils:i,deserializeTx:b};var $A,zA,jA,VA;!function(e){e[e.BANDWIDTH=0]="BANDWIDTH",e[e.ENERGY=1]="ENERGY",e[e.TRON_POWER=2]="TRON_POWER"}($A||($A={})),function(e){e.ENOUGH_PERMISSION="ENOUGH_PERMISSION",e.NOT_ENOUGH_PERMISSION="NOT_ENOUGH_PERMISSION",e.SIGNATURE_FORMAT_ERROR="SIGNATURE_FORMAT_ERROR",e.COMPUTE_ADDRESS_ERROR="COMPUTE_ADDRESS_ERROR",e.PERMISSION_ERROR="PERMISSION_ERROR",e.OTHER_ERROR="OTHER_ERROR"}(zA||(zA={})),function(e){e[e.SUCCESS=0]="SUCCESS",e[e.SIGERROR=1]="SIGERROR",e[e.CONTRACT_VALIDATE_ERROR=2]="CONTRACT_VALIDATE_ERROR",e[e.CONTRACT_EXE_ERROR=3]="CONTRACT_EXE_ERROR",e[e.BANDWITH_ERROR=4]="BANDWITH_ERROR",e[e.DUP_TRANSACTION_ERROR=5]="DUP_TRANSACTION_ERROR",e[e.TAPOS_ERROR=6]="TAPOS_ERROR",e[e.TOO_BIG_TRANSACTION_ERROR=7]="TOO_BIG_TRANSACTION_ERROR",e[e.TRANSACTION_EXPIRATION_ERROR=8]="TRANSACTION_EXPIRATION_ERROR",e[e.SERVER_BUSY=9]="SERVER_BUSY",e[e.NO_CONNECTION=10]="NO_CONNECTION",e[e.NOT_ENOUGH_EFFECTIVE_CONNECTION=11]="NOT_ENOUGH_EFFECTIVE_CONNECTION",e[e.OTHER_ERROR=20]="OTHER_ERROR"}(jA||(jA={})),function(e){e[e.PENDING=0]="PENDING",e[e.DISAPPROVED=1]="DISAPPROVED",e[e.APPROVED=2]="APPROVED",e[e.CANCELED=3]="CANCELED"}(VA||(VA={}));var GA=function(e){return e.SignMessage="signMessage",e.SignTransaction="signTransaction",e}({});const HA={code:4001,message:"Invalid method parameters"},KA={code:4002,message:"Invalid transaction format"},ZA={code:4100,message:"User rejected the request"},qA={code:5e3,message:"Unknown error with request"},JA=we(dr,/^tron:(728126428|3448148188|2494104990)\/slip44:195$/u),YA=we(dr,/^tron:(728126428|3448148188|2494104990)\/slip44:195-staked-for-(energy|bandwidth)$/u),XA=we(dr,/^tron:(728126428|3448148188|2494104990)\/slip44:(energy|bandwidth)$/u),QA=we(dr,/^tron:(728126428|3448148188|2494104990)\/slip44:maximum-(energy|bandwidth)$/u),ev=we(dr,/^tron:(728126428|3448148188|2494104990)\/(trc10|trc20):[a-zA-Z0-9]+$/u),tv=we(dr,/^tron:(728126428|3448148188|2494104990)\/trc721:[a-zA-Z0-9]+$/u),rv=we(J(),/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/u),nv=we(J(),/^(?!0\d)(\d+(\.\d+)?)$/u),ov=Te(J(),"safe-url",(e=>{try{const t=new URL(e),r=["http:","https:","wss:"];if(!r.includes(t.protocol))return`URL must use one of the following protocols: ${r.join(", ")}`;if(!e.match(/^(https?|wss):\/\/[^/]+\/?/u))return"Malformed URL - incorrect protocol format";const n=t.hostname.toLowerCase();if(!("localhost"===n||n.includes(".")&&/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/u.test(n)))return"Invalid hostname format";const o=decodeURIComponent(e.toLowerCase());if(e.includes("\\")||e.includes("@")||o.includes("\\")||o.includes("@")||e.toLowerCase().includes("%2f@")||e.toLowerCase().includes("%5c@"))return"URL contains protocol pollution attempts";const s=decodeURIComponent(n);if(n.includes("\\")||n.includes("@")||s.includes("/")||n.toLowerCase().includes("%2f"))return"Invalid hostname characters detected";if(e.includes("../")||e.includes("..%2f")||e.includes("..%2F"))return"Directory traversal attempts are not allowed";const a=[/<[^>]*>/u,/javascript:/u,/data:/u,/\\[@\\]/u,/%2f@/u,/[^\x20-\x7E]/u,/\$\{.*?\}/u,/#\{.*?\}/u,/[|;]/u,/%0[acd]|%0[acd]/u,/\/\/\w+@/u,/(?:[^a-z]|^)(?:union\s+(?:all\s+)?select|select\s+(?:.*\s+)?from|insert\s+into|update\s+.*\s+set|delete\s+from|drop\s+table|alter\s+table|create\s+table|exec(?:ute)?|union|where\s+[\d\w]\s*=\s*[\d\w]|\bor\b\s*[\d\w]\s*=\s*[\d\w])/iu,/'.*?(?:OR|UNION|SELECT|FROM|WHERE).*?'/iu,/%27.*?(?:OR|UNION|SELECT|FROM|WHERE).*?(?:%27|')/iu,/%20(?:OR|UNION|SELECT|FROM|WHERE)%20/iu,/[?&](?:url|redirect|next|return_to|return_url|goto|destination|continue|redirect_uri)=(?:[^&]*\/\/|https?:)/iu,/[?&](?:url|redirect|next|return_to|return_url|goto|destination|continue|redirect_uri)=%(?:[^&]*\/\/|https?:)/iu];for(const e of a)if(e.test(o))return"URL contains potentially malicious patterns";return!(t.port&&!/^\d+$/u.test(t.port))||"Invalid port number"}catch(e){return"Invalid URL format"}})),sv=H({accountId:rv}),av=H({accountId:rv}),iv=H({accountId:rv}),cv=H({accountId:rv,assets:U(dr)}),uv=H({accountId:rv,pagination:H({limit:$(),next:K(V(J()))})}),lv=L(Object.values(io)),dv=K(H({entropySource:K(J()),index:K($()),addressType:K(L([br.Eoa])),scope:K(lv),metamask:K(H({correlationId:K(J())}))})),fv=H({scopes:be(U(lv)),entropySource:J(),groupIndex:me(G(),0)}),pv=q(dr,H({amount:nv,unit:J()})),hv=(U(dr),L(Object.values(cn)),L(["btc","eth","ltc","bch","bnb","eos","xrp","xlm","link","dot","yfi","usd","aed","ars","aud","bdt","bhd","bmd","brl","cad","chf","clp","cny","czk","dkk","eur","gbp","gel","hkd","huf","idr","ils","inr","jpy","krw","kwd","lkr","mmk","mxn","myr","ngn","nok","nzd","php","pkr","pln","rub","sar","sek","sgd","thb","try","twd","uah","vef","vnd","zar","xdr","xag","xau","bits","sats"]),H({transaction:J(),scope:L(Object.values(io))}),H({value:V(nv)}),k("Base58",(e=>"string"!=typeof e?"Expected a string, but received: "+typeof e:!!/^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+$/u.test(e)||"Expected a Base58 encoded string, but received a string with invalid characters")),we(J(),/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)$/u)),gv=L(Object.values(io)),yv=we(J(),/^m\/44'\/195'/u),mv=(we(J(),/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$/u),k("TronAddress",(e=>{if("string"!=typeof e)return"Expected a string, but received: "+typeof e;return!!PT.isAddress(e)||"Invalid Tron address format"}))),bv=(Q([JA,YA,ev,tv,XA,QA]),H({address:mv,message:hv})),wv=H({signature:J()}),Tv=H({address:mv,transaction:H({rawDataHex:J(),type:J()})}),Av=H({method:z(GA.SignMessage),params:bv}),vv=H({method:z(GA.SignTransaction),params:Tv}),Pv=H({..._r.schema,scope:gv,request:Q([Av,vv])}),Ev=X({method:L(Object.values(GA)),params:q(J(),ee())}),Cv=we(J(),/^[a-zA-Z0-9]+:[a-zA-Z0-9]+:[a-zA-Z0-9]+$/u);function Bv(e){const{baseUrl:t,path:r,pathParams:n,queryParams:o,encodePathParams:s=!0}=e,a=function(e){if(!e||"string"!=typeof e)return"";const t=Ao(e);try{const e=new URL(t);return["http:","https:","wss:"].includes(e.protocol)?t.length>2048?"":t:""}catch{return""}}(t);if(""===a)throw new Error("Invalid URL format");R(a,ov);const i=r.replace(/\{(\w+)\}/gu,((e,t)=>{const r=n?.[t];if(void 0===r)throw new Error(`Path parameter ${t} is undefined`);const o=Ao(r);return s?encodeURIComponent(o):o})).replace(/^\/+/u,"").replace(/\/+/gu,"/").replace(/\/+$/u,""),c=a.endsWith("/")?a:`${a}/`,u=new URL(i,c);Object.entries(o??{}).filter((([e,t])=>void 0!==t)).filter((([e,t])=>null!==t)).forEach((([e,t])=>{if(t){const r=Ao(t);u.searchParams.append(e,r)}}));const l=u.toString();return R(l,ov),l}var Wv=function(e){return e.TransactionAdded="Transaction Added",e.TransactionRejected="Transaction Rejected",e.TransactionApproved="Transaction Approved",e.TransactionSubmitted="Transaction Submitted",e.TransactionFinalized="Transaction Finalized",e}({}),Sv=function(e){return e.SecurityAlertDetected="Security Alert Detected",e.SecurityScanCompleted="Security Scan Completed",e}({});const Iv=U(H({decimals:$(),assetId:ev,name:K(J()),symbol:K(J()),iconUrl:K(ov)})),_v={name:"UNKNOWN",symbol:"UNKNOWN",fungible:!0,iconUrl:"",units:[{name:"UNKNOWN",symbol:"UNKNOWN",decimals:9}]};class Ov{#Q;#ee;#te;#re;#ne;static supportedNetworks=[io.Mainnet,io.Nile,io.Shasta];constructor(e,t=globalThis.fetch,r=Re){this.#Q=t,this.#ee=r;const{tokenApi:n,staticApi:o}=e.get(),{baseUrl:s,chunkSize:a}=n;R(s,ov),this.#te=s,this.#re=a,this.#ne=o.baseUrl}async#oe(e){R(e,U(ev));const t=Bv({baseUrl:this.#te,path:"/v3/assets",queryParams:{assetIds:e.join(",")}}),r=await this.#Q(t);if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);const n=await r.json();return R(n,Iv),n}async getTokensMetadata(e){try{R(e,U(fe));const t=e.filter((e=>{if(wo.includes(e))return!1;const{chainId:t}=he(e);return Ov.supportedNetworks.includes(t)}));t.length!==e.length&&this.#ee.warn(`[TokenApiClient] Received some asset types that are either not supported by the Token API or are excluded resource/staked tokens. They will be ignored. Supported networks: ${Ov.supportedNetworks.join(", ")}`);const r=[];for(let e=0;e<t.length;e+=this.#re)r.push(t.slice(e,e+this.#re));const n=(await Promise.all(r.map((async e=>this.#oe(e))))).flat(),o=new Map;return e.forEach((e=>{const t=n.find((t=>t.assetId===e));if(!t)return this.#ee.warn(`No metadata for ${e}. Returning default values.`),void o.set(e,_v);const r=t.name??_v.name,s=t.symbol??_v.symbol,a=t.decimals??9,i={name:r,symbol:s,fungible:!0,iconUrl:t.iconUrl??Bv({baseUrl:this.#ne,path:"/api/v2/tokenIcons/assets/{assetType}.png",pathParams:{assetType:e.replace(/:/gu,"/")},encodePathParams:!1}),units:[{name:r,symbol:s,decimals:a}]};o.set(e,i)})),Object.fromEntries(o)}catch(e){throw this.#ee.error(e,"Error fetching token metadata"),e}}}const Rv=X({id:J(),owner_address:J(),name:J(),abbr:J(),total_supply:me(G(),0),trx_num:me(G(),0),num:me(G(),0),precision:me(G(),0),start_time:me(G(),0),end_time:me(G(),0),description:J(),url:J()}),Mv=X({freeNetUsed:K(me(G(),0)),freeNetLimit:K(me(G(),0)),NetLimit:K(me(G(),0)),TotalNetLimit:K(me(G(),0)),TotalNetWeight:K(me(G(),0)),tronPowerUsed:K(me(G(),0)),tronPowerLimit:K(me(G(),0)),EnergyUsed:K(me(G(),0)),EnergyLimit:K(me(G(),0)),TotalEnergyLimit:K(me(G(),0)),TotalEnergyWeight:K(me(G(),0))}),xv=X({energy_usage:K(me(G(),0)),energy_fee:K(me(G(),0)),origin_energy_usage:K(me(G(),0)),energy_usage_total:K(me(G(),0)),net_usage:K(me(G(),0)),net_fee:K(me(G(),0)),result:K(J()),energy_penalty_total:K(me(G(),0))}),Fv=X({address:J(),topics:U(J()),data:J()}),kv=X({hash:K(J()),caller_address:K(J()),transferTo_address:K(J()),callValueInfo:K(U(X({callValue:K(me(G(),0)),tokenId:K(J())}))),note:K(J()),rejected:K(D())}),Nv=X({id:K(J()),fee:K(me(G(),0)),blockNumber:K(me(G(),0)),blockTimeStamp:K(me(G(),0)),contractResult:K(U(J())),contract_address:K(J()),receipt:K(xv),log:K(U(Fv)),result:K(J()),resMessage:K(J()),withdraw_amount:K(me(G(),0)),unfreeze_amount:K(me(G(),0)),internal_transactions:K(U(kv)),withdraw_expire_amount:K(me(G(),0)),cancel_unfreezeV2_amount:K(q(J(),G()))}),Uv=X({num:me(G(),0)}),Dv=X({key:J(),value:K(G())}),Lv=X({chainParameter:U(Dv)}),$v=X({result:D(),message:K(J())}),zv=X({contract:U(X({parameter:X({value:X({data:J(),owner_address:J(),contract_address:J()}),type_url:J()}),type:J()})),ref_block_bytes:J(),ref_block_hash:J(),expiration:me(G(),0),timestamp:me(G(),0)}),jv=X({ret:U(X({ret:K(J())})),visible:D(),txID:J(),raw_data:zv,raw_data_hex:J()}),Vv=X({result:$v,energy_used:me(G(),0),constant_result:U(J()),energy_penalty:K(me(G(),0)),transaction:jv}),Gv=X({consume_user_resource_percent:K(me(G(),0)),origin_energy_limit:K(me(G(),0))});const Hv=X({address:J(),weight:G()}),Kv=X({keys:U(Hv),threshold:G(),permission_name:J(),operations:K(J()),id:K(G()),type:K(J())}),Zv=X({energy_window_optimized:K(D()),energy_window_size:K(G()),delegated_frozenV2_balance_for_energy:K(me(G(),0)),delegated_frozenV2_balance_for_bandwidth:K(me(G(),0))}),qv=X({amount:K(me(G(),0)),type:K(J())}),Jv=X({unfreeze_amount:me(G(),0),unfreeze_expire_time:me(G(),0),type:K(J())}),Yv=X({vote_address:J(),vote_count:me(G(),0)}),Xv=X({key:J(),value:G()}),Qv=X({owner_permission:K(Kv),account_resource:K(Zv),active_permission:K(U(Kv)),address:mv,create_time:K(me(G(),0)),latest_opration_time:K(me(G(),0)),frozenV2:K(U(qv)),unfrozenV2:K(U(Jv)),balance:K(me(G(),0)),assetV2:K(U(Xv)),trc20:K(U(q(J(),J()))),latest_consume_free_time:K(me(G(),0)),votes:K(U(Yv)),latest_withdraw_time:K(me(G(),0)),net_window_size:K(me(G(),0)),net_window_optimized:K(D())}),eP=X({contractRet:K(J()),fee:K(me(G(),0))}),tP=X({vote_address:J(),vote_count:me(G(),0)}),rP=X({owner_address:K(J()),to_address:K(J()),unfreeze_balance:K(me(G(),0)),votes:K(U(tP)),frozen_balance:K(me(G(),0)),data:K(J()),contract_address:K(J()),call_value:K(me(G(),0)),amount:K(me(G(),0)),asset_name:K(J())}),nP=X({value:rP,type_url:J()}),oP=X({parameter:nP,type:J()}),sP=X({_:G()}),aP=X({note:J(),rejected:D(),call_value:K(sP)}),iP=X({internal_tx_id:J(),data:aP,to_address:J(),from_address:J()}),cP=X({contract:U(oP),ref_block_bytes:J(),ref_block_hash:J(),expiration:me(G(),0),timestamp:me(G(),0),fee_limit:K(me(G(),0))}),uP=X({ret:K(U(eP)),signature:K(U(J())),txID:J(),net_usage:K(me(G(),0)),raw_data_hex:K(J()),net_fee:K(me(G(),0)),energy_usage:K(me(G(),0)),blockNumber:K(me(G(),0)),block_timestamp:K(me(G(),0)),energy_fee:K(me(G(),0)),energy_usage_total:K(me(G(),0)),raw_data:cP,internal_transactions:K(U(iP))}),lP=X({symbol:J(),address:J(),decimals:me(G(),0),name:J()}),dP=X({transaction_id:J(),token_info:lP,block_timestamp:me(G(),0),from:J(),to:J(),type:J(),value:J()}),fP=X({at:me(G(),0),page_size:me(G(),0)}),pP=(X({data:U(Qv),success:D(),meta:fP}),X({data:U(uP),success:D(),meta:fP}),X({data:U(dP),success:D(),meta:fP}),(e,t)=>`${e}:${t.map((e=>JSON.stringify(e))).join(":")}`);function hP(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)}const gP=(e,t)=>Object.hasOwnProperty.call(e,t);var yP;!function(e){e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date"}(yP=yP||(yP={}));var mP=r(282);const bP=e=>H(e);function wP({path:e,branch:t}){const r=e[e.length-1];return gP(t[t.length-2],r)}function TP(e){return new I({...e,type:`optional ${e.type}`,validator:(t,r)=>!wP(r)||e.validator(t,r),refiner:(t,r)=>!wP(r)||e.refiner(t,r)})}function AP(e){if(null===e||"boolean"==typeof e||"string"==typeof e)return!0;if("number"==typeof e&&Number.isFinite(e))return!0;if("object"==typeof e){let t=!0;if(Array.isArray(e)){for(let r=0;r<e.length;r++)if(!AP(e[r])){t=!1;break}return t}const r=Object.entries(e);for(let e=0;e<r.length;e++)if("string"!=typeof r[e][0]||!AP(r[e][1])){t=!1;break}return t}return!1}const vP=k("JSON",(e=>AP(e))),PP=yt(vP,Te(N(),"JSON",(e=>x(e,vP))),(e=>JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t})))));function EP(e){try{return function(e){M(e,PP)}(e),!0}catch{return!1}}const CP=z("2.0"),BP=V(Q([G(),J()])),WP=bP({code:$(),message:J(),data:TP(PP),stack:TP(J())}),SP=Q([q(J(),PP),U(PP)]);bP({id:BP,jsonrpc:CP,method:J(),params:TP(SP)}),bP({jsonrpc:CP,method:J(),params:TP(SP)});H({id:BP,jsonrpc:CP,result:K(ee()),error:K(WP)});const IP=bP({id:BP,jsonrpc:CP,result:PP}),_P=bP({id:BP,jsonrpc:CP,error:WP});Q([IP,_P]);const OP={invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},RP={userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901},MP={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}},xP=OP.internal,FP=(kP(xP),"Unspecified server error.");function kP(e,t="Unspecified error message. This is a bug, please report it."){if(function(e){return Number.isInteger(e)}(e)){const t=e.toString();if(gP(MP,t))return MP[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return FP}return t}function NP(e){return Array.isArray(e)?e.map((e=>EP(e)?e:hP(e)?UP(e):null)):hP(e)?UP(e):EP(e)?e:null}function UP(e){return Object.getOwnPropertyNames(e).reduce(((t,r)=>{const n=e[r];return EP(n)&&(t[r]=n),t}),{})}const DP=function(e){return e?.__esModule?e.default:e}(mP);class LP extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a non-empty string.');!function(e){return hP(e)&&gP(e,"cause")&&hP(e.cause)}(r)?super(t):(super(t,{cause:r.cause}),gP(this,"cause")||Object.assign(this,{cause:r.cause})),void 0!==r&&(this.data=r),this.code=e}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data,function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}}(this.data)&&(e.data.cause=NP(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return DP(this.serialize(),zP,2)}}class $P extends LP{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}function zP(e,t){if("[Circular]"!==t)return t}const jP=e=>sE(OP.parse,e),VP=e=>sE(OP.invalidRequest,e),GP=e=>sE(OP.invalidParams,e),HP=e=>sE(OP.methodNotFound,e),KP=e=>sE(OP.internal,e),ZP=e=>sE(OP.invalidInput,e),qP=e=>sE(OP.resourceNotFound,e),JP=e=>sE(OP.resourceUnavailable,e),YP=e=>sE(OP.transactionRejected,e),XP=e=>sE(OP.methodNotSupported,e),QP=e=>sE(OP.limitExceeded,e),eE=e=>aE(RP.userRejectedRequest,e),tE=e=>aE(RP.unauthorized,e),rE=e=>aE(RP.unsupportedMethod,e),nE=e=>aE(RP.disconnected,e),oE=e=>aE(RP.chainDisconnected,e);function sE(e,t){const[r,n]=iE(t);return new LP(e,r??kP(e),n)}function aE(e,t){const[r,n]=iE(t);return new $P(e,r??kP(e),n)}function iE(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t??void 0,r]}}return[]}const cE=(e,t)=>Object.hasOwnProperty.call(e,t);var uE;!function(e){e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date"}(uE=uE||(uE={}));const lE=e=>H(e);function dE({path:e,branch:t}){const r=e[e.length-1];return cE(t[t.length-2],r)}function fE(e){return new I({...e,type:`optional ${e.type}`,validator:(t,r)=>!dE(r)||e.validator(t,r),refiner:(t,r)=>!dE(r)||e.refiner(t,r)})}function pE(e){if(null===e||"boolean"==typeof e||"string"==typeof e)return!0;if("number"==typeof e&&Number.isFinite(e))return!0;if("object"==typeof e){let t=!0;if(Array.isArray(e)){for(let r=0;r<e.length;r++)if(!pE(e[r])){t=!1;break}return t}const r=Object.entries(e);for(let e=0;e<r.length;e++)if("string"!=typeof r[e][0]||!pE(r[e][1])){t=!1;break}return t}return!1}const hE=k("JSON",(e=>pE(e))),gE=yt(hE,Te(N(),"JSON",(e=>x(e,hE))),(e=>JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t})))));function yE(e){try{return function(e){M(e,gE)}(e),!0}catch{return!1}}const mE=z("2.0"),bE=V(Q([G(),J()])),wE=lE({code:$(),message:J(),data:fE(gE),stack:fE(J())}),TE=Q([q(J(),gE),U(gE)]);lE({id:bE,jsonrpc:mE,method:J(),params:fE(TE)}),lE({jsonrpc:mE,method:J(),params:fE(TE)});H({id:bE,jsonrpc:mE,result:K(ee()),error:K(wE)});const AE=lE({id:bE,jsonrpc:mE,result:gE}),vE=lE({id:bE,jsonrpc:mE,error:wE});Q([AE,vE]);function PE(e,t,r=null){return n=e,Boolean(n)&&"object"==typeof n&&!Array.isArray(n)&&cE(e,t)?e[t]:r;var n}function EE(e,t,r=String(e)){const n=PE(e,t);return"string"==typeof n?n:r}function CE(e){const t=PE(e,"data");return null!==t&&yE(t)&&!Array.isArray(t)?t:{}}class BE extends Error{#se;#ae;#o;#ie;constructor(e,t={}){const r=function(e){return EE(e,"message")}(e);super(r),this.#ae=r,this.#se=function(e){const t=PE(e,"code");return"number"==typeof t&&Number.isInteger(t)?t:-32603}(e);const n={...CE(e),...t};Object.keys(n).length>0&&(this.#o=n),this.#ie=super.stack}get name(){return"SnapError"}get code(){return this.#se}get message(){return this.#ae}get data(){return this.#o}get stack(){return this.#ie}toJSON(){return{code:-31002,message:"Snap Error",data:{cause:{code:this.code,message:this.message,stack:this.stack,...this.data?{data:this.data}:{}}}}}serialize(){return this.toJSON()}}function WE(e){return class extends BE{constructor(t,r){if("object"==typeof t){const r=e();return void super({code:r.code,message:r.message,data:t})}const n=e(t);super({code:n.code,message:n.message,data:r})}}}const SE=WE(KP),IE=WE(ZP),_E=WE(GP),OE=WE(VP),RE=WE(QP),ME=WE(HP),xE=WE(XP),FE=WE(jP),kE=WE(qP),NE=WE(JP),UE=WE(YP),DE=WE(oE),LE=WE(nE),$E=WE(tE),zE=WE(rE),jE=WE(eE),VE=BigInt(2**32-1),GE=BigInt(32);function HE(e,t=!1){return t?{h:Number(e&VE),l:Number(e>>GE&VE)}:{h:0|Number(e>>GE&VE),l:0|Number(e&VE)}}function KE(e,t=!1){const r=e.length;let n=new Uint32Array(r),o=new Uint32Array(r);for(let s=0;s<r;s++){const{h:r,l:a}=HE(e[s],t);[n[s],o[s]]=[r,a]}return[n,o]}const ZE=(e,t,r)=>e<<r|t>>>32-r,qE=(e,t,r)=>t<<r|e>>>32-r,JE=(e,t,r)=>t<<r-32|e>>>64-r,YE=(e,t,r)=>e<<r-32|t>>>64-r;function XE(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function QE(e,...t){if(!function(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function eC(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function tC(e,t){QE(e);const r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function rC(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function nC(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function oC(e,t){return e<<32-t|e>>>t}const sC=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];function aC(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const iC=sC?e=>e:function(e){for(let t=0;t<e.length;t++)e[t]=aC(e[t]);return e};Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function cC(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}function uC(e){return"string"==typeof e&&(e=cC(e)),QE(e),e}class lC{}function dC(e){const t=t=>e().update(uC(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}const fC=BigInt(0),pC=BigInt(1),hC=BigInt(2),gC=BigInt(7),yC=BigInt(256),mC=BigInt(113),bC=[],wC=[],TC=[];for(let e=0,t=pC,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],bC.push(2*(5*n+r)),wC.push((e+1)*(e+2)/2%64);let o=fC;for(let e=0;e<7;e++)t=(t<<pC^(t>>gC)*mC)%yC,t&hC&&(o^=pC<<(pC<<BigInt(e))-pC);TC.push(o)}const AC=KE(TC,!0),vC=AC[0],PC=AC[1],EC=(e,t,r)=>r>32?JE(e,t,r):ZE(e,t,r),CC=(e,t,r)=>r>32?YE(e,t,r):qE(e,t,r);class BC extends lC{constructor(e,t,r,n=!1,o=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=o,XE(r),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");var s;this.state=new Uint8Array(200),this.state32=(s=this.state,new Uint32Array(s.buffer,s.byteOffset,Math.floor(s.byteLength/4)))}clone(){return this._cloneInto()}keccak(){iC(this.state32),function(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,o=(t+2)%10,s=r[o],a=r[o+1],i=EC(s,a,1)^r[n],c=CC(s,a,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=i,e[t+r+1]^=c}let t=e[2],o=e[3];for(let r=0;r<24;r++){const n=wC[r],s=EC(t,o,n),a=CC(t,o,n),i=bC[r];t=e[i],o=e[i+1],e[i]=s,e[i+1]=a}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=vC[n],e[1]^=PC[n]}rC(r)}(this.state32,this.rounds),iC(this.state32),this.posOut=0,this.pos=0}update(e){eC(this),QE(e=uC(e));const{blockLen:t,state:r}=this,n=e.length;for(let o=0;o<n;){const s=Math.min(t-this.pos,n-o);for(let t=0;t<s;t++)r[this.pos++]^=e[o++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,128&t&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){eC(this,!1),QE(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,o=e.length;n<o;){this.posOut>=r&&this.keccak();const s=Math.min(r-this.posOut,o-n);e.set(t.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return XE(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(tC(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,rC(this.state)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:o,enableXOF:s}=this;return e||(e=new BC(t,r,n,s,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=r,e.outputLen=n,e.enableXOF=s,e.destroyed=this.destroyed,e}}const WC=(e,t,r)=>dC((()=>new BC(t,e,r))),SC=WC(1,136,32),{memoize:IC}=ge,_C=/^(?:0x)?[0-9a-f]+$/iu,OC=/^0x[0-9a-f]+$/iu,RC=/^0x[0-9a-f]{40}$/u,MC=/^0x[0-9a-fA-F]{40}$/u,xC=(we(J(),_C),we(J(),OC),we(J(),RC),we(J(),MC),e=>"string"==typeof e);function FC(e){return xC(e)&&MC.test(e)}function kC(e){v(function(e){return xC(e)&&_C.test(e)}(e),"Value must be a hexadecimal string.")}const NC=IC((function(e){v(FC(e),"Invalid hex address.");const t=LC(e).toLowerCase(),r=SC(t),{length:n}=t,o=new Array(n);for(let e=0;e<n;e++){const n=1&e,s=r[e>>1],a=0===n?s>>4:15&s;o[e]=a>=8?t[e].toUpperCase():t[e]}return`0x${o.join("")}`}));const UC=IC((function(e){return!!FC(e)&&NC(e)===e}));IC((function(e){return xC(t=e)&&RC.test(t)||UC(e);var t}));function DC(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`}function LC(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}r(1048).hp;const $C=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function zC(e){return e instanceof Uint8Array}function jC(e){v(zC(e),"Value must be a Uint8Array.")}function VC(e){if(jC(e),0===e.length)return"0x";const t=$C(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return DC(r.join(""))}function GC(e){if("0x"===e?.toLowerCase?.())return new Uint8Array;kC(e);const t=LC(e).toLowerCase(),r=t.length%2==0?t:`0${t}`,n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){const t=r.charCodeAt(2*e),o=r.charCodeAt(2*e+1),s=t-(t<58?48:87),a=o-(o<58?48:87);n[e]=16*s+a}return n}function HC(e,t,r){return e&t^~e&r}function KC(e,t,r){return e&t^e&r^t&r}class ZC extends lC{constructor(e,t,r,n){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(e),this.view=nC(this.buffer)}update(e){eC(this),QE(e=uC(e));const{view:t,buffer:r,blockLen:n}=this,o=e.length;for(let s=0;s<o;){const a=Math.min(n-this.pos,o-s);if(a!==n)r.set(e.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===n&&(this.process(t,0),this.pos=0);else{const t=nC(e);for(;n<=o-s;s+=n)this.process(t,s)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){eC(this),tC(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:n,isLE:o}=this;let{pos:s}=this;t[s++]=128,rC(this.buffer.subarray(s)),this.padOffset>n-s&&(this.process(r,0),s=0);for(let e=s;e<n;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const o=BigInt(32),s=BigInt(4294967295),a=Number(r>>o&s),i=Number(r&s),c=n?4:0,u=n?0:4;e.setUint32(t+c,a,n),e.setUint32(t+u,i,n)}(r,n-8,BigInt(8*this.length),o),this.process(r,0);const a=nC(e),i=this.outputLen;if(i%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=i/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)a.setUint32(4*e,u[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:o,destroyed:s,pos:a}=this;return e.destroyed=s,e.finished=o,e.length=n,e.pos=a,n%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}const qC=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),JC=(Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298])),YC=new Uint32Array(64);class XC extends ZC{constructor(e=32){super(64,e,8,!1),this.A=0|qC[0],this.B=0|qC[1],this.C=0|qC[2],this.D=0|qC[3],this.E=0|qC[4],this.F=0|qC[5],this.G=0|qC[6],this.H=0|qC[7]}get(){const{A:e,B:t,C:r,D:n,E:o,F:s,G:a,H:i}=this;return[e,t,r,n,o,s,a,i]}set(e,t,r,n,o,s,a,i){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|s,this.G=0|a,this.H=0|i}process(e,t){for(let r=0;r<16;r++,t+=4)YC[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=YC[e-15],r=YC[e-2],n=oC(t,7)^oC(t,18)^t>>>3,o=oC(r,17)^oC(r,19)^r>>>10;YC[e]=o+YC[e-7]+n+YC[e-16]|0}let{A:r,B:n,C:o,D:s,E:a,F:i,G:c,H:u}=this;for(let e=0;e<64;e++){const t=u+(oC(a,6)^oC(a,11)^oC(a,25))+HC(a,i,c)+JC[e]+YC[e]|0,l=(oC(r,2)^oC(r,13)^oC(r,22))+KC(r,n,o)|0;u=c,c=i,i=a,a=s+t|0,s=o,o=n,n=r,r=t+l|0}r=r+this.A|0,n=n+this.B|0,o=o+this.C|0,s=s+this.D|0,a=a+this.E|0,i=i+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(r,n,o,s,a,i,c,u)}roundClean(){rC(YC)}destroy(){this.set(0,0,0,0,0,0,0,0),rC(this.buffer)}}const QC=KE(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e))));QC[0],QC[1],new Uint32Array(80),new Uint32Array(80);Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);const eB=dC((()=>new XC));async function tB(e){return"crypto"in globalThis&&"object"==typeof globalThis.crypto&&globalThis.crypto.subtle?.digest?new Uint8Array(await globalThis.crypto.subtle.digest("SHA-256",e)):eB(e)}const rB=e=>no(e.toString()).multipliedBy(ao).integerValue(no.ROUND_DOWN).toFixed(0),nB=e=>no(e.toString()).dividedBy(ao),oB=(e,t)=>no(e.toString()).multipliedBy(no(10).pow(t)).integerValue(no.ROUND_DOWN).toFixed(0),sB=(e,t)=>no(e.toString()).dividedBy(no(10).pow(t));class aB{static createPendingTransaction({txId:e,account:t,scope:r}){const n=Math.floor(Date.now()/1e3);return{type:Fr.Unknown,id:e,from:[{address:t.address,asset:{unit:"TRX",type:`${r}/slip44:195`,amount:"0",fungible:!0}}],to:[{address:t.address,asset:{unit:"TRX",type:`${r}/slip44:195`,amount:"0",fungible:!0}}],events:[{status:xr.Unconfirmed,timestamp:n}],chain:r,status:xr.Unconfirmed,account:t.id,timestamp:n,fees:[]}}static createPendingSendTransaction({txId:e,account:t,scope:r,toAddress:n,amount:o,assetType:s,assetSymbol:a}){const i=Math.floor(Date.now()/1e3);return{type:Fr.Send,id:e,from:[{address:t.address,asset:{unit:a,type:s,amount:o,fungible:!0}}],to:[{address:n,asset:{unit:a,type:s,amount:o,fungible:!0}}],events:[{status:xr.Unconfirmed,timestamp:i}],chain:r,status:xr.Unconfirmed,account:t.id,timestamp:i,fees:[]}}static#ce(e,t){const r=[],{nativeToken:n,bandwidth:o,energy:s}=bo[e],a=t.ret.reduce(((e,t)=>e+(t.fee||0)),0),i=(e,t)=>{e>0&&r.push({type:"base",asset:{type:t.id,unit:t.symbol,amount:e.toString(),fungible:!0}})};return i(nB(a).toNumber(),n),i(t.net_usage,o),i(t.energy_usage,s),r}static#ue(e){const t=!e.blockNumber,r=e.ret?.[0]?.contractRet,n=r&&"SUCCESS"!==r;return t?xr.Unconfirmed:n?xr.Failed:xr.Confirmed}static#le({accountAddress:e,from:t,to:r,trc20Type:n}){return"Approval"===n?Fr.Unknown:t===e&&r===e?Fr.Swap:t===e?Fr.Send:r===e?Fr.Receive:Fr.Unknown}static#de(e){return PT.address.fromHex(e)}static#fe(e,t){const r=e.internal_transactions;if(!r||0===r.length)return!1;const n=PT.address.toHex(t).toLowerCase();return r.some((e=>{const t=e.caller_address?.toLowerCase(),r=e.transferTo_address?.toLowerCase(),o=e.callValueInfo?.some((e=>(e.callValue??0)>0));return o&&(t===n||r===n)}))}static#pe({scope:e,account:t,trongridTransaction:r}){const n=r.raw_data.contract[0].parameter.value,o=this.#de(n.owner_address),s=this.#de(n.to_address),a=this.#ue(r),i=a===xr.Unconfirmed?Math.floor(Date.now()/1e3):Math.floor(r.block_timestamp/1e3),c=n.amount,u=nB(c).toString(),l=aB.#ce(e,r),d=this.#le({accountAddress:t.address,from:o,to:s}),f=bo[e].nativeToken;return{type:d,id:r.txID,from:[{address:o,asset:{unit:f.symbol,type:f.id,amount:u,fungible:!0}}],to:[{address:s,asset:{unit:f.symbol,type:f.id,amount:u,fungible:!0}}],events:[{status:a,timestamp:i}],chain:e,status:a,account:t.id,timestamp:i,fees:l}}static#he({scope:e,account:t,trongridTransaction:r,trc10TokenMetadata:n}){const o=r.raw_data.contract[0].parameter.value,s=this.#de(o.owner_address),a=this.#de(o.to_address),i=this.#ue(r),c=i===xr.Unconfirmed?Math.floor(Date.now()/1e3):Math.floor(r.block_timestamp/1e3),u=o.asset_name,l=n?.get(u),d=l?.decimals??6,f=l?.symbol??"UNKNOWN",p=(o.amount/Math.pow(10,d)).toString(),h=aB.#ce(e,r);return{type:this.#le({accountAddress:t.address,from:s,to:a}),id:r.txID,from:[{address:s,asset:{unit:f,type:`${e}/trc10:${u}`,amount:p,fungible:!0}}],to:[{address:a,asset:{unit:f,type:`${e}/trc10:${u}`,amount:p,fungible:!0}}],events:[{status:i,timestamp:c}],chain:e,status:i,account:t.id,timestamp:c,fees:h}}static#ge({scope:e,account:t,trc20Transfer:r}){const{from:n,to:o,value:s,token_info:a,block_timestamp:i,transaction_id:c}=r,u=Math.pow(10,a.decimals),l=(parseFloat(s)/u).toString(),d=this.#le({accountAddress:t.address,from:n,to:o,trc20Type:r.type}),f=xr.Confirmed;return{type:d,id:c,from:[{address:n,asset:{unit:a.symbol,type:`${e}/trc20:${a.address}`,amount:l,fungible:!0}}],to:[{address:o,asset:{unit:a.symbol,type:`${e}/trc20:${a.address}`,amount:l,fungible:!0}}],events:[{status:f,timestamp:Math.floor(i/1e3)}],chain:e,status:f,account:t.id,timestamp:Math.floor(i/1e3),fees:[]}}static#ye({scope:e,account:t,trongridTransaction:r,sentTransfer:n,receivedTransfer:o}){const s=this.#ue(r),a=s===xr.Unconfirmed?Math.floor(Date.now()/1e3):Math.floor(r.block_timestamp/1e3),i=Math.pow(10,n.token_info.decimals),c=(parseFloat(n.value)/i).toString(),u=Math.pow(10,o.token_info.decimals),l=(parseFloat(o.value)/u).toString(),d=aB.#ce(e,r);return{type:Fr.Swap,id:r.txID,from:[{address:n.from,asset:{unit:n.token_info.symbol,type:`${e}/trc20:${n.token_info.address}`,amount:c,fungible:!0}}],to:[{address:o.to,asset:{unit:o.token_info.symbol,type:`${e}/trc20:${o.token_info.address}`,amount:l,fungible:!0}}],events:[{status:s,timestamp:a}],chain:e,status:s,account:t.id,timestamp:a,fees:d}}static#me({scope:e,account:t,trongridTransaction:r,trc20Transfer:n}){const o=this.#ue(r),s=o===xr.Unconfirmed?Math.floor(Date.now()/1e3):Math.floor(r.block_timestamp/1e3),a=Math.pow(10,n.token_info.decimals),i=(parseFloat(n.value)/a).toString(),c=r.raw_data.contract?.[0],u=c?.parameter?.value?.call_value;let l="0";if(u&&u>0)l=nB(u).toString();else{const e=r.internal_transactions??[],n=PT.address.toHex(t.address).toLowerCase();for(const t of e){const e=t.caller_address?.toLowerCase();if(e===n){const e=t.callValueInfo?.find((e=>e.callValue))?.callValue??0;if(e>0){l=nB(e).toString();break}}}if("0"===l&&e.length>0){let t=0;for(const r of e){t+=r.callValueInfo?.find((e=>e.callValue))?.callValue??0}t>0&&(l=nB(t).toString())}}const d=bo[e].nativeToken,f=aB.#ce(e,r);return{type:Fr.Swap,id:r.txID,from:[{address:t.address,asset:{unit:d.symbol,type:d.id,amount:l,fungible:!0}}],to:[{address:t.address,asset:{unit:n.token_info.symbol,type:`${e}/trc20:${n.token_info.address}`,amount:i,fungible:!0}}],events:[{status:o,timestamp:s}],chain:e,status:o,account:t.id,timestamp:s,fees:f}}static#be({scope:e,account:t,trongridTransaction:r,trc20Transfers:n=[]}){const o=this.#ue(r),s=r.raw_data.contract?.[0],a=s?.parameter?.value?.owner_address,i=s?.parameter?.value?.contract_address,c=s?.parameter?.value?.call_value;if(o===xr.Failed){if(!a)return null;const n=Math.floor(r.block_timestamp/1e3),s=aB.#ce(e,r);return{type:Fr.Unknown,id:r.txID,from:[],to:[],events:[{status:o,timestamp:n}],chain:e,status:o,account:t.id,timestamp:n,fees:s}}if(0===n.length&&c&&c>0){if(!a||!i)return null;const n=Math.floor(r.block_timestamp/1e3),s=nB(c).toString(),u=aB.#ce(e,r),l=bo[e].nativeToken;return{type:Fr.Send,id:r.txID,from:[{address:this.#de(a),asset:{unit:l.symbol,type:l.id,amount:s,fungible:!0}}],to:[{address:this.#de(i),asset:{unit:l.symbol,type:l.id,amount:s,fungible:!0}}],events:[{status:o,timestamp:n}],chain:e,status:o,account:t.id,timestamp:n,fees:u}}if(0===n.length&&(!c||0===c))return null;const u=n.find((e=>e.from===t.address)),l=n.find((e=>e.to===t.address)),d=u&&l&&u.token_info.address!==l.token_info.address;if(u&&l&&n.length>=2&&d)return this.#ye({scope:e,account:t,trongridTransaction:r,sentTransfer:u,receivedTransfer:l});const f=this.#fe(r,t.address),p=c&&c>0,h=r.internal_transactions&&r.internal_transactions.length>0&&r.internal_transactions.some((e=>e.callValueInfo?.some((e=>(e.callValue??0)>0))));if(l&&!u&&(f||p||h))return this.#me({scope:e,account:t,trongridTransaction:r,trc20Transfer:l});const g=n[0];if(!g)return null;const{from:y,to:m}=g,b=g.value,{decimals:w,address:T,symbol:A}=g.token_info,v=o===xr.Unconfirmed?Math.floor(Date.now()/1e3):Math.floor(g.block_timestamp/1e3),P=Math.pow(10,w),E=(parseFloat(b)/P).toString(),C=this.#le({accountAddress:t.address,from:y,to:m,trc20Type:g.type}),B=aB.#ce(e,r);return{type:C,id:g.transaction_id,from:[{address:y,asset:{unit:A,type:`${e}/trc20:${T}`,amount:E,fungible:!0}}],to:[{address:m,asset:{unit:A,type:`${e}/trc20:${T}`,amount:E,fungible:!0}}],events:[{status:o,timestamp:v}],chain:e,status:o,account:t.id,timestamp:v,fees:B}}static#we({scope:e,account:t,trongridTransaction:r}){const n=r.raw_data.contract[0],o=n?.parameter?.value;if(!o)return null;const s=o.owner_address;if(!s)return null;const a=PT.address.fromHex(s),i=Math.floor(r.block_timestamp/1e3),c=Number(o.frozen_balance??o.frozen_balance_v2)||0,u=nB(c).toString(),{resource:l}=o,d="ENERGY"===l;if(!d&&!("BANDWIDTH"===l))return null;const f=bo[e].nativeToken,p=d?bo[e].stakedForEnergy:bo[e].stakedForBandwidth,h=aB.#ce(e,r);return{type:Fr.StakeDeposit,id:r.txID,from:[{address:a,asset:{unit:f.symbol,type:f.id,amount:u,fungible:!0}}],to:[{address:a,asset:{unit:p.symbol,type:p.id,amount:u,fungible:!0}}],events:[{status:xr.Confirmed,timestamp:i}],chain:e,status:xr.Confirmed,account:t.id,timestamp:i,fees:h}}static#Te({scope:e,account:t,trongridTransaction:r}){const n=r.raw_data.contract[0],o=n?.parameter?.value;if(!o)return null;const s=o.owner_address;if(!s)return null;const a=PT.address.fromHex(s),i=Math.floor(r.block_timestamp/1e3),c=Number(o.unfreeze_balance)||0,u=nB(c).toString(),{resource:l}=o,d="ENERGY"===l;if(!d&&!("BANDWIDTH"===l))return null;const f=bo[e].nativeToken,p=d?bo[e].stakedForEnergy:bo[e].stakedForBandwidth,h=aB.#ce(e,r);return{type:Fr.StakeWithdraw,id:r.txID,from:[{address:a,asset:{unit:p.symbol,type:p.id,amount:u,fungible:!0}}],to:[{address:a,asset:{unit:f.symbol,type:f.id,amount:u,fungible:!0}}],events:[{status:xr.Confirmed,timestamp:i}],chain:e,status:xr.Confirmed,account:t.id,timestamp:i,fees:h}}static mapTransaction({scope:e,account:t,trongridTransaction:r,trc20Transfers:n=[],trc10TokenMetadata:o}){const s=r.raw_data.contract?.[0],a=s?.type;if(!s||!a)return null;switch(a){case"TransferContract":return this.#pe({scope:e,account:t,trongridTransaction:r});case"TransferAssetContract":return this.#he({scope:e,account:t,trongridTransaction:r,trc10TokenMetadata:o});case"FreezeBalanceV2Contract":case"FreezeBalanceContract":return this.#we({scope:e,account:t,trongridTransaction:r});case"UnfreezeBalanceV2Contract":case"UnfreezeBalanceContract":return this.#Te({scope:e,account:t,trongridTransaction:r});case"TriggerSmartContract":return this.#be({scope:e,account:t,trongridTransaction:r,trc20Transfers:n});default:return null}}static mapTransactions({scope:e,account:t,rawTransactions:r,trc20Transactions:n,trc10TokenMetadata:o}){const s=[],a=new Set,i=new Map;for(const e of n){const t=i.get(e.transaction_id)??[];t.push(e),i.set(e.transaction_id,t)}for(const n of r){const r=i.get(n.txID)??[],c=this.mapTransaction({scope:e,account:t,trongridTransaction:n,trc20Transfers:r,trc10TokenMetadata:o});c&&(s.push(c),a.add(n.txID))}for(const r of n)if(!a.has(r.transaction_id)){const n=this.#ge({scope:e,account:t,trc20Transfer:r});n&&(s.push(n),a.add(r.transaction_id))}return s}}function iB(e,t,r){try{R(e,t)}catch(e){throw r.cause=e,r}}function cB(e,t,r){if("string"==typeof e)throw new Error(`An HTML element ("${String(e)}") was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.`);if(!e)throw new Error("A JSX fragment was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.");return e({...t,key:r})}function uB(e,t,r){return cB(e,t,r)}function lB(e){return Object.fromEntries(Object.entries(e).filter((([,e])=>void 0!==e)))}function dB(e){return t=>{const{key:r=null,...n}=t;return{type:e,props:lB(n),key:r}}}const fB=dB("Container"),pB=dB("Box"),hB=dB("Heading"),gB=dB("Section"),yB=dB("Text"),mB=dB("Tooltip");var bB;!function(e){e.Accessibility="accessibility",e.Activity="activity",e.AddCard="add-card",e.AddCircle="add-circle",e.AddSquare="add-square",e.Add="add",e.Ai="ai",e.AlternateEmail="alternate-email",e.Apple="apple",e.Apps="apps",e.Arrow2Down="arrow-2-down",e.Arrow2Left="arrow-2-left",e.Arrow2Right="arrow-2-right",e.Arrow2UpRight="arrow-2-up-right",e.Arrow2Up="arrow-2-up",e.ArrowCircleDown="arrow-circle-down",e.ArrowCircleUp="arrow-circle-up",e.ArrowDoubleLeft="arrow-double-left",e.ArrowDoubleRight="arrow-double-right",e.ArrowDown="arrow-down",e.ArrowDropDownCircle="arrow-drop-down-circle",e.ArrowLeft="arrow-left",e.ArrowRight="arrow-right",e.ArrowUp="arrow-up",e.Attachment="attachment",e.Ban="ban",e.BankAssured="bank-assured",e.Bank="bank",e.Bold="bold",e.Book="book",e.Bookmark="bookmark",e.Bridge="bridge",e.Briefcase="briefcase",e.Bulb="bulb",e.BuySell="buy-sell",e.Cake="cake",e.Calculator="calculator",e.Calendar="calendar",e.Call="call",e.Camera="camera",e.Campaign="campaign",e.CardPos="card-pos",e.Card="card",e.Cash="cash",e.Category="category",e.Chart="chart",e.CheckBold="check-bold",e.Check="check",e.CircleX="circle-x",e.ClockFilled="clock-filled",e.Clock="clock",e.Close="close",e.CloudDownload="cloud-download",e.CloudUpload="cloud-upload",e.Cloud="cloud",e.CodeCircle="code-circle",e.Code="code",e.Coin="coin",e.Collapse="collapse",e.Confirmation="confirmation",e.Connect="connect",e.CopySuccess="copy-success",e.Copy="copy",e.CreditCheck="credit-check",e.CurrencyFranc="currency-franc",e.CurrencyLira="currency-lira",e.CurrencyPound="currency-pound",e.CurrencyYuan="currency-yuan",e.Customize="customize",e.Danger="danger",e.DarkFilled="dark-filled",e.Dark="dark",e.Data="data",e.Description="description",e.Details="details",e.Diagram="diagram",e.DocumentCode="document-code",e.Download="download",e.Draft="draft",e.EcoLeaf="eco-leaf",e.EditSquare="edit-square",e.Edit="edit",e.EncryptedAdd="encrypted-add",e.Eraser="eraser",e.Error="error",e.Ethereum="ethereum",e.Exchange="exchange",e.ExpandVertical="expand-vertical",e.Expand="expand",e.ExploreFilled="explore-filled",e.Explore="explore",e.Export="export",e.Extension="extension",e.EyeSlash="eye-slash",e.Eye="eye",e.FaceId="face-id",e.Feedback="feedback",e.File="file",e.Filter="filter",e.Fingerprint="fingerprint",e.Fire="fire",e.FirstPage="first-page",e.Flag="flag",e.FlashSlash="flash-slash",e.Flash="flash",e.Flask="flask",e.Flower="flower",e.Folder="folder",e.Forest="forest",e.FullCircle="full-circle",e.Gas="gas",e.Gift="gift",e.GlobalSearch="global-search",e.Global="global",e.Graph="graph",e.Hardware="hardware",e.HashTag="hash-tag",e.HeartFilled="heart-filled",e.Heart="heart",e.Hierarchy="hierarchy",e.HomeFilled="home-filled",e.Home="home",e.Image="image",e.Info="info",e.Inventory="inventory",e.Joystick="joystick",e.KeepFilled="keep-filled",e.Keep="keep",e.Key="key",e.LastPage="last-page",e.LightFilled="light-filled",e.Light="light",e.Link="link",e.Loading="loading",e.Location="location",e.LockSlash="lock-slash",e.Lock="lock",e.LockedFilled="locked-filled",e.Login="login",e.Logout="logout",e.Mail="mail",e.Map="map",e.Menu="menu",e.MessageQuestion="message-question",e.Messages="messages",e.Mic="mic",e.MinusBold="minus-bold",e.MinusSquare="minus-square",e.Minus="minus",e.Mobile="mobile",e.MoneyBag="money-bag",e.Money="money",e.Monitor="monitor",e.MoreHorizontal="more-horizontal",e.MoreVertical="more-vertical",e.MountainFlag="mountain-flag",e.MusicNote="music-note",e.Notification="notification",e.PageInfo="page-info",e.Palette="palette",e.PasswordCheck="password-check",e.Pending="pending",e.People="people",e.PersonCancel="person-cancel",e.Pin="pin",e.Plant="plant",e.Plug="plug",e.PlusAndMinus="plus-and-minus",e.PolicyAlert="policy-alert",e.Print="print",e.PriorityHigh="priority-high",e.PrivacyTip="privacy-tip",e.ProgrammingArrows="programming-arrows",e.Publish="publish",e.QrCode="qr-code",e.Question="question",e.Receive="receive",e.Received="received",e.Refresh="refresh",e.RemoveMinus="remove-minus",e.Report="report",e.Rocket="rocket",e.SaveFilled="save-filled",e.Save="save",e.Saving="saving",e.ScanBarcode="scan-barcode",e.ScanFocus="scan-focus",e.Scan="scan",e.Search="search",e.SecurityAlert="security-alert",e.SecurityCross="security-cross",e.SecurityKey="security-key",e.SecuritySearch="security-search",e.SecuritySlash="security-slash",e.SecurityTick="security-tick",e.SecurityTime="security-time",e.SecurityUser="security-user",e.Security="security",e.Send="send",e.SentimentDissatisfied="sentiment-dissatisfied",e.SentimentNeutral="sentiment-neutral",e.SentimentSatisfied="sentiment-satisfied",e.SentimentVerySatisfied="sentiment-very-satisfied",e.SettingFilled="setting-filled",e.Setting="setting",e.Share="share",e.ShieldLock="shield-lock",e.ShoppingBag="shopping-bag",e.ShoppingCart="shopping-cart",e.SignalCellular="signal-cellular",e.Slash="slash",e.Sms="sms",e.SnapsMobile="snaps-mobile",e.SnapsPlus="snaps-plus",e.SnapsRound="snaps-round",e.Snaps="snaps",e.SortByAlpha="sort-by-alpha",e.Sort="sort",e.Sparkle="sparkle",e.Speed="speed",e.Speedometer="speedometer",e.Square="square",e.Stake="stake",e.StarFilled="star-filled",e.Star="star",e.Start="start",e.Storefront="storefront",e.Student="student",e.SwapHorizontal="swap-horizontal",e.SwapVertical="swap-vertical",e.TabClose="tab-close",e.TableRow="table-row",e.Tablet="tablet",e.Tag="tag",e.ThumbDownFilled="thumb-down-filled",e.ThumbDown="thumb-down",e.ThumbUpFilled="thumb-up-filled",e.ThumbUp="thumb-up",e.Tint="tint",e.Tooltip="tooltip",e.Translate="translate",e.Trash="trash",e.TrendDown="trend-down",e.TrendUp="trend-up",e.TriangleUp="triangle-up",e.TriangleDown="triangle-down",e.Undo="undo",e.Unfold="unfold",e.UnlockedFilled="unlocked-filled",e.Unpin="unpin",e.UploadFile="upload-file",e.Upload="upload",e.Usb="usb",e.UserCheck="user-check",e.UserCircleAdd="user-circle-add",e.UserCircleRemove="user-circle-remove",e.UserCircle="user-circle",e.User="user",e.VerifiedFilled="verified-filled",e.Verified="verified",e.Videocam="videocam",e.ViewColumn="view-column",e.ViewInAr="view-in-ar",e.VolumeOff="volume-off",e.VolumeUp="volume-up",e.WalletFilled="wallet-filled",e.Wallet="wallet",e.Warning="warning",e.WebTraffic="web-traffic",e.Widgets="widgets",e.WifiOff="wifi-off",e.Wifi="wifi",e.X="x"}(bB||(bB={}));const wB=dB("Icon"),TB=dB("Address"),AB=dB("Image"),vB=dB("Footer"),PB=dB("Button");var EB=function(e){return e.Cancel="confirm-sign-transaction-cancel",e.Confirm="confirm-sign-transaction-confirm",e}({});function CB(e){return{"confirm-sign-transaction-cancel":async t=>async function(e,t){const{id:r}=t;await e.resolveInterface(r,!1)}(e,t),"confirm-sign-transaction-confirm":async t=>async function(e,t){const{id:r}=t;await e.resolveInterface(r,!0)}(e,t)}}const BB='<svg width="16" height="16" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="96" height="96" fill="#FF060A"/><g clip-path="url(#clip0_7875_4963)"><path d="M75.7883 36.0541C72.9706 33.4525 69.0729 29.4796 65.8984 26.662L65.7105 26.5305C65.398 26.2795 65.0456 26.0827 64.668 25.9482C57.0134 24.5206 21.3891 17.8616 20.6941 17.9461C20.4993 17.9734 20.3132 18.044 20.1493 18.1527L19.9709 18.2936C19.7512 18.5168 19.5843 18.7864 19.4825 19.0826L19.4355 19.2047V19.8715V19.9748C23.446 31.142 39.2811 67.7243 42.3993 76.3087C42.5871 76.891 42.944 77.9993 43.6109 78.0557H43.7611C44.118 78.0557 45.6396 76.0457 45.6396 76.0457C45.6396 76.0457 72.8391 43.0606 75.591 39.548C75.9472 39.1153 76.2617 38.6499 76.5302 38.1579C76.5988 37.7731 76.5665 37.377 76.4364 37.0083C76.3064 36.6396 76.0831 36.3109 75.7883 36.0541ZM52.6179 39.8955L64.2266 30.2686L71.0358 36.5425L52.6179 39.8955ZM48.1097 39.2662L28.1233 22.8864L60.4603 28.8504L48.1097 39.2662ZM49.913 43.5584L70.369 40.2618L46.9826 68.4381L49.913 43.5584ZM25.4089 24.5206L46.4379 42.3656L43.3948 68.4569L25.4089 24.5206Z" fill="white"/></g><defs><clipPath id="clip0_7875_4963"><rect width="60.1096" height="60.1096" fill="white" transform="translate(17.9453 17.9453)"/></clipPath></defs></svg>';function WB(e){if(!e)return"Unknown";if("metamask"===e.toLowerCase())return"MetaMask";try{return new URL(e).hostname}catch{return e}}const SB=JSON.parse('{"D":{"confirmation.transaction.title":{"message":"Transaction request"},"confirmation.estimatedChanges.title":{"message":"Estimated changes"},"confirmation.estimatedChanges.tooltip":{"message":"Estimated changes are what might happen if you go through with this transaction. This is just a prediction, not a guarantee."},"confirmation.estimatedChanges.send":{"message":"You send"},"confirmation.bandwidthConsumed":{"message":"Bandwidth consumed"},"confirmation.estimatedChanges.receive":{"message":"You receive"},"confirmation.origin":{"message":"Request from"},"confirmation.origin.tooltip":{"message":"This is the site asking for your confirmation."},"confirmation.from":{"message":"From"},"confirmation.to":{"message":"To"},"confirmation.network":{"message":"Network"},"confirmation.transactionFee":{"message":"Network fee"},"confirmation.confirmButton":{"message":"Confirm"},"confirmation.cancelButton":{"message":"Cancel"},"confirmation.signMessage.title":{"message":"Sign message"},"confirmation.signMessage.message":{"message":"Message"},"confirmation.account":{"message":"Account"},"confirmation.signTransaction.title":{"message":"Sign transaction"},"confirmation.estimatedChanges.notAvailable":{"message":"Estimated changes are not available"},"confirmation.estimatedChanges.noChanges":{"message":"No estimated changes"},"confirmation.simulationTitleAPIError":{"message":"Because of an error, we couldn\'t check for security alerts."},"confirmation.simulationMessageAPIError":{"message":"Only continue if you trust every address involved."},"confirmation.simulationErrorTitle":{"message":"This transaction was reverted during simulation."},"confirmation.simulationErrorSubtitle":{"message":"{reason}"},"confirmation.validationErrorTitle":{"message":"This is a deceptive request"},"confirmation.validationErrorSubtitle":{"message":"If you approve this request, a third party known for scams will take all your assets."},"confirmation.validationErrorLearnMore":{"message":"Learn more"},"confirmation.validationErrorSecurityAdviced":{"message":"Security advice by"},"transactionScan.errors.unknownError":{"message":"An unknown error occurred"},"transactionScan.errors.insufficientBalance":{"message":"Insufficient balance"},"transactionScan.errors.invalidTransaction":{"message":"Invalid transaction"},"transactionScan.errors.insufficientFunds":{"message":"Insufficient funds"},"transactionScan.errors.invalidAddress":{"message":"Invalid address"},"transactionScan.errors.unsupportedEIP712Message":{"message":"Unsupported method"}}}'),IB=JSON.parse('{"D":{"confirmation.transaction.title":{"message":"Solicitud de transacción"},"confirmation.estimatedChanges.title":{"message":"Cambios estimados"},"confirmation.estimatedChanges.tooltip":{"message":"Los cambios estimados son los que podrían producirse si sigue adelante con esta transacción. Esto es solo una predicción, no una garantía."},"confirmation.estimatedChanges.send":{"message":"Usted envía"},"confirmation.bandwidthConsumed":{"message":"Ancho de banda consumido"},"confirmation.estimatedChanges.receive":{"message":"Usted recibe"},"confirmation.origin":{"message":"Solicitud de"},"confirmation.origin.tooltip":{"message":"Este es el sitio que solicita su confirmación."},"confirmation.from":{"message":"De"},"confirmation.to":{"message":"A"},"confirmation.network":{"message":"Red"},"confirmation.transactionFee":{"message":"Tarifa de red"},"confirmation.confirmButton":{"message":"Confirmar"},"confirmation.cancelButton":{"message":"Cancelar"},"confirmation.signMessage.title":{"message":"Firmar mensaje"},"confirmation.signMessage.message":{"message":"Mensaje"},"confirmation.account":{"message":"Cuenta"},"confirmation.signTransaction.title":{"message":"Firmar transacción"},"confirmation.estimatedChanges.notAvailable":{"message":"Los cambios estimados no están disponibles"},"confirmation.estimatedChanges.noChanges":{"message":"Sin cambios estimados"},"confirmation.simulationTitleAPIError":{"message":"Debido a un error, no pudimos verificar alertas de seguridad."},"confirmation.simulationMessageAPIError":{"message":"Solo continúe si confía en cada dirección involucrada."},"confirmation.simulationErrorTitle":{"message":"Esta transacción se revirtió durante la simulación."},"confirmation.simulationErrorSubtitle":{"message":"{reason}"},"confirmation.validationErrorTitle":{"message":"Esta es una solicitud engañosa"},"confirmation.validationErrorSubtitle":{"message":"Si aprueba esta solicitud, un tercero conocido por estafas tomará todos sus activos."},"confirmation.validationErrorLearnMore":{"message":"Más información"},"confirmation.validationErrorSecurityAdviced":{"message":"Asesoramiento de seguridad por"},"transactionScan.errors.unknownError":{"message":"Ocurrió un error desconocido"},"transactionScan.errors.insufficientBalance":{"message":"Saldo insuficiente"},"transactionScan.errors.invalidTransaction":{"message":"Transacción inválida"},"transactionScan.errors.insufficientFunds":{"message":"Fondos insuficientes"},"transactionScan.errors.invalidAddress":{"message":"Dirección inválida"},"transactionScan.errors.unsupportedEIP712Message":{"message":"Método no compatible"}}}'),_B=JSON.parse('{"D":{"confirmation.transaction.title":{"message":"Demande de transaction"},"confirmation.estimatedChanges.title":{"message":"Changements estimés"},"confirmation.estimatedChanges.tooltip":{"message":"Les changements estimés représentent ce qui pourrait se produire si vous effectuez cette transaction. Il s’agit juste d’une estimation fournie à titre d’information."},"confirmation.estimatedChanges.send":{"message":"Vous envoyez"},"confirmation.bandwidthConsumed":{"message":"Bande passante utilisée"},"confirmation.estimatedChanges.receive":{"message":"Vous recevez"},"confirmation.origin":{"message":"Demande de la part de"},"confirmation.origin.tooltip":{"message":"Ceci est le site qui demande votre confirmation."},"confirmation.from":{"message":"De"},"confirmation.to":{"message":"À"},"confirmation.network":{"message":"Réseau"},"confirmation.transactionFee":{"message":"Frais de réseau"},"confirmation.confirmButton":{"message":"Confirmer"},"confirmation.cancelButton":{"message":"Annuler"},"confirmation.signMessage.title":{"message":"Signer le message"},"confirmation.signMessage.message":{"message":"Message"},"confirmation.account":{"message":"Compte"},"confirmation.signTransaction.title":{"message":"Signer la transaction"},"confirmation.estimatedChanges.notAvailable":{"message":"Les changements estimés ne sont pas disponibles"},"confirmation.estimatedChanges.noChanges":{"message":"Aucun changement estimé"},"confirmation.simulationTitleAPIError":{"message":"En raison d\'une erreur, nous n\'avons pas pu vérifier les alertes de sécurité."},"confirmation.simulationMessageAPIError":{"message":"Ne continuez que si vous faites confiance à chaque adresse impliquée."},"confirmation.simulationErrorTitle":{"message":"Cette transaction a été annulée lors de la simulation."},"confirmation.simulationErrorSubtitle":{"message":"{reason}"},"confirmation.validationErrorTitle":{"message":"Il s\'agit d\'une demande trompeuse"},"confirmation.validationErrorSubtitle":{"message":"Si vous approuvez cette demande, un tiers connu pour des escroqueries prendra tous vos actifs."},"confirmation.validationErrorLearnMore":{"message":"En savoir plus"},"confirmation.validationErrorSecurityAdviced":{"message":"Conseils de sécurité par"},"transactionScan.errors.unknownError":{"message":"Une erreur inconnue s\'est produite"},"transactionScan.errors.insufficientBalance":{"message":"Solde insuffisant"},"transactionScan.errors.invalidTransaction":{"message":"Transaction invalide"},"transactionScan.errors.insufficientFunds":{"message":"Fonds insuffisants"},"transactionScan.errors.invalidAddress":{"message":"Adresse invalide"},"transactionScan.errors.unsupportedEIP712Message":{"message":"Méthode non prise en charge"}}}'),OB={en:SB.D,es:IB.D,fr:_B.D};function RB(e){const t=OB[e]??OB.en;return(e,r)=>{let n=t?.[e]?.message??e;return r&&n&&Object.keys(r).forEach((e=>{const t=new RegExp(`\\{${e}\\}`,"gu");n=n.replace(t,r[e]??"")})),n}}const MB=dB("Skeleton"),xB=({preferences:e})=>{const t=RB(e.locale);return uB(gB,{direction:"vertical",children:[uB(pB,{direction:"horizontal",alignment:"start",children:[cB(yB,{fontWeight:"medium",children:t("confirmation.estimatedChanges.title")}),cB(mB,{content:t("confirmation.estimatedChanges.tooltip"),children:cB(wB,{name:"info"})})]}),uB(pB,{alignment:"space-between",direction:"horizontal",children:[cB(MB,{width:60}),cB(MB,{width:100})]})]})},FB=({preferences:e})=>{const t=RB(e.locale);return uB(pB,{direction:"horizontal",alignment:"start",children:[cB(yB,{fontWeight:"medium",children:t("confirmation.estimatedChanges.title")}),cB(mB,{content:t("confirmation.estimatedChanges.tooltip"),children:cB(wB,{name:"info"})})]})},kB=({asset:e,preferences:t})=>{const{locale:r}=t,n=e.value?.toLocaleString(r.replace("_","-"))??"0",o="out"===e.type;return uB(pB,{direction:"horizontal",alignment:"end",children:[e.logo?cB(AB,{src:e.logo,borderRadius:"full",height:16,width:16}):null,uB(yB,{color:o?"error":"success",children:[o?"-":"+",n," ",e.symbol]})]})},NB=({changes:e,preferences:t,scanFetchStatus:r})=>{const n=RB(t.locale),o="fetched"===r,s="error"===r;if("fetching"===r)return cB(xB,{preferences:t});if(s)return uB(gB,{direction:"vertical",children:[cB(FB,{preferences:t}),cB(yB,{color:"alternative",children:n("confirmation.estimatedChanges.notAvailable")})]});const a=e?.assets.filter((e=>"out"===e.type))??[],i=e?.assets.filter((e=>"in"===e.type))??[],c=a.length>0||i.length>0;return uB(gB,o&&!c?{direction:"vertical",children:[cB(FB,{preferences:t}),cB(yB,{color:"alternative",children:n("confirmation.estimatedChanges.noChanges")})]}:{children:[cB(FB,{preferences:t}),a?.length>0?uB(pB,{alignment:"space-between",direction:"horizontal",children:[cB(yB,{fontWeight:"medium",color:"alternative",children:n("confirmation.estimatedChanges.send")}),cB(pB,{children:a?.map((e=>cB(kB,{asset:e,preferences:t})))})]}):null,i?.length>0?uB(pB,{alignment:"space-between",direction:"horizontal",children:[cB(yB,{fontWeight:"medium",color:"alternative",children:n("confirmation.estimatedChanges.receive")}),cB(pB,{children:i?.map((e=>cB(kB,{asset:e,preferences:t})))})]}):null]})};const UB=e=>{const{caipId:t,symbol:r,amount:n,iconUrl:o,price:s,preferences:a,priceLoading:i}=e,c=a&&s?function(e,t,r){const n=new no(e).toNumber(),[o]=r.split("_");return n.toLocaleString(o,{style:"currency",currency:t,maximumFractionDigits:2,minimumFractionDigits:2})}((u=s,new no(n).multipliedBy(u).toString()),a.currency,a.locale):"";var u;const l=void 0!==a,d=l&&i,f=l&&!i&&c,p=t===co.BandwidthMainnet||t===co.BandwidthNile||t===co.BandwidthShasta,h=t===co.EnergyMainnet||t===co.EnergyNile||t===co.EnergyShasta,g=!p&&!h,y=o??'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="16" height="16">\n <path fill="#999999" d="M42.75 24c0 10.59375-8.53125 19.21875-19.125 19.21875-10.6875 0-19.21875-8.625-19.21875-19.21875 0-10.59375 8.53125-19.21875 19.21875-19.21875 10.59375 0 19.125 8.625 19.125 19.21875zM23.625 14.0625c-3.09375 0-5.90625 2.25-5.90625 5.4375 0 0.84375 0.75 1.59375 1.59375 1.59375 0.84375 0 1.59375-0.75 1.59375-1.59375 0-1.125 1.03125-2.25 2.71875-2.25 1.59375 0 2.625 1.125 2.625 2.25 0 0.5625-0.375 1.03125-1.3125 1.59375l0 0c-1.125 0.75-3 1.96875-3 4.5l0 0.46875c0 0.84375 0.75 1.59375 1.6875 1.59375 0.84375 0 1.59375-0.75 1.59375-1.59375l0-0.46875c0-0.65625 0.28125-1.125 1.40625-1.78125 1.03125-0.65625 2.8125-1.875 2.8125-4.3125 0-3.1875-2.8125-5.4375-5.8125-5.4375zM23.53125 31.875c-0.84375 0-1.59375 0.65625-1.59375 1.59375 0 0.84375 0.75 1.59375 1.59375 1.59375l0.09375 0c0.84375 0 1.59375-0.75 1.59375-1.59375 0-0.9375-0.75-1.59375-1.59375-1.59375z"/>\n</svg>';return uB(pB,{direction:"horizontal",alignment:"center",children:[d?cB(MB,{width:80}):null,f?cB(yB,{color:"muted",children:c}):null,uB(pB,{alignment:"center",center:!0,children:[p?cB(wB,{name:"connect",size:"md"}):null,h?cB(wB,{name:"flash",size:"md"}):null,g?cB(AB,{borderRadius:"full",src:y,height:16,width:16}):null]}),cB(yB,{children:`${n} ${r}`})]})},DB=({fees:e,preferences:t,tokenPrices:r={},tokenPricesFetchStatus:n="initial"})=>{const o=RB(t.locale),s="fetching"===n,a=[...e].sort(((e,t)=>{const r="TRX"===e.asset.unit,n="TRX"===t.asset.unit;return r&&!n?-1:!r&&n?1:0}));return cB(pB,{children:a.map(((e,n)=>{const a=r[e.asset.type]?.price??null;return uB(pB,{alignment:"space-between",direction:"horizontal",children:[0===n?cB(yB,{fontWeight:"medium",color:"alternative",children:o("confirmation.transactionFee")}):cB(pB,{children:null}),cB(UB,{caipId:e.asset.type,amount:e.asset.amount,symbol:e.asset.unit,iconUrl:e.asset.iconUrl,price:a,preferences:t,priceLoading:s})]},`${e.asset.type}-${e.asset.unit}-${n}`)}))})},LB=dB("Banner"),$B=dB("Link"),zB={GENERAL_INSUFFICIENT_FUNDS:"transactionScan.errors.insufficientFunds",GENERAL_INVALID_ADDRESS:"transactionScan.errors.invalidAddress",UNSUPPORTED_EIP712_MESSAGE:"transactionScan.errors.unsupportedEIP712Message"};function jB(e,t){const r=RB(t.locale),{code:n,type:o,message:s}=e,a=(n&&zB[n])??"transactionScan.errors.unknownError";if(s&&"transactionScan.errors.unknownError"===a)return s;try{return r(a)}catch{return o??n??"Unknown error"}}const VB={Malicious:"danger",Warning:"warning"},GB=({preferences:e,validation:t,error:r,scanFetchStatus:n})=>{const o=RB(e.locale);if("fetching"===n)return cB(pB,{children:cB(MB,{height:"40px"})});if("error"===n)return cB(LB,{title:o("confirmation.simulationTitleAPIError"),severity:"danger",children:cB(yB,{children:o("confirmation.simulationMessageAPIError")})});if(!r&&!t)return cB(pB,{children:null});if(r)return cB(LB,{title:o("confirmation.simulationErrorTitle"),severity:"warning",children:cB(yB,{children:o("confirmation.simulationErrorSubtitle",{reason:jB(r,e)})})});if(!t)return cB(pB,{children:null});const s=t?.type?VB[t.type]:void 0;return s?uB(LB,{title:o("confirmation.validationErrorTitle"),severity:s,children:[cB(yB,{children:o("confirmation.validationErrorSubtitle")}),cB(yB,{size:"sm",children:cB($B,{href:"https://support.metamask.io/configure/wallet/how-to-turn-on-security-alerts/",children:o("confirmation.validationErrorLearnMore")})}),uB(yB,{size:"sm",children:[cB(wB,{color:"primary",name:"security-tick"})," ",o("confirmation.validationErrorSecurityAdviced")," ",cB($B,{href:"https://www.blockaid.io",children:"Blockaid"})]})]}):cB(pB,{children:null})},HB=({context:e})=>{const t=RB(e.preferences.locale),{account:r,scope:n,origin:o,networkImage:s,preferences:a,scan:i,scanFetchStatus:c,fees:u,tokenPrices:l,tokenPricesFetchStatus:d}=e,f="fetching"===c||"ERROR"===i?.status,p=r?`${n}:${r.address}`:null;return uB(fB,{children:[uB(pB,{children:[a.useSecurityAlerts?cB(GB,{scanFetchStatus:c,validation:i?.validation??null,error:i?.error??null,preferences:a}):null,uB(pB,{alignment:"center",center:!0,children:[cB(pB,{children:null}),cB(hB,{size:"lg",children:t("confirmation.signTransaction.title")}),cB(pB,{children:null})]}),a.simulateOnChainActions?cB(NB,{scanFetchStatus:c,changes:i?.estimatedChanges??null,preferences:a}):null,uB(gB,{children:[o?uB(pB,{alignment:"space-between",direction:"horizontal",children:[uB(pB,{direction:"horizontal",alignment:"start",children:[cB(yB,{fontWeight:"medium",color:"alternative",children:t("confirmation.origin")}),cB(mB,{content:t("confirmation.origin.tooltip"),children:cB(wB,{name:"question",color:"muted"})})]}),cB(yB,{children:WB(o)})]}):null,uB(pB,{alignment:"space-between",direction:"horizontal",children:[cB(yB,{fontWeight:"medium",color:"alternative",children:t("confirmation.account")}),p?cB(TB,{address:p,truncate:!0,displayName:!0,avatar:!0}):null]}),uB(pB,{alignment:"space-between",direction:"horizontal",children:[cB(yB,{fontWeight:"medium",color:"alternative",children:t("confirmation.network")}),uB(pB,{direction:"horizontal",alignment:"end",children:[cB(AB,{borderRadius:"medium",src:s??BB,height:16,width:16}),cB(yB,{children:bo[n].name})]})]}),cB(pB,{children:null}),cB(DB,{fees:u,preferences:a,tokenPrices:l,tokenPricesFetchStatus:d})]})]}),uB(vB,{children:[cB(PB,{name:EB.Cancel,children:t("confirmation.cancelButton")}),cB(PB,{name:EB.Confirm,disabled:f,children:t("confirmation.confirmButton")})]})]})},KB="confirmSignTransaction";var ZB=function(e){return e.Cancel="confirm-sign-and-send-transaction-cancel",e.Confirm="confirm-sign-and-send-transaction-confirm",e}({});function qB(e){return{"confirm-sign-and-send-transaction-cancel":async t=>async function(e,t){const{id:r}=t;await e.resolveInterface(r,!1)}(e,t),"confirm-sign-and-send-transaction-confirm":async t=>async function(e,t){const{id:r}=t;await e.resolveInterface(r,!0)}(e,t)}}function JB(e,t,r){return Bv({baseUrl:{[io.Mainnet]:"https://tronscan.org",[io.Nile]:"https://nile.tronscan.org",[io.Shasta]:"https://shasta.tronscan.org"}[e],path:`/#/${t}/${r}`})}const YB=({context:{origin:e,scope:t,fromAddress:r,toAddress:n,asset:o,amount:s,fees:a,preferences:i,networkImage:c,tokenPrices:u,tokenPricesFetchStatus:l}})=>{const d=RB(i.locale),f=u[o.assetType]?.price??null,p="fetching"===l;return uB(fB,{children:[uB(pB,{children:[uB(pB,{alignment:"center",center:!0,children:[cB(pB,{children:null}),cB(hB,{size:"lg",children:d("confirmation.transaction.title")}),cB(pB,{children:null})]}),uB(gB,{children:[uB(pB,{direction:"horizontal",center:!0,children:[cB(yB,{fontWeight:"medium",children:d("confirmation.estimatedChanges.title")}),cB(mB,{content:d("confirmation.estimatedChanges.tooltip"),children:cB(wB,{name:"info"})})]}),uB(pB,{alignment:"space-between",direction:"horizontal",children:[cB(pB,{alignment:"space-between",direction:"horizontal",center:!0,children:cB(yB,{fontWeight:"medium",color:"alternative",children:d("confirmation.estimatedChanges.send")})}),cB(UB,{caipId:o.assetType,amount:s??"",symbol:o.symbol,iconUrl:o.iconUrl,price:f,preferences:i,priceLoading:p})]})]}),uB(gB,{children:[uB(pB,{alignment:"space-between",direction:"horizontal",children:[uB(pB,{alignment:"space-between",direction:"horizontal",center:!0,children:[cB(yB,{fontWeight:"medium",color:"alternative",children:d("confirmation.origin")}),cB(mB,{content:d("confirmation.origin.tooltip"),children:cB(wB,{name:"question",color:"muted"})})]}),cB(yB,{children:e})]}),cB(pB,{children:null}),uB(pB,{alignment:"space-between",direction:"horizontal",children:[cB(yB,{fontWeight:"medium",color:"alternative",children:d("confirmation.from")}),cB($B,{href:JB(t,"address",r??""),children:cB(TB,{address:`${t}:${r}`,truncate:!0,displayName:!0,avatar:!0})})]}),cB(pB,{children:null}),n&&uB(pB,{alignment:"space-between",direction:"horizontal",children:[cB(yB,{fontWeight:"medium",color:"alternative",children:d("confirmation.to")}),cB($B,{href:JB(t,"address",n??""),children:cB(TB,{address:`${t}:${n}`,truncate:!0,displayName:!0,avatar:!0})})]}),cB(pB,{children:null}),uB(pB,{alignment:"space-between",direction:"horizontal",children:[cB(yB,{fontWeight:"medium",color:"alternative",children:d("confirmation.network")}),uB(pB,{direction:"horizontal",alignment:"center",children:[cB(pB,{alignment:"center",center:!0,children:cB(AB,{borderRadius:"medium",src:c??BB,height:16,width:16})}),cB(yB,{children:bo[t].name})]})]}),cB(pB,{children:null}),cB(DB,{fees:a,preferences:i,tokenPrices:u,tokenPricesFetchStatus:l})]})]}),uB(vB,{children:[cB(PB,{name:ZB.Cancel,children:d("confirmation.cancelButton")}),cB(PB,{name:ZB.Confirm,children:d("confirmation.confirmButton")})]})]})},XB="confirmTransaction";!function(e){e.ContinuouslySynchronizeSelectedAccounts="onSynchronizeSelectedAccountsCronjob"}({});var QB=function(e){return e.SynchronizeSelectedAccounts="onSynchronizeSelectedAccounts",e.SynchronizeAccounts="onSynchronizeAccounts",e.SynchronizeAccount="onSynchronizeAccount",e.SynchronizeAccountTransactions="onSynchronizeAccountTransactions",e.RefreshConfirmationPrices="refreshConfirmationPrices",e.RefreshSignTransaction="refreshSignTransaction",e.TrackTransaction="onTrackTransaction",e}({});var eW=function(e){return e.SignAndSendTransaction="signAndSendTransaction",e.ConfirmSend="confirmSend",e.ComputeFee="computeFee",e.OnAddressInput="onAddressInput",e.OnAmountInput="onAmountInput",e.ComputeStakeFee="computeStakeFee",e.OnStakeAmountInput="onStakeAmountInput",e.ConfirmStake="confirmStake",e.OnUnstakeAmountInput="onUnstakeAmountInput",e.ConfirmUnstake="confirmUnstake",e.SignRewardsMessage="signRewardsMessage",e}({}),tW=function(e){return e.Required="Required",e.Invalid="Invalid",e.InsufficientBalance="InsufficientBalance",e.InsufficientBalanceToCoverFee="InsufficientBalanceToCoverFee",e}({});function rW(e){return k(JSON.stringify(e),z(e).validator)}var nW=r(1048).hp;const oW=H({transaction:hv,accountId:rv,scope:gv,options:H({visible:K(D()),type:J()})}),sW=H({jsonrpc:mE,id:bE,method:rW(eW.SignAndSendTransaction),params:oW}),aW=H({fromAccountId:rv,toAddress:mv,amount:nv,assetId:fe}),iW=H({jsonrpc:mE,id:bE,method:rW(eW.ConfirmSend),params:aW}),cW=H({value:mv}),uW=H({jsonrpc:mE,id:bE,method:rW(eW.OnAddressInput),params:cW}),lW=H({accountId:rv,assetId:fe,value:nv}),dW=H({jsonrpc:mE,id:bE,method:rW(eW.OnAmountInput),params:lW}),fW=(H({valid:D(),errors:U(H({code:L(Object.values(tW))}))}),H({transaction:hv,accountId:rv,scope:gv,options:H({visible:K(D()),type:J(),feeLimit:K(G())})})),pW=H({accountId:rv,assetId:JA,value:nv}),hW=H({jsonrpc:mE,id:bE,method:rW(eW.OnStakeAmountInput),params:pW}),gW=H({fromAccountId:rv,assetId:JA,value:nv,options:H({purpose:L(["ENERGY","BANDWIDTH"]),srNodeAddress:K(mv)})}),yW=H({jsonrpc:mE,id:bE,method:rW(eW.ConfirmStake),params:gW}),mW=H({jsonrpc:mE,id:bE,method:rW(eW.ComputeFee),params:fW}),bW=U(H({type:L(Object.values(Rr)),asset:Cr})),wW=H({fromAccountId:rv,value:nv,options:H({purpose:L(["ENERGY","BANDWIDTH"])})}),TW=H({jsonrpc:mE,id:bE,method:rW(eW.ComputeStakeFee),params:wW}),AW=H({accountId:rv,assetId:JA,options:H({purpose:L(["ENERGY","BANDWIDTH"])}),value:nv}),vW=H({jsonrpc:mE,id:bE,method:rW(eW.OnUnstakeAmountInput),params:AW}),PW=H({accountId:rv,assetId:JA,options:H({purpose:L(["ENERGY","BANDWIDTH"])}),value:nv}),EW=H({jsonrpc:mE,id:bE,method:rW(eW.ConfirmUnstake),params:PW});function CW(e){const t=nW.from(e,"base64").toString("utf8");if(!t.startsWith("rewards,"))throw new Error('Message must start with "rewards,"');const r=t.split(",");if(3!==r.length)throw new Error("Message must have exactly 3 parts: rewards,{address},{timestamp}");const[n,o,s]=r;if("rewards"!==n)throw new Error('Message must start with "rewards"');if(!x(o,mv))throw new Error("Invalid Tron address");if(!x(s,nv))throw new Error("Invalid timestamp format");if(s.includes("."))throw new Error("Invalid timestamp");const a=parseInt(s,10);if(a<=0)throw new Error("Invalid timestamp");return{address:o,timestamp:a}}const BW=Te(hv,"RewardsMessage",(e=>{try{return CW(e),!0}catch(e){return e instanceof Error?e.message:"Invalid rewards message"}})),WW=H({accountId:rv,message:BW}),SW=H({jsonrpc:mE,id:bE,method:rW(eW.SignRewardsMessage),params:WW});var IW,_W=r(1048).hp;class OW extends Error{constructor(e){super(`Method not supported: ${e}`)}}async function RW(e,t){try{return await async function(e,t){switch(R(t,_t),t.method){case`${mn.ListAccounts}`:return R(t,wn),e.listAccounts();case`${mn.GetAccount}`:return R(t,Tn),e.getAccount(t.params.id);case`${mn.CreateAccount}`:return R(t,An),e.createAccount(t.params.options);case`${mn.DiscoverAccounts}`:if(void 0===e.discoverAccounts)throw new OW(t.method);return R(t,Pn),e.discoverAccounts(t.params.scopes,t.params.entropySource,t.params.groupIndex);case`${mn.ListAccountTransactions}`:if(void 0===e.listAccountTransactions)throw new OW(t.method);return R(t,En),e.listAccountTransactions(t.params.id,t.params.pagination);case`${mn.ListAccountAssets}`:if(void 0===e.listAccountAssets)throw new OW(t.method);return R(t,Cn),e.listAccountAssets(t.params.id);case`${mn.GetAccountBalances}`:if(void 0===e.getAccountBalances)throw new OW(t.method);return R(t,Wn),e.getAccountBalances(t.params.id,t.params.assets);case`${mn.ResolveAccountAddress}`:if(void 0===e.resolveAccountAddress)throw new OW(t.method);return R(t,Sn),e.resolveAccountAddress(t.params.scope,t.params.request);case`${mn.SetSelectedAccounts}`:if(void 0===e.setSelectedAccounts)throw new OW(t.method);return R(t,vn),e.setSelectedAccounts(t.params.accounts);case`${mn.FilterAccountChains}`:return R(t,In),e.filterAccountChains(t.params.id,t.params.chains);case`${mn.UpdateAccount}`:return R(t,_n),e.updateAccount(t.params.account);case`${mn.DeleteAccount}`:return R(t,On),e.deleteAccount(t.params.id);case`${mn.ExportAccount}`:if(void 0===e.exportAccount)throw new OW(t.method);return R(t,Rn),e.exportAccount(t.params.id);case`${mn.ListRequests}`:if(void 0===e.listRequests)throw new OW(t.method);return R(t,Mn),e.listRequests();case`${mn.GetRequest}`:if(void 0===e.getRequest)throw new OW(t.method);return R(t,xn),e.getRequest(t.params.id);case`${mn.SubmitRequest}`:return R(t,Fn),e.submitRequest(t.params);case`${mn.ApproveRequest}`:if(void 0===e.approveRequest)throw new OW(t.method);return R(t,kn),e.approveRequest(t.params.id,t.params.data);case`${mn.RejectRequest}`:if(void 0===e.rejectRequest)throw new OW(t.method);return R(t,Nn),e.rejectRequest(t.params.id);default:throw new OW(t.method)}}(e,t)}catch(e){const t=e instanceof Error&&"string"==typeof e.message?e.message:"An unknown error occurred while handling the keyring request";throw new Error(t)}}!function(e){e.GetSelectedAccounts="getSelectedAccounts"}(IW||(IW={}));H({method:z(IW.GetSelectedAccounts)});const MW=U(J());async function xW(e,t,r){await e.request({method:"snap_manageAccounts",params:{method:t,params:{...r}}})}async function FW(e){const t=await e.request({method:"snap_manageAccounts",params:{method:IW.GetSelectedAccounts}});return R(t,MW),t}function kW(e){const{id:t,address:r,type:n,options:o,methods:s,scopes:a}=e;return{id:t,address:r,type:n,options:o,methods:s,scopes:a}}function NW(e){return[BE,ME,jE,xE,ME,FE,kE,NE,UE,DE,LE,$E,zE,SE,IE,_E,OE,RE].some((t=>e instanceof t))}const UW=async e=>{try{return await e()}catch(e){const t=NW(e)?e:new BE(e);throw Re.error({error:t},`[SnapError] ${JSON.stringify(t.toJSON(),null,2)}`),t}};(function(e){e.OnStart="onStart",e.OnInstall="onInstall",e.OnUpdate="onUpdate"})({}),function(e){e.ComputeFee="computeFee"}({});const DW=["https://portfolio.metamask.io"],LW=new Set([]),$W=new Set([mn.ListAccounts,mn.GetAccount,mn.CreateAccount,mn.DeleteAccount,mn.DiscoverAccounts,mn.GetAccountBalances,mn.SubmitRequest,mn.ListAccountTransactions,mn.ListAccountAssets,mn.ResolveAccountAddress,mn.SetSelectedAccounts]),zW=new Map([]);for(const e of DW)zW.set(e,LW);zW.set("metamask",$W);const jW=(e,t)=>{if(!e)throw new $E("Origin not found");if(!zW.get(e)?.has(t))throw new $E("Permission denied")};function VW(e,t){try{R(e,t)}catch(e){throw new _E(e.message)}}function GW(e,t){try{R(e,t)}catch{throw new BE("Invalid Response")}}var HW=function(e){return e.Cancel="confirm-sign-message-cancel",e.Confirm="confirm-sign-message-confirm",e}({});function KW(e){return{"confirm-sign-message-cancel":async t=>async function(e,t){const{id:r}=t;await e.resolveInterface(r,!1)}(e,t),"confirm-sign-message-confirm":async t=>async function(e,t){const{id:r}=t;await e.resolveInterface(r,!0)}(e,t)}}function ZW(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function qW(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function JW(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function YW(e,t){qW(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const XW=BigInt(2**32-1),QW=BigInt(32);function eS(e,t=!1){return t?{h:Number(e&XW),l:Number(e>>QW&XW)}:{h:0|Number(e>>QW&XW),l:0|Number(e&XW)}}function tS(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:s,l:a}=eS(e[o],t);[r[o],n[o]]=[s,a]}return[r,n]}const rS=(e,t,r)=>e<<r|t>>>32-r,nS=(e,t,r)=>t<<r|e>>>32-r,oS=(e,t,r)=>t<<r-32|e>>>64-r,sS=(e,t,r)=>e<<r-32|t>>>64-r;const aS=e=>e instanceof Uint8Array;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function iS(e){if("string"==typeof e&&(e=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}(e)),!aS(e))throw new Error("expected Uint8Array, got "+typeof e);return e}class cS{clone(){return this._cloneInto()}}const[uS,lS,dS]=[[],[],[]],fS=BigInt(0),pS=BigInt(1),hS=BigInt(2),gS=BigInt(7),yS=BigInt(256),mS=BigInt(113);for(let e=0,t=pS,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],uS.push(2*(5*n+r)),lS.push((e+1)*(e+2)/2%64);let o=fS;for(let e=0;e<7;e++)t=(t<<pS^(t>>gS)*mS)%yS,t&hS&&(o^=pS<<(pS<<BigInt(e))-pS);dS.push(o)}const[bS,wS]=tS(dS,!0),TS=(e,t,r)=>r>32?oS(e,t,r):rS(e,t,r),AS=(e,t,r)=>r>32?sS(e,t,r):nS(e,t,r);class vS extends cS{constructor(e,t,r,n=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,ZW(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var s;this.state=new Uint8Array(200),this.state32=(s=this.state,new Uint32Array(s.buffer,s.byteOffset,Math.floor(s.byteLength/4)))}keccak(){!function(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,o=(t+2)%10,s=r[o],a=r[o+1],i=TS(s,a,1)^r[n],c=AS(s,a,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=i,e[t+r+1]^=c}let t=e[2],o=e[3];for(let r=0;r<24;r++){const n=lS[r],s=TS(t,o,n),a=AS(t,o,n),i=uS[r];t=e[i],o=e[i+1],e[i]=s,e[i+1]=a}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=bS[n],e[1]^=wS[n]}r.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){JW(this);const{blockLen:t,state:r}=this,n=(e=iS(e)).length;for(let o=0;o<n;){const s=Math.min(t-this.pos,n-o);for(let t=0;t<s;t++)r[this.pos++]^=e[o++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,128&t&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){JW(this,!1),qW(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,o=e.length;n<o;){this.posOut>=r&&this.keccak();const s=Math.min(r-this.posOut,o-n);e.set(t.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return ZW(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(YW(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:o,enableXOF:s}=this;return e||(e=new vS(t,r,n,s,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=r,e.outputLen=n,e.enableXOF=s,e.destroyed=this.destroyed,e}}const PS=(e,t,r)=>function(e){const t=t=>e().update(iS(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}((()=>new vS(t,e,r))),ES=PS(1,136,32);function CS(e,t,r){const n=t.split("|").map((e=>e.trim()));for(let r=0;r<n.length;r++)switch(t){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof e===t)return}const o=new Error(`invalid value for type ${t}`);throw o.code="INVALID_ARGUMENT",o.argument=`value.${r}`,o.value=e,o}function BS(e,t,r){for(let n in t){let o=t[n];const s=r?r[n]:null;s&&CS(o,s,n),Object.defineProperty(e,n,{enumerable:!0,value:o,writable:!1})}}function WS(e,t){if(null==e)return"null";if(null==t&&(t=new Set),"object"==typeof e){if(t.has(e))return"[Circular]";t.add(e)}if(Array.isArray(e))return"[ "+e.map((e=>WS(e,t))).join(", ")+" ]";if(e instanceof Uint8Array){const t="0123456789abcdef";let r="0x";for(let n=0;n<e.length;n++)r+=t[e[n]>>4],r+=t[15&e[n]];return r}if("object"==typeof e&&"function"==typeof e.toJSON)return WS(e.toJSON(),t);switch(typeof e){case"boolean":case"number":case"symbol":return e.toString();case"bigint":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const r=Object.keys(e);return r.sort(),"{ "+r.map((r=>`${WS(r,t)}: ${WS(e[r],t)}`)).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function SS(e,t,r,n){if(!e)throw function(e,t,r){let n,o=e;{const n=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${WS(r)}`);for(const e in r){if("shortMessage"===e)continue;const t=r[e];n.push(e+"="+WS(t))}}n.push(`code=${t}`),n.push("version=6.15.0"),n.length&&(e+=" ("+n.join(", ")+")")}switch(t){case"INVALID_ARGUMENT":n=new TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":n=new RangeError(e);break;default:n=new Error(e)}return BS(n,{code:t}),r&&Object.assign(n,r),null==n.shortMessage&&BS(n,{shortMessage:o}),n}(t,r,n)}function IS(e,t,r,n){SS(e,t,"INVALID_ARGUMENT",{argument:r,value:n})}["NFD","NFC","NFKD","NFKC"].reduce(((e,t)=>{try{if("test"!=="test".normalize(t))throw new Error("bad");if("NFD"===t){const e=String.fromCharCode(233).normalize("NFD");if(e!==String.fromCharCode(101,769))throw new Error("broken")}e.push(t)}catch(e){}return e}),[]);function _S(e,t,r){if(e instanceof Uint8Array)return r?new Uint8Array(e):e;if("string"==typeof e&&e.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const t=new Uint8Array((e.length-2)/2);let r=2;for(let n=0;n<t.length;n++)t[n]=parseInt(e.substring(r,r+2),16),r+=2;return t}IS(!1,"invalid BytesLike value",t||"value",e)}function OS(e,t){return _S(e,t,!1)}function RS(e,t){return _S(e,t,!0)}function MS(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&(("number"!=typeof t||e.length===2+2*t)&&(!0!==t||e.length%2==0))}const xS="0123456789abcdef";function FS(e){const t=OS(e);let r="0x";for(let e=0;e<t.length;e++){const n=t[e];r+=xS[(240&n)>>4]+xS[15&n]}return r}function kS(e){return"0x"+e.map((e=>FS(e).substring(2))).join("")}function NS(e){return MS(e,!0)?(e.length-2)/2:OS(e).length}function US(e,t,r){const n=OS(e);SS(t>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:t,offset:t+1});const o=new Uint8Array(t);return o.fill(0),r?o.set(n,t-n.length):o.set(n,0),FS(o)}let DS=!1;const LS=function(e){return ES(e)};let $S=LS;function zS(e){const t=OS(e,"data");return FS($S(t))}zS._=LS,zS.lock=function(){DS=!0},zS.register=function(e){if(DS)throw new TypeError("keccak256 is locked");$S=e},Object.freeze(zS);const jS=BigInt(0),VS=BigInt(36);function GS(e){const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const n=OS(zS(r));for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const HS={};for(let e=0;e<10;e++)HS[String(e)]=String(e);for(let e=0;e<26;e++)HS[String.fromCharCode(65+e)]=String(10+e);function KS(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>HS[e])).join("");for(;t.length>=15;){let e=t.substring(0,15);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}const ZS=function(){const e={};for(let t=0;t<36;t++){e["0123456789abcdefghijklmnopqrstuvwxyz"[t]]=BigInt(t)}return e}();function qS(e){if(IS("string"==typeof e,"invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith("0x")||(e="0x"+e);const t=GS(e);return IS(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===e,"bad address checksum","address",e),t}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){IS(e.substring(2,4)===KS(e),"bad icap checksum","address",e);let t=function(e){e=e.toLowerCase();let t=jS;for(let r=0;r<e.length;r++)t=t*VS+ZS[e[r]];return t}(e.substring(4)).toString(16);for(;t.length<40;)t="0"+t;return GS("0x"+t)}IS(!1,"invalid address","address",e)}const JS=BigInt(0),YS=(BigInt(1),9007199254740991);function XS(e,t){switch(typeof e){case"bigint":return e;case"number":return IS(Number.isInteger(e),"underflow",t||"value",e),IS(e>=-YS&&e<=YS,"overflow",t||"value",e),BigInt(e);case"string":try{if(""===e)throw new Error("empty string");return"-"===e[0]&&"-"!==e[1]?-BigInt(e.substring(1)):BigInt(e)}catch(r){IS(!1,`invalid BigNumberish string: ${r.message}`,t||"value",e)}}IS(!1,"invalid BigNumberish value",t||"value",e)}function QS(e,t){const r=XS(e,t);return SS(r>=JS,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),r}function eI(e,t){switch(typeof e){case"bigint":return IS(e>=-YS&&e<=YS,"overflow",t||"value",e),Number(e);case"number":return IS(Number.isInteger(e),"underflow",t||"value",e),IS(e>=-YS&&e<=YS,"overflow",t||"value",e),e;case"string":try{if(""===e)throw new Error("empty string");return eI(BigInt(e),t)}catch(r){IS(!1,`invalid numeric string: ${r.message}`,t||"value",e)}}IS(!1,"invalid numeric value",t||"value",e)}function tI(e,t){let r=QS(e,"value").toString(16);if(null==t)r.length%2&&(r="0"+r);else{const n=eI(t,"width");for(SS(2*n>=r.length,`value exceeds width (${n} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:e});r.length<2*n;)r="0"+r}return"0x"+r}function rI(e){const t=QS(e,"value");if(t===JS)return new Uint8Array([]);let r=t.toString(16);r.length%2&&(r="0"+r);const n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){const t=2*e;n[e]=parseInt(r.substring(t,t+2),16)}return n}const nI="0x0000000000000000000000000000000000000000000000000000000000000000",oI=BigInt(0),sI=BigInt(1),aI=BigInt(2),iI=BigInt(27),cI=BigInt(28),uI=BigInt(35),lI={};function dI(e){return US(rI(e),32,!0)}class fI{#e;#t;#r;#n;get r(){return this.#e}set r(e){IS(32===NS(e),"invalid r","value",e),this.#e=FS(e)}get s(){return IS(parseInt(this.#t.substring(0,3))<8,"non-canonical s; use ._s","s",this.#t),this.#t}set s(e){IS(32===NS(e),"invalid s","value",e),this.#t=FS(e)}get _s(){return this.#t}isValid(){return parseInt(this.#t.substring(0,3))<8}get v(){return this.#r}set v(e){const t=eI(e,"value");IS(27===t||28===t,"invalid v","v",e),this.#r=t}get networkV(){return this.#n}get legacyChainId(){const e=this.networkV;return null==e?null:fI.getChainId(e)}get yParity(){return 27===this.v?0:1}get yParityAndS(){const e=OS(this.s);return this.yParity&&(e[0]|=128),FS(e)}get compactSerialized(){return kS([this.r,this.yParityAndS])}get serialized(){return kS([this.r,this.s,this.yParity?"0x1c":"0x1b"])}constructor(e,t,r,n){!function(e,t,r){if(null==r&&(r=""),e!==t){let e=r,t="new";r&&(e+=".",t+=" "+r),SS(!1,`private constructor; use ${e}from* methods`,"UNSUPPORTED_OPERATION",{operation:t})}}(e,lI,"Signature"),this.#e=t,this.#t=r,this.#r=n,this.#n=null}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this._s}"${this.isValid()?"":', valid: "false"'}, yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new fI(lI,this.r,this._s,this.v);return this.networkV&&(e.#n=this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:null!=e?e.toString():null,r:this.r,s:this._s,v:this.v}}static getChainId(e){const t=XS(e,"v");return t==iI||t==cI?oI:(IS(t>=uI,"invalid EIP-155 v","v",e),(t-uI)/aI)}static getChainIdV(e,t){return XS(e)*aI+BigInt(35+t-27)}static getNormalizedV(e){const t=XS(e);return t===oI||t===iI?27:t===sI||t===cI?28:(IS(t>=uI,"invalid v","v",e),t&sI?27:28)}static from(e){function t(t,r){IS(t,r,"signature",e)}if(null==e)return new fI(lI,nI,nI,27);if("string"==typeof e){const r=OS(e,"signature");if(64===r.length){const e=FS(r.slice(0,32)),t=r.slice(32,64),n=128&t[0]?28:27;return t[0]&=127,new fI(lI,e,FS(t),n)}if(65===r.length){const e=FS(r.slice(0,32)),t=FS(r.slice(32,64)),n=fI.getNormalizedV(r[64]);return new fI(lI,e,t,n)}t(!1,"invalid raw signature length")}if(e instanceof fI)return e.clone();const r=e.r;t(null!=r,"missing r");const n=dI(r),o=function(e,r){if(null!=e)return dI(e);if(null!=r){t(MS(r,32),"invalid yParityAndS");const e=OS(r);return e[0]&=127,FS(e)}t(!1,"missing s")}(e.s,e.yParityAndS),{networkV:s,v:a}=function(e,r,n){if(null!=e){const t=XS(e);return{networkV:t>=uI?t:void 0,v:fI.getNormalizedV(t)}}if(null!=r)return t(MS(r,32),"invalid yParityAndS"),{v:128&OS(r)[0]?28:27};if(null!=n){switch(eI(n,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}t(!1,"invalid yParity")}t(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),i=new fI(lI,n,o,a);return s&&(i.#n=s),t(null==e.yParity||eI(e.yParity,"sig.yParity")===i.yParity,"yParity mismatch"),t(null==e.yParityAndS||e.yParityAndS===i.yParityAndS,"yParityAndS mismatch"),i}}class pI{#c;constructor(e){IS(32===NS(e),"invalid private key","privateKey","[REDACTED]"),this.#c=FS(e)}get privateKey(){return this.#c}get publicKey(){return pI.computePublicKey(this.#c)}get compressedPublicKey(){return pI.computePublicKey(this.#c,!0)}sign(e){IS(32===NS(e),"invalid digest length","digest",e);const t=gu.sign(RS(e),RS(this.#c),{lowS:!0});return fI.from({r:tI(t.r,32),s:tI(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){const t=pI.computePublicKey(e);return FS(gu.getSharedSecret(RS(this.#c),OS(t),!1))}static computePublicKey(e,t){let r=OS(e,"key");if(32===r.length){return FS(gu.getPublicKey(r,!!t))}if(64===r.length){const e=new Uint8Array(65);e[0]=4,e.set(r,1),r=e}return FS(gu.ProjectivePoint.fromHex(r).toRawBytes(t))}static recoverPublicKey(e,t){IS(32===NS(e),"invalid digest length","digest",e);const r=fI.from(t);let n=gu.Signature.fromCompact(RS(kS([r.r,r.s])));n=n.addRecoveryBit(r.yParity);const o=n.recoverPublicKey(RS(e));return IS(null!=o,"invalid signature for digest","signature",t),"0x"+o.toHex(!1)}static addPoints(e,t,r){const n=gu.ProjectivePoint.fromHex(pI.computePublicKey(e).substring(2)),o=gu.ProjectivePoint.fromHex(pI.computePublicKey(t).substring(2));return"0x"+n.add(o).toHex(!!r)}}function hI(e){let t;return t="string"==typeof e?pI.computePublicKey(e,!1):e.publicKey,qS(zS("0x"+t.substring(4)).substring(26))}class gI{#Ae;#ve;#ee;#Pe;#Ee;#Ce;constructor({accountsRepository:e,configProvider:t,logger:r,assetsService:n,snapClient:o,transactionsService:s}){this.#ee=Oe(r,"[🔑 AccountsService]"),this.#ve=t,this.#Ae=e,this.#Pe=n,this.#Ee=s,this.#Ce=o}async deriveTronKeypair({entropySource:e,derivationPath:t}){try{this.#ee.log({derivationPath:t},"Generating TRON wallet"),R(t,yv);const r=t.split("/"),n=await this.#Ce.getBip32Entropy({entropySource:e,path:r,curve:"secp256k1"});if(!n.privateKey||!n.publicKey)throw new Error("Unable to derive private key");const o=GC(n.privateKey),s=GC(n.publicKey),a=n.privateKey.slice(2),i=hI(n.publicKey),c=PT.address.fromHex(i);if(!c)throw new Error("Unable to derive address");return{privateKeyBytes:o,publicKeyBytes:s,privateKeyHex:a,address:c}}catch(e){throw function(e){const t=e?.message?.toLowerCase()??"",r=e?.stack?.toLowerCase()??"";if(["private","key","entropy","mnemonic","seed","derivation","bip32","bip44","secret"].some((e=>t.includes(e)||r.includes(e)))){const t=new Error("Key derivation failed. Please check your connection and try again.");return NW(e)&&e.constructor?new e.constructor:t}return e}(e)}}async deriveAccount({entropySource:e,index:t}){const r=gI.getDefaultDerivationPath(t),{address:n}=await this.deriveTronKeypair({entropySource:e,derivationPath:r});return{id:"",entropySource:e,derivationPath:r,index:t,type:br.Eoa,address:n,scopes:[hn.Mainnet,hn.Nile,hn.Shasta],options:{entropy:{type:"mnemonic",id:e,derivationPath:r,groupIndex:t},exportable:!0},methods:["signMessage","signTransaction"]}}async create(e,t){const r=await this.#Ae.getAll(),n=t?.entropySource??await this.#Be(),o=t?.index??this.#We(r,n),s=r.find((e=>e.index===o&&e.entropySource===n));if(s)return this.#ee.warn("[🔑 Keyring] An account already exists with the same derivation path and entropy source. Skipping account creation."),kW(s);const a=await this.deriveAccount({entropySource:n,index:o}),{metamask:i,...c}=t??{},u={...a,id:e,options:{...a.options,...Object.fromEntries(Object.entries(c).filter((([,e])=>void 0!==e))),groupIndex:o}};await this.#Ae.create(u);const l=kW(u);return await xW(snap,Un.AccountCreated,{account:l,displayConfirmation:!1,...i?{metamask:i}:{}}),l}async getAll(){return this.#Ae.getAll()}async getAllSelected(){const[e,t]=await Promise.all([this.#Ae.getAll(),FW(snap)]);return e.filter((e=>t.includes(e.id)))}async findById(e){return this.#Ae.findById(e)}async findByIdOrThrow(e){const t=await this.#Ae.findById(e);if(!t)throw new Error(`Account with ID ${e} not found`);return t}async findByIds(e){const t=await this.#Ae.findByIds(e);return t&&e.length===t.length||this.#ee.error("[findByIds] Some accounts not found"),t}async findByAddress(e){return this.#Ae.findByAddress(e)}async delete(e){return this.#Ae.delete(e)}async synchronizeAssets(e){const t=this.#ve.get().activeNetworks,r=e.flatMap((e=>t.map((t=>({account:e,scope:t}))))),n=(await Promise.allSettled(r.map((async({account:e,scope:t})=>this.#Pe.fetchAssetsAndBalancesForAccount(t,e))))).flatMap((e=>"fulfilled"===e.status?e.value:[]));await this.#Pe.saveMany(n)}async synchronizeTransactions(e){const t=this.#ve.get().activeNetworks,r=e.flatMap((e=>t.map((t=>({account:e,scope:t}))))),n=(await Promise.allSettled(r.map((async({account:e,scope:t})=>this.#Ee.fetchNewTransactionsForAccount(t,e))))).flatMap((e=>"fulfilled"===e.status?e.value:[]));await this.#Ee.saveMany(n)}async synchronize(e){await Promise.all([this.synchronizeAssets(e),this.synchronizeTransactions(e)])}#We(e,t){return function(e){if(0===e.length)return 0;const t=e.map((e=>e.index)).sort(((e,t)=>e-t));let r=0;for(const e of t){if(e!==r)break;r+=1}return r}(e.filter((e=>e.entropySource===t)))}static getDefaultDerivationPath(e){return`m/44'/195'/0'/0/${e}`}async#Be(){const e=(await this.#Ce.listEntropySources()).find((({primary:e})=>e));if(!e)throw new Error("No default entropy source found - this can never happen");return e.id}}class yI{#ee;#Se;#Ie;#_e;#Oe;#Re;#Me;cacheTtlsMilliseconds;constructor({logger:e,assetsRepository:t,state:r,trongridApiClient:n,tronHttpClient:o,priceApiClient:s,tokenApiClient:a}){this.#ee=Oe(e,"[🪙 AssetsService]"),this.#Se=t,this.#Ie=r,this.#_e=n,this.#Oe=o,this.#Re=s,this.#Me=a;const{cacheTtlsMilliseconds:i}=$I.get().priceApi;this.cacheTtlsMilliseconds=i}static isFiat(e){return e.includes("swift:0/iso4217:")}async getAllAssetsByAccountId(e){return this.#Se.getByAccountId(e)}async getAssetsByAccountId(e,t){return this.#Se.getByAccountIdAndAssetTypes(e,t)}async getAssetByAccountId(e,t){return this.#Se.getByAccountIdAndAssetType(e,t)}async fetchAssetsAndBalancesForAccount(e,t){this.#ee.info("Fetching assets and balances by account",{account:t,scope:e});const[r,n]=await Promise.allSettled([this.#_e.getAccountInfoByAddress(e,t.address),this.#Oe.getAccountResources(e,t.address)]);if("rejected"===r.status||"rejected"===n.status){const r=`Failed to fetch account info or account resources for ${t.address} on network ${e}`;throw this.#ee.error(r),new Error(r)}const o=this.#xe({account:t,scope:e,tronAccountInfo:r.value}),s=this.#Fe({account:t,scope:e,tronAccountInfo:r.value}),a=this.#ke({account:t,scope:e,tronAccountResources:n.value}),i=this.#Ne({account:t,scope:e,tronAccountResources:n.value}),c=this.#Ue({account:t,scope:e,tronAccountInfo:r.value}),u=this.#De({account:t,scope:e,tronAccountInfo:r.value}),l=[o.assetType,...s.map((e=>e.assetType)),...a.map((e=>e.assetType)),...i.map((e=>e.assetType)),...c.map((e=>e.assetType)),...u.map((e=>e.assetType))],d=[o.assetType,...c.map((e=>e.assetType)),...u.map((e=>e.assetType))],[f,p]=await Promise.all([this.getAssetsMetadata(l),this.#Re.getMultipleSpotPrices(d,"usd").catch((()=>({})))]),h=[o,...s,...a,...i,...c,...u].map((e=>{const t=f[e.assetType],{symbol:r,decimals:n=0,iconUrl:o}=e;let s=r,a=n,i=o;if(t?.fungible){const e=t.units?.[0];e?(s=e.symbol??t.symbol??s,a=e.decimals??a):s=t?.symbol??s,i=t.iconUrl??i}const c=sB(e.rawAmount,a).toString();return{...e,symbol:s,decimals:a,uiAmount:c,iconUrl:i}}));return this.#Le(h,p)}#Le(e,t){return e.filter((e=>{if(To.includes(e.assetType))return!0;const r=t[e.assetType];return"number"==typeof r?.price}))}#xe({account:e,scope:t,tronAccountInfo:r}){const n=r.balance??0;return{assetType:bo[t].nativeToken.id,keyringAccountId:e.id,network:t,symbol:bo[t].nativeToken.symbol,decimals:bo[t].nativeToken.decimals,rawAmount:n.toString(),uiAmount:sB(n,bo[t].nativeToken.decimals).toString(),iconUrl:bo[t].nativeToken.iconUrl}}#Fe({account:e,scope:t,tronAccountInfo:r}){const n=[];let o=0,s=0;r.frozenV2?.forEach((e=>{const t=e.amount??0;"ENERGY"===e.type?s+=t:e.type||(o+=t)}));if(o+=r?.account_resource?.delegated_frozenV2_balance_for_bandwidth??0,s+=r?.account_resource?.delegated_frozenV2_balance_for_energy??0,o>0){const r={assetType:bo[t].stakedForBandwidth.id,keyringAccountId:e.id,network:t,symbol:bo[t].stakedForBandwidth.symbol,decimals:bo[t].stakedForBandwidth.decimals,rawAmount:o.toString(),uiAmount:sB(o,bo[t].stakedForBandwidth.decimals).toString(),iconUrl:bo[t].stakedForBandwidth.iconUrl};n.push(r)}if(s>0){const r={assetType:bo[t].stakedForEnergy.id,keyringAccountId:e.id,network:t,symbol:bo[t].stakedForEnergy.symbol,decimals:bo[t].stakedForEnergy.decimals,rawAmount:s.toString(),uiAmount:sB(s,bo[t].stakedForEnergy.decimals).toString(),iconUrl:bo[t].stakedForEnergy.iconUrl};n.push(r)}return n}#ke({account:e,scope:t,tronAccountResources:r}){const n=(r?.freeNetLimit??0)+(r?.NetLimit??0),o=n-(r?.freeNetUsed??0);return[{assetType:bo[t].bandwidth.id,keyringAccountId:e.id,network:t,symbol:bo[t].bandwidth.symbol,decimals:bo[t].bandwidth.decimals,rawAmount:o.toString(),uiAmount:o.toString(),iconUrl:bo[t].bandwidth.iconUrl},{assetType:bo[t].maximumBandwidth.id,keyringAccountId:e.id,network:t,symbol:bo[t].maximumBandwidth.symbol,decimals:bo[t].maximumBandwidth.decimals,rawAmount:n.toString(),uiAmount:n.toString(),iconUrl:bo[t].maximumBandwidth.iconUrl}]}#Ne({account:e,scope:t,tronAccountResources:r}){const n=r?.EnergyLimit??0,o=n-(r?.EnergyUsed??0);return[{assetType:bo[t].energy.id,keyringAccountId:e.id,network:t,symbol:bo[t].energy.symbol,decimals:bo[t].energy.decimals,rawAmount:o.toString(),uiAmount:o.toString(),iconUrl:bo[t].energy.iconUrl},{assetType:bo[t].maximumEnergy.id,keyringAccountId:e.id,network:t,symbol:bo[t].maximumEnergy.symbol,decimals:bo[t].maximumEnergy.decimals,rawAmount:n.toString(),uiAmount:n.toString(),iconUrl:bo[t].maximumEnergy.iconUrl}]}#Ue({account:e,scope:t,tronAccountInfo:r}){const{assetV2:n}=r;return n?.flatMap((r=>({assetType:`${t}/trc10:${r.key}`,keyringAccountId:e.id,network:t,symbol:"",decimals:0,rawAmount:r.value?.toString()??"0",uiAmount:"0",iconUrl:""})))??[]}#De({account:e,scope:t,tronAccountInfo:r}){const{trc20:n}=r;return n?.flatMap((r=>Object.entries(r).map((([r,n])=>({assetType:`${t}/trc20:${r}`,keyringAccountId:e.id,network:t,symbol:"",decimals:0,rawAmount:n,uiAmount:"0",iconUrl:""})))))??[]}async getAssetsMetadata(e){this.#ee.info("Fetching metadata for assets",e);const{nativeAssetTypes:t,stakedNativeAssetTypes:r,energyAssetTypes:n,maximunEnergyAssetTypes:o,bandwidthAssetTypes:s,maximunBandwidthAssetTypes:a,tokenTrc10AssetTypes:i,tokenTrc20AssetTypes:c}=this.#$e(e),u={...this.#ze(t),...this.#je(r),...this.#Ve(n),...this.#Ge(o),...this.#He(s),...this.#Ke(a),...await this.#Ze([...i,...c])};return this.#ee.info("Resolved assets metadata",{assetTypes:e,result:u}),u}#$e(e){return{nativeAssetTypes:e.filter((e=>e.endsWith("/slip44:195"))),stakedNativeAssetTypes:e.filter((e=>e.includes("/slip44:195-staked-for-"))),energyAssetTypes:e.filter((e=>e.endsWith("/slip44:energy"))),maximunEnergyAssetTypes:e.filter((e=>e.endsWith("/slip44:maximum-energy"))),bandwidthAssetTypes:e.filter((e=>e.endsWith("/slip44:bandwidth"))),maximunBandwidthAssetTypes:e.filter((e=>e.endsWith("/slip44:maximum-bandwidth"))),tokenTrc10AssetTypes:e.filter((e=>e.includes("/trc10:"))),tokenTrc20AssetTypes:e.filter((e=>e.includes("/trc20:"))),nftAssetTypes:e.filter((e=>e.includes("/trc721:")))}}#ze(e){const t={};for(const r of e)t[r]={fungible:uo.fungible,name:uo.name,symbol:uo.symbol,iconUrl:uo.iconUrl,units:[{decimals:uo.decimals,symbol:uo.symbol,name:uo.name}]};return t}#je(e){const t={};for(const r of e){r.endsWith("staked-for-bandwidth")&&(t[r]={fungible:lo.fungible,name:lo.name,symbol:lo.symbol,iconUrl:lo.iconUrl,units:[{decimals:lo.decimals,symbol:lo.symbol,name:lo.name}]});r.endsWith("staked-for-energy")&&(t[r]={fungible:fo.fungible,name:fo.name,symbol:fo.symbol,iconUrl:fo.iconUrl,units:[{decimals:fo.decimals,symbol:fo.symbol,name:fo.name}]})}return t}#He(e){const t={};for(const r of e)t[r]={fungible:po.fungible,name:po.name,symbol:po.symbol,iconUrl:po.iconUrl,units:[{decimals:po.decimals,symbol:po.symbol,name:po.name}]};return t}#Ke(e){const t={};for(const r of e)t[r]={fungible:ho.fungible,name:ho.name,symbol:ho.symbol,iconUrl:ho.iconUrl,units:[{decimals:ho.decimals,symbol:ho.symbol,name:ho.name}]};return t}#Ve(e){const t={};for(const r of e)t[r]={fungible:go.fungible,name:go.name,symbol:go.symbol,iconUrl:go.iconUrl,units:[{decimals:go.decimals,symbol:go.symbol,name:go.name}]};return t}#Ge(e){const t={};for(const r of e)t[r]={fungible:yo.fungible,name:yo.name,symbol:yo.symbol,iconUrl:yo.iconUrl,units:[{decimals:yo.decimals,symbol:yo.symbol,name:yo.name}]};return t}async#Ze(e){return this.#Me.getTokensMetadata(e)}static hasChanged(e,t){const r=t.find((t=>t.keyringAccountId===e.keyringAccountId&&t.assetType===e.assetType));return!r||r.rawAmount!==e.rawAmount}async saveMany(e){this.#ee.info("Saving assets",e);const t=e=>"0"===e.rawAmount||"0"===e.uiAmount;await this.getAll();await this.#Se.saveMany(e);const r=e=>t(e)&&!(e=>To.includes(e.assetType))(e),n=e=>!r(e)&&!0,o=e.reduce(((e,t)=>({...e,[t.keyringAccountId]:{added:[...e[t.keyringAccountId]?.added??[],...n(t)?[t.assetType]:[]],removed:[...e[t.keyringAccountId]?.removed??[],...r(t)?[t.assetType]:[]]}})),{});Object.values(o).map((e=>e.added.length+e.removed.length)).every((e=>0===e))||await xW(snap,Un.AccountAssetListUpdated,{assets:o});const s=e.filter((()=>!0)).reduce(((e,t)=>({...e,[t.keyringAccountId]:{...e[t.keyringAccountId]??{},[t.assetType]:{unit:t.symbol,amount:t.uiAmount}}})),{});Object.values(s).map((e=>Object.keys(e).length)).some((e=>e>0))&&await xW(snap,Un.AccountBalancesUpdated,{balances:s})}async getAll(){const e=await this.#Ie.getKey("assets")??{};return Object.values(e).flat()}#qe(e,t){const r=mo[e],{chainId:n}=he(e);return{assetType:r.id,keyringAccountId:t,network:n,symbol:r.symbol,decimals:r.decimals,rawAmount:"0",uiAmount:"0"}}async getByKeyringAccountId(e){const t=await this.#Se.getByAccountId(e),r=[];for(const n of To){if(!t.find((e=>e.assetType===n))){const t=this.#qe(n,e);r.push(t)}}return[...t,...r]}#Je(e){if(!yI.isFiat(e))throw new Error("Passed caipAssetType is not a fiat asset");return he(e).assetReference.toLowerCase()}async#Ye(e){const t=e.filter((e=>!yI.isFiat(e))),[r,n]=await Promise.all([this.#Re.getFiatExchangeRates(),this.#Re.getMultipleSpotPrices(t,"usd")]);return{fiatExchangeRates:r,cryptoPrices:n}}async getMultipleTokenConversions(e){if(0===e.length)return{};const t=e.flatMap((e=>[e.from,e.to])),{fiatExchangeRates:r,cryptoPrices:n}=await this.#Ye(t),o={};return e.forEach((e=>{const{from:t,to:s}=e;let a,i;if(o[t]??={},yI.isFiat(t)){const e=r[this.#Je(t)]?.value;if(!e)return void(o[t][s]=null);a=new no(1).dividedBy(e)}else a=new no(n[t]?.price??0);if(yI.isFiat(s)){const e=r[this.#Je(s)]?.value;if(!e)return void(o[t][s]=null);i=new no(1).dividedBy(e)}else i=new no(n[s]?.price??0);if(a.isZero()||i.isZero())return void(o[t][s]=null);const c=a.dividedBy(i).toString(),u=Date.now();o[t][s]={rate:c,conversionTime:u,expirationTime:u+this.cacheTtlsMilliseconds.historicalPrices}})),o}#Xe(e,t){const r=(0,ge.pick)(e,["marketCap","totalVolume","circulatingSupply","allTimeHigh","allTimeLow","pricePercentChange1h","pricePercentChange1d","pricePercentChange7d","pricePercentChange14d","pricePercentChange30d","pricePercentChange200d","pricePercentChange1y"]),n=e=>null==e?"":new no(e).dividedBy(t).toString(),o=(e,t)=>null==t?{}:{[e]:t},s={...o("PT1H",r.pricePercentChange1h),...o("P1D",r.pricePercentChange1d),...o("P7D",r.pricePercentChange7d),...o("P14D",r.pricePercentChange14d),...o("P30D",r.pricePercentChange30d),...o("P200D",r.pricePercentChange200d),...o("P1Y",r.pricePercentChange1y)};return{fungible:!0,marketCap:n(r.marketCap),totalVolume:n(r.totalVolume),circulatingSupply:(r.circulatingSupply??0).toString(),allTimeHigh:n(r.allTimeHigh),allTimeLow:n(r.allTimeLow),...Object.keys(s).length>0?{pricePercentChange:s}:{}}}async getMultipleTokensMarketData(e){if(0===e.length)return{};const t=e.flatMap((e=>[e.asset,e.unit])),{fiatExchangeRates:r,cryptoPrices:n}=await this.#Ye(t),o={};return e.forEach((e=>{const{asset:t,unit:s}=e;if(!n[t])return;let a;if(yI.isFiat(s)){const e=r[this.#Je(s)]?.value;if(!e)return;a=new no(1).dividedBy(e)}else a=new no(n[s]?.price??0);a.isZero()||(o[t]??={},o[t][s]=this.#Xe(n[t],a))})),o}async getHistoricalPrice(e,t){R(e,fe),R(t,fe);const r=he(t).assetReference.toLowerCase();R(r,Ce);const n=["1d","7d","1m","3m","1y","1000y"].map((async n=>this.#Re.getHistoricalPrices({assetType:e,timePeriod:n,vsCurrency:r}).then((e=>({timePeriod:n,response:e}))).catch((r=>(this.#ee.warn(`Error fetching historical prices for ${e} to ${t} with time period ${n}. Returning null object.`,r),{timePeriod:n,response:Se}))))),o=(await Promise.all(n)).reduce(((e,{timePeriod:t,response:r})=>(e[`P${t.toUpperCase()}`]=r.prices.map((e=>[e[0],e[1].toString()])),e)),{}),s=Date.now();return{intervals:o,updateTime:s,expirationTime:s+this.cacheTtlsMilliseconds.historicalPrices}}}var mI;!function(e){e[e.Millisecond=1]="Millisecond",e[e.Second=1e3]="Second",e[e.Minute=6e4]="Minute",e[e.Hour=36e5]="Hour",e[e.Day=864e5]="Day",e[e.Week=6048e5]="Week",e[e.Year=31536e6]="Year"}(mI=mI||(mI={}));const bI={production:[io.Mainnet],local:[io.Mainnet],test:[io.Mainnet]},wI=yt(U(ov),J(),(e=>e.split(","))),TI=H({ENVIRONMENT:L(["local","test","production"]),RPC_URL_LIST_MAINNET:wI,RPC_URL_LIST_NILE_TESTNET:wI,RPC_URL_LIST_SHASTA_TESTNET:wI,EXPLORER_MAINNET_BASE_URL:ov,EXPLORER_NILE_BASE_URL:ov,EXPLORER_SHASTA_BASE_URL:ov,PRICE_API_BASE_URL:ov,TOKEN_API_BASE_URL:ov,STATIC_API_BASE_URL:ov,SECURITY_ALERTS_API_BASE_URL:ov,NFT_API_BASE_URL:ov,LOCAL_API_BASE_URL:J(),TRONGRID_BASE_URL_MAINNET:ov,TRONGRID_BASE_URL_NILE:ov,TRONGRID_BASE_URL_SHASTA:ov,TRON_HTTP_BASE_URL_MAINNET:ov,TRON_HTTP_BASE_URL_NILE:ov,TRON_HTTP_BASE_URL_SHASTA:ov});const AI=({message:e,account:t,scope:r,locale:n,networkImage:o,origin:s})=>{const a=RB(n),{address:i}=t,c=`${r}:${i}`;return uB(fB,{children:[uB(pB,{children:[uB(pB,{alignment:"center",center:!0,children:[cB(pB,{children:null}),cB(hB,{size:"lg",children:a("confirmation.signMessage.title")}),cB(pB,{children:null})]}),uB(gB,{children:[cB(yB,{fontWeight:"medium",children:a("confirmation.signMessage.message")}),cB(yB,{children:e})]}),uB(gB,{children:[s?uB(pB,{alignment:"space-between",direction:"horizontal",children:[uB(pB,{direction:"horizontal",alignment:"start",children:[cB(yB,{fontWeight:"medium",color:"alternative",children:a("confirmation.origin")}),cB(mB,{content:a("confirmation.origin.tooltip"),children:cB(wB,{name:"question",color:"muted"})})]}),cB(yB,{children:s})]}):null,uB(pB,{alignment:"space-between",direction:"horizontal",children:[cB(yB,{fontWeight:"medium",color:"alternative",children:a("confirmation.account")}),cB(TB,{address:c,truncate:!0,displayName:!0,avatar:!0})]}),uB(pB,{alignment:"space-between",direction:"horizontal",children:[cB(yB,{fontWeight:"medium",color:"alternative",children:a("confirmation.network")}),uB(pB,{direction:"horizontal",alignment:"end",children:[cB(AB,{borderRadius:"medium",src:o??BB,height:16,width:16}),cB(yB,{children:bo[r].name})]})]})]})]}),uB(vB,{children:[cB(PB,{name:HW.Cancel,children:a("confirmation.cancelButton")}),cB(PB,{name:HW.Confirm,children:a("confirmation.confirmButton")})]})]})};var vI=r(1048).hp;const PI=e=>{if(e in mo)return mo[e].iconUrl},EI={scope:io.Mainnet,account:null,transaction:{rawDataHex:"",type:""},origin:"",networkImage:BB,scan:null,scanFetchStatus:"initial",tokenPrices:{},tokenPricesFetchStatus:"initial",scanParameters:null,fees:[],feesFetchStatus:"initial",preferences:{locale:"en",currency:"usd",hideBalances:!1,useSecurityAlerts:!0,useExternalPricingData:!0,simulateOnChainActions:!0,useTokenDetection:!0,batchCheckBalances:!0,displayNftMedia:!1,useNftDetection:!1}};async function CI(e,t,r){const{snapClient:n,transactionScanService:o}=y_;R(e.request.params,Tv);const{request:{params:{transaction:s}},scope:a,origin:i}=e,c={...EI,scope:a,account:t,transaction:s,origin:i??"Unknown",scanFetchStatus:"fetching",tokenPricesFetchStatus:"initial",feesFetchStatus:"initial"},{assetsService:u,feeCalculatorService:l,priceApiClient:d}=y_,[f,p]=await Promise.all([n.getPreferences().catch((()=>EI.preferences)),u.getAssetsByAccountId(t.id,[bo[a].bandwidth.id,bo[a].energy.id])]);c.preferences=f;const{useSecurityAlerts:h,simulateOnChainActions:g,useExternalPricingData:y}=c.preferences;try{const[e,t]=p,n=t?new no(t.rawAmount):oo,o=e?new no(e.rawAmount):oo,i={visible:!0,txID:VC(await tB(GC(s.rawDataHex))).slice(2),raw_data:r,raw_data_hex:s.rawDataHex},u=await l.computeFee({scope:a,transaction:i,availableEnergy:n,availableBandwidth:o});u.forEach((e=>{e.asset.iconUrl=PI(e.asset.type)}));const f=y?await d.getMultipleSpotPrices([`${a}/slip44:195`],c.preferences.currency).catch((()=>({}))):{};c.fees=u,c.feesFetchStatus="fetched",c.tokenPrices=f,c.tokenPricesFetchStatus="fetched"}catch{c.fees=[],c.feesFetchStatus="error",c.tokenPrices={},c.tokenPricesFetchStatus="error"}c.scanParameters=(e=>{const t=e.contract[0]?.parameter.value;if(!t)return null;const r=PT.address.fromHex(t.owner_address);let n="";"contract_address"in t&&t.contract_address?n=PT.address.fromHex(t.contract_address):"to_address"in t&&t.to_address&&(n=PT.address.fromHex(t.to_address));let o=0;"call_value"in t&&t.call_value?o=t.call_value:"amount"in t&&t.amount&&(o=t.amount);let s=null;return"data"in t&&t.data&&(s=DC(t.data)),{from:r,to:n,data:s,value:o}})(r);const m=await n.createInterface(cB(HB,{context:c}),c),b=n.showDialog(m),w=y_.state.setKey(`mapInterfaceNameToId.${KB}`,m);if(o&&(h||g)){const e=[];g&&e.push("simulation"),h&&e.push("validation");try{const r=await o.scanTransaction({accountAddress:t.address,parameters:{from:c.scanParameters?.from??void 0,to:c.scanParameters?.to??void 0,data:c.scanParameters?.data??void 0,value:c.scanParameters?.value??void 0},origin:i,scope:a,options:e});c.scan=r,c.scanFetchStatus=r?"fetched":"error"}catch{c.scan=null,c.scanFetchStatus="error"}await w,await n.updateInterface(m,cB(HB,{context:c}),c),await n.scheduleBackgroundEvent({method:QB.RefreshSignTransaction,duration:"PT20S"})}else c.scanFetchStatus="fetched",await w,await n.updateInterface(m,cB(HB,{context:c}),c);return b}const BI={scope:io.Mainnet,fromAddress:null,toAddress:null,amount:null,fees:[],asset:{assetType:`${io.Mainnet}/slip44:195`,keyringAccountId:"",network:io.Mainnet,symbol:"TRX",decimals:6,rawAmount:"0",uiAmount:"0",iconUrl:""},origin:"MetaMask",networkImage:BB,tokenPrices:{},tokenPricesFetchStatus:"initial",preferences:{locale:"en",currency:"usd",hideBalances:!1,useSecurityAlerts:!1,useExternalPricingData:!0,simulateOnChainActions:!1,useTokenDetection:!0,batchCheckBalances:!0,displayNftMedia:!1,useNftDetection:!1}};var WI=r(1048).hp;const SI=new Set(["FreezeBalanceContract","FreezeBalanceV2Contract","UnfreezeBalanceContract","UnfreezeBalanceV2Contract","WithdrawExpireUnfreezeContract","CancelAllUnfreezeV2Contract","DelegateResourceContract","UnDelegateResourceContract","VoteWitnessContract","AccountCreateContract","AccountUpdateContract","AccountPermissionUpdateContract","SetAccountIdContract","WitnessCreateContract","WitnessUpdateContract","UpdateBrokerageContract","AssetIssueContract","ParticipateAssetIssueContract","UnfreezeAssetContract","UpdateAssetContract","ProposalCreateContract","ProposalApproveContract","ProposalDeleteContract","ExchangeCreateContract","ExchangeInjectContract","ExchangeWithdrawContract","ExchangeTransactionContract","ClearABIContract","UpdateSettingContract","UpdateEnergyLimitContract","WithdrawBalanceContract","ShieldedTransferContract"]);new Error("timeout while waiting for mutex to become available"),new Error("mutex already locked");const II=new Error("request for lock canceled");var _I=function(e,t,r,n){return new(r||(r=Promise))((function(o,s){function a(e){try{c(n.next(e))}catch(e){s(e)}}function i(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,i)}c((n=n.apply(e,t||[])).next())}))};class OI{constructor(e,t=II){this._value=e,this._cancelError=t,this._queue=[],this._weightedWaiters=[]}acquire(e=1,t=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise(((r,n)=>{const o={resolve:r,reject:n,weight:e,priority:t},s=RI(this._queue,(e=>t<=e.priority));-1===s&&e<=this._value?this._dispatchItem(o):this._queue.splice(s+1,0,o)}))}runExclusive(e){return _I(this,arguments,void 0,(function*(e,t=1,r=0){const[n,o]=yield this.acquire(t,r);try{return yield e(n)}finally{o()}}))}waitForUnlock(e=1,t=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,t)?Promise.resolve():new Promise((r=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),function(e,t){const r=RI(e,(e=>t.priority<=e.priority));e.splice(r+1,0,t)}(this._weightedWaiters[e-1],{resolve:r,priority:t})}))}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatchQueue()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatchQueue()}cancel(){this._queue.forEach((e=>e.reject(this._cancelError))),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(e){const t=this._value;this._value-=e.weight,e.resolve([t,this._newReleaser(e.weight)])}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){if(0===this._queue.length)for(let e=this._value;e>0;e--){const t=this._weightedWaiters[e-1];t&&(t.forEach((e=>e.resolve())),this._weightedWaiters[e-1]=[])}else{const e=this._queue[0].priority;for(let t=this._value;t>0;t--){const r=this._weightedWaiters[t-1];if(!r)continue;const n=r.findIndex((t=>t.priority<=e));(-1===n?r:r.splice(0,n)).forEach((e=>e.resolve()))}}}_couldLockImmediately(e,t){return(0===this._queue.length||this._queue[0].priority<t)&&e<=this._value}}function RI(e,t){for(let r=e.length-1;r>=0;r--)if(t(e[r]))return r;return-1}var MI=function(e,t,r,n){return new(r||(r=Promise))((function(o,s){function a(e){try{c(n.next(e))}catch(e){s(e)}}function i(e){try{c(n.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,i)}c((n=n.apply(e,t||[])).next())}))};class xI{constructor(e){this._semaphore=new OI(1,e)}acquire(){return MI(this,arguments,void 0,(function*(e=0){const[,t]=yield this._semaphore.acquire(1,e);return t}))}runExclusive(e,t=0){return this._semaphore.runExclusive((()=>e()),1,t)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(e=0){return this._semaphore.waitForUnlock(1,e)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}const FI=e=>JSON.parse(JSON.stringify(e),((e,t)=>{if(!t)return t;if("undefined"!==t.__type){if("BigNumber"===t.__type)return new no(t.value);if("bigint"===t.__type)return BigInt(t.value);if("Uint8Array"===t.__type){const e=atob(t.value),r=new Uint8Array(e.length);for(let t=0;t<e.length;t++)r[t]=e.charCodeAt(t);return r}return t}})),kI=e=>(0,ge.cloneDeepWith)(e,(e=>{if(void 0===e)return{__type:"undefined"};if(e instanceof no)return{__type:"BigNumber",value:e.toString()};if("bigint"==typeof e)return{__type:"bigint",value:e.toString()};if(e instanceof Uint8Array){let t="";for(const r of e)t+=String.fromCharCode(r);return{__type:"Uint8Array",value:btoa(t)}}}));class NI{#Qe=new xI;#et=new xI;#tt=0;#rt=null;async#nt(){this.#et.isLocked()||(this.#rt=await this.#et.acquire())}async wrapRegularStateOperation(e){await Promise.all([this.#Qe.waitForUnlock(),this.#nt()]);try{return this.#tt+=1,await e()}finally{this.#tt-=1,0===this.#tt&&this.#rt&&this.#rt()}}async wrapManageStateOperation(e){return await this.#et.waitForUnlock(),await this.#Qe.runExclusive(e)}}var UI=function(e){return e.Benign="Benign",e.Warning="Warning",e.Malicious="Malicious",e}({}),DI=function(e){return e.SUCCESS="SUCCESS",e.ERROR="ERROR",e}({});var LI=r(1048).hp;const $I=new class{#ot;constructor(){const e=this.#st();this.#ot=this.#at(e)}#st(){return M({ENVIRONMENT:"production",RPC_URL_LIST_MAINNET:"https://tron-mainnet.infura.io/v3/5b98a22672004ef1bf40a80123c5c48d",RPC_URL_LIST_NILE_TESTNET:"https://nile.trongrid.io",RPC_URL_LIST_SHASTA_TESTNET:"https://api.shasta.trongrid.io/jsonrpc",EXPLORER_MAINNET_BASE_URL:"https://tronscan.org",EXPLORER_NILE_BASE_URL:"https://nile.tronscan.org",EXPLORER_SHASTA_BASE_URL:"https://shasta.tronscan.org",PRICE_API_BASE_URL:"https://price.api.cx.metamask.io",TOKEN_API_BASE_URL:"https://tokens.api.cx.metamask.io",STATIC_API_BASE_URL:"https://static.cx.metamask.io",SECURITY_ALERTS_API_BASE_URL:"https://security-alerts.api.cx.metamask.io",NFT_API_BASE_URL:"https://nft.api.cx.metamask.io",LOCAL_API_BASE_URL:"http://localhost:8899",TRONGRID_BASE_URL_MAINNET:"https://tron-mainnet.infura.io/v3/5b98a22672004ef1bf40a80123c5c48d",TRONGRID_BASE_URL_NILE:"https://nile.api.trongrid.io",TRONGRID_BASE_URL_SHASTA:"https://shasta.api.trongrid.io",TRON_HTTP_BASE_URL_MAINNET:"https://tron-mainnet.infura.io/v3/5b98a22672004ef1bf40a80123c5c48d",TRON_HTTP_BASE_URL_NILE:"https://nile.trongrid.io",TRON_HTTP_BASE_URL_SHASTA:"https://shasta.trongrid.io"},TI)}#at(e){return{environment:e.ENVIRONMENT,networks:[{...bo[io.Mainnet],rpcUrls:e.RPC_URL_LIST_MAINNET,explorerBaseUrl:e.EXPLORER_MAINNET_BASE_URL},{...bo[io.Nile],rpcUrls:e.RPC_URL_LIST_NILE_TESTNET,explorerBaseUrl:e.EXPLORER_NILE_BASE_URL},{...bo[io.Shasta],rpcUrls:e.RPC_URL_LIST_SHASTA_TESTNET,explorerBaseUrl:e.EXPLORER_SHASTA_BASE_URL}],activeNetworks:bI[e.ENVIRONMENT],priceApi:{baseUrl:"test"===e.ENVIRONMENT?e.LOCAL_API_BASE_URL:e.PRICE_API_BASE_URL,chunkSize:50,cacheTtlsMilliseconds:{fiatExchangeRates:mI.Minute,spotPrices:mI.Minute,historicalPrices:mI.Minute}},tokenApi:{baseUrl:"test"===e.ENVIRONMENT?e.LOCAL_API_BASE_URL:e.TOKEN_API_BASE_URL,chunkSize:50},staticApi:{baseUrl:e.STATIC_API_BASE_URL},transactions:{storageLimit:10},securityAlertsApi:{baseUrl:"test"===e.ENVIRONMENT?e.LOCAL_API_BASE_URL:e.SECURITY_ALERTS_API_BASE_URL},nftApi:{baseUrl:"test"===e.ENVIRONMENT?e.LOCAL_API_BASE_URL:e.NFT_API_BASE_URL,cacheTtlsMilliseconds:{listAddressSolanaNfts:mI.Minute,getNftMetadata:mI.Minute}},trongridApi:{baseUrls:{[io.Mainnet]:e.TRONGRID_BASE_URL_MAINNET,[io.Nile]:e.TRONGRID_BASE_URL_NILE,[io.Shasta]:e.TRONGRID_BASE_URL_SHASTA}},tronHttpApi:{baseUrls:{[io.Mainnet]:e.TRON_HTTP_BASE_URL_MAINNET,[io.Nile]:e.TRON_HTTP_BASE_URL_NILE,[io.Shasta]:e.TRON_HTTP_BASE_URL_SHASTA}}}}get(){return this.#ot}getNetworkBy(e,t){const r=this.get().networks.find((r=>r[e]===t));if(!r)throw new Error(`Network ${e} not found`);return r}},zI=new class{#it=new NI;#ot;constructor(e){this.#ot=e}async#ct(){const e=await snap.request({method:"snap_getState",params:{encrypted:this.#ot.encrypted}}),t=FI(e??{});var r,n;return r=this.#ot.defaultState,n=t,{...r,...Object.fromEntries(Object.entries(n).filter((([e,t])=>null!=t&&(!t||"object"!=typeof t||Object.keys(t).length>0))))}}async get(){return this.#it.wrapRegularStateOperation((async()=>this.#ct()))}async getKey(e){return this.#it.wrapRegularStateOperation((async()=>{const t=await snap.request({method:"snap_getState",params:{key:e,encrypted:this.#ot.encrypted}});if(null!==t)return FI(t)}))}async setKey(e,t){await this.#it.wrapRegularStateOperation((async()=>{await snap.request({method:"snap_setState",params:{key:e,value:kI(t),encrypted:this.#ot.encrypted}})}))}async update(e){return await this.#it.wrapManageStateOperation((async()=>{const t=await this.#ct(),r=e(t);return await snap.request({method:"snap_manageState",params:{operation:"update",newState:kI(r),encrypted:this.#ot.encrypted}}),r}))}async deleteKey(e){await this.update((t=>((0,ge.unset)(t,e),t)))}async deleteKeys(e){await this.update((t=>(e.forEach((e=>{(0,ge.unset)(t,e)})),t)))}}({encrypted:!1,defaultState:{keyringAccounts:{},assets:{},tokenPrices:{},transactions:{},mapInterfaceNameToId:{}}}),jI=new class{async getBip32Entropy({entropySource:e,path:t,curve:r}){return snap.request({method:"snap_getBip32Entropy",params:{path:t,curve:r,...e?{source:e}:{}}})}async createInterface(e,t){return snap.request({method:"snap_createInterface",params:{ui:e,context:t}})}async updateInterface(e,t,r){return snap.request({method:"snap_updateInterface",params:{id:e,ui:t,context:r}})}async getInterfaceState(e){return snap.request({method:"snap_getInterfaceState",params:{id:e}})}async getInterfaceContext(e){const t=await snap.request({method:"snap_getInterfaceContext",params:{id:e}});return t||null}async updateInterfaceWithContext(e,t,r){return snap.request({method:"snap_updateInterface",params:{id:e,ui:t,context:r}})}async resolveInterface(e,t){return snap.request({method:"snap_resolveInterface",params:{id:e,value:t}})}async showDialog(e){return snap.request({method:"snap_dialog",params:{id:e}})}async getPreferences(){return snap.request({method:"snap_getPreferences"})}async getClientStatus(){return snap.request({method:"snap_getClientStatus"})}async scheduleBackgroundEvent({method:e,params:t={},duration:r}){return snap.request({method:"snap_scheduleBackgroundEvent",params:{duration:r,request:{method:e,params:t}}})}async listEntropySources(){return snap.request({method:"snap_listEntropySources"})}async trackEvent(e,t){try{await snap.request({method:"snap_trackEvent",params:{event:{event:e,properties:t}}})}catch{}}async trackTransactionAdded(e){await this.trackEvent(Wv.TransactionAdded,{message:"Snap transaction added",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip})}async trackTransactionRejected(e){await this.trackEvent(Wv.TransactionRejected,{message:"Snap transaction rejected",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip})}async trackTransactionSubmitted(e){await this.trackEvent(Wv.TransactionSubmitted,{message:"Snap transaction submitted",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip})}async trackTransactionApproved(e){await this.trackEvent(Wv.TransactionApproved,{message:"Snap transaction approved",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip})}async trackTransactionFinalized(e){await this.trackEvent(Wv.TransactionFinalized,{message:"Snap transaction finalized",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip})}async trackSecurityAlertDetected(e){await this.trackEvent(Sv.SecurityAlertDetected,{message:"Snap security alert detected",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip,security_alert_response:e.securityAlertResponse,security_alert_reason:e.securityAlertReason,security_alert_description:e.securityAlertDescription})}async trackSecurityScanCompleted(e){await this.trackEvent(Sv.SecurityScanCompleted,{message:"Snap security scan completed",origin:e.origin,account_type:e.accountType,chain_id_caip:e.chainIdCaip,scan_status:e.scanStatus,has_security_alerts:e.hasSecurityAlerts})}},VI=new class{#ut="keyringAccounts";#Ie;constructor(e){this.#Ie=e}async getAll(){const e=await this.#Ie.getKey(this.#ut);return Object.values(e??{})}async findById(e){return(await this.getAll()).find((t=>t.id===e))??null}async findByIds(e){return(await this.getAll()).filter((t=>e.includes(t.id)))??null}async findByAddress(e){return(await this.getAll()).find((t=>t.address===e))??null}async create(e){return await this.#Ie.setKey(`${this.#ut}.${e.id}`,e),e}async delete(e){await Promise.all([this.#Ie.deleteKey(`${this.#ut}.${e}`),this.#Ie.deleteKey(`assets.${e}`),this.#Ie.deleteKey(`transactions.${e}`)])}}(zI),GI=new class{#Ie;constructor(e){this.#Ie=e}async getByAccountId(e){return await this.#Ie.getKey(`assets.${e}`)??[]}async getByAccountIdAndAssetType(e,t){return(await this.getByAccountId(e)).find((e=>e.assetType===t))??null}async getByAccountIdAndAssetTypes(e,t){const r=await this.getByAccountId(e),n=[];for(const e of t){const t=r.find((t=>t.assetType===e));n.push(t??null)}return n}async getAll(){const e=await this.#Ie.getKey("assets")??{};return Object.values(e).flat()}async saveMany(e){await this.#Ie.update((t=>{const r=(0,ge.cloneDeep)(t);for(const t of e){const{keyringAccountId:e}=t,n=(0,ge.cloneDeep)(r.assets[e]??[]),o=n.findIndex((e=>e.assetType===t.assetType&&e.keyringAccountId===t.keyringAccountId));-1===o?n.push(t):n[o]=t,r.assets[e]=n}return r}))}}(zI),HI=new class{#Ie;#lt="transactions";constructor(e){this.#Ie=e}async getAll(){const e=await this.#Ie.getKey(this.#lt);return Object.values(e??{}).flat()}async findByAccountId(e){return await this.#Ie.getKey(`${this.#lt}.${e}`)??[]}async getTransactionIdsByAccountId(e){const t=await this.#Ie.getKey(`${this.#lt}.${e}`);return new Set((t??[]).map((e=>e.id)))}async save(e){await this.saveMany([e])}async saveMany(e){await this.#Ie.update((t=>{const r=t[this.#lt];return e.forEach((e=>{const n=e.id,o=e.account,s=r[o]??[],a=s.findIndex((e=>e.id===n));-1!==a&&(s[a]=e);const i=(0,ge.chain)([...s,e]).uniqBy("id").sortBy((e=>-(e.timestamp??0))).value();t[this.#lt][o]=i})),t}))}}(zI),KI=new class{#dt=new Map;constructor({configProvider:e}){const{baseUrls:t}=e.get().tronHttpApi;Object.entries(t).forEach((([e,t])=>{this.#dt.set(e,{baseUrl:t,headers:{"Content-Type":"application/json","Access-Control-Allow-Headers":"*","Access-Control-Allow-Origin":"*"}})}))}async getTRC10TokenById(e,t){const r=this.#dt.get(t);if(!r)throw new Error(`No client configured for network: ${t}`);const{baseUrl:n,headers:o}=r,s=Bv({baseUrl:n,path:"/wallet/getassetissuebyid"}),a=JSON.stringify({value:e}),i=await fetch(s,{method:"POST",headers:o,body:a});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const c=await i.json();return R(c,Rv),c}async getTRC10TokenMetadata(e,t){const r=await this.getTRC10TokenById(e,t);return{name:r.name,symbol:r.abbr,decimals:r.precision}}async getAccountResources(e,t){const r=this.#dt.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=Bv({baseUrl:n,path:"/wallet/getaccountresource"}),a=JSON.stringify({address:t,visible:!0}),i=await fetch(s,{method:"POST",headers:o,body:a});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const c=await i.json();return R(c,Mv),c}async getTransactionInfoById(e,t){const r=this.#dt.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=Bv({baseUrl:n,path:"/wallet/gettransactioninfobyid"}),a=JSON.stringify({value:t}),i=await fetch(s,{method:"POST",headers:o,body:a});if(!i.ok){if(404===i.status)return null;throw new Error(`HTTP error! status: ${i.status}`)}const c=await i.json();return c?.id&&c?.blockNumber?(R(c,Nv),c):null}async getNextMaintenanceTime(e){const t=this.#dt.get(e);if(!t)throw new Error(`No client configured for network: ${e}`);const{baseUrl:r,headers:n}=t,o=Bv({baseUrl:r,path:"/wallet/getnextmaintenancetime"}),s=await fetch(o,{method:"POST",headers:n});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);const a=await s.json();return R(a,Uv),a.num}async getChainParameters(e){const t=this.#dt.get(e);if(!t)throw new Error(`No client configured for network: ${e}`);const{baseUrl:r,headers:n}=t,o=Bv({baseUrl:r,path:"/wallet/getchainparameters"}),s=await fetch(o,{headers:n});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);const a=await s.json();if(R(a,Lv),!a.chainParameter)throw new Error("No chain parameters found");for(const e of a.chainParameter)R(e,Dv);return a.chainParameter}async triggerConstantContract(e,t){const r=this.#dt.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=Bv({baseUrl:n,path:"/wallet/triggerconstantcontract"}),a=await fetch(s,{method:"POST",headers:o,body:JSON.stringify(Object.fromEntries(Object.entries(t).filter((([e,t])=>null!=t))))});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const i=await a.json();return R(i,Vv),i}async getContract(e,t){const r=this.#dt.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=Bv({baseUrl:n,path:"/wallet/getcontract"}),a=JSON.stringify({value:t,visible:!1}),i=await fetch(s,{method:"POST",headers:o,body:a});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const c=await i.json();return c&&0!==Object.keys(c).length?(R(c,Gv),c):null}}({configProvider:$I}),ZI=new class{#Ie;prefix;logger;constructor(e,t=console,r="__cache__default"){this.#Ie=e,this.logger=t,this.prefix=r}async get(e){return(await this.mget([e]))[e]}async set(e,t,r=Number.MAX_SAFE_INTEGER){this.#ft(r),await this.#Ie.setKey(`${this.prefix}.${e}`,{value:t,expiresAt:Math.min(Date.now()+(r??Number.MAX_SAFE_INTEGER),Number.MAX_SAFE_INTEGER)})}#ft(e){if(void 0!==e){if("number"!=typeof e)throw new Error("TTL must be a number");if(e<0)throw new Error("TTL must be positive");if(e>Number.MAX_SAFE_INTEGER)throw new Error("TTL must be less than 2^53 - 1")}}async delete(e){return(await this.mdelete([e]))[e]??!1}async clear(){await this.#Ie.setKey(this.prefix,{})}async has(e){return void 0!==await this.get(e)}async keys(){const e=await this.#Ie.getKey(this.prefix);return Object.keys(e??{})}async size(){const e=await this.#Ie.getKey(this.prefix);return Object.keys(e??{}).length}async peek(e){const t=await this.#Ie.getKey(this.prefix),r=t?.[e];return r?.value}async mget(e){const t=await this.#Ie.getKey(this.prefix);if(!t)return{};const r=Object.entries(t).filter((([t])=>e.includes(t))),n=r.filter((([e,t])=>t&&t.expiresAt<Date.now()));await this.mdelete(n.map((([e])=>e)));const o={};return r.forEach((([e,t])=>{if(void 0===t)return this.logger.info(`[StateCache] ❌ Cache miss for key "${e}"`),void(o[e]=void 0);t.expiresAt<Date.now()?(this.logger.info(`[StateCache] ⌛ Cache expired for key "${e}"`),o[e]=void 0):(this.logger.info(`[StateCache] 🎉 Cache hit for key "${e}"`),o[e]=t.value)})),e.forEach((e=>{e in o||(this.logger.info(`[StateCache] ❌ Cache miss for key "${e}"`),o[e]=void 0)})),o}async mset(e){if(0!==e.length)if(1!==e.length)e.forEach((({ttlMilliseconds:e})=>{this.#ft(e)})),await this.#Ie.update((t=>{const r=t[this.prefix]??{};return e.forEach((({key:e,value:t,ttlMilliseconds:n})=>{void 0!==t&&(r[e]={value:t,expiresAt:Math.min(Date.now()+(n??Number.MAX_SAFE_INTEGER),Number.MAX_SAFE_INTEGER)})})),t[this.prefix]=r,t}));else{v(e[0]);const{key:t,value:r,ttlMilliseconds:n}=e[0];await this.set(t,r,n)}}async mdelete(e){const t={};return await this.#Ie.update((r=>{const n=r[this.prefix]??{};return e.forEach((e=>{void 0===n[e]?t[e]=!1:(delete n[e],t[e]=!0)})),r[this.prefix]=n,r})),t}}(zI,_e,"__cache__trongrid"),qI=new class{#dt=new Map;#Oe;#pt;#ht;constructor({configProvider:e,tronHttpClient:t,cache:r}){const{baseUrls:n}=e.get().trongridApi;Object.entries(n).forEach((([e,t])=>{this.#dt.set(e,{baseUrl:t,headers:{"Content-Type":"application/json","Access-Control-Allow-Headers":"*","Access-Control-Allow-Origin":"*"}})})),this.#Oe=t,this.#pt=r,this.#ht=((e,t,{functionName:r,generateCacheKey:n})=>{const o=n??pP,s=r??e.name??"anonymousFunction",a=new Map;return async(...r)=>{const n=o(s,r),i=Date.now(),c=a.get(n);if(void 0!==c&&i<c)try{const e=await t.get(n);if(void 0!==e)return e}catch(e){Re.error(`Cache get error for key "${n}":`,e)}const{result:u,expiresAt:l}=await e(...r),d=Math.max(0,l-i);return t.set(n,u,d).catch((e=>{Re.error(`Cache set error for key "${n}":`,e)})),a.set(n,l),u}})(this.#gt.bind(this),this.#pt,{functionName:"TrongridApiClient:getChainParameters"})}async getAccountInfoByAddress(e,t){const r=this.#dt.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=Bv({baseUrl:n,path:"/v1/accounts/{address}",pathParams:{address:t}}),a=await fetch(s,{headers:o});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const i=await a.json();if("boolean"!=typeof i.success||!i.success)throw new Error("API request failed");if(R(i.meta,fP),!i.data||0===i.data.length)throw new Error("Account not found or no data returned");const c=i.data[0];if(!c)throw new Error("No data");return R(c,Qv),c}async getTransactionInfoByAddress(e,t){const r=this.#dt.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=Bv({baseUrl:n,path:"/v1/accounts/{address}/transactions",pathParams:{address:t}}),a=await fetch(s,{headers:o});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const i=await a.json();if("boolean"!=typeof i.success||!i.success)throw new Error("API request failed");if(R(i.meta,fP),!i.data)throw new Error("API request failed");for(const e of i.data)R(e,uP);return i.data}async getContractTransactionInfoByAddress(e,t){const r=this.#dt.get(e);if(!r)throw new Error(`No client configured for network: ${e}`);const{baseUrl:n,headers:o}=r,s=Bv({baseUrl:n,path:"/v1/accounts/{address}/transactions/trc20",pathParams:{address:t}}),a=await fetch(s,{headers:o});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);const i=await a.json();if("boolean"!=typeof i.success||!i.success)throw new Error("API request failed");if(R(i.meta,fP),!i.data)throw new Error("API request failed");for(const e of i.data)R(e,dP);return i.data}async getChainParameters(e){return this.#ht(e)}async#gt(e){const[t,r]=await Promise.all([this.#Oe.getChainParameters(e),this.#Oe.getNextMaintenanceTime(e)]);return{result:t,expiresAt:r}}}({configProvider:$I,tronHttpClient:KI,cache:ZI}),JI=new class{#ve;constructor({configProvider:e}){this.#ve=e}createClient(e,t){const r=this.#ve.get(),{baseUrls:n}=r.trongridApi,o=n[e];if(!o)throw new Error(`No configuration found for network: ${e}`);const s={fullHost:o,...t&&{privateKey:t}};return new PT(s)}}({configProvider:$I}),YI=new class{#pt=new Map;logger;constructor(e){this.logger=e}#ft(e){if(void 0!==e){if("number"!=typeof e)throw new Error("TTL must be a number");if(e<0)throw new Error("TTL must be positive");if(e>Number.MAX_SAFE_INTEGER)throw new Error("TTL must be less than 2^53 - 1")}}#yt(e){return e.expiresAt<Date.now()}async#mt(){const e=[];for(const[t,r]of this.#pt.entries())this.#yt(r)&&e.push(t);await this.mdelete(e)}async get(e){return(await this.mget([e]))[e]}async set(e,t,r=Number.MAX_SAFE_INTEGER){this.#ft(r),this.#pt.set(e,{value:t,expiresAt:Math.min(Date.now()+(r??Number.MAX_SAFE_INTEGER),Number.MAX_SAFE_INTEGER)})}async delete(e){return(await this.mdelete([e]))[e]??!1}async clear(){this.#pt.clear()}async has(e){const t=this.#pt.get(e);return!!t&&(!this.#yt(t)||(this.#pt.delete(e),!1))}async keys(){return await this.#mt(),Array.from(this.#pt.keys())}async size(){return await this.#mt(),this.#pt.size}async peek(e){const t=this.#pt.get(e);if(t){if(!this.#yt(t))return t.value;this.#pt.delete(e)}}async mget(e){await this.#mt();const t={};for(const r of e){const e=this.#pt.get(r);e?(this.logger.info(`[InMemoryCache] 🎉 Cache hit for key "${r}"`),t[r]=e.value):(this.logger.info(`[InMemoryCache] ❌ Cache miss for key "${r}"`),t[r]=void 0)}return t}async mset(e){if(0!==e.length)if(1!==e.length)e.forEach((({ttlMilliseconds:e})=>{this.#ft(e)})),e.forEach((({key:e,value:t,ttlMilliseconds:r})=>{void 0!==t&&this.#pt.set(e,{value:t,expiresAt:Math.min(Date.now()+(r??Number.MAX_SAFE_INTEGER),Number.MAX_SAFE_INTEGER)})}));else{v(e[0]);const{key:t,value:r,ttlMilliseconds:n}=e[0];await this.set(t,r,n)}}async mdelete(e){return Object.fromEntries(e.map((e=>[e,this.#pt.delete(e)])))}}(_e),XI=new class{#Q;#ee;#te;#re;#pt;cacheTtlsMilliseconds;constructor(e,t,r=globalThis.fetch,n=Re){const{baseUrl:o,chunkSize:s,cacheTtlsMilliseconds:a}=e.get().priceApi;R(o,ov),this.#Q=r,this.#ee=n,this.#te=o,this.#re=s,this.cacheTtlsMilliseconds=a,this.#pt=t}async getFiatExchangeRates(){try{const e=Bv({baseUrl:this.#te,path:"/v1/exchange-rates/fiat"}),t=await this.#Q(e);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const r=await t.json();return R(r,ve),r}catch(e){throw this.#ee.error(e,"Error fetching fiat exchange rates"),e}}async#bt(e,t="usd"){try{if(0===e.length)return{};const r=[...new Set(e)],n=[];for(let e=0;e<r.length;e+=this.#re)n.push(r.slice(e,e+this.#re));const o=await Promise.all(n.map((async e=>{const r=Bv({baseUrl:this.#te,path:"/v3/spot-prices",queryParams:{vsCurrency:t,assetIds:e.join(","),includeMarketData:"true"}}),n=await this.#Q(r);if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const o=await n.json();return R(o,Ee),o}))),s=o.reduce(((e,t)=>({...e,...t})),{});return await this.#pt.mset(e.map((e=>({key:`PriceApiClient:getMultipleSpotPrices:${e}:${t}`,value:s[e],ttlMilliseconds:this.cacheTtlsMilliseconds.spotPrices})))),s}catch(e){throw this.#ee.error(e,"Error fetching spot prices"),e}}async#wt(e,t="usd"){const r=[...new Set(e)],n="PriceApiClient:getMultipleSpotPrices",o=e=>`${n}:${e}:${t}`,s=await this.#pt.mget(r.map(o)),a=(0,ge.mapKeys)(s,((e,t)=>(e=>{const t=new RegExp(`^${n}:(.+):(.+)$`,"u"),r=e.match(t);if(!r)throw new Error("Invalid cache key");return r})(t)[1])),i=r.filter((e=>void 0===a[e]));if(0===i.length)return a;const c=await this.#bt(i,t);return await this.#pt.mset(Object.entries(c).map((([e,t])=>({key:o(e),value:t,ttlMilliseconds:this.cacheTtlsMilliseconds.spotPrices})))),{...a,...c}}async getMultipleSpotPrices(e,t="usd"){R(e,U(fe)),R(t,Ce);const r=e.filter((e=>!wo.includes(e)));return this.#wt(r,t)}async#Tt(e){const t=Bv({baseUrl:this.#te,path:"/v3/historical-prices/{assetType}",pathParams:{assetType:e.assetType},queryParams:{...e.timePeriod&&{timePeriod:e.timePeriod},...e.from&&{from:e.from.toString()},...e.to&&{to:e.to.toString()},...e.vsCurrency&&{vsCurrency:e.vsCurrency}},encodePathParams:!1}),r=await this.#Q(t),n=await r.json();return R(n,We),n}async getHistoricalPrices(e){return R(e,Be),((e,t,{ttlMilliseconds:r,functionName:n,generateCacheKey:o})=>{const s=o??Me,a=n??e.name??"anonymousFunction";return async(...n)=>{const o=s(a,n);try{const e=await t.get(o);if(void 0!==e)return e}catch(e){Re.error(`Cache get error for key "${o}":`,e)}const i=await e(...n);return t.set(o,i,r).catch((e=>{Re.error(`Cache set error for key "${o}":`,e)})),i}})(this.#Tt.bind(this),this.#pt,{functionName:"PriceApiClient:getHistoricalPrices",ttlMilliseconds:this.cacheTtlsMilliseconds.historicalPrices})(e)}}($I,YI),QI=new Ov($I),e_=new class{#Q;#ee;#te;constructor(e,t){this.#Q=fetch,this.#ee=Oe(Re,"[🔒 SecurityAlertsApiClient]"),this.#te=e.get().securityAlertsApi.baseUrl}async scanTransaction({accountAddress:e,parameters:t,origin:r,options:n=["simulation","validation"]}){this.#ee.info("Scanning Tron transaction with Security Alerts API");const o=await this.#Q(`${this.#te}/tron/transaction/scan`,{headers:{"Content-Type":"application/json",accept:"application/json"},method:"POST",body:JSON.stringify({account_address:e,metadata:{domain:r},data:t,options:n})});if(!o.ok){const e=await o.json();throw this.#ee.error(`Security Alerts API error: ${o.status} - ${JSON.stringify(e)}`),new Error(`Security Alerts API error: ${o.status} - ${JSON.stringify(e)}`)}return await o.json()}}($I,Re),t_=new yI({logger:Re,state:zI,assetsRepository:GI,trongridApiClient:qI,tronHttpClient:KI,priceApiClient:XI,tokenApiClient:QI}),r_=new class{#ee;#At;#_e;#Oe;constructor({logger:e,transactionsRepository:t,trongridApiClient:r,tronHttpClient:n}){this.#ee=Oe(e,"[🧾 TransactionsService]"),this.#At=t,this.#_e=r,this.#Oe=n}async#vt(e,t){const r=t.map((async t=>{const r="TriggerSmartContract"===t.raw_data.contract?.[0]?.type,n=!t.internal_transactions||0===t.internal_transactions.length,o=t.raw_data.contract?.[0]?.parameter?.value?.call_value>0;if(r&&n&&o){this.#ee.debug(`Attempting to enrich transaction ${t.txID} with full details for swap detection.`);try{const r=await this.#Oe.getTransactionInfoById(e,t.txID);if(r)return{...t,internal_transactions:r.internal_transactions??[]}}catch(e){this.#ee.warn({txId:t.txID,error:e},`Failed to enrich transaction ${t.txID}`)}}return t}));return(await Promise.allSettled(r)).map((e=>"fulfilled"===e.status?e.value:null)).filter(Boolean)}async#Pt(e,t){const r=new Map,n=new Set;for(const e of t){const t=e.raw_data.contract?.[0];if("TransferAssetContract"===t?.type){const e=t.parameter.value.asset_name;e&&n.add(e)}}if(0===n.size)return r;this.#ee.debug(`Fetching metadata for ${n.size} TRC10 tokens...`);const o=Array.from(n).map((async t=>{try{return{tokenId:t,metadata:await this.#Oe.getTRC10TokenMetadata(t,e)}}catch(e){return this.#ee.warn({tokenId:t,error:e},`Failed to fetch TRC10 token metadata for ${t}, will use default decimals`),null}})),s=await Promise.allSettled(o);for(const e of s)"fulfilled"===e.status&&e.value&&r.set(e.value.tokenId,e.value.metadata);return this.#ee.debug(`Successfully fetched metadata for ${r.size}/${n.size} TRC10 tokens.`),r}async fetchNewTransactionsForAccount(e,t){this.#ee.info(`Fetching new transactions for account ${t.address} on network ${e}...`);const r=await this.#At.getTransactionIdsByAccountId(t.id);this.#ee.debug(`Found ${r.size} existing transactions in state for account ${t.id}.`);const{rawTransactions:n,trc20Transactions:o}=await this.#Et(e,t.address);this.#ee.info(`Fetched ${n.length} raw transactions and ${o.length} TRC20 assistance data for account ${t.address} on network ${e}.`);const s=n.filter((e=>!r.has(e.txID)));if(this.#ee.info(`Found ${s.length} new transactions to process (${n.length-s.length} already in state).`),0===s.length)return this.#ee.info("No new transactions found."),[];const{enrichedRawTransactions:a,trc10TokenMetadata:i}=await this.#Ct(e,s);this.#ee.info(`Enriched ${a.length} new transactions, fetched metadata for ${i.size} TRC10 tokens.`);const c=new Set(s.map((e=>e.txID))),u=o.filter((e=>c.has(e.transaction_id))),l=aB.mapTransactions({scope:e,account:t,rawTransactions:a,trc20Transactions:u,trc10TokenMetadata:i});return this.#ee.info(`Returning ${l.length} new transactions for account ${t.address} on network ${e}.`),l}async#Et(e,t){const[r,n]=await Promise.allSettled([this.#_e.getTransactionInfoByAddress(e,t),this.#_e.getContractTransactionInfoByAddress(e,t)]);let o=[],s=[];return"rejected"===r.status?this.#ee.error(`Failed to fetch raw transactions for address ${t} on network ${e}`):o=r.value,"rejected"===n.status?this.#ee.error(`Failed to fetch TRC20 transactions for address ${t} on network ${e}`):s=n.value,{rawTransactions:o,trc20Transactions:s}}async#Ct(e,t){const[r,n]=await Promise.all([this.#vt(e,t),this.#Pt(e,t)]);return{enrichedRawTransactions:r,trc10TokenMetadata:n}}async findByAccounts(e){return(await Promise.all(e.map((async e=>this.#At.findByAccountId(e.id))))).flat()}async save(e){await this.saveMany([e])}async saveMany(e){await this.#At.saveMany(e);const t=(0,ge.groupBy)(e,"account");await xW(snap,Un.AccountTransactionsUpdated,{transactions:t})}}({logger:Re,transactionsRepository:HI,trongridApiClient:qI,tronHttpClient:KI}),n_=new gI({logger:Re,snapClient:jI,accountsRepository:VI,configProvider:$I,assetsService:t_,transactionsService:r_}),o_=new class{#ee;#_e;#Oe;constructor({logger:e,trongridApiClient:t,tronHttpClient:r}){this.#ee=Oe(e,"[💸 FeeCalculatorService]"),this.#_e=t,this.#Oe=r}#Bt(e){const t=WI.from(e.raw_data_hex,"hex").byteLength,r=e;if(r.signature&&Array.isArray(r.signature)){const e=r.signature.reduce(((e,t)=>e+t.length/2),0);return no(t+e+64+5)}return no(t+134)}async#Wt(e,t,r){const n=t.raw_data.contract;if(!n||0===n.length)return this.#ee.log("No contracts found in transaction, assuming zero energy usage"),oo;let o=oo;for(const t of n){const n=t.type;let s;this.#ee.log(`Calculating energy for contract type: ${n}`),"TransferContract"===n||"TransferAssetContract"===n?s=oo:"TriggerSmartContract"===n?s=no(await this.#St(e,t,r)):SI.has(n)?(this.#ee.log(`System contract ${n} detected, zero energy consumption`),s=oo):(this.#ee.warn(`Unknown contract type: ${n}, using conservative estimate`),s=no(13e4)),this.#ee.log(`Contract ${n} energy: ${s.toString()}`),o=o.plus(s)}return this.#ee.log(`Total energy for transaction: ${o.toString()}`),o}async#It(e,t){try{return await this.#_e.getAccountInfoByAddress(e,t),!0}catch{return this.#ee.log(`Account ${t} is not activated on ${e}`),!1}}async#_t(e,t){const r=await this.#_e.getChainParameters(e),n=r.find((e=>"getEnergyFee"===e.key))?.value??420,o=Math.floor(t/n);return this.#ee.log({feeLimit:t,energyPrice:n,maxEnergyFromFeeLimit:o},"Calculated fallback energy from fee limit"),o}async#Ot(e,t){return void 0!==t&&t>0?this.#_t(e,t):13e4}#Rt(e,t){if(!t)return{userEnergy:e};const r=t.consume_user_resource_percent??100,n=t.origin_energy_limit??0;if(r>=100||n<=0)return{userEnergy:e};const o=Math.ceil(e*(r/100)),s=e-o,a=Math.min(s,n),i=e-a;return this.#ee.log({totalEnergy:e,userPercent:r,maxDeployerSubsidy:n,userTheoretical:o,deployerTheoretical:s,deployerActual:a,userActual:i},"Energy sharing calculation"),{userEnergy:i}}async#St(e,t,r){try{const{data:n,owner_address:o,contract_address:s,call_value:a,token_id:i,call_token_id:c,call_token_value:u}=t.parameter.value;if(!n)throw this.#ee.warn("No data field found in contract, using fallback"),new Error("No data field found in contract");this.#ee.log({contractAddress:s,ownerAddress:o,callValue:a,tokenId:i,callTokenId:c,callTokenValue:u},"Estimating energy");const[l,d]=await Promise.all([this.#Oe.triggerConstantContract(e,{owner_address:o,contract_address:s,data:n,call_value:a,token_id:i,call_token_id:c,call_token_value:u}),this.#Oe.getContract(e,s).catch((()=>(this.#ee.warn("Failed to fetch contract info for energy sharing, assuming user pays all"),null)))]);if("FAILED"===l.transaction.ret[0]?.ret)throw new Error("Simulation yields failed result");if("energy_used"in l){const e=l.energy_used,{userEnergy:t}=this.#Rt(e,d);return this.#ee.log({data:n.slice(0,8),totalEnergy:e,userEnergy:t,energyPenalty:l.energy_penalty,hasEnergySharing:null!==d},`Energy estimate for ${n.slice(0,8)}: user pays ${t} of ${e} units`),t}return this.#ee.warn("No energy_used in result, using fallback"),this.#Ot(e,r)}catch(t){return this.#ee.error({error:t},"Failed to estimate smart contract energy, using fallback"),this.#Ot(e,r)}}async#Mt({scope:e,transaction:t}){const r=t.raw_data.contract;if(!r||0===r.length)return oo;const n=[];for(const e of r)if("TransferContract"===e.type){const{amount:t,to_address:r}=e.parameter.value;t>0&&r&&n.push(r)}if(0===n.length)return oo;const o=(await Promise.all(n.map((async t=>({address:t,isActivated:await this.#It(e,t)}))))).filter((({address:e,isActivated:t})=>!t&&(this.#ee.log(`Account ${e} is not activated, activation fee required`),!0))).length;return so.multipliedBy(o)}async computeFee({scope:e,transaction:t,availableEnergy:r,availableBandwidth:n,feeLimit:o}){this.#ee.log("Calculating fee for transaction ",JSON.stringify(t));const s=this.#Bt(t),a=await this.#Wt(e,t,o),i=n.isGreaterThanOrEqualTo(s),c=i?s:oo,u=i?oo:s,l=no.min(a,r),d=no.max(a.minus(r),oo);let f=oo;if(u.isGreaterThan(0)||d.isGreaterThan(0)){const t=await this.#_e.getChainParameters(e),r=t.find((e=>"getTransactionFee"===e.key))?.value??1e3,n=t.find((e=>"getEnergyFee"===e.key))?.value??100,o=u.multipliedBy(r).div(ao),s=d.multipliedBy(n).div(ao);f=f.plus(o).plus(s)}const p=await this.#Mt({scope:e,transaction:t});p.isGreaterThan(0)&&(f=f.plus(p));const h=[{type:Rr.Base,asset:{unit:bo[e].nativeToken.symbol,type:bo[e].nativeToken.id,amount:Number(f.toFixed(6)).toString(),fungible:!0}}];return l.isGreaterThan(0)&&h.push({type:Rr.Base,asset:{unit:bo[e].energy.symbol,type:bo[e].energy.id,amount:l.toString(),fungible:!0}}),c.isGreaterThan(0)&&h.push({type:Rr.Base,asset:{unit:bo[e].bandwidth.symbol,type:bo[e].bandwidth.id,amount:c.toString(),fungible:!0}}),h}}({logger:Re,trongridApiClient:qI,tronHttpClient:KI}),s_=new class{#xt;#Pe;#Ft;#kt;#ee;#Ce;constructor({accountsService:e,assetsService:t,tronWebFactory:r,feeCalculatorService:n,logger:o,snapClient:s}){this.#xt=e,this.#Pe=t,this.#Ft=r,this.#kt=n,this.#ee=Oe(o,"[💸 SendService]"),this.#Ce=s}async validateSend({scope:e,fromAccountId:t,toAddress:r,asset:n,amount:o}){this.#ee.log("Validating send",{scope:e,fromAccountId:t,toAddress:r,assetType:n.assetType,amount:o.toString()});const s=bo[e].nativeToken.id,a=n.assetType===s,[i,c,u,l]=await this.#Pe.getAssetsByAccountId(t,[n.assetType,s,bo[e].bandwidth.id,bo[e].energy.id]),d=i?new no(i.uiAmount):oo,f=c?new no(c.uiAmount):oo,p=u?new no(u.rawAmount):oo,h=l?new no(l.rawAmount):oo;if(o.isGreaterThan(d))return this.#ee.log("Insufficient balance for asset being sent",{amount:o.toString(),assetBalance:d.toString()}),{valid:!1,errorCode:tW.InsufficientBalance};const g=await this.buildTransaction({fromAccountId:t,toAddress:r,asset:n,amount:o.toNumber()}),y=await this.#kt.computeFee({scope:e,transaction:g,availableEnergy:h,availableBandwidth:p}),m=new no(y.find((e=>e.asset.type===s))?.asset.amount??"0"),b=a?o.plus(m):m;return this.#ee.log("Validation calculation",{isNativeToken:a,amount:o.toString(),trxFee:m.toString(),totalTrxNeeded:b.toString(),nativeTokenBalance:f.toString()}),b.isGreaterThan(f)?(this.#ee.log("Insufficient TRX balance to cover fees",{totalTrxNeeded:b.toString(),nativeTokenBalance:f.toString()}),{valid:!1,errorCode:tW.InsufficientBalanceToCoverFee}):{valid:!0}}async buildTransaction({fromAccountId:e,toAddress:t,asset:r,amount:n}){const{chainId:o,assetNamespace:s,assetReference:a}=he(r.assetType);try{switch(s){case"slip44":return this.#ee.log("Sending TRX transaction"),this.buildSendTrxTransaction({scope:o,fromAccountId:e,toAddress:t,amount:n});case"trc10":return this.#ee.log(`Sending TRC10 token: ${a}`),this.buildSendTrc10Transaction({scope:o,fromAccountId:e,toAddress:t,amount:n,tokenId:a,decimals:r.decimals});case"trc20":return this.#ee.log(`Sending TRC20 token: ${a}`),this.buildSendTrc20Transaction({scope:o,fromAccountId:e,toAddress:t,contractAddress:a,amount:n,decimals:r.decimals});default:throw new Error(`Unsupported asset namespace: ${s}`)}}catch(e){throw this.#ee.error({error:e},"Failed to send asset"),new Error(`Failed to send asset: ${e instanceof Error?e.message:"Unknown error"}`)}}async buildSendTrxTransaction({scope:e,fromAccountId:t,toAddress:r,amount:n}){const o=await this.#xt.findByIdOrThrow(t),s=this.#Ft.createClient(e),a=Number(rB(n));return s.transactionBuilder.sendTrx(r,a,o.address)}async buildSendTrc10Transaction({scope:e,fromAccountId:t,toAddress:r,amount:n,tokenId:o,decimals:s}){const a=await this.#xt.findByIdOrThrow(t),i=this.#Ft.createClient(e),c=Number(oB(n,s));return i.transactionBuilder.sendToken(r,c,o,a.address)}async buildSendTrc20Transaction({scope:e,fromAccountId:t,toAddress:r,contractAddress:n,amount:o,decimals:s}){const a=await this.#xt.findByIdOrThrow(t),i=this.#Ft.createClient(e),c=[{type:"address",value:r},{type:"uint256",value:oB(o,s)}];return(await i.transactionBuilder.triggerSmartContract(n,"transfer(address,uint256)",{},c,a.address)).transaction}#Nt(e){const t=e.raw_data?.contract?.[0],r=t?.parameter?.value?.owner_address;if(!r)return null;try{return PT.address.fromHex(r)}catch{return null}}async signAndSendTransaction({scope:e,fromAccountId:t,transaction:r,origin:n="MetaMask"}){const o=await this.#xt.findByIdOrThrow(t),s=this.#Nt(r);if(!s)throw new Error("Transaction is missing owner_address - cannot verify sender");if(s!==o.address)throw new Error(`Transaction owner_address (${s}) does not match the account address (${o.address})`);const{privateKeyHex:a}=await this.#xt.deriveTronKeypair({entropySource:o.entropySource,derivationPath:o.derivationPath}),i=this.#Ft.createClient(e,a),c=await i.trx.sign(r),u=await i.trx.sendRawTransaction(c);if(!u.result)throw new Error(`Failed to send transaction: ${u.message}`);return await this.#Ce.trackTransactionSubmitted({origin:n,accountType:o.type,chainIdCaip:e}),await this.#Ce.scheduleBackgroundEvent({method:QB.TrackTransaction,params:{txId:u.txid,scope:e,accountIds:[t],attempt:0},duration:"PT1S"}),u}}({logger:Re,snapClient:jI,accountsService:n_,assetsService:t_,tronWebFactory:JI,feeCalculatorService:o_}),a_=new class{#ee;#xt;#Ft;#Ce;constructor({logger:e,accountsService:t,tronWebFactory:r,snapClient:n}){this.#ee=Oe(e,"[💸 StakingService]"),this.#xt=t,this.#Ft=r,this.#Ce=n}async stake({account:e,assetId:t,amount:r,purpose:n,srNodeAddress:o}){this.#ee.info(`Staking ${r.toString()} ${t} from ${e.address} for ${n}...`);const{chainId:s}=he(t),{privateKeyHex:a}=await this.#xt.deriveTronKeypair({entropySource:e.entropySource,derivationPath:e.derivationPath}),i=this.#Ft.createClient(s,a),c=Number(rB(r)),u=await i.transactionBuilder.freezeBalanceV2(c,n,e.address),l=await i.trx.sign(u);await i.trx.sendRawTransaction(l);const d=r.integerValue(no.ROUND_DOWN).toNumber(),f=o??"TVMwGfdDz58VvM7yTzGMWWSHsmofSxa9jH",p=await i.transactionBuilder.vote({[f]:d},e.address),h=await i.trx.sign(p);await i.trx.sendRawTransaction(h),await this.#Ce.scheduleBackgroundEvent({method:QB.SynchronizeAccount,params:{accountId:e.id},duration:"PT5S"})}async unstake({account:e,assetId:t,amount:r}){this.#ee.info(`Unstaking ${r.toString()} ${t} from ${e.address}...`);const{chainId:n}=he(t),{privateKeyHex:o}=await this.#xt.deriveTronKeypair({entropySource:e.entropySource,derivationPath:e.derivationPath}),s=this.#Ft.createClient(n,o);let a;if([co.TrxStakedForBandwidthMainnet,co.TrxStakedForBandwidthNile,co.TrxStakedForBandwidthShasta].includes(t)&&(a="BANDWIDTH"),[co.TrxStakedForEnergyMainnet,co.TrxStakedForEnergyNile,co.TrxStakedForEnergyShasta].includes(t)&&(a="ENERGY"),!a)throw new Error("Invalid asset ID");const i=Number(rB(r)),c=await s.transactionBuilder.unfreezeBalanceV2(i,a,e.address),u=await s.trx.sign(c);await s.trx.sendRawTransaction(u),await this.#Ce.scheduleBackgroundEvent({method:QB.SynchronizeAccount,params:{accountId:e.id},duration:"PT5S"})}}({logger:Re,snapClient:jI,accountsService:n_,tronWebFactory:JI}),i_=new class{#ee;#xt;#Ft;constructor({logger:e,accountsService:t,tronWebFactory:r}){this.#ee=Oe(e,"[💼 WalletService]"),this.#xt=t,this.#Ft=r}async handleKeyringRequest({account:e,scope:t,method:r,params:n}){this.#ee.log("Handling wallet request",{method:r,accountId:e.id,scope:t,params:n});try{switch(r){case GA.SignMessage:return await this.signMessage({account:e,scope:t,params:n});case GA.SignTransaction:return await this.signTransaction({account:e,scope:t,params:n});default:throw new BE("Unsupported wallet method",HA)}}catch(e){if(this.#ee.error({error:e},"Error handling wallet request"),4100===e.code||e.message?.includes("rejected"))throw new BE(ZA.message,ZA);if(4001===e.code||e.message?.includes("Invalid"))throw new BE(e.message??HA.message,HA);throw new BE(e.message??qA.message,qA)}}async signMessage({account:e,scope:t,params:r}){try{VW(r,bv);const{address:n,message:o}=r,{privateKeyHex:s}=await this.#xt.deriveTronKeypair({entropySource:e.entropySource,derivationPath:e.derivationPath}),a=this.#Ft.createClient(t,s),i=LI.from(o,"base64").toString("utf8"),c={signature:a.trx.signMessageV2(i,s)};return GW(c,wv),this.#ee.log("Message signed successfully",{address:n}),c}catch(e){throw this.#ee.error({error:e},"Error signing message"),e}}async signTransaction({account:e,scope:t,params:r}){try{VW(r,Tv);const{address:n,transaction:{rawDataHex:o,type:s}}=r,{privateKeyHex:a}=await this.#xt.deriveTronKeypair({entropySource:e.entropySource,derivationPath:e.derivationPath}),i=this.#Ft.createClient(t,a),c=i.utils.deserializeTx.deserializeTransaction(s,o),u={visible:!1,txID:VC(await tB(GC(o))).slice(2),raw_data:c,raw_data_hex:o},l=(await i.trx.sign(u,a)).signature,d={signature:`0x${l?.[0]??""}`};return this.#ee.log("Transaction signed successfully",{address:n,scope:t}),d}catch(e){if(this.#ee.error({error:e},"Error signing transaction"),e.message?.includes("deserialize")||e.message?.includes("parse")||e.message?.includes("invalid"))throw new BE(`Invalid transaction format: ${e.message}`,KA);throw e}}async resolveAccountAddress(e,t,r){this.#ee.log("Resolving account address",{accountCount:e.length,scope:t,request:r});const n=e.filter((e=>e.scopes.includes(t)));if(0===n.length)throw new Error(`No accounts with scope: ${t}`);VW(r,Ev);const{params:o}=r,{address:s}=o;if(!s||"string"!=typeof s)throw new Error("Address parameter is required and must be a string");const a=s;if(!this.#Ft.createClient(t).isAddress(a))throw new Error(`Invalid Tron address: ${a}`);const i=n.find((e=>e.address===a));if(!i)throw new Error(`Account not found in keyring for address: ${a}`);const c=`${t}:${a}`;return GW(c,Cv),this.#ee.log("Address resolved successfully",{address:a,caip10Address:c,accountId:i.id}),{address:c}}}({logger:Re,accountsService:n_,tronWebFactory:JI}),c_=new class{#Ut;#Ce;#ee;constructor(e,t,r){this.#Ut=e,this.#Ce=t,this.#ee=r}async scanTransaction({accountAddress:e,parameters:t,origin:r,scope:n,options:o=["simulation","validation"],account:s}){try{const a=await this.#Ut.scanTransaction({accountAddress:e,parameters:t,origin:"metamask"===r?"https://metamask.io":r,options:o}),i=this.#Dt(a);if(!i?.status)return this.#ee.warn("Invalid scan result received from security alerts API"),s&&await this.#Ce.trackSecurityScanCompleted({origin:r,accountType:s.type,chainIdCaip:n,scanStatus:DI.ERROR,hasSecurityAlerts:!1}),null;if(s){const e=Object.values(DI).includes(i.status)?i.status:DI.ERROR,t=Boolean(i.validation?.type&&i.validation.type!==UI.Benign);if(await this.#Ce.trackSecurityScanCompleted({origin:r,accountType:s.type,chainIdCaip:n,scanStatus:e,hasSecurityAlerts:t}),t){const e=Object.values(UI).includes(i.validation.type)?i.validation.type:UI.Warning;await this.#Ce.trackSecurityAlertDetected({origin:r,accountType:s.type,chainIdCaip:n,securityAlertResponse:e,securityAlertReason:i.validation.reason??null,securityAlertDescription:this.getSecurityAlertDescription(i.validation)})}}return i}catch(e){return this.#ee.error(e),s&&await this.#Ce.trackSecurityScanCompleted({origin:r,accountType:s.type,chainIdCaip:n,scanStatus:DI.ERROR,hasSecurityAlerts:!1}),null}}getSecurityAlertDescription(e){if(!e?.reason)return"Security alert: Unknown reason";return{unfair_trade:"Unfair trade of assets, without adequate compensation to the owner's account",transfer_farming:"Substantial transfer of the account's assets to untrusted entities",known_attacker:"A known attacker's account is involved in the transaction",other:"The transaction was marked as malicious for other reason, further details would be described in features field"}[e.reason]??`Security alert: ${e.reason}`}#Dt(e){if(!e)return null;const t=e.simulation?.status,r=e.validation?.status;return{status:"Error"===t||"Error"===r?"ERROR":"SUCCESS",estimatedChanges:{assets:e.simulation?.account_summary?.assets_diffs?.map((e=>{const t=e.in?.[0],r=e.out?.[0],n=t??r;return{type:t?"in":"out",symbol:"symbol"in e.asset?e.asset.symbol:e.asset_type,name:"name"in e.asset?e.asset.name:e.asset_type,logo:"logo_url"in e.asset?e.asset.logo_url??null:null,value:n?parseFloat(n.value):null,price:n?.usd_price?parseFloat(n.usd_price):null,assetType:e.asset_type}}))??[]},validation:{type:e.validation?.result_type??null,reason:e.validation?.reason??null},error:e.simulation?.error||e.simulation?.error_details?{type:e.simulation?.error_details?.type??null,code:e.simulation?.error_details?.code??null,message:e.simulation?.error??null}:null}}}(e_,jI,Re),u_=new class{#ee;#Ce;#Ie;#Ft;constructor({snapClient:e,state:t,tronWebFactory:r}){this.#ee=Oe(Re,"[🔑 ConfirmationHandler]"),this.#Ce=e,this.#Ie=t,this.#Ft=r}async handleKeyringRequest({request:e,account:t}){this.#ee.info("Handling keyring request",{request:e,account:t});const{method:r}=e.request;switch(r){case GA.SignMessage:return this.#Lt(e,t);case GA.SignTransaction:return this.#$t(e,t);default:throw this.#ee.warn("Unhandled keyring request method",{method:r}),new Error(`Unhandled keyring request method: ${r}`)}return!1}async#Lt(e,t){const r=await async function(e,t){R(e.request.params,bv);const{request:{params:{message:r}},scope:n,origin:o}=e,s=vI.from(r,"base64").toString("utf8"),a=await y_.snapClient.getPreferences().then((e=>e.locale)).catch((()=>"en")),i=await y_.snapClient.createInterface(cB(AI,{message:s,account:t,scope:n,locale:a,networkImage:BB,origin:WB(o)}),{});return y_.snapClient.showDialog(i)}(e,t);return!0===r}async#$t(e,t){R(e.request.params,Tv);const{scope:r,request:{params:{transaction:{rawDataHex:n,type:o}}}}=e,s=this.#Ft.createClient(r).utils.deserializeTx.deserializeTransaction(o,n);return!0===await CI(e,t,s)}async confirmTransactionRequest({scope:e,fromAddress:t,toAddress:r,amount:n,fees:o,asset:s,accountType:a,origin:i}){await this.#Ce.trackTransactionAdded({origin:i,accountType:a,chainIdCaip:e});const c=await async function(e,t,r){const n={...BI,...r,tokenPricesFetchStatus:"fetching"};try{n.preferences=await e.getPreferences()}catch{}n.fees.forEach((e=>{e.asset.iconUrl=PI(e.asset.type)}));const o=await e.createInterface(cB(YB,{context:n}),n),s=e.showDialog(o);return await t.setKey(`mapInterfaceNameToId.${XB}`,o),n.preferences.useExternalPricingData?await e.scheduleBackgroundEvent({method:QB.RefreshConfirmationPrices,duration:"PT1S"}):(n.tokenPricesFetchStatus="fetched",await e.updateInterface(o,cB(YB,{context:n}),n)),s}(this.#Ce,this.#Ie,{scope:e,fromAddress:t,toAddress:r,amount:n,fees:o,asset:s,origin:WB(i)});return!0===c?await this.#Ce.trackTransactionApproved({origin:i,accountType:a,chainIdCaip:e}):await this.#Ce.trackTransactionRejected({origin:i,accountType:a,chainIdCaip:e}),!0===c}}({snapClient:jI,state:zI,tronWebFactory:JI}),l_=new class{#ee;#Pe;constructor({logger:e,assetsService:t}){this.#ee=Oe(e,"[🪙 AssetsHandler]"),this.#Pe=t}async onAssetHistoricalPrice(e){this.#ee.log("[📈 onAssetHistoricalPrice]",e);const{from:t,to:r}=e;return{historicalPrice:await this.#Pe.getHistoricalPrice(t,r)}}async onAssetsConversion(e){this.#ee.log("[💱 onAssetsConversion]");const{conversions:t}=e;return{conversionRates:await this.#Pe.getMultipleTokenConversions(t)}}async onAssetsLookup(e){return{assets:await this.#Pe.getAssetsMetadata(e.assets)}}async onAssetsMarketData(e){return{marketData:await this.#Pe.getMultipleTokensMarketData(e.assets)}}}({logger:Re,assetsService:t_}),d_=new class{#ee;#xt;#Pe;#zt;#Ft;#kt;#Ce;#jt;#Vt;#Ee;constructor({logger:e,accountsService:t,assetsService:r,sendService:n,feeCalculatorService:o,tronWebFactory:s,snapClient:a,stakingService:i,confirmationHandler:c,transactionsService:u}){this.#ee=Oe(e,"[👋 ClientRequestHandler]"),this.#xt=t,this.#Pe=r,this.#zt=n,this.#kt=o,this.#Ft=s,this.#Ce=a,this.#jt=i,this.#Vt=c,this.#Ee=u}async handle(e){this.#ee.log("Handling client request",e);const{method:t}=e;switch(t){case eW.SignAndSendTransaction:return this.#Gt(e);case eW.OnAddressInput:return this.#Ht(e);case eW.OnAmountInput:return this.#Kt(e);case eW.ConfirmSend:return this.#Zt(e);case eW.ComputeFee:return this.#qt(e);case eW.ComputeStakeFee:return this.#Jt(e);case eW.OnStakeAmountInput:return this.#Yt(e);case eW.ConfirmStake:return this.#Xt(e);case eW.OnUnstakeAmountInput:return this.#Qt(e);case eW.ConfirmUnstake:return this.#er(e);case eW.SignRewardsMessage:return this.#tr(e);default:throw new ME}}async#Gt(e){iB(e,sW,new _E);const{transaction:t,accountId:r,scope:n,options:{type:o}}=e.params,s=await this.#xt.findByIdOrThrow(r),{privateKeyHex:a}=await this.#xt.deriveTronKeypair({entropySource:s.entropySource,derivationPath:s.derivationPath}),i=this.#Ft.createClient(n,a),c=_W.from(t,"base64").toString("hex"),u=i.utils.deserializeTx.deserializeTransaction(o,c),l={visible:!1,txID:VC(await tB(GC(c))).slice(2),raw_data:u,raw_data_hex:c},d=await i.trx.sign(l),f=await i.trx.sendRawTransaction(d);if(!f.result)throw new Error(`Failed to send transaction: ${f.message}`);const p=aB.createPendingTransaction({txId:f.txid,account:s,scope:n});return await this.#Ee.save(p),await this.#Ce.scheduleBackgroundEvent({method:QB.TrackTransaction,params:{txId:f.txid,scope:n,accountIds:[r],attempt:0},duration:"PT1S"}),{transactionId:f.txid}}async#Ht(e){try{return R(e,uW),{valid:!0,errors:[]}}catch{return{valid:!1,errors:[{code:tW.Invalid}]}}}async#Kt(e){try{R(e,dW);const{accountId:t,assetId:r,value:n}=e.params;if(!await this.#xt.findById(t))return{valid:!1,errors:[{code:tW.Required}]};const{chainId:o}=he(r),s=o,[a,i,c,u]=await this.#Pe.getAssetsByAccountId(t,[r,bo[s].nativeToken.id,bo[s].bandwidth.id,bo[s].energy.id]),l=new no(n),d=a?new no(a.uiAmount):oo,f=i?new no(i.uiAmount):oo,p=c?new no(c.uiAmount):oo,h=u?new no(u.uiAmount):oo;if(!a||l.isGreaterThan(d))return{valid:!1,errors:[{code:tW.InsufficientBalance}]};const g=await this.#zt.buildTransaction({fromAccountId:t,toAddress:"T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb",asset:a,amount:l.toNumber()}),y=await this.#kt.computeFee({scope:s,transaction:g,availableEnergy:h,availableBandwidth:p}),m=bo[s].nativeToken.id,b=new no(y.find((e=>e.asset.type===m))?.asset.amount??"0");return(r===m?l.plus(b):b).isGreaterThan(f)?{valid:!1,errors:[{code:tW.InsufficientBalanceToCoverFee}]}:{valid:!0,errors:[]}}catch(e){return this.#ee.error("Error in #handleOnAmountInput:",e),{valid:!1,errors:[{code:tW.Invalid}]}}}async#Zt(e){iB(e,iW,new _E);const{fromAccountId:t,toAddress:r,amount:n,assetId:o}=e.params,s=await this.#xt.findById(t);if(!s)return{valid:!1,errors:[{code:tW.Invalid}]};const a=await this.#Pe.getAssetByAccountId(t,o);if(!a)return{valid:!1,errors:[{code:tW.InsufficientBalance}]};const{chainId:i}=he(o),c=i,u=new no(n),l=await this.#zt.validateSend({scope:c,fromAccountId:t,toAddress:r,asset:a,amount:u});if(!l.valid)return{valid:!1,errors:[{code:l.errorCode??tW.InsufficientBalance}]};const[[d,f],p]=await Promise.all([this.#Pe.getAssetsByAccountId(t,[bo[c].bandwidth.id,bo[c].energy.id]),this.#zt.buildTransaction({fromAccountId:t,toAddress:r,asset:a,amount:u.toNumber()})]),h=f?new no(f.rawAmount):oo,g=d?new no(d.rawAmount):oo,y=await this.#kt.computeFee({scope:c,transaction:p,availableEnergy:h,availableBandwidth:g});if(!await this.#Vt.confirmTransactionRequest({scope:c,fromAddress:s.address,toAddress:r,amount:n,fees:y,asset:a,accountType:s.type,origin:"MetaMask"}))throw new jE;const m=await this.#zt.signAndSendTransaction({scope:c,fromAccountId:t,transaction:p}),b=aB.createPendingSendTransaction({txId:m.txid,account:s,scope:c,toAddress:r,amount:n,assetType:o,assetSymbol:a.symbol});return await this.#Ee.save(b),this.#ee.log(`Created pending Send transaction ${m.txid} for account ${s.id}`),{transactionId:m.txid,status:xr.Submitted}}async#qt(e){iB(e,mW,new _E);const{params:{scope:t,transaction:r,accountId:n,options:{type:o,feeLimit:s}}}=e;await this.#xt.findByIdOrThrow(n);const a=this.#Ft.createClient(t),i=_W.from(r,"base64").toString("hex"),c=a.utils.deserializeTx.deserializeTransaction(o,i),u={visible:!1,txID:VC(await tB(GC(i))).slice(2),raw_data:c,raw_data_hex:i},[l,d]=await this.#Pe.getAssetsByAccountId(n,[bo[t].bandwidth.id,bo[t].energy.id]),f=d?new no(d.rawAmount):oo,p=l?new no(l.rawAmount):oo,h=await this.#kt.computeFee({scope:t,transaction:u,availableEnergy:f,availableBandwidth:p,feeLimit:s});return R(h,bW),h}async#Jt(e){iB(e,TW,new _E);const{fromAccountId:t,value:r,options:{purpose:n}}=e.params,o=await this.#xt.findByIdOrThrow(t),s=io.Mainnet,a=await this.#Pe.getAssetByAccountId(t,bo[s].nativeToken.id),i=a?new no(a.uiAmount):oo,c=no(r);if(c.isGreaterThan(i))return{valid:!1,errors:[tW.InsufficientBalance]};const u=this.#Ft.createClient(s),l=Number(rB(c)),d=await u.transactionBuilder.freezeBalanceV2(l,n,o.address),[f,p]=await this.#Pe.getAssetsByAccountId(t,[bo[s].bandwidth.id,bo[s].energy.id]),h=p?no(p.rawAmount):oo,g=f?no(f.rawAmount):oo,y=await this.#kt.computeFee({scope:s,transaction:d,availableEnergy:h,availableBandwidth:g});return R(y,bW),y}async#Yt(e){iB(e,hW,new _E);const{accountId:t,assetId:r,value:n}=e.params;await this.#xt.findByIdOrThrow(t);const o=await this.#Pe.getAssetByAccountId(t,r),s=o?new no(o.uiAmount):oo;return new no(n).isGreaterThan(s)?{valid:!1,errors:[{code:tW.InsufficientBalance}]}:{valid:!0,errors:[]}}async#Xt(e){iB(e,yW,new _E);const{fromAccountId:t,assetId:r,value:n,options:{purpose:o,srNodeAddress:s}}=e.params,a=await this.#xt.findByIdOrThrow(t),i=await this.#Pe.getAssetByAccountId(t,r),c=i?new no(i.uiAmount):oo,u=new no(n);return u.isGreaterThan(c)?{valid:!1,errors:[{code:tW.InsufficientBalance}]}:(await this.#jt.stake({account:a,assetId:r,amount:u,purpose:o,srNodeAddress:s}),{valid:!0,errors:[]})}async#Qt(e){iB(e,vW,new _E);const{accountId:t,assetId:r,value:n,options:{purpose:o}}=e.params,s=`${r}-staked-for-${o.toLowerCase()}`;await this.#xt.findByIdOrThrow(t);const a=await this.#Pe.getAssetByAccountId(t,s),i=a?new no(a.uiAmount):oo;return new no(n).isGreaterThan(i)?{valid:!1,errors:[{code:tW.InsufficientBalance}]}:{valid:!0,errors:[]}}async#er(e){iB(e,EW,new _E);const{accountId:t,assetId:r,value:n,options:{purpose:o}}=e.params,s=`${r}-staked-for-${o.toLowerCase()}`,a=await this.#xt.findByIdOrThrow(t),i=await this.#Pe.getAssetByAccountId(t,s),c=i?new no(i.uiAmount):oo,u=new no(n);return u.isGreaterThan(c)?{valid:!1,errors:[{code:tW.InsufficientBalance}]}:(await this.#jt.unstake({account:a,assetId:s,amount:u}),{valid:!0,errors:[]})}async#tr(e){iB(e,SW,new _E);const{params:{accountId:t,message:r}}=e,n=await this.#xt.findById(t);if(!n)throw new _E(`Account not found: ${t}`);const{address:o}=CW(r);if(o!==n.address)throw new _E(`Address in rewards message (${o}) does not match signing account address (${n.address})`);const{privateKeyHex:s}=await this.#xt.deriveTronKeypair({entropySource:n.entropySource,derivationPath:n.derivationPath}),a=this.#Ft.createClient(io.Mainnet,s),i=_W.from(r,"base64").toString("utf8");return{signature:a.trx.signMessageV2(i,s),signedMessage:r,signatureType:"secp256k1"}}}({logger:Re,snapClient:jI,accountsService:n_,assetsService:t_,sendService:s_,tronWebFactory:JI,feeCalculatorService:o_,stakingService:a_,confirmationHandler:u_,transactionsService:r_}),f_=new class{#ee;#xt;#Ce;#Ie;#Re;#Oe;#rr;constructor({logger:e,accountsService:t,snapClient:r,state:n,priceApiClient:o,tronHttpClient:s,transactionScanService:a}){this.#ee=Oe(e,"[⏰ CronHandler]"),this.#xt=t,this.#Ce=r,this.#Ie=n,this.#Re=o,this.#Oe=s,this.#rr=a}async handle(e){const{method:t,params:r}=e,{active:n,locked:o}=await this.#Ce.getClientStatus();if(n&&!o)switch(t){case"onSynchronizeSelectedAccountsCronjob":case"onSynchronizeSelectedAccounts":await this.synchronizeSelectedAccounts();break;case"onSynchronizeAccounts":await this.synchronizeAccounts(r);break;case"onSynchronizeAccount":await this.synchronizeAccount(r);break;case"onSynchronizeAccountTransactions":await this.synchronizeAccountTransactions(r);break;case"refreshConfirmationPrices":await this.refreshConfirmationPrices();break;case"refreshSignTransaction":await this.refreshSignTransaction();break;case"onTrackTransaction":await this.trackTransaction(r);break;default:throw new Error(`Unknown cronjob method: ${t}`)}}async synchronizeSelectedAccounts(){this.#ee.info("Synchronizing selected accounts...");const e=await this.#xt.getAllSelected();await this.#xt.synchronize(e)}async synchronizeAccounts({accountIds:e}){this.#ee.info(`Synchronizing accounts ${e.join(", ")}...`);const t=await this.#xt.findByIds(e);t&&await this.#xt.synchronize(t)}async synchronizeAccount({accountId:e}){this.#ee.info(`Synchronizing account ${e}...`);const t=await this.#xt.findById(e);t&&await this.#xt.synchronize([t])}async synchronizeAccountTransactions({accountId:e}){this.#ee.info(`Synchronizing account transactions ${e}...`);const t=await this.#xt.findById(e);t&&await this.#xt.synchronizeTransactions([t])}async refreshConfirmationPrices(){this.#ee.info("Background price refresh triggered for confirmation...");const e=(await this.#Ie.getKey("mapInterfaceNameToId")??{})[XB];e?await this.#nr(e):this.#ee.info("No active transaction request interface found")}async#nr(e){const t=await this.#Ce.getInterfaceContext(e);if(!t)return this.#ee.info("Interface context no longer exists, cleaning up"),void await this.#Ie.setKey(`mapInterfaceNameToId.${XB}`,null);try{const r=[t.asset.assetType,...t.fees.map((e=>e.asset.type))],n=[...new Set(r)],o={...t,tokenPricesFetchStatus:"fetching"};await this.#Ce.updateInterface(e,cB(YB,{context:o}),o),this.#ee.info(`Fetching fresh prices for ${n.length} assets`);const s=await this.#Re.getMultipleSpotPrices(n,t.preferences.currency),a={...t,tokenPrices:s,tokenPricesFetchStatus:"fetched"};await this.#Ce.updateInterface(e,cB(YB,{context:a}),a),this.#ee.info("Successfully refreshed confirmation prices"),await this.#Ce.scheduleBackgroundEvent({method:"refreshConfirmationPrices",duration:"PT20S"})}catch(t){this.#ee.error("Error refreshing confirmation prices:",t);try{const t=await this.#Ce.getInterfaceContext(e);if(!t)return;const r={...t,tokenPricesFetchStatus:"error"};await this.#Ce.updateInterface(e,cB(YB,{context:r}),r)}catch{}}}async refreshSignTransaction(){this.#ee.info("Background refresh triggered for signTransaction confirmation...");const e=(await this.#Ie.getKey("mapInterfaceNameToId")??{})[KB];if(!e)return void this.#ee.info("No active signTransaction confirmation interface found");const t=await this.#Ce.getInterfaceContext(e);if(!t)return this.#ee.info("Interface context no longer exists, cleaning up"),void await this.#Ie.setKey(`mapInterfaceNameToId.${KB}`,null);if(!t.account?.address||!t.transaction||!t.scope)return void this.#ee.info("Context is missing required fields");const{preferences:r,scope:n,account:o,origin:s,scanParameters:a}=t,i=r.simulateOnChainActions||r.useSecurityAlerts;try{const c={...t,scanFetchStatus:i?"fetching":t.scanFetchStatus};await this.#Ce.updateInterface(e,cB(HB,{context:c}),c);let{scan:u,scanFetchStatus:l}=t;if(i){const e=[];r.simulateOnChainActions&&e.push("simulation"),r.useSecurityAlerts&&e.push("validation");try{u=await this.#rr.scanTransaction({accountAddress:o.address,parameters:{from:a?.from??void 0,to:a?.to??void 0,data:a?.data??void 0,value:a?.value??void 0},origin:s,scope:n,options:e,account:o}),l=u?"fetched":"error",this.#ee.info("Successfully refreshed signTransaction scan")}catch(e){this.#ee.error("Error refreshing signTransaction scan:",e),l="error"}}const d=await this.#Ce.getInterfaceContext(e);if(!d)return void this.#ee.info("Interface closed during refresh");const f={...d,scan:u,scanFetchStatus:l};await this.#Ce.updateInterface(e,cB(HB,{context:f}),f),this.#ee.info("Successfully refreshed signTransaction confirmation"),await this.#Ce.scheduleBackgroundEvent({method:"refreshSignTransaction",duration:"PT20S"})}catch(t){this.#ee.error("Error refreshing signTransaction:",t);try{const t=await this.#Ce.getInterfaceContext(e);if(!t)return;const r={...t,scanFetchStatus:i?"error":t.scanFetchStatus};await this.#Ce.updateInterface(e,cB(HB,{context:r}),r)}catch{}}}async trackTransaction({txId:e,scope:t,accountIds:r,attempt:n=0}){const o="PT1S";if(this.#ee.info(`[Attempt ${n+1} of 15] Tracking transaction ${e} on ${t}...`),n>=15){this.#ee.warn({txId:e,scope:t,attempts:15},"Transaction tracking timeout - syncing accounts");const n=await this.#xt.findByIds(r);n&&n.length>0&&await this.#xt.synchronize(n)}else try{const s=await this.#Oe.getTransactionInfoById(t,e);if(!s)return this.#ee.info({txId:e,attempt:n},"Transaction not confirmed yet, scheduling next check..."),void await this.#Ce.scheduleBackgroundEvent({method:"onTrackTransaction",params:{txId:e,scope:t,accountIds:r,attempt:n+1},duration:o});this.#ee.log({txId:e,blockNumber:s.blockNumber,scope:t},"✅ Transaction confirmed on-chain");const a=await this.#xt.findByIds(r),i=a?.[0];if(!i)return void this.#ee.error({txId:e},"Sender account not found");await this.#Ce.scheduleBackgroundEvent({method:"onSynchronizeSelectedAccounts",duration:"PT1S"}),await this.#Ce.trackTransactionFinalized({origin:"MetaMask",accountType:i.type,chainIdCaip:t})}catch(s){if(this.#ee.error({error:s,txId:e,scope:t,attempt:n},"Error tracking transaction"),n<14)await this.#Ce.scheduleBackgroundEvent({method:"onTrackTransaction",params:{txId:e,scope:t,accountIds:r,attempt:n+1},duration:o});else{this.#ee.warn({txId:e,scope:t},"Max tracking attempts reached with errors - falling back to account sync");const n=await this.#xt.findByIds(r);n&&n.length>0&&await this.#xt.synchronize(n)}}}}({logger:Re,snapClient:jI,accountsService:n_,state:zI,priceApiClient:XI,tronHttpClient:KI,transactionScanService:c_}),p_=new class{#ee;#Ce;#xt;#Pe;#Ee;#or;#Vt;constructor({logger:e,snapClient:t,accountsService:r,assetsService:n,transactionsService:o,walletService:s,confirmationHandler:a}){this.#ee=Oe(e,"[🔑 KeyringHandler]"),this.#Ce=t,this.#xt=r,this.#Pe=n,this.#Ee=o,this.#or=s,this.#Vt=a}async handle(e,t){jW(e,t.method);return await UW((async()=>RW(this,t)))??null}async#sr(){try{const e=await this.#xt.getAll();return(0,ge.sortBy)(e,["entropySource","index"])}catch(e){throw this.#ee.error({error:e},"Error listing accounts"),new Error("Error listing accounts")}}async listAccounts(){return(await this.#sr()).map(kW)}async#ar(e){try{return await this.#xt.findById(e)??void 0}catch(e){throw this.#ee.error({error:e},"Error getting account"),new BE(e)}}async getAccount(e){VW({accountId:e},sv);const t=await this.#ar(e);return t?kW(t):void 0}async#ir(e){const t=await this.#ar(e);if(!t)throw new Error(`Account "${e}" not found`);return t}async createAccount(e){VW(e,dv);const t=globalThis.crypto.randomUUID();try{return await this.#xt.create(t,e)}catch(e){throw this.#ee.error({error:e},"Error creating account"),await this.#xt.delete(t),new Error(`Error creating account: ${e.message}`)}}async listAccountAssets(e){try{VW({accountId:e},iv),await this.#ir(e),this.#ee.info("Listing account assets",{accountId:e});const t=(await this.#Pe.getByKeyringAccountId(e)).filter((e=>To.includes(e.assetType)||Number(e.rawAmount)>0)).map((e=>e.assetType));return this.#ee.info("Account assets",{accountId:e,result:t}),GW(t,Bn),t}catch(e){throw this.#ee.error({error:e},"Error listing account assets"),e}}async listAccountTransactions(e,t){try{VW({accountId:e,pagination:t},uv),this.#ee.info("Listing account transactions...");const{limit:r,next:n}=t,o=await this.#ar(e);if(!o)throw new Error("Account not found");const s=await this.#Ee.findByAccounts([o]),a=n?s.findIndex((e=>e.id===n)):0,i=s.slice(a,a+r),c=a+t.limit<s.length;return{data:i,next:c?s[a+t.limit]?.id??null:null}}catch(e){throw this.#ee.error({error:e},"Error listing account transactions"),e}}async discoverAccounts(e,t,r){try{VW({scopes:e,entropySource:t,groupIndex:r},fv);const n=await this.#xt.deriveAccount({entropySource:t,index:r}),o=[];for(const t of e)o.push(this.#Ee.fetchNewTransactionsForAccount(t,n));const s=await Promise.all(o);return s.some((e=>e.length>0))?[{type:"bip44",scopes:e,derivationPath:n.derivationPath}]:[]}catch(e){throw this.#ee.error({error:e},"Error discovering accounts"),e}}async getAccountBalances(e,t){try{VW({accountId:e,assets:t},cv),this.#ee.info("Getting account balances",{accountId:e,assets:t}),await this.#ir(e);const r=await this.#Pe.getByKeyringAccountId(e),n=r.filter((e=>t.includes(e.assetType))).filter((e=>To.includes(e.assetType)||Number(e.rawAmount)>0)).reduce(((e,t)=>(e[t.assetType]={unit:t.symbol,amount:t.uiAmount},e)),{});return this.#ee.info("Account balances",{accountId:e,result:n}),GW(n,pv),n}catch(e){throw this.#ee.error({error:e},"Error getting account balances"),e}}async resolveAccountAddress(e,t){this.#ee.info("Resolving account address",{scope:e,request:t});const r=await this.#sr();return await this.#or.resolveAccountAddress(r,e,t)}async filterAccountChains(e,t){throw new Error("Method not implemented.")}async updateAccount(e){throw new Error("Method not implemented.")}async deleteAccount(e){try{VW({accountId:e},av);const t=await this.#ir(e);await xW(snap,Un.AccountDeleted,{id:t.id}),await this.#xt.delete(e)}catch(e){throw this.#ee.error({error:e},"Error deleting account"),e}}async submitRequest(e){return{pending:!1,result:await this.#cr(e)}}async#cr(e){R(e,Pv),this.#ee.log("Handling submitRequest",{method:e.request.method});const{request:{method:t,params:r={}},scope:n,account:o}=e,s=await this.#ir(o);if(n&&!s.scopes.includes(n))throw new Error(`Scope "${n}" is not allowed for this account`);if(!s.methods.includes(t))throw new Error(`Method "${t}" is not allowed for this account`);if(!await this.#Vt.handleKeyringRequest({request:e,account:s}))throw new jE;return await this.#or.handleKeyringRequest({account:s,scope:n,method:t,params:r})}async setSelectedAccounts(e){VW(e,U(rv)),await this.#Ce.scheduleBackgroundEvent({method:QB.SynchronizeSelectedAccounts,params:{accountIds:e},duration:"PT1S"})}}({logger:Re,snapClient:jI,accountsService:n_,assetsService:t_,transactionsService:r_,walletService:i_,confirmationHandler:u_}),h_=new class{#ee;constructor({logger:e}){this.#ee=Oe(e,"[👋 RpcHandler]")}async handle(e,t){jW(e,t.method),this.#ee.log("Handling RPC request",t);const{method:r}=t;throw new ME}}({logger:Re}),g_=new class{#ee;#Ce;constructor({logger:e,snapClient:t}){this.#ee=Oe(e,"[👵 LifecycleHandler]"),this.#Ce=t}async handle({id:e,event:t,context:r}){if(this.#ee.log("[👇 onUserInput]",e,t),!t.name)return;const n={...qB(this.#Ce),...KW(this.#Ce),...CB(this.#Ce)}[t.name];n&&await UW((async()=>n({id:e,event:t,context:r})))}}({logger:Re,snapClient:jI}),y_={snapClient:jI,state:zI,priceApiClient:XI,feeCalculatorService:o_,assetsService:t_,accountsService:n_,transactionsService:r_,sendService:s_,walletService:i_,tronHttpClient:KI,tronWebFactory:JI,confirmationHandler:u_,transactionScanService:c_,assetsHandler:l_,clientRequestHandler:d_,cronHandler:f_,keyringHandler:p_,rpcHandler:h_,userInputHandler:g_},m_=async e=>UW((async()=>l_.onAssetHistoricalPrice(e))),b_=async e=>UW((async()=>l_.onAssetsConversion(e))),w_=async e=>UW((async()=>l_.onAssetsLookup(e))),T_=async e=>UW((async()=>l_.onAssetsMarketData(e))),A_=async({request:e})=>UW((async()=>d_.handle(e))),v_=async({request:e})=>UW((async()=>f_.handle(e))),P_=async({origin:e,request:t})=>UW((async()=>p_.handle(e,t))),E_=async({origin:e,request:t})=>UW((async()=>h_.handle(e,t))),C_=async e=>UW((async()=>g_.handle(e)))})(),module.exports=n})();