@aeternity/aepp-sdk 14.0.0 → 14.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +11 -19
  3. package/dist/aepp-sdk.browser-script.cjs +1 -1
  4. package/dist/aepp-sdk.browser-script.cjs.LICENSE.txt +2 -0
  5. package/dist/aepp-sdk.browser-script.cjs.map +1 -1
  6. package/dist/aepp-sdk.browser.cjs +1 -1
  7. package/dist/aepp-sdk.browser.cjs.map +1 -1
  8. package/dist/aepp-sdk.cjs +11678 -6969
  9. package/dist/aepp-sdk.cjs.map +1 -1
  10. package/es/AeSdkBase.d.ts +10 -1
  11. package/es/AeSdkBase.js +12 -2
  12. package/es/AeSdkBase.js.map +1 -1
  13. package/es/AeSdkMethods.d.ts +1 -1
  14. package/es/AeSdkMethods.js.map +1 -1
  15. package/es/AeSdkWallet.js +1 -1
  16. package/es/AeSdkWallet.js.map +1 -1
  17. package/es/Middleware.d.ts +5 -1
  18. package/es/Middleware.js +7 -2
  19. package/es/Middleware.js.map +1 -1
  20. package/es/MiddlewareSubscriber.d.ts +3 -0
  21. package/es/MiddlewareSubscriber.js +4 -0
  22. package/es/MiddlewareSubscriber.js.map +1 -1
  23. package/es/Node.d.ts +6 -1
  24. package/es/Node.js +28 -4
  25. package/es/Node.js.map +1 -1
  26. package/es/account/Base.d.ts +12 -0
  27. package/es/account/Base.js +1 -0
  28. package/es/account/Base.js.map +1 -1
  29. package/es/account/BaseFactory.d.ts +1 -0
  30. package/es/account/BaseFactory.js +1 -0
  31. package/es/account/BaseFactory.js.map +1 -1
  32. package/es/account/Generalized.d.ts +5 -0
  33. package/es/account/Generalized.js +9 -0
  34. package/es/account/Generalized.js.map +1 -1
  35. package/es/account/Ledger.d.ts +5 -0
  36. package/es/account/Ledger.js +9 -0
  37. package/es/account/Ledger.js.map +1 -1
  38. package/es/account/LedgerFactory.d.ts +2 -0
  39. package/es/account/LedgerFactory.js +10 -4
  40. package/es/account/LedgerFactory.js.map +1 -1
  41. package/es/account/Memory.d.ts +5 -0
  42. package/es/account/Memory.js +14 -5
  43. package/es/account/Memory.js.map +1 -1
  44. package/es/account/Metamask.d.ts +8 -0
  45. package/es/account/Metamask.js +13 -0
  46. package/es/account/Metamask.js.map +1 -1
  47. package/es/account/MetamaskFactory.d.ts +20 -2
  48. package/es/account/MetamaskFactory.js +93 -39
  49. package/es/account/MetamaskFactory.js.map +1 -1
  50. package/es/account/MnemonicFactory.d.ts +12 -2
  51. package/es/account/MnemonicFactory.js +48 -24
  52. package/es/account/MnemonicFactory.js.map +1 -1
  53. package/es/account/Rpc.d.ts +5 -0
  54. package/es/account/Rpc.js +8 -0
  55. package/es/account/Rpc.js.map +1 -1
  56. package/es/aens.d.ts +25 -5
  57. package/es/aens.js +52 -18
  58. package/es/aens.js.map +1 -1
  59. package/es/aepp-wallet-communication/connection/BrowserRuntime.d.ts +1 -1
  60. package/es/aepp-wallet-communication/connection/BrowserRuntime.js.map +1 -1
  61. package/es/apis/middleware/middleware.d.ts +99 -9
  62. package/es/apis/middleware/middleware.js +560 -91
  63. package/es/apis/middleware/middleware.js.map +1 -1
  64. package/es/apis/middleware/models/index.d.ts +1267 -1582
  65. package/es/apis/middleware/models/index.js +1 -1363
  66. package/es/apis/middleware/models/index.js.map +1 -1
  67. package/es/apis/middleware/models/mappers.d.ts +126 -56
  68. package/es/apis/middleware/models/mappers.js +6250 -2989
  69. package/es/apis/middleware/models/mappers.js.map +1 -1
  70. package/es/apis/middleware/models/parameters.d.ts +54 -33
  71. package/es/apis/middleware/models/parameters.js +389 -134
  72. package/es/apis/middleware/models/parameters.js.map +1 -1
  73. package/es/apis/node/models/index.d.ts +60 -15
  74. package/es/apis/node/models/index.js.map +1 -1
  75. package/es/apis/node/models/mappers.d.ts +3 -0
  76. package/es/apis/node/models/mappers.js +130 -2
  77. package/es/apis/node/models/mappers.js.map +1 -1
  78. package/es/apis/node/node.d.ts +13 -1
  79. package/es/apis/node/node.js +54 -0
  80. package/es/apis/node/node.js.map +1 -1
  81. package/es/chain.d.ts +19 -6
  82. package/es/chain.js +30 -24
  83. package/es/chain.js.map +1 -1
  84. package/es/channel/Contract.d.ts +6 -3
  85. package/es/channel/Contract.js +5 -2
  86. package/es/channel/Contract.js.map +1 -1
  87. package/es/channel/Spend.d.ts +1 -1
  88. package/es/channel/Spend.js.map +1 -1
  89. package/es/channel/handlers.js +1 -2
  90. package/es/channel/handlers.js.map +1 -1
  91. package/es/channel/internal.d.ts +1 -1
  92. package/es/channel/internal.js +2 -2
  93. package/es/channel/internal.js.map +1 -1
  94. package/es/contract/Contract.d.ts +13 -2
  95. package/es/contract/Contract.js +22 -12
  96. package/es/contract/Contract.js.map +1 -1
  97. package/es/contract/compiler/Base.d.ts +1 -0
  98. package/es/contract/compiler/Base.js +1 -0
  99. package/es/contract/compiler/Base.js.map +1 -1
  100. package/es/contract/compiler/Cli.d.ts +2 -1
  101. package/es/contract/compiler/Cli.js +11 -9
  102. package/es/contract/compiler/Cli.js.map +1 -1
  103. package/es/contract/compiler/Http.d.ts +2 -1
  104. package/es/contract/compiler/Http.js +3 -2
  105. package/es/contract/compiler/Http.js.map +1 -1
  106. package/es/contract/compiler/getFileSystem.d.ts +1 -0
  107. package/es/contract/compiler/getFileSystem.js +1 -0
  108. package/es/contract/compiler/getFileSystem.js.map +1 -1
  109. package/es/contract/ga.d.ts +3 -3
  110. package/es/contract/ga.js +3 -3
  111. package/es/contract/ga.js.map +1 -1
  112. package/es/index-browser.d.ts +32 -2
  113. package/es/index-browser.js +32 -2
  114. package/es/index-browser.js.map +1 -1
  115. package/es/oracle/Oracle.d.ts +10 -1
  116. package/es/oracle/Oracle.js +16 -6
  117. package/es/oracle/Oracle.js.map +1 -1
  118. package/es/oracle/OracleBase.d.ts +15 -2
  119. package/es/oracle/OracleBase.js +23 -1
  120. package/es/oracle/OracleBase.js.map +1 -1
  121. package/es/oracle/OracleClient.d.ts +3 -0
  122. package/es/oracle/OracleClient.js +6 -1
  123. package/es/oracle/OracleClient.js.map +1 -1
  124. package/es/spend.js +1 -1
  125. package/es/spend.js.map +1 -1
  126. package/es/tx/builder/common.js +6 -3
  127. package/es/tx/builder/common.js.map +1 -1
  128. package/es/tx/builder/constants.d.ts +53 -3
  129. package/es/tx/builder/constants.js +62 -12
  130. package/es/tx/builder/constants.js.map +1 -1
  131. package/es/tx/builder/delegation/schema.js +15 -0
  132. package/es/tx/builder/delegation/schema.js.map +1 -1
  133. package/es/tx/builder/entry/constants.d.ts +4 -1
  134. package/es/tx/builder/entry/constants.js +10 -1
  135. package/es/tx/builder/entry/constants.js.map +1 -1
  136. package/es/tx/builder/entry/index.js +1 -2
  137. package/es/tx/builder/entry/index.js.map +1 -1
  138. package/es/tx/builder/field-types/ct-version.js +1 -2
  139. package/es/tx/builder/field-types/ct-version.js.map +1 -1
  140. package/es/tx/builder/field-types/fee.d.ts +1 -1
  141. package/es/tx/builder/field-types/fee.js +4 -4
  142. package/es/tx/builder/field-types/fee.js.map +1 -1
  143. package/es/tx/builder/field-types/gas-price.d.ts +3 -0
  144. package/es/tx/builder/field-types/gas-price.js +1 -1
  145. package/es/tx/builder/field-types/gas-price.js.map +1 -1
  146. package/es/tx/builder/field-types/name-fee.js +1 -1
  147. package/es/tx/builder/field-types/name-fee.js.map +1 -1
  148. package/es/tx/builder/field-types/name-id.js +2 -2
  149. package/es/tx/builder/field-types/name-id.js.map +1 -1
  150. package/es/tx/builder/field-types/nonce.d.ts +1 -1
  151. package/es/tx/builder/field-types/nonce.js.map +1 -1
  152. package/es/tx/builder/field-types/pointers.js +3 -3
  153. package/es/tx/builder/field-types/pointers.js.map +1 -1
  154. package/es/tx/builder/field-types/ttl.js +1 -2
  155. package/es/tx/builder/field-types/ttl.js.map +1 -1
  156. package/es/tx/builder/helpers.d.ts +18 -12
  157. package/es/tx/builder/helpers.js +25 -17
  158. package/es/tx/builder/helpers.js.map +1 -1
  159. package/es/tx/builder/schema.d.ts +27 -24
  160. package/es/tx/builder/schema.generated.d.ts +12 -12
  161. package/es/tx/builder/schema.generated.js.map +1 -1
  162. package/es/tx/builder/schema.js +5 -3
  163. package/es/tx/builder/schema.js.map +1 -1
  164. package/es/tx/execution-cost.d.ts +3 -0
  165. package/es/tx/execution-cost.js +7 -4
  166. package/es/tx/execution-cost.js.map +1 -1
  167. package/es/tx/transaction-signer.d.ts +1 -0
  168. package/es/tx/transaction-signer.js +1 -0
  169. package/es/tx/transaction-signer.js.map +1 -1
  170. package/es/tx/validator.js +4 -3
  171. package/es/tx/validator.js.map +1 -1
  172. package/es/utils/MiddlewarePage.d.ts +4 -3
  173. package/es/utils/MiddlewarePage.js.map +1 -1
  174. package/es/utils/amount-formatter.d.ts +15 -1
  175. package/es/utils/amount-formatter.js +17 -1
  176. package/es/utils/amount-formatter.js.map +1 -1
  177. package/es/utils/autorest.d.ts +1 -1
  178. package/es/utils/autorest.js +10 -4
  179. package/es/utils/autorest.js.map +1 -1
  180. package/es/utils/bignumber.d.ts +1 -1
  181. package/es/utils/bignumber.js +1 -1
  182. package/es/utils/bignumber.js.map +1 -1
  183. package/es/utils/bytes.d.ts +3 -1
  184. package/es/utils/bytes.js +3 -1
  185. package/es/utils/bytes.js.map +1 -1
  186. package/es/utils/crypto.d.ts +48 -15
  187. package/es/utils/crypto.js +80 -29
  188. package/es/utils/crypto.js.map +1 -1
  189. package/es/utils/encoder-types.d.ts +1 -1
  190. package/es/utils/encoder-types.js +1 -1
  191. package/es/utils/encoder-types.js.map +1 -1
  192. package/es/utils/encoder.d.ts +2 -0
  193. package/es/utils/encoder.js +2 -0
  194. package/es/utils/encoder.js.map +1 -1
  195. package/es/utils/errors.d.ts +2 -2
  196. package/es/utils/errors.js +2 -2
  197. package/es/utils/errors.js.map +1 -1
  198. package/es/utils/json-big.js +1 -1
  199. package/es/utils/json-big.js.map +1 -1
  200. package/es/utils/jwt.js +3 -3
  201. package/es/utils/jwt.js.map +1 -1
  202. package/es/utils/typed-data.d.ts +5 -0
  203. package/es/utils/typed-data.js +6 -0
  204. package/es/utils/typed-data.js.map +1 -1
  205. package/package.json +50 -51
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see aepp-sdk.browser-script.cjs.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Aeternity=t():e.Aeternity=t()}(self,(function(){return function(){var e={9226:function(e,t,n){const r=n(9986),i=n(7776),a=n(9101),s=n(2813),o=n(8836),{FateTypeCalldata:c,FateTypeString:u}=n(3182),l=n(7611);e.exports=class{constructor(e){this._byteArrayEncoder=new r,this._typeResolver=new i(e),this._apiEncoder=new a,this._eventEncoder=new s,this._canonicalMapper=new o}encodeCall(e,t,n){const{types:r,required:i}=this._typeResolver.getCallTypes(e,t);if(n.length>r.length||n.length<i)throw new l(`Non matching number of arguments. ${t} expects between ${i} and ${r.length} number of arguments but got ${n.length}`);for(;n.length<r.length;)n.push(void 0);return this._byteArrayEncoder.encode(c(t,r),n)}decodeCall(e,t,n){const{types:r,_required:i}=this._typeResolver.getCallTypes(e,t),a=c(t,r);return this._byteArrayEncoder.decodeWithType(n,a)}decodeResult(e,t,n,r="ok"){if("ok"===r){const r=this._typeResolver.getReturnType(e,t);return this._byteArrayEncoder.decodeWithType(n,r)}if("error"===r){const e=new TextDecoder,t=this._apiEncoder.decodeWithType(n,"contract_bytearray");return e.decode(t)}if("revert"===r)return this._byteArrayEncoder.decodeWithType(n,u());throw new l(`Unknown call result type: "${r}"`)}decodeEvent(e,t,n){const r=this._typeResolver.getEventType(e,n);return this._eventEncoder.decodeWithType(t,r)}}},7776:function(e,t,n){const r=n(7815),i=n(4495),{FateTypeEvent:a}=n(3182),s=({type:e})=>{let t,n=e;var r;return(r=n)&&"object"==typeof r&&r.constructor===Object&&([[n,t]]=Object.entries(n)),"option"===n};e.exports=class extends r{constructor(e){super(),this.aci=e}getCallTypes(e,t){const n=this.getNamespaceAci(e).functions.find((e=>e.name===t));if(n){const e=n.arguments.map((e=>this.resolveType(e.type))),t=n.arguments.filter(s);return{types:e,required:e.length-t.length}}if("init"===t)return{types:[],required:0};throw new i(`Unknown function ${t}`)}getReturnType(e,t){if("init"===t)return this.resolveType("void");const n=this.getNamespaceAci(e).functions.find((e=>e.name===t));if(!n)throw new i(`Unknown function ${t}`);return this.resolveType(n.returns)}getEventType(e,t){const n=this.getNamespaceAci(e);if(!n.hasOwnProperty("event"))throw new i("Missing event declaration");return a(this.resolveType(n.event),t)}isCustomType(e){if("string"!=typeof e)return!1;if(this.isStdType(e))return!1;const[t,n]=e.split(".");return!!this.getNamespaceAci(t)}isStdType(e){return"Set.set"===e}getNamespaceAci(e){for(const t of this.aci){const[[n,r]]=Object.entries(t);if(r.name===e)return r}return null}resolveTypeDef(e,t=[]){const[n,r]=e.split("."),a=this.getNamespaceAci(n);if(!a)throw new i("Unknown namespace for "+JSON.stringify(e));if(a.name===e)return["contract_pubkey",[]];const s=[...a.typedefs||a.type_defs,...a.state?[{name:"state",typedef:a.state,vars:[]}]:[]].find((e=>e.name===r));if(!s)throw new i("Unknown type definition: "+JSON.stringify(e));const o={};return s.vars.forEach(((e,n)=>{const[[r,i]]=Object.entries(e);o[i]=t[n]})),[o.hasOwnProperty(s.typedef)?o[s.typedef]:s.typedef,o]}}},9101:function(e,t,n){const r=n(2122),i=n(6911),a=n(5450),s=n(5345),o={key_block_hash:{tag:"kh",size:32,encoder:i},micro_block_hash:{tag:"mh",size:32,encoder:i},block_pof_hash:{tag:"bf",size:32,encoder:i},block_tx_hash:{tag:"bx",size:32,encoder:i},block_state_hash:{tag:"bs",size:32,encoder:i},contract_bytearray:{tag:"cb",size:0,encoder:r},contract_pubkey:{tag:"ct",size:32,encoder:i},account_pubkey:{tag:"ak",size:32,encoder:i},channel:{tag:"ch",size:32,encoder:i},oracle_pubkey:{tag:"ok",size:32,encoder:i},oracle_query_id:{tag:"oq",size:32,encoder:i},peer_pubkey:{tag:"pp",size:32,encoder:i},name:{tag:"nm",size:0,encoder:i},tx_hash:{tag:"th",size:32,encoder:i},signature:{tag:"sg",size:64,encoder:i},commitment:{tag:"cm",size:32,encoder:i},bytearray:{tag:"ba",size:0,encoder:r}},c={kh:"key_block_hash",mh:"micro_block_hash",bf:"block_pof_hash",bx:"block_tx_hash",bs:"block_state_hash",cb:"contract_bytearray",ct:"contract_pubkey",ak:"account_pubkey",ch:"channel",ok:"oracle_pubkey",oq:"oracle_query_id",pp:"peer_pubkey",nm:"name",th:"tx_hash",sg:"signature",cm:"commitment",ba:"bytearray"};e.exports=class{encode(e,t){if(!o.hasOwnProperty(e))throw new s(e,`Unsupported API type ${e}`);const n=o[e];if(n.size>0&&t.length!==n.size)throw new s(e,`Invalid payload. Expected size ${n.size}, but got ${t.length}`);const r=n.encoder.encode(t);return`${n.tag}_${r}`}decode(e){const t=e.substring(0,2);if(!c.hasOwnProperty(t))throw new a(`Invalid API data format. Unsupported tag: ${t}`);if("_"!==e[2])throw new a(`Invalid API data format. Expected _ separator on position 2, got ${e[2]}`);const n=o[c[t]],r=e.substring(3),i=n.encoder.decode(r);if(n.size>0&&i.length!==n.size)throw new a(`Invalid API data format. Expected size ${n.size}, but got ${i.length}`);return i}decodeWithType(e,t){const n=e.substring(0,2);if(!o.hasOwnProperty(t))throw new s(t,"Unsupported API type");const r=o[t].tag;if(n!==r){const n=this.capitalizeType(t);throw new s(t,`${n} should start with ${r}_, got ${e} instead`)}return this.decode(e)}capitalizeType(e){const t=e.replace("_"," ");return t.charAt(0).toUpperCase()+t.slice(1)}}},146:function(e,t,n){const r=n(9986),i=n(5192),a=n(9101),s=n(2813),{FateTypeCalldata:o,FateTypeString:c}=n(3182),u=n(7611);e.exports=class{constructor(e){this._byteArrayEncoder=new r,this._typeResolver=new i(e),this._apiEncoder=new a,this._eventEncoder=new s}encodeCall(e,t){const{types:n,required:r}=this._typeResolver.getCallTypes(e);if(t.length>n.length||t.length<r)throw new u(`Non matching number of arguments. ${e} expects between ${r} and ${n.length} number of arguments but got ${t.length}`);return this._byteArrayEncoder.encode(o(e,n),t)}decodeCall(e){const{functionId:t,args:n}=this._byteArrayEncoder.decodeWithType(e,o());return{functionId:t,functionName:this._typeResolver.getFunctionName(t),args:n}}decodeResult(e,t,n="ok"){if("ok"===n){const n=this._typeResolver.getReturnType(e);return this._byteArrayEncoder.decodeWithType(t,n)}if("error"===n){const e=new TextDecoder,n=this._apiEncoder.decodeWithType(t,"contract_bytearray");return e.decode(n)}if("revert"===n)return this._byteArrayEncoder.decodeWithType(t,c());throw new u(`Unknown call resutls type: "${n}"`)}}},5192:function(e,t,n){const r=n(9479),i=n(4495),{FateTypeVoid:a,FateTypeTuple:s,FateTypeEvent:o,FateTypeList:c,FateTypeMap:u,FateTypeVariant:l,FateTypeOracleAddress:p,FateTypeOracleQueryAddress:d}=n(3182);e.exports=class{constructor(e){this._contractEncoder=new r,this._encodedContract=e,this._contract=null}get _bytecode(){return null===this._contract&&(this._contract=this._contractEncoder.decode(this._encodedContract)),this._contract.bytecode}getFunctionId(e){const{symbols:t}=this._bytecode;return Object.keys(t).find((n=>t[n]===e))}getFunction(e){const{functions:t}=this._bytecode;return t.find((t=>t.id===e))}getFunctionName(e){const{name:t}=this.getFunction(e);return t}getCallTypes(e){const t=this.getFunction(this.getFunctionId(e));if(t){const e=t.args.valueTypes.map((e=>this.resolveType(e)));return{types:e,required:e.length}}if("init"===e)return{types:[],required:0};throw new i(`Unknown function ${e}`)}getReturnType(e){if("init"===e)return a();const t=this.getFunction(this.getFunctionId(e));if(t)return this.resolveType(t.returnType);throw new i(`Unknown function ${e}`)}getEventType(e){const t=this.getFunction(this.getFunctionId("Chain.event"));if(!t)throw new i("The contract does not have event declaration");const n=t.args.valueTypes[0];return o(this.resolveType(n),e)}resolveType(e){if("variant"===e.name){const t=e.variants.map(((e,t)=>{const n=e.valueTypes.map((e=>this.resolveType(e)));return{[t]:n}}));return l(t)}let t=[];return Array.isArray(e.valueTypes)&&(t=e.valueTypes.map((e=>this.resolveType(e)))),"tuple"===e.name?s(t):"list"===e.name?c(...t):"map"===e.name?u(...t):"oracle"===e.name?p(...t):"oracle_query"===e.name?d(...t):e}}},9986:function(e,t,n){const r=n(9945),i=n(9101),a=n(8836),s=n(7746);e.exports=class{constructor(){this._serializer=new r,this._apiEncoder=new i,this._externalDataFactory=new s,this._canonicalMapper=new a}encode(e,t){const n=this._externalDataFactory.create(e,t),r=this._serializer.serialize(n),i=new Uint8Array(r.flat(1/0));return this._apiEncoder.encode("contract_bytearray",i)}decode(e){const t=this._apiEncoder.decodeWithType(e,"contract_bytearray"),n=this._serializer.deserialize(t);return this._canonicalMapper.toCanonical(n)}decodeWithType(e,t){const n=this._apiEncoder.decodeWithType(e,"contract_bytearray"),r=this._serializer.deserializeWithType(n,t);return this._canonicalMapper.toCanonical(r)}}},9479:function(e,t,n){const r=n(9101),i=n(9945),a=n(4058),s=n(8766),o=n(8707);e.exports=class{constructor(){this._apiEncoder=new r,this._contractBytecodeSerializer=new a(new i),this._intSerializer=new s}decode(e){const t=this._apiEncoder.decodeWithType(e,"contract_bytearray"),n=new Uint8Array([o.CONTRACT_BYTEARRAY,...this._intSerializer.serialize(t.length),...t]);return this._contractBytecodeSerializer.deserialize(n)}}},8269:function(e){e.exports=class{constructor(e){this._valueFactory=e}get valueFactory(){return this._valueFactory}supports({_name:e,_valueTypes:t}){return!1}create(e,t){throw new Error("Not implemented.")}}},8824:function(e,t,n){const r=n(1047),i=n(4537),a=n(8269),s=["bls12_381.fr","bls12_381.fp"];e.exports=class extends a{supports({name:e,_valueTypes:t}){return s.includes(e)}create(e,t){switch(e.name){case"bls12_381.fr":return new r(t);case"bls12_381.fp":return new i(t);default:throw new Error(`Unsupported type "${e.name}"`)}}}},9310:function(e,t,n){const{symbolIdentifier:r}=n(7439),i=n(5345),a=n(3585),s=n(8269);e.exports=class extends s{supports({name:e,_valueTypes:t}){return"calldata"===e}create(e,t){if(!Array.isArray(t))throw new i(e.name,`Fate calldata arguments must be an Array, got ${t} instead`);const n=this.valueFactory.createMultiple(e.argumentTypes,t),s=r(e.functionName);return new a(s,e.argumentTypes,n)}}},6753:function(e,t,n){const r=n(6949),i=n(7412),a=n(715),s=n(5542),o=n(344),c=n(2182),u=n(9398),l=n(329),p=n(6571),d=n(7196),m=n(8824),h=n(9310);e.exports=class{constructor(){this._factories=[new a(this),new s(this),new o(this),new c(this),new u(this),new l(this),new d(this),new p(this),new m(this),new h(this)]}createMultiple(e,t){return r(t.length===e.length,`Number of types (${e.length}) and values (${t.length}) should match`),i(e,t).map((e=>this.create(...e)))}create(e,t){const n=this._factories.find((t=>t.supports(e)));return r(n,`Unsupported type "${e.name}"`),n.create(e,t)}}},7196:function(e,t,n){const{hash:r}=n(7439),{byteArray2Int:i}=n(1247),a=n(4495),s=n(8269),o=["string","signature","bytes"];e.exports=class extends s{supports({name:e,_valueTypes:t}){return"event"===e}create({variantType:e,topics:t},n){const[s,...o]=t;if("bigint"!=typeof s)throw new a(`Event name hash (first topic) should be of type "BigInt", got "${typeof s}" instead.`);const c=e.variants.map((e=>i(r(Object.keys(e)[0])))).findIndex((e=>e===s));if(-1===c)throw new a("Event name hash does not match any event variant constructor");const u=e.variants[c],l=Object.keys(u)[0],[p]=Object.values(u),d=p.map((e=>this._isData(e)?n:o.shift()));return this.valueFactory.create(e,{[l]:d})}_isData(e){return!(!o.includes(e.name)||"bytes"===e.name&&e.size<=32)}}},5542:function(e,t,n){const r=n(889),i=n(5345),a=n(8269);e.exports=class extends a{supports({name:e,_valueTypes:t}){return"list"===e}create(e,t){if(!Array.isArray(t))throw new i(e.name,`Fate list must be an Array, got ${t} instead`);const n=t.map((t=>this.valueFactory.create(e.valuesType,t)));return new r(e.valuesType,n)}}},2182:function(e,t,n){const r=n(5603),i=n(8269);e.exports=class extends i{supports({name:e,_valueTypes:t}){return"map"===e}create(e,t){const n=[];for(const r of t)n.push([this.valueFactory.create(e.keyType,r[0]),this.valueFactory.create(e.valueType,r[1])]);return new r(e.keyType,e.valueType,n)}}},715:function(e,t,n){const r=n(9512),i=n(6465),a=n(2280),s=n(1649),o=n(1143),c=n(1794),u=n(2325),l=n(9640),p=n(8767),d=n(9216),m=n(9511),h=n(3131),f=n(8269),y=["int","bool","string","bits","hash","bytes","signature","account_pubkey","contract_pubkey","channel","oracle_pubkey","oracle_query_id"];e.exports=class extends f{supports({name:e,_valueTypes:t}){return y.includes(e)}create(e,t){switch(e.name){case"int":return new r(t);case"bool":return new i(t);case"string":return new a(t);case"bits":return new u(t);case"hash":return new s(t);case"bytes":return new c(t,e.valueTypes);case"signature":return new o(t);case"account_pubkey":return new l(t);case"contract_pubkey":return new p(t);case"channel":return new d(t);case"oracle_pubkey":return new m(t);case"oracle_query_id":return new h(t);default:throw new Error(`Unsupported type "${e.name}"`)}}}},329:function(e,t,n){const r=n(8269),i=n(4899),{FateTypeRecord:a}=n(3182),s=n(5345);e.exports=class extends r{supports({name:e,_valueTypes:t}){return"record"===e}create(e,t){if("object"!=typeof t)throw new s(e.name,`Fate record must be an Object, got ${t} instead`);const n=Object.keys(t).length;if(n!==e.keys.length)throw new s(e.name,`Number of expected keys (${e.keys.length}) and actual keys (${n}) should match`);const r=e.valueTypes.map(((n,r)=>{const i=e.keys[r];return this.valueFactory.create(n,t[i])}));return 1===r.length?r[0]:new i(a(e.keys,e.valueTypes),r)}}},344:function(e,t,n){const r=n(5981),i=n(8269);e.exports=class extends i{supports({name:e,_valueTypes:t}){return"set"===e}create(e,t){const n=[];for(const r of t)n.push(this.valueFactory.create(e.valuesType,r));return new r(e.valuesType,n)}}},9398:function(e,t,n){const r=n(4899),i=n(5345),a=n(8269);e.exports=class extends a{supports({name:e,_valueTypes:t}){return"tuple"===e}create(e,t){if(!Array.isArray(t))throw new i(e.name,`Fate tuple must be an Array, got ${t} instead`);const n=e.valueTypes.map(((e,n)=>this.valueFactory.create(e,t[n])));return 1===n.length?n[0]:new r(e.valueTypes,n)}}},6571:function(e,t,n){const r=n(9560),i=n(5345),a=n(8269),s=["variant","Chain.ttl","AENS.pointee","AENSv2.pointee","AENS.name","AENSv2.name"];e.exports=class extends a{supports({name:e,_valueTypes:t}){return s.includes(e)}create(e,t){if(!this.isValid(t))throw new i(e.name,`Variant should be an object mapping constructor to array of values, got "${t}" instead`);const[n,a]=Object.entries(t)[0],s=e.variants.map((e=>{const[[,t]]=Object.entries(e);return t.length})),o=e.variants.findIndex((e=>{const[[t,r]]=Object.entries(e);return t===n}));if(-1===o)throw new i(e.name,`Unknown variant constructor: ${n}`);const[[,c]]=Object.entries(e.variants[o]);if(a.length!==c.length)throw new i(e.name,`"${n}" variant constructor expects ${c.length} argument(s) but got ${a.length} instead`);const u=this.valueFactory.createMultiple(c,a);return new r(s,o,u,c,e.variants)}isValid(e){return"object"==typeof e&&null!==e&&1===Object.entries(e).length&&Array.isArray(Object.values(e)[0])}}},4841:function(e,t,n){const r=n(9986),i=n(7776),a=n(9101),s=n(2813),o=n(8836),{FateTypeCalldata:c,FateTypeString:u}=n(3182),l=n(7611);e.exports=class{constructor(e){this._byteArrayEncoder=new r,this._typeResolver=new i(e),this._apiEncoder=new a,this._eventEncoder=new s,this._canonicalMapper=new o}encode(e,t,n){const{types:r,required:i}=this._typeResolver.getCallTypes(e,t);if(n.length>r.length||n.length<i)throw new l(`Non matching number of arguments. ${t} expects between ${i} and ${r.length} number of arguments but got ${n.length}`);for(;n.length<r.length;)n.push(void 0);return this._byteArrayEncoder.encode(c(t,r),n)}decode(e,t,n){const r=this._typeResolver.getReturnType(e,t);return this._byteArrayEncoder.decodeWithType(n,r)}decodeContractByteArray(e){return this._byteArrayEncoder.decode(e)}decodeString(e){const t=new TextDecoder,n=this._apiEncoder.decodeWithType(e,"contract_bytearray");return t.decode(n)}decodeFateString(e){return this._byteArrayEncoder.decodeWithType(e,u())}decodeEvent(e,t,n){const r=this._typeResolver.getEventType(e,n);return this._eventEncoder.decodeWithType(t,r)}}},7611:function(e){class t extends Error{constructor(e){super(e),this.name="EncoderError"}}e.exports=t},3541:function(e){class t extends Error{constructor(e){super("Invalid FATE prefix: 0b"+e.toString(2).padStart(8,"0")),this.name="FatePrefixError",this.prefix=e}}e.exports=t},5345:function(e){class t extends Error{constructor(e,t){super(t),this.name="FateTypeError",this.type=e}}e.exports=t},5450:function(e){class t extends Error{constructor(e){super(e),this.name="FormatError"}}e.exports=t},9520:function(e){class t extends Error{constructor(e){super(e),this.name="InternalError"}}e.exports=t},4275:function(e){class t extends Error{constructor(e){super(e),this.name="SerializerError"}}e.exports=t},4495:function(e){class t extends Error{constructor(e){super(e),this.name="TypeResolveError"}}e.exports=t},2813:function(e,t,n){const r=n(9101),i=n(6753),a=n(8836);e.exports=class{constructor(){this._dataFactory=new i,this._apiEncoder=new r,this._canonicalMapper=new a}decodeWithType(e,t){const n=this._apiEncoder.decode(e),r=this._dataFactory.create(t,n);return this._canonicalMapper.toCanonical(r)}}},7746:function(e,t,n){const r=n(6753),i=n(991);e.exports=class extends r{constructor(){super(),this._mapper=new i}create(e,t){const n=this._mapper.toInternal(e,t);return super.create(e,n)}}},5167:function(e,t,n){const r=n(6949),i=n(889),a=n(4899),{FateTypeTuple:s,FateTypeInt:o}=n(3182),c=(e,t)=>{if(0===e.length)return-1;if(0===t.length)return 1;const n=m(e.itemsType);for(let r=0;r<e.length;r++){if(void 0===t.items[r])return 1;const i=n(e.items[r],t.items[r]);if(0!==i)return i}return e.length===t.length?0:-1},u=e=>{const t=m(e);return(e,n)=>t(e.key,n.key)},l=(e,t)=>{const n=new i(o(),e.valueOf()),r=new i(o(),t.valueOf());return c(n,r)},p=(e,t)=>Number(BigInt(e)-BigInt(t)),d={int:p,bool:(e,t)=>e-t,string:(e,t)=>{const n=new TextEncoder,r=e.toString(),i=t.toString();return r.length===i.length?l(n.encode(e),n.encode(t)):r.length-i.length},bits:(e,t)=>e<0||t<0?-p(e,t):p(e,t),list:c,tuple:(e,t)=>{if(0===e.size)return-1;const n=e.size-t.size;if(0!==n)return n;for(let n=0;n<e.size;n++){const r=e.valueTypes[n],i=m(r)(e.items[n],t.items[n]);if(0!==i)return i}return 0},variant:(e,t)=>{const n=e.arities.length-t.arities.length;if(0!==n)return n;const r=new i(e.aritiesType,e.arities),o=new i(t.aritiesType,t.arities),c=m(r)(r,o);if(0!==c)return c;const u=e.tag-t.tag;return 0!==u?u:m(s())(new a(e.valueTypes,e.value),new a(t.valueTypes,t.value))},map:(e,t)=>{const n=[...e.items],r=[...t.items];n.sort(u(e.keyType)),r.sort(u(t.keyType));const i=m(e.keyType),a=m(e.valueType);for(let e=0;e<n.length;e++){if(void 0===r[e])return 1;const t=n[e],s=r[e],o=i(t.key,s.key);if(0!==o)return o;const c=a(t.value,s.value);if(0!==c)return c}return n.length===r.length?0:-1},bytes:l,account_pubkey:l,channel:l,contract_pubkey:l,oracle_query_id:l,oracle_pubkey:l},m=e=>(r(e.hasOwnProperty("name"),`Cannot determine type name of ${JSON.stringify(e)}`),r(d.hasOwnProperty(e.name),`Unsupported comparator for ${e.name}`),d[e.name]);e.exports=m},7824:function(e){e.exports=Object.freeze({0:{mnemonic:"RETURN",args:0,end:!0},1:{mnemonic:"RETURNR",args:1,end:!0},2:{mnemonic:"CALL",args:1,end:!0},3:{mnemonic:"CALL_R",args:5,end:!0},4:{mnemonic:"CALL_T",args:1,end:!0},5:{mnemonic:"CALL_GR",args:6,end:!0},6:{mnemonic:"JUMP",args:1,end:!0},7:{mnemonic:"JUMPIF",args:2,end:!0},8:{mnemonic:"SWITCH_V2",args:3,end:!0},9:{mnemonic:"SWITCH_V3",args:4,end:!0},10:{mnemonic:"SWITCH_VN",args:2,end:!0},11:{mnemonic:"CALL_VALUE",args:1,end:!1},12:{mnemonic:"PUSH",args:1,end:!1},13:{mnemonic:"DUPA",args:0,end:!1},14:{mnemonic:"DUP",args:1,end:!1},15:{mnemonic:"POP",args:1,end:!1},16:{mnemonic:"INCA",args:0,end:!1},17:{mnemonic:"INC",args:1,end:!1},18:{mnemonic:"DECA",args:0,end:!1},19:{mnemonic:"DEC",args:1,end:!1},20:{mnemonic:"ADD",args:3,end:!1},21:{mnemonic:"SUB",args:3,end:!1},22:{mnemonic:"MUL",args:3,end:!1},23:{mnemonic:"DIV",args:3,end:!1},24:{mnemonic:"MOD",args:3,end:!1},25:{mnemonic:"POW",args:3,end:!1},26:{mnemonic:"STORE",args:2,end:!1},27:{mnemonic:"SHA3",args:2,end:!1},28:{mnemonic:"SHA256",args:2,end:!1},29:{mnemonic:"BLAKE2B",args:2,end:!1},30:{mnemonic:"LT",args:3,end:!1},31:{mnemonic:"GT",args:3,end:!1},32:{mnemonic:"EQ",args:3,end:!1},33:{mnemonic:"ELT",args:3,end:!1},34:{mnemonic:"EGT",args:3,end:!1},35:{mnemonic:"NEQ",args:3,end:!1},36:{mnemonic:"AND",args:3,end:!1},37:{mnemonic:"OR",args:3,end:!1},38:{mnemonic:"NOT",args:2,end:!1},39:{mnemonic:"TUPLE",args:2,end:!1},40:{mnemonic:"ELEMENT",args:3,end:!1},41:{mnemonic:"SETELEMENT",args:4,end:!1},42:{mnemonic:"MAP_EMPTY",args:1,end:!1},43:{mnemonic:"MAP_LOOKUP",args:3,end:!1},44:{mnemonic:"MAP_LOOKUPD",args:4,end:!1},45:{mnemonic:"MAP_UPDATE",args:4,end:!1},46:{mnemonic:"MAP_DELETE",args:3,end:!1},47:{mnemonic:"MAP_MEMBER",args:3,end:!1},48:{mnemonic:"MAP_FROM_LIST",args:2,end:!1},49:{mnemonic:"MAP_SIZE",args:2,end:!1},50:{mnemonic:"MAP_TO_LIST",args:2,end:!1},51:{mnemonic:"IS_NIL",args:2,end:!1},52:{mnemonic:"CONS",args:3,end:!1},53:{mnemonic:"HD",args:2,end:!1},54:{mnemonic:"TL",args:2,end:!1},55:{mnemonic:"LENGTH",args:2,end:!1},56:{mnemonic:"NIL",args:1,end:!1},57:{mnemonic:"APPEND",args:3,end:!1},58:{mnemonic:"STR_JOIN",args:3,end:!1},59:{mnemonic:"INT_TO_STR",args:2,end:!1},60:{mnemonic:"ADDR_TO_STR",args:2,end:!1},61:{mnemonic:"STR_REVERSE",args:2,end:!1},62:{mnemonic:"STR_LENGTH",args:2,end:!1},63:{mnemonic:"BYTES_TO_INT",args:2,end:!1},64:{mnemonic:"BYTES_TO_STR",args:2,end:!1},65:{mnemonic:"BYTES_CONCAT",args:3,end:!1},66:{mnemonic:"BYTES_SPLIT",args:3,end:!1},67:{mnemonic:"INT_TO_ADDR",args:2,end:!1},68:{mnemonic:"VARIANT",args:4,end:!1},69:{mnemonic:"VARIANT_TEST",args:3,end:!1},70:{mnemonic:"VARIANT_ELEMENT",args:3,end:!1},71:{mnemonic:"BITS_NONEA",args:0,end:!1},72:{mnemonic:"BITS_NONE",args:1,end:!1},73:{mnemonic:"BITS_ALLA",args:0,end:!1},74:{mnemonic:"BITS_ALL",args:1,end:!1},75:{mnemonic:"BITS_ALL_N",args:2,end:!1},76:{mnemonic:"BITS_SET",args:3,end:!1},77:{mnemonic:"BITS_CLEAR",args:3,end:!1},78:{mnemonic:"BITS_TEST",args:3,end:!1},79:{mnemonic:"BITS_SUM",args:2,end:!1},80:{mnemonic:"BITS_OR",args:3,end:!1},81:{mnemonic:"BITS_AND",args:3,end:!1},82:{mnemonic:"BITS_DIFF",args:3,end:!1},83:{mnemonic:"BALANCE",args:1,end:!1},84:{mnemonic:"ORIGIN",args:1,end:!1},85:{mnemonic:"CALLER",args:1,end:!1},86:{mnemonic:"BLOCKHASH",args:2,end:!1},87:{mnemonic:"BENEFICIARY",args:1,end:!1},88:{mnemonic:"TIMESTAMP",args:1,end:!1},89:{mnemonic:"GENERATION",args:1,end:!1},90:{mnemonic:"MICROBLOCK",args:1,end:!1},91:{mnemonic:"DIFFICULTY",args:1,end:!1},92:{mnemonic:"GASLIMIT",args:1,end:!1},93:{mnemonic:"GAS",args:1,end:!1},94:{mnemonic:"ADDRESS",args:1,end:!1},95:{mnemonic:"GASPRICE",args:1,end:!1},96:{mnemonic:"LOG0",args:1,end:!1},97:{mnemonic:"LOG1",args:2,end:!1},98:{mnemonic:"LOG2",args:3,end:!1},99:{mnemonic:"LOG3",args:4,end:!1},100:{mnemonic:"LOG4",args:5,end:!1},101:{mnemonic:"SPEND",args:2,end:!1},102:{mnemonic:"ORACLE_REGISTER",args:7,end:!1},103:{mnemonic:"ORACLE_QUERY",args:8,end:!1},104:{mnemonic:"ORACLE_RESPOND",args:6,end:!1},105:{mnemonic:"ORACLE_EXTEND",args:3,end:!1},106:{mnemonic:"ORACLE_GET_ANSWER",args:5,end:!1},107:{mnemonic:"ORACLE_GET_QUESTION",args:5,end:!1},108:{mnemonic:"ORACLE_QUERY_FEE",args:2,end:!1},109:{mnemonic:"AENS_RESOLVE",args:4,end:!1},110:{mnemonic:"AENS_PRECLAIM",args:3,end:!1},111:{mnemonic:"AENS_CLAIM",args:5,end:!1},112:{mnemonic:"AENS_UPDATE",args:6,end:!1},113:{mnemonic:"AENS_TRANSFER",args:4,end:!1},114:{mnemonic:"AENS_REVOKE",args:3,end:!1},115:{mnemonic:"BALANCE_OTHER",args:2,end:!1},116:{mnemonic:"VERIFY_SIG",args:4,end:!1},117:{mnemonic:"VERIFY_SIG_SECP256K1",args:4,end:!1},118:{mnemonic:"CONTRACT_TO_ADDRESS",args:2,end:!1},119:{mnemonic:"AUTH_TX_HASH",args:1,end:!1},120:{mnemonic:"ORACLE_CHECK",args:4,end:!1},121:{mnemonic:"ORACLE_CHECK_QUERY",args:5,end:!1},122:{mnemonic:"IS_ORACLE",args:2,end:!1},123:{mnemonic:"IS_CONTRACT",args:2,end:!1},124:{mnemonic:"IS_PAYABLE",args:2,end:!1},125:{mnemonic:"CREATOR",args:1,end:!1},126:{mnemonic:"ECVERIFY_SECP256K1",args:4,end:!1},127:{mnemonic:"ECRECOVER_SECP256K1",args:3,end:!1},128:{mnemonic:"ADDRESS_TO_CONTRACT",args:2,end:!1},129:{mnemonic:"BLS12_381_G1_NEG",args:2,end:!1},130:{mnemonic:"BLS12_381_G1_NORM",args:2,end:!1},131:{mnemonic:"BLS12_381_G1_VALID",args:2,end:!1},132:{mnemonic:"BLS12_381_G1_IS_ZERO",args:2,end:!1},133:{mnemonic:"BLS12_381_G1_ADD",args:3,end:!1},134:{mnemonic:"BLS12_381_G1_MUL",args:3,end:!1},135:{mnemonic:"BLS12_381_G2_NEG",args:2,end:!1},136:{mnemonic:"BLS12_381_G2_NORM",args:2,end:!1},137:{mnemonic:"BLS12_381_G2_VALID",args:2,end:!1},138:{mnemonic:"BLS12_381_G2_IS_ZERO",args:2,end:!1},139:{mnemonic:"BLS12_381_G2_ADD",args:3,end:!1},140:{mnemonic:"BLS12_381_G2_MUL",args:3,end:!1},141:{mnemonic:"BLS12_381_GT_INV",args:2,end:!1},142:{mnemonic:"BLS12_381_GT_ADD",args:3,end:!1},143:{mnemonic:"BLS12_381_GT_MUL",args:3,end:!1},144:{mnemonic:"BLS12_381_GT_POW",args:3,end:!1},145:{mnemonic:"BLS12_381_GT_IS_ONE",args:2,end:!1},146:{mnemonic:"BLS12_381_PAIRING",args:3,end:!1},147:{mnemonic:"BLS12_381_MILLER_LOOP",args:3,end:!1},148:{mnemonic:"BLS12_381_FINAL_EXP",args:2,end:!1},149:{mnemonic:"BLS12_381_INT_TO_FR",args:2,end:!1},150:{mnemonic:"BLS12_381_INT_TO_FP",args:2,end:!1},151:{mnemonic:"BLS12_381_FR_TO_INT",args:2,end:!1},152:{mnemonic:"BLS12_381_FP_TO_INT",args:2,end:!1},153:{mnemonic:"AENS_LOOKUP",args:2,end:!1},154:{mnemonic:"ORACLE_EXPIRY",args:2,end:!1},155:{mnemonic:"AUTH_TX",args:1,end:!1},156:{mnemonic:"STR_TO_LIST",args:2,end:!1},157:{mnemonic:"STR_FROM_LIST",args:2,end:!1},158:{mnemonic:"STR_TO_UPPER",args:2,end:!1},159:{mnemonic:"STR_TO_LOWER",args:2,end:!1},160:{mnemonic:"CHAR_TO_INT",args:2,end:!1},161:{mnemonic:"CHAR_FROM_INT",args:2,end:!1},162:{mnemonic:"CALL_PGR",args:7,end:!0},163:{mnemonic:"CREATE",args:3,end:!0},164:{mnemonic:"CLONE",args:4,end:!0},165:{mnemonic:"CLONE_G",args:5,end:!0},166:{mnemonic:"BYTECODE_HASH",args:2,end:!1},167:{mnemonic:"FEE",args:1,end:!1},168:{mnemonic:"ADDRESS_TO_BYTES",args:2,end:!1},169:{mnemonic:"POSEIDON",args:3,end:!1},170:{mnemonic:"MULMOD",args:4,end:!1},171:{mnemonic:"BAND",args:3,end:!1},172:{mnemonic:"BOR",args:3,end:!1},173:{mnemonic:"BXOR",args:3,end:!1},174:{mnemonic:"BNOT",args:2,end:!1},175:{mnemonic:"BSL",args:3,end:!1},176:{mnemonic:"BSR",args:3,end:!1},250:{mnemonic:"DEACTIVATE",args:0,end:!1},251:{mnemonic:"ABORT",args:1,end:!0},252:{mnemonic:"EXIT",args:1,end:!0},253:{mnemonic:"NOP",args:0,end:!1},254:{mnemonic:"FUNCTION",args:0,end:!1},255:{mnemonic:"EXTEND",args:0,end:!1}})},8707:function(e){e.exports=Object.freeze({SMALL_INT:0,LONG_STRING:1,SHORT_STRING:1,SHORT_LIST:3,TYPE_INTEGER:7,TYPE_BOOLEAN:23,TYPE_LIST:39,TYPE_TUPLE:55,TYPE_OBJECT:71,TYPE_BITS:87,TYPE_MAP:103,TYPE_STRING:119,TYPE_VARIANT:135,TYPE_BYTES:151,TYPE_CONTRACT_BYTEARRAY:167,TYPE_VAR:231,TYPE_ANY:247,LONG_TUPLE:11,SHORT_TUPLE:11,LONG_LIST:31,MAP:47,EMPTY_TUPLE:63,POS_BITS:79,EMPTY_STRING:95,POS_BIG_INT:111,FALSE:127,CONTRACT_BYTEARRAY:143,OBJECT:159,VARIANT:175,MAP_ID:191,NEG_BITS:207,EMPTY_MAP:223,NEG_BIG_INT:239,TRUE:255,OTYPE_ADDRESS:0,OTYPE_BYTES:1,OTYPE_CONTRACT:2,OTYPE_ORACLE:3,OTYPE_ORACLE_QUERY:4,OTYPE_CHANNEL:5})},3182:function(e){const t=e=>({name:"bytes",size:e}),n=(e,t)=>({name:"map",keyType:e,valueType:t}),r=e=>({name:"variant",variants:e}),i=()=>r([{RelativeTTL:[{name:"int"}]},{FixedTTL:[{name:"int"}]}]),a=()=>r([{"AENS.AccountPt":[{name:"account_pubkey"}]},{"AENS.OraclePt":[{name:"account_pubkey"}]},{"AENS.ContractPt":[{name:"account_pubkey"}]},{"AENS.ChannelPt":[{name:"account_pubkey"}]}]),s=()=>{const e=[{"AENSv2.AccountPt":[{name:"account_pubkey"}]},{"AENSv2.OraclePt":[{name:"account_pubkey"}]},{"AENSv2.ContractPt":[{name:"account_pubkey"}]},{"AENSv2.ChannelPt":[{name:"account_pubkey"}]},{"AENSv2.DataPt":[t()]}];return r(e)};e.exports={FateTypeVoid:()=>({name:"void"}),FateTypeInt:()=>({name:"int"}),FateTypeBool:()=>({name:"bool"}),FateTypeString:()=>({name:"string"}),FateTypeBits:()=>({name:"bits"}),FateTypeBytes:t,FateTypeHash:()=>({name:"hash"}),FateTypeSignature:()=>({name:"signature"}),FateTypeAccountAddress:()=>({name:"account_pubkey"}),FateTypeContractAddress:()=>({name:"contract_pubkey"}),FateTypeChannelAddress:()=>({name:"channel"}),FateTypeOracleAddress:(e,t)=>({name:"oracle_pubkey",questionType:e,answerType:t}),FateTypeOracleQueryAddress:(e,t)=>({name:"oracle_query_id",questionType:e,answerType:t}),FateTypeByteArray:()=>({name:"byte_array"}),FateTypeList:e=>({name:"list",valuesType:e}),FateTypeTuple:(e=[])=>({name:"tuple",valueTypes:e}),FateTypeRecord:(e,t)=>({name:"record",keys:e,valueTypes:t}),FateTypeSet:e=>({name:"set",valuesType:e}),FateTypeMap:n,FateTypeVariant:r,FateTypeType:e=>({name:"type",type:e}),FateTypeOption:e=>r([{None:[]},{Some:e}]),FateTypeChainTTL:i,FateTypeChainGAMetaTx:()=>r([{"Chain.GAMetaTx":[{name:"account_pubkey"},{name:"int"}]}]),FateTypeChainPayingForTx:()=>r([{"Chain.PayingForTx":[{name:"account_pubkey"},{name:"int"}]}]),FateTypeChainBaseTx:()=>r([{"Chain.SpendTx":[{name:"account_pubkey"},{name:"int"},{name:"string"}]},{"Chain.OracleRegisterTx":[]},{"Chain.OracleQueryTx":[]},{"Chain.OracleResponseTx":[]},{"Chain.OracleExtendTx":[]},{"Chain.NamePreclaimTx":[]},{"Chain.NameClaimTx":[{name:"string"}]},{"Chain.NameUpdateTx":[{name:"hash"}]},{"Chain.NameRevokeTx":[{name:"hash"}]},{"Chain.NameTransferTx":[{name:"account_pubkey"},{name:"hash"}]},{"Chain.ChannelCreateTx":[{name:"account_pubkey"}]},{"Chain.ChannelDepositTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.ChannelWithdrawTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.ChannelForceProgressTx":[{name:"account_pubkey"}]},{"Chain.ChannelCloseMutualTx":[{name:"account_pubkey"}]},{"Chain.ChannelCloseSoloTx":[{name:"account_pubkey"}]},{"Chain.ChannelSlashTx":[{name:"account_pubkey"}]},{"Chain.ChannelSettleTx":[{name:"account_pubkey"}]},{"Chain.ChannelSnapshotSoloTx":[{name:"account_pubkey"}]},{"Chain.ContractCreateTx":[{name:"account_pubkey"}]},{"Chain.ContractCallTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.GAAttachTx":[]}]),FateTypeAENSPointee:a,FateTypeAENSv2Pointee:s,FateTypeAENSName:()=>{const e=[{"AENS.Name":[{name:"account_pubkey"},i(),n({name:"string"},a())]}];return r(e)},FateTypeAENSv2Name:()=>{const e=[{"AENSv2.Name":[{name:"account_pubkey"},i(),n({name:"string"},s())]}];return r(e)},FateTypeEvent:(e,t)=>({name:"event",variantType:e,topics:t}),FateTypeBls12381Fr:()=>({name:"bls12_381.fr"}),FateTypeBls12381Fp:()=>({name:"bls12_381.fp"}),FateTypeCalldata:(e,t)=>({name:"calldata",functionName:e,argumentTypes:t}),FateTypeContractBytearray:()=>({name:"contract_bytearray"}),FateTypeVar:e=>({name:"tvar",id:e}),FateTypeAny:()=>({name:"any"})}},8836:function(e,t,n){const r=n(9101),{montBytes2Int:i}=n(2041),{byteArray2Hex:a}=n(1247);e.exports=class{constructor(){this._apiEncoder=new r}toCanonical(e){return e.accept(this)}visitData(e){return e.valueOf()}visitAddress(e){return this._apiEncoder.encode(e.name,e.value)}visitList(e){return e.items.map((e=>e.accept(this)))}visitSet(e){return new Set(e.items.map((e=>e.accept(this))))}visitMap(e){const t=new Map;for(const[n,r]of e.iterator)t.set(n.accept(this),r.accept(this));return t}visitTuple(e){return e.prepareItems((e=>e.accept(this)))}visitVariant(e){const t=e.value.map((e=>e.accept(this)));if("None"!==e.variantName)return"Some"===e.variantName?t[0]:{[e.variantName]:t}}visitBls12381Fr(e){return i(e.valueOf(),"r")}visitBls12381Fp(e){return i(e.valueOf(),"p")}visitCalldata(e){const{functionId:t,args:n}=e.valueOf();return{functionId:a(t),args:n.map((e=>e.accept(this)))}}}},991:function(e,t,n){const r=n(9101),{int2MontBytes:i}=n(2041),a=n(5345);e.exports=class{constructor(){this._apiEncoder=new r}toInternal(e,t){switch(e.name){case"account_pubkey":case"contract_pubkey":case"channel":case"oracle_pubkey":case"oracle_query_id":return this.toAddress(e,t);case"variant":return this.toVariant(e,t);case"map":return this.toMap(e,t);case"set":return this.toSet(e,t);case"record":return this.toRecord(e,t);case"bls12_381.fr":return this.toBls12381Fr(e,t);case"bls12_381.fp":return this.toBls12381Fp(e,t);default:return t}}toAddress({name:e,_:t},n){return this._apiEncoder.decodeWithType(n,e)}toVariant(e,t){if(!this.isOptionVariant(e))return t;if([void 0,null].includes(t))return{None:[]};const[n]=Object.keys(t);return["Some","None"].includes(n)?t:{Some:[t]}}isOptionVariant({_name:e,variants:t}){return t.some((({None:e})=>e&&0===e.length))&&t.some((({Some:e})=>e))}toMap(e,t){if("object"!=typeof t||null===t)throw new a("map",`Fate map must be one of: Map, Array, Object; got ${t} instead`);return Array.isArray(t)||t instanceof Map?t:Object.entries(t)}toSet(e,t){if(t instanceof Set)return t;if(Array.isArray(t))return new Set(t);throw new a("set",`Fate set must be a Set or Array, got "${t}" instead`)}toRecord(e,t){return e.keys.reduce(((e,n)=>({...e,[n]:t[n]})),{})}validateBls12381Field(e,t){if("bigint"!=typeof t&&!Number.isInteger(t))throw new a(e.name,`Should be one of: BigInt or Number; got ${t} instead`)}toBls12381Fr(e,t){return this.validateBls12381Field(e,t),i(t,"r")}toBls12381Fp(e,t){return this.validateBls12381Field(e,t),i(t,"p")}}},9945:function(e,t,n){const r=n(9291),i=n(8517),a=n(1666),s=n(5323),o=n(5499),c=n(1251),u=n(5980),l=n(7596),p=n(284),d=n(1849),m=n(8766),h=n(9737),f=n(5411),y=n(6291),g=n(1885),w=n(4157),N=n(5945),v=n(8566),b=n(2021),x=n(8950),_=n(6937),T=n(8003),C=n(4058),S=n(4323),A=n(4275);e.exports=class extends a{constructor(){super(),this.typeFactory=new r,this._serializers={void:new h,bool:new c,int:new m,tuple:new b(this),record:new b(this),list:new f(this),set:new y(this),map:new g(this),byte_array:new u,string:new v,hash:new l,signature:new l,bits:new o,variant:new x(this),bytes:new l,account_pubkey:new s,contract_pubkey:new d,oracle_pubkey:new N,oracle_query_id:new w,channel:new p,"bls12_381.fr":new _,"bls12_381.fp":new _,calldata:new T(this),contract_bytearray:new C(this),type:new S}}_getSerializer(e){if(!e.hasOwnProperty("name"))throw new A("Unsupported type: "+JSON.stringify(e));const t=e.name;if(!this._serializers.hasOwnProperty(t))throw new A("Unsupported type: "+JSON.stringify(t));return this._serializers[t]}serialize(e){if("object"!=typeof e)throw new A("Only object serialization is supported. Got: "+JSON.stringify(e));if(!(e instanceof i))throw new A("Only instances of FateData is supported.");return this._getSerializer(e).serialize(e)}deserializeWithType(e,t){if(!(e instanceof Uint8Array))throw new A("Only instances of Uint8Array is supported.");return this._getSerializer(t).deserialize(e,t)}deserialize(e){if(!(e instanceof Uint8Array))throw new A("Only instances of Uint8Array is supported.");const t=this.typeFactory.createType(e);return this.deserializeWithType(e,t)}deserializeStream(e,t){if(!(e instanceof Uint8Array))throw new A("Only instances of Uint8Array is supported.");let n=t;return void 0===t&&(n=this.typeFactory.createType(e)),this._getSerializer(n).deserializeStream(e,t)}}},5323:function(e,t,n){const r=n(858),i=n(8707),a=n(1666),s=n(9640);e.exports=class extends a{serialize(e){return[i.OBJECT,i.OTYPE_ADDRESS,...r.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=r.decode(t.slice(2),!0);return[new s(n.data),new Uint8Array(n.remainder)]}}},1666:function(e,t,n){const r=n(4275);e.exports=class{constructor(e){this.globalSerializer=e}serialize(e){throw new r("Not implemented.")}deserialize(e,t){const[n,r]=this.deserializeStream(e,t);return n}deserializeStream(e,t){throw new r("Not implemented.")}}},5499:function(e,t,n){const r=n(8707),i=n(6128),a=n(2325),s=n(1666),o=n(1351);e.exports=class extends s{serialize(e){return[e.value>=0?r.POS_BITS:r.NEG_BITS,...i.encode(o(e.value))]}deserializeStream(e){const t=new Uint8Array(e),n=t[0]===r.POS_BITS?1n:-1n,[s,o]=i.decode(t.slice(1));return[new a(s*n),new Uint8Array(o)]}}},6937:function(e,t,n){const r=n(1666),i=n(7596),a=n(1047),s=n(4537),o=new i,c=(e,t)=>{switch(e.name){case"bls12_381.fr":return new a(t);case"bls12_381.fp":return new s(t);default:throw new Error(`Unsupported type "${e.name}"`)}};e.exports=class extends r{serialize(e){return o.serialize(e)}deserializeStream(e,t){const[n,r]=o.deserializeStream(e);return[c(t,n.valueOf()),r]}}},1251:function(e,t,n){const r=n(8707),i=n(6465),a=n(1666),s=n(3541);e.exports=class extends a{serialize(e){return!0===e.valueOf()?[r.TRUE]:[r.FALSE]}deserializeStream(e){const t=new Uint8Array(e),n=t[0],a=t.slice(1);if(n===r.TRUE)return[new i(!0),a];if(n===r.FALSE)return[new i(!1),a];throw new s(n)}}},5980:function(e,t,n){const r=n(8707),i=n(1666),a=n(30),s=new(n(8766));e.exports=class extends i{serialize(e){return 0===e.length?[r.EMPTY_STRING]:e.length<64?[e.length<<2|r.SHORT_STRING,...e.valueOf()]:[r.LONG_STRING,...s.serialize(e.length-64),...e.valueOf()]}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(n===r.EMPTY_STRING)return[new a,t.slice(1)];if(n===r.LONG_STRING){const[e,n]=s.deserializeStream(t.slice(1)),r=Number(e.valueOf())+64;return[new a(n.slice(0,r)),n.slice(r)]}const i=1+(n>>2);return[new a(t.slice(1,i)),t.slice(i)]}}},2664:function(e,t,n){const r=n(858),i=n(1666),a=n(4323),{byteArray2Hex:s,byteArray2Int:o}=n(1247),c=n(7824),{FateTypeByteArray:u,FateTypeString:l,FateTypeMap:p}=n(3182),d={3:"immediate",2:"var",1:"arg",0:"stack"};e.exports=class extends i{constructor(e){super(e),this._typeSerializer=new a}deserialize(e){const t=r.decode(e,!0),n=r.decode(t.remainder,!0),i=r.decode(n.remainder),a=this.deserializeSymbols(n.data);return{functions:this.deserializeFunctions(t.data,a),symbols:a,annotations:this.deserializeAnnotations(i)}}deserializeFunctions(e,t){let n={},r=e;const i=[];for(;r.length;)[n,r]=this.deserializeFunction(r,t),i.push(n);return i}deserializeFunction(e,t){const n=e[0],r=s(e.slice(1,5));if(254!==n)throw new Error(`Wrong function prefix, expected 0xfe got 0x${e[0].toString(16)}`);const i=t[r],[a,o]=this.deserializeAttributes(e.slice(5)),[c,u,l]=this.deserializeSignature(o),[p,d]=this.deserializeInstructions(l);return[{id:r,name:i,attributes:a,args:c,returnType:u,instructions:p},d]}deserializeInstructions(e){let t={},n=e;const r=[];let i=0,a=!1;for(;n.length&&254!==n[0];)void 0===r[i]&&(r[i]=[]),[t,n,a]=this.deserializeInstruction(n),r[i].push(t),a&&i++;return[r,n]}deserializeInstruction(e){const t=e[0],n=e.slice(1);if(!c.hasOwnProperty(t))throw new Error(`Unsupported opcode: 0x${t.toString(16)}`);const r=c[t],{mnemonic:i,end:a}=r;if(0===r.args)return[{mnemonic:i,args:[]},n,a];const[s,o]=this.deserializeArguments(n,r.args);return[{mnemonic:i,args:s},o,a]}deserializeArguments(e,t){const n=t<=4?1:2,r=e.subarray(0,n),i=e.slice(n),a=((e,t=1)=>{const n=[];let r=Number(o(e));for(let e=0;e<2*t;e+=2)n.push(3&r),r>>=2;if(0!==r)throw new Error(`Invalid argument modifier data. Unexpected padding: 0b${r.toString(2)}`);return n})(r,t),s=[];let c,u=i;return a.forEach((e=>{[c,u]=this.deserializeArgument(e,u),s.push(c)})),[s,u]}deserializeArgument(e,t){const n=d[e];if("stack"===n)return[{mod:n,arg:0},t];const[r,i]=this.globalSerializer.deserializeStream(t);return[{mod:n,arg:r.valueOf()},i]}deserializeSignature(e){const[t,n]=this._typeSerializer.deserializeStream(e),[r,i]=this._typeSerializer.deserializeStream(n);return[t,r,i]}deserializeAttributes(e){const[t,n]=this.globalSerializer.deserializeStream(e),r=Number(t.valueOf()),i=[];return 1&r&&i.push("private"),2&r&&i.push("payable"),[i,n]}deserializeSymbols(e){const t=p(u(),l()),n=this.globalSerializer.deserializeWithType(e,t).valueOf(),r={};return n.forEach(((e,t)=>{const n=s(t);r[n]=e})),r}deserializeAnnotations(e){return this.globalSerializer.deserialize(e).valueOf()}}},7596:function(e,t,n){const r=n(8707),i=n(5980),a=n(1794),s=n(1666),o=new i;e.exports=class extends s{serialize(e){return[r.OBJECT,r.OTYPE_BYTES,...o.serialize(e.value)]}deserializeStream(e){const t=new Uint8Array(e),[n,r]=o.deserializeStream(t.slice(2));return[new a(n.valueOf()),r]}}},8003:function(e,t,n){const r=n(4899),i=n(3585),a=n(30),s=n(1666),{FateTypeTuple:o,FateTypeByteArray:c}=n(3182);e.exports=class extends s{serialize(e){const t=new a(e.functionId),n=new r(e.argTypes,e.args),i=new r([t.type,n.type],[t,n]);return this.globalSerializer.serialize(i)}deserialize(e,t){const n=o([c(),o(t.argumentTypes)]),[r]=this.globalSerializer.deserializeStream(e,n),[a,s]=r.items;return new i(a.valueOf(),s.valueTypes,s.items)}}},284:function(e,t,n){const r=n(858),i=n(8707),a=n(1666),s=n(9216);e.exports=class extends a{serialize(e){return[i.OBJECT,i.OTYPE_CHANNEL,...r.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=r.decode(t.slice(2),!0);return[new s(n.data),new Uint8Array(n.remainder)]}}},4058:function(e,t,n){const r=n(858),i=n(1666),a=n(2664),s=n(8766),{byteArray2Int:o,byteArray2Hex:c}=n(1247);e.exports=class extends i{constructor(e){super(),this._bytecodeSerializer=new a(e),this._intSerializer=new s}deserializeStream(e){const t=new Uint8Array(e),[n,i]=this._intSerializer.deserializeStream(t.slice(1)),a=Number(n),s=r.decode(i.slice(0,a)),u=new TextDecoder;return[{tag:o(s[0]),vsn:o(s[1]),sourceHash:c(s[2]),aevmTypeInfo:s[3],bytecode:this._bytecodeSerializer.deserialize(s[4]),compilerVersion:u.decode(s[5]),payable:Boolean(s[6][0])},i.slice(a)]}}},1849:function(e,t,n){const r=n(858),i=n(8707),a=n(1666),s=n(8767);e.exports=class extends a{serialize(e){return[i.OBJECT,i.OTYPE_CONTRACT,...r.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=r.decode(t.slice(2),!0);return[new s(n.data),new Uint8Array(n.remainder)]}}},8766:function(e,t,n){const r=n(8707),i=n(6128),a=n(9512),s=n(1666),o=n(3541),c=n(1351);e.exports=class extends s{serialize(e){const t=e instanceof a?e.value:BigInt(e),n=c(t);if(n<64){const e=Number(n);return t>=0?[e<<1]:[e<<1&254|128]}return t<0?[r.NEG_BIG_INT,...i.encode(n-64n)]:[r.POS_BIG_INT,...i.encode(n-64n)]}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(!(1&n))return 128&n?[new a(-((126&n)>>1)),t.slice(1)]:[new a(n>>1),t.slice(1)];if(n===r.POS_BIG_INT||n===r.NEG_BIG_INT){const e=n===r.POS_BIG_INT?1n:-1n,[s,o]=i.decode(t.slice(1));return[new a((s+64n)*e),new Uint8Array(o)]}throw new o(n)}}},5411:function(e,t,n){const r=n(6128),i=n(8707),a=n(889),s=n(1666);e.exports=class extends s{serialize(e){const t=e.items.map((e=>this.globalSerializer.serialize(e))).flat(1/0),n=e.items.length;return n<16?[n<<4|i.SHORT_LIST,...t]:[i.LONG_LIST,...r.encode(n-16),...t]}deserializeStream(e,t){const n=new Uint8Array(e),s=n[0];let o,c,u=0n,l=n.slice(1);s===i.LONG_LIST&&([u,l]=r.decode(n.slice(1)),u+=16n),(15&s)===i.SHORT_LIST&&(u=BigInt((240&s)>>4)),void 0!==t&&(o=t.valuesType);const p=[];for(let e=0n;e<u;e++)[c,l]=this.globalSerializer.deserializeStream(l,o),p.push(c);return 0n===u?[new a,l]:(void 0===t&&(o=p[0].type),[new a(o,p),l])}}},1885:function(e,t,n){const r=n(8707),i=n(6128),a=n(1666),s=n(5167),o=n(5603),c=n(3541);e.exports=class extends a{serialize(e){const t=e.length,n=s(e.keyType),a=[...e.items];a.sort(((e,t)=>n(e.key,t.key)));const o=a.map((e=>[this.globalSerializer.serialize(e.key),this.globalSerializer.serialize(e.value)]));return[r.MAP,...i.encode(t),...o.flat(1/0)]}deserializeStream(e,t){const n=new Uint8Array(e),a=n[0];if(a!==r.MAP)throw new c(a);const[s,u]=i.decode(n.slice(1));let l,p,d=u;if(0n===s)return[new o,d];void 0!==t&&({keyType:l,valueType:p}=t);const m=[];for(let e=0n;e<s;e++){const[e,t]=this.globalSerializer.deserializeStream(d,l),[n,r]=this.globalSerializer.deserializeStream(t,p);m.push([e,n]),d=r}const h=m[0];return void 0===t&&(l=h[0].type,p=h[1].type),[new o(l,p,m),d]}}},4157:function(e,t,n){const r=n(858),i=n(8707),a=n(1666),s=n(3131);e.exports=class extends a{serialize(e){return[i.OBJECT,i.OTYPE_ORACLE_QUERY,...r.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=r.decode(t.slice(2),!0);return[new s(n.data),new Uint8Array(n.remainder)]}}},5945:function(e,t,n){const r=n(858),i=n(8707),a=n(1666),s=n(9511);e.exports=class extends a{serialize(e){return[i.OBJECT,i.OTYPE_ORACLE,...r.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=r.decode(t.slice(2),!0);return[new s(n.data),new Uint8Array(n.remainder)]}}},6291:function(e,t,n){const r=n(1666),{FateTypeTuple:i,FateTypeMap:a}=n(3182),s=n(5603),o=n(4899),c=n(5981);e.exports=class extends r{serialize(e){return this.globalSerializer.serialize(new s(e.itemsType,i(),e.items.map((e=>[e,new o]))))}deserializeStream(e,t){const n=a(t.valuesType,i()),[r,s]=this.globalSerializer.deserializeStream(e,n);return[new c(t.valuesType,r.keys),s]}}},8566:function(e,t,n){const r=n(8707),i=n(1666),a=n(5980),s=n(2280),o=n(3541),c=new a;e.exports=class extends i{serialize(e){const t=(new TextEncoder).encode(e);return c.serialize(t)}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if((3&n)!==r.SHORT_STRING&&![r.EMPTY_STRING,r.LONG_STRING].includes(n))throw new o(n);const i=new TextDecoder,[a,u]=c.deserializeStream(t);return[new s(i.decode(a.valueOf())),u]}}},2021:function(e,t,n){const r=n(8707),i=n(4899),a=n(1666),s=n(6128);e.exports=class extends a{serialize(e){const t=e.size;if(0===t)return[r.EMPTY_TUPLE];const n=e.items.map((e=>this.globalSerializer.serialize(e))).flat(1/0);return t<16?[t<<4|r.SHORT_TUPLE,...n]:[r.LONG_TUPLE,...s.encode(t-16),...n]}deserializeStream(e,t){const n=new Uint8Array(e),a=n[0];let o=0n,c=n.slice(1);if(a===r.EMPTY_TUPLE)return[new i,c];(15&a)===r.SHORT_TUPLE&&(o=(240&a)>>4),a===r.LONG_TUPLE&&([o,c]=s.decode(n.slice(1)),o+=16n);let u=[];void 0!==t&&(u=t.valueTypes);const l=[];let p=null;for(let e=0n;e<o;e++)[p,c]=this.globalSerializer.deserializeStream(c,u[e]),l.push(p);let d=t;return void 0===t&&(d=l.map((e=>e.type))),[new i(d,l),c]}}},4323:function(e,t,n){const r=n(8707),i=n(1666),a=n(8766),s=n(3541),o=n(5345),{FateTypeInt:c,FateTypeBool:u,FateTypeString:l,FateTypeBits:p,FateTypeBytes:d,FateTypeAccountAddress:m,FateTypeContractAddress:h,FateTypeOracleAddress:f,FateTypeOracleQueryAddress:y,FateTypeChannelAddress:g,FateTypeList:w,FateTypeMap:N,FateTypeTuple:v,FateTypeVariant:b,FateTypeVar:x,FateTypeAny:_}=n(3182),T={[r.TYPE_INTEGER]:c(),[r.TYPE_BOOLEAN]:u(),[r.TYPE_BITS]:p(),[r.TYPE_STRING]:l(),[r.TYPE_ANY]:_()},C={[r.OTYPE_ADDRESS]:m(),[r.OTYPE_CONTRACT]:h(),[r.OTYPE_ORACLE]:f(),[r.OTYPE_ORACLE_QUERY]:y(),[r.OTYPE_CHANNEL]:g()};e.exports=class extends i{constructor(e){super(e),this._intSerializer=new a}serialize(e){const t=Object.entries(T).find((([t,{name:n}])=>n===e.name))?.[0];if(null!=t)return new Uint8Array([t]);const n=Object.entries(C).find((([t,{name:n}])=>n===e.name))?.[0];if(null!=n)return new Uint8Array([r.TYPE_OBJECT,n]);if("tvar"===e.name)return new Uint8Array([r.TYPE_VAR,e.id]);if("bytes"===e.name)return new Uint8Array([r.TYPE_BYTES,...this._intSerializer.serialize(e.size)]);if("list"===e.name)return new Uint8Array([r.TYPE_LIST,...this.serialize(e.valuesType)]);if("map"===e.name)return new Uint8Array([r.TYPE_MAP,...this.serialize(e.keyType),...this.serialize(e.valueType)]);if("tuple"===e.name)return new Uint8Array([r.TYPE_TUPLE,e.valueTypes.length,...e.valueTypes.map((e=>[...this.serialize(e)])).flat()]);if("variant"===e.name)return new Uint8Array([r.TYPE_VARIANT,e.variants.length,...e.variants.map((e=>[...this.serialize(e)])).flat()]);throw new o(e.name,`Unsupported type: ${e.name}`)}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(T.hasOwnProperty(n))return[T[n],t.slice(1)];if(n===r.TYPE_OBJECT){const e=t[1];if(!C.hasOwnProperty(e))throw new s(e,"Unsupported object type");return[C[e],t.slice(2)]}if(n===r.TYPE_VAR)return[x(t[1]),t.slice(2)];if(n===r.TYPE_BYTES){const[e,n]=this._intSerializer.deserializeStream(t.slice(1));return[d(e.valueOf()),n]}if(n===r.TYPE_LIST){const[e,n]=this.deserializeStream(t.slice(1));return[w(e),n]}if(n===r.TYPE_MAP){const[e,n]=this.deserializeStream(t.slice(1)),[r,i]=this.deserializeStream(n);return[N(e,r),i]}if(n===r.TYPE_TUPLE){const e=t[1],n=[];let r,i=t.slice(2);for(let t=0;t<e;t++)[r,i]=this.deserializeStream(i),n.push(r);return[v(n),i]}if(n===r.TYPE_VARIANT){const e=t[1],n=[];let r,i=t.slice(2);for(let t=0;t<e;t++)[r,i]=this.deserializeStream(i),n.push(r);return[b(n),i]}throw new s(n)}}},8950:function(e,t,n){const r=n(858),i=n(8707),a=n(4899),s=n(9560),{FateTypeTuple:o}=n(3182),c=n(1666);e.exports=class extends c{serialize(e){const t=new a(e.valueTypes,e.value);return[i.VARIANT,...r.encode(new Uint8Array(e.arities)),e.tag,...this.globalSerializer.serialize(t)]}deserializeStream(e,t){const n=new Uint8Array(e),i=r.decode(n.slice(1),!0),a=[...i.data],c=i.remainder[0],u=i.remainder.slice(1);let l,p=[];void 0!==t&&void 0!==t.variants&&(p=t.variants,l=o(Object.values(p[c])[0]));const[d,m]=this.globalSerializer.deserializeStream(u,l);return[new s(a,c,d.items,d.valueTypes,p),m]}}},9737:function(e,t,n){const r=n(4779),i=n(1666);e.exports=class extends i{serialize(){return""}deserialize(){return new r}deserializeStream(e){return[new r,e]}}},9291:function(e,t,n){const r=n(6949),i=n(8707),a=n(3541),{FateTypeInt:s,FateTypeBool:o,FateTypeString:c,FateTypeBits:u,FateTypeBytes:l,FateTypeAccountAddress:p,FateTypeContractAddress:d,FateTypeOracleAddress:m,FateTypeOracleQueryAddress:h,FateTypeChannelAddress:f,FateTypeList:y,FateTypeMap:g,FateTypeTuple:w,FateTypeVariant:N,FateTypeContractBytearray:v,FateTypeType:b}=n(3182),x={[i.OTYPE_ADDRESS]:p(),[i.OTYPE_BYTES]:l(),[i.OTYPE_CONTRACT]:d(),[i.OTYPE_ORACLE]:m(),[i.OTYPE_ORACLE_QUERY]:h(),[i.OTYPE_CHANNEL]:f()};e.exports=class{createType(e){const t=e[0];if(t===i.TRUE||t===i.FALSE)return o();if((1&t)===i.SMALL_INT||t===i.POS_BIG_INT||t===i.NEG_BIG_INT)return s();if((3&t)===i.SHORT_STRING||t===i.LONG_STRING||t===i.EMPTY_STRING)return c();if((15&t)===i.SHORT_LIST||t===i.LONG_LIST)return y();if((15&t)===i.SHORT_TUPLE||t===i.LONG_TUPLE||t===i.EMPTY_TUPLE)return w();if(t===i.MAP||t===i.EMPTY_MAP)return g();if(t===i.POS_BITS||t===i.NEG_BITS)return u();if(t===i.VARIANT)return N();if(t===i.OBJECT){const t=e[1];return r(x.hasOwnProperty(t),`Unsupported object type "${t}"`),x[t]}if(t===i.CONTRACT_BYTEARRAY)return v();if(t===i.TYPE_INTEGER||t===i.TYPE_BOOLEAN||t===i.TYPE_LIST||t===i.TYPE_TUPLE||t===i.TYPE_OBJECT||t===i.TYPE_BITS||t===i.TYPE_MAP||t===i.TYPE_STRING||t===i.TYPE_VARIANT||t===i.TYPE_BYTES||t===i.TYPE_CONTRACT_BYTEARRAY||t===i.TYPE_VAR||t===i.TYPE_ANY)return b();throw new a(t)}}},7815:function(e,t,n){const r=n(4495),{FateTypeVoid:i,FateTypeInt:a,FateTypeBool:s,FateTypeString:o,FateTypeBits:c,FateTypeBytes:u,FateTypeHash:l,FateTypeSignature:p,FateTypeAccountAddress:d,FateTypeContractAddress:m,FateTypeOracleAddress:h,FateTypeOracleQueryAddress:f,FateTypeList:y,FateTypeMap:g,FateTypeTuple:w,FateTypeRecord:N,FateTypeSet:v,FateTypeVariant:b,FateTypeOption:x,FateTypeChainTTL:_,FateTypeChainGAMetaTx:T,FateTypeChainPayingForTx:C,FateTypeChainBaseTx:S,FateTypeAENSPointee:A,FateTypeAENSv2Pointee:P,FateTypeAENSName:E,FateTypeAENSv2Name:z,FateTypeBls12381Fr:I,FateTypeBls12381Fp:M}=n(3182);e.exports=class{isCustomType(){return!1}resolveTypeDef(e,t){return[e,t]}resolveValueTypes(e,t){return Array.isArray(e)?e.map((e=>{const n=e.hasOwnProperty("type")?e.type:e,r=t.hasOwnProperty(n)?t[n]:n;return this.resolveType(r,t)})):[]}resolveType(e,t={}){let n=e,b=[],q=[];var R;if((R=e)&&"object"==typeof R&&R.constructor===Object&&([[n,b]]=Object.entries(e)),this.isCustomType(n)){const[e,t]=this.resolveTypeDef(n,b);return this.resolveType(e,t)}if("variant"!==n&&(q=this.resolveValueTypes(b,t)),"void"===n)return i();if("unit"===n)return w([]);if("int"===n)return a();if("bool"===n)return s();if("string"===n)return o();if("bits"===n)return c();if("hash"===n)return l();if("signature"===n)return p();if("address"===n)return d();if("contract_pubkey"===n)return m();if("Chain.ttl"===n)return _();if("Chain.ga_meta_tx"===n)return T();if("Chain.paying_for_tx"===n)return C();if("Chain.base_tx"===n)return S();if("AENS.pointee"===n)return A();if("AENSv2.pointee"===n)return P();if("AENS.name"===n)return E();if("AENSv2.name"===n)return z();if("Set.set"===n)return v(...q);if("MCL_BLS12_381.fr"===n)return I();if("MCL_BLS12_381.fp"===n)return M();if("bytes"===n)return u("any"===b?void 0:b);if("list"===n)return y(...q);if("map"===n)return g(...q);if(("tuple"===n||"record"===n)&&1===q.length)return q[0];if("tuple"===n)return w(q);if("record"===n){const e=b.map((e=>e.name));return N(e,q)}if("variant"===n)return this.resolveVariant(b,t);if("option"===n)return x(q);if("oracle"===n)return h(...q);if("oracle_query"===n)return f(...q);throw new r("Cannot resolve type: "+JSON.stringify(e))}resolveVariant(e,t){const n=e.map((e=>{const[[n,r]]=Object.entries(e),i=r.map((e=>{const n=t.hasOwnProperty(e)?t[e]:e;return this.resolveType(n,t)}));return{[n]:i}}));return b(n)}}},5711:function(e,t,n){const r=n(9226);e.exports=class{constructor(e){this._internalEncoder=new r(e)}encodeCall(e,t,n){return this._internalEncoder.encodeCall(e,t,n)}decodeCall(e,t,n){return this._internalEncoder.decodeCall(e,t,n)}decodeResult(e,t,n,r="ok"){return this._internalEncoder.decodeResult(e,t,n,r)}decodeEvent(e,t,n){return this._internalEncoder.decodeEvent(e,t,n)}}},1877:function(e,t,n){const r=n(146);e.exports=class{constructor(e){this._internalEncoder=new r(e)}encodeCall(e,t){return this._internalEncoder.encodeCall(e,t)}decodeCall(e){return this._internalEncoder.decodeCall(e)}decodeResult(e,t="ok"){return this._internalEncoder.decodeResult(e,t)}}},4747:function(e,t,n){const r=n(9986);e.exports=class{constructor(){this._internalEncoder=new r}encodeWithType(e,t){return this._internalEncoder.encode(t,e)}decode(e){return this._internalEncoder.decode(e)}decodeWithType(e,t){return this._internalEncoder.decodeWithType(e,t)}}},9316:function(e,t,n){const r=n(9479);e.exports=class{constructor(){this._internalEncoder=new r}decode(e){return this._internalEncoder.decode(e)}}},3442:function(e,t,n){const r=n(4841);e.exports=class{constructor(e){this._internalEncoder=new r(e)}encode(e,t,n){return this._internalEncoder.encode(e,t,n)}decode(e,t,n){return this._internalEncoder.decode(e,t,n)}decodeContractByteArray(e){return this._internalEncoder.decodeContractByteArray(e)}decodeString(e){return this._internalEncoder.decodeString(e)}decodeFateString(e){return this._internalEncoder.decodeFateString(e)}decodeEvent(e,t,n){return this._internalEncoder.decodeEvent(e,t,n)}}},6278:function(e,t,n){const r=n(9101);e.exports=class{constructor(){this._internalEncoder=new r}encode(e,t){return this._internalEncoder.encode(e,t)}decode(e){return this._internalEncoder.decode(e)}}},9102:function(e,t,n){const r=n(7815);e.exports=class{constructor(){this._internalResolver=new r}resolveType(e,t={}){return this._internalResolver.resolveType(e,t)}}},6176:function(e,t,n){const r=n(3442),i=n(5711),a=n(1877),s=n(4747),o=n(6278),c=n(9316),u=n(9102);e.exports={Encoder:r,AciContractCallEncoder:i,BytecodeContractCallEncoder:a,ContractByteArrayEncoder:s,FateApiEncoder:o,ContractEncoder:c,TypeResolver:u}},9640:function(e,t,n){const r=n(3533);e.exports=class extends r{constructor(e){super(e,"account_pubkey","ak")}}},3533:function(e,t,n){const r=n(1794);e.exports=class extends r{constructor(e,t,n){super(e,32,t),this._prefix=n}get prefix(){return this._prefix}accept(e){return e.visitAddress(this)}}},2325:function(e,t,n){const r=n(8517);e.exports=class extends r{constructor(e){super("bits"),this._value=BigInt(e)}get value(){return this._value}valueOf(){return this._value}}},6859:function(e,t,n){const r=n(8517),i=n(5345);e.exports=class extends r{constructor(e,t,n){if(super(n),!Array.isArray(e)&&!ArrayBuffer.isView(e))throw new i(n,`Should be one of: Array or ArrayBuffer; got ${e} instead`);const r=new Uint8Array(e);if(r.byteLength!==t)throw new i(n,`Invalid length: got ${r.byteLength} bytes instead of ${t} bytes`);this._value=r,this._size=t}get value(){return this._value}get size(){return this._size}valueOf(){return this._value}}},4537:function(e,t,n){const r=n(6859),{FateTypeBls12381Fp:i}=n(3182);e.exports=class extends r{constructor(e){super(e,48,"bls12_381.fp")}get type(){return i()}accept(e){return e.visitBls12381Fp(this)}}},1047:function(e,t,n){const r=n(6859),{FateTypeBls12381Fr:i}=n(3182);e.exports=class extends r{constructor(e){super(e,32,"bls12_381.fr")}get type(){return i()}accept(e){return e.visitBls12381Fr(this)}}},6465:function(e,t,n){const r=n(8517),{FateTypeBool:i}=n(3182);e.exports=class extends r{constructor(e){super("bool"),this._value=!!e}get value(){return this._value}get type(){return i()}valueOf(){return this._value}}},30:function(e,t,n){const r=n(8517),{FateTypeByteArray:i}=n(3182);e.exports=class extends r{constructor(e=[]){super("byte_array"),this._value=new Uint8Array(e)}get length(){return this._value.length}get type(){return i()}valueOf(){return this._value}}},1794:function(e,t,n){const r=n(8517),{int2ByteArray:i}=n(1247),a=n(6423),s=n(5345);e.exports=class extends r{constructor(e,t,n="bytes"){if(super(n),this._value=((e,t=0)=>{if(Array.isArray(e)||ArrayBuffer.isView(e))return new Uint8Array(e);if("string"==typeof e)return a(e);if("bigint"!=typeof e&&!Number.isInteger(e))throw new s("byte_array",`Should be one of: Array, ArrayBuffer, hex string, Number, BigInt; got ${e} instead`);const n=i(e);if(n.length>=t)return n;const r=new Uint8Array(t);return r.set(n,t-n.length),r})(e,t),t&&this._value.byteLength!==t)throw new s(n,`Invalid length: got ${this._value.byteLength} bytes instead of ${t} bytes`);this._size=t}get value(){return this._value}get size(){return this._size}valueOf(){return this._value}}},3585:function(e,t,n){const r=n(8517);e.exports=class extends r{constructor(e,t,n){super("calldata"),this._functionId=new Uint8Array(e),this._argTypes=t,this._args=n}get functionId(){return this._functionId}get argTypes(){return this._argTypes}get args(){return this._args}valueOf(){return{functionId:this._functionId,args:this._args}}accept(e){return e.visitCalldata(this)}}},9216:function(e,t,n){const r=n(3533);e.exports=class extends r{constructor(e){super(e,"channel","ch")}}},8767:function(e,t,n){const r=n(3533);e.exports=class extends r{constructor(e){super(e,"contract_pubkey","ct")}}},8517:function(e,t,n){const r=n(9520);e.exports=class{constructor(e){this.name=e}valueOf(){throw new r("Not implemented.")}accept(e){return e.visitData(this)}}},1649:function(e,t,n){const r=n(1794);e.exports=class extends r{constructor(e){super(e,32,"hash")}}},9512:function(e,t,n){const r=n(8517),{FateTypeInt:i}=n(3182);e.exports=class extends r{constructor(e){super("int"),this._value=BigInt(e)}get value(){return this._value}get type(){return i()}valueOf(){return this._value}}},889:function(e,t,n){const r=n(8517),{FateTypeList:i}=n(3182);e.exports=class extends r{constructor(e,t=[]){super("list"),this._itemsType=e,this.items=Array.from(t)}get itemsType(){return this._itemsType}get type(){return i(this.itemsType)}get length(){return this.items.length}valueOf(){return this.items.map((e=>e.valueOf()))}accept(e){return e.visitList(this)}}},5603:function(e,t,n){const r=n(8517),{FateTypeMap:i}=n(3182),a=e=>{const[t,n]=e;return{key:t,value:n}};e.exports=class extends r{constructor(e,t,n=[]){super("map"),this._keyType=e,this._valueType=t,this._type=i(e,t),this._value=new Map(n)}get items(){return[...this._value.entries()].map(a)}get keyType(){return this._keyType}get valueType(){return this._valueType}get type(){return this._type}get length(){return this._value.size}get iterator(){return this._value[Symbol.iterator]()}get keys(){return this._value.keys()}valueOf(){const e=new Map;for(const[t,n]of this.iterator)e.set(t.valueOf(),n.valueOf());return e}accept(e){return e.visitMap(this)}}},9511:function(e,t,n){const r=n(3533);e.exports=class extends r{constructor(e){super(e,"oracle_pubkey","ok")}}},3131:function(e,t,n){const r=n(3533);e.exports=class extends r{constructor(e){super(e,"oracle_query_id","oq")}}},5981:function(e,t,n){const r=n(8517),{FateTypeSet:i}=n(3182);e.exports=class extends r{constructor(e,t=[]){super("set"),this._itemsType=e,this._items=new Set(t)}get items(){return Array.from(this._items.values())}get itemsType(){return this._itemsType}get type(){return i(this.itemsType)}get length(){return this._items.size}valueOf(){return new Set(this.items.map((e=>e.valueOf())))}accept(e){return e.visitSet(this)}}},1143:function(e,t,n){const r=n(1794);e.exports=class extends r{constructor(e){super(e,64,"signature")}}},2280:function(e,t,n){const r=n(8517),{FateTypeString:i}=n(3182);e.exports=class extends r{constructor(e){var t;super("string"),this._value=(t=e)instanceof Uint8Array?(new TextDecoder).decode(t):t.toString()}get type(){return i()}toString(){return this._value}valueOf(){return this._value}}},4899:function(e,t,n){const r=n(8517),{FateTypeTuple:i}=n(3182);e.exports=class extends r{constructor(e=[],t=[]){super("tuple"),this._valueTypes=e.hasOwnProperty("valueTypes")?e.valueTypes:e,this._type=Array.isArray(e)?i(e):e,this._items=Array.from(t)}get valueTypes(){return this._valueTypes}get type(){return this._type}get size(){return this._items.length}get items(){return this._items}valueOf(){return this.prepareItems((e=>e.valueOf()))}prepareItems(e){const t=this._items.map(e);return"record"===this._type.name?(n=this._type.keys,r=t,n.reduce(((e,t,n)=>(e[t]=r[n],e)),{})):t;var n,r}accept(e){return e.visitTuple(this)}}},9560:function(e,t,n){const r=n(8517),{FateTypeVariant:i,FateTypeTuple:a,FateTypeInt:s}=n(3182);e.exports=class extends r{constructor(e,t,n=[],r=[],a=[]){super("variant"),this.arities=Array.from(e),this._tag=t,this._value=n,this._valueTypes=r,this._type=i(a)}get valueTypes(){return this._valueTypes}get type(){return this._type}get tag(){return this._tag}get value(){return this._value}get aritiesType(){return s()}get variantType(){return a(this._valueTypes)}get variants(){return this._type.variants}get variantName(){if(0===this.variants.length)return this.tag;const e=this.variants[this.tag];return Object.keys(e)[0]}valueOf(){if(0===this.variants.length)return this;const e=this._value.map((e=>e.valueOf()));return{[this.variantName]:e}}accept(e){return e.visitVariant(this)}}},4779:function(e,t,n){const r=n(8517),{FateTypeVoid:i}=n(3182);e.exports=class extends r{constructor(){super("void"),this._value=void 0}get value(){return this._value}get type(){return i()}valueOf(){return this._value}}},6128:function(e,t,n){const r=n(858),{int2ByteArray:i,byteArray2Int:a}=n(1247);e.exports={encode(e){return new Uint8Array(r.encode(i(e)))},decode(e){const t=r.decode(e,!0);return[a(t.data),t.remainder]}}},1351:function(e){e.exports=e=>e>0?e:-1n*e},6949:function(e,t,n){const r=n(9520);e.exports=(e,t)=>{if(!e)throw new r(t)}},6911:function(e,t,n){const r=n(8957).default,{addChecksum:i,getPayload:a}=n(2122);e.exports={encode:e=>r.encode(i(e)),decode:e=>a(r.decode(e))}},2122:function(e,t,n){const r=n(4107),{Buffer:i}=n(2861),a=n(5450),s=e=>(new r).update(e).digest(),o=e=>s(s(e)).slice(0,4),c=e=>{const t=i.from(e),n=o(e);return i.concat([t,n],t.length+4)},u=e=>{const t=i.from(e),n=t.slice(0,-4),r=t.slice(-4),s=o(n);if(!r.equals(s))throw new a("Invalid checksum");return new Uint8Array(n)};e.exports={addChecksum:c,getPayload:u,encode:e=>c(e).toString("base64"),decode:e=>{const t=i.from(e,"base64");return u(t)}}},2041:function(e,t,n){const{int2ByteArray:r,byteArray2IntBE:i}=n(1247),a={r:{R:1n<<256n,N:0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001n},p:{R:1n<<384n,N:0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn}},s=(e,t)=>{if(0n===t)return[1n,0n,e];const[n,r,i]=s(t,e%t);return[r,n-r*(e/t),i]};e.exports={int2MontBytes:(e,t)=>{const n=a[t],i=BigInt(e)*n.R%n.N;return r(i)},montBytes2Int:(e,t)=>{const n=a[t],r=i(e),o=((e,t)=>{const[n,r,i]=s(e,t);return(n+t)%t})(n.R,n.N);return r*o%n.N}}},7439:function(e,t,n){const r=n(4156),i=e=>Array.from(r.blake2b(e,null,32));e.exports={hash:i,symbolIdentifier:e=>i(e).slice(0,4)}},6423:function(e,t,n){const r=n(5450);e.exports=e=>{const t=e.match(/^(0x)?([a-f0-9]*)$/i);if(!t)throw new r(`Invalid hex string: ${e}`);return new Uint8Array(t[2].split(/(.{1,2})/).filter((e=>e)).map((e=>parseInt(e,16))))}},1247:function(e){const t=e=>{const n=BigInt(e);return n<256n?new Uint8Array([Number(n)]):new Uint8Array([...t(n>>8n),Number(0xffn&n)])},n=e=>[...e].map((e=>e.toString(16).padStart(2,"0")));e.exports={int2ByteArray:t,byteArray2Int:e=>{const t=n(e);return BigInt("0x"+t.join(""))},byteArray2IntBE:e=>{const t=n(e).reverse();return BigInt("0x"+t.join(""))},byteArray2Hex:e=>n(e).join("")}},7412:function(e){e.exports=(e,...t)=>e.map(((e,n)=>t.reduce(((e,t)=>[...e,t[n]]),[e])))},7526:function(e,t){"use strict";t.byteLength=function(e){var t=o(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,a=o(e),s=a[0],c=a[1],u=new i(function(e,t,n){return 3*(t+n)/4-n}(0,s,c)),l=0,p=c>0?s-4:s;for(n=0;n<p;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===c&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[l++]=255&t),1===c&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],s=16383,o=0,u=r-i;o<u;o+=s)a.push(c(e,o,o+s>u?u:o+s));return 1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),a.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=a[s],r[a.charCodeAt(s)]=s;function o(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,r){for(var i,a,s=[],o=t;o<r;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),s.push(n[(a=i)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},1594:function(e,t,n){var r;!function(){"use strict";var i,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,o=Math.floor,c="[BigNumber Error] ",u=c+"Number primitive has more than 15 significant digits: ",l=1e14,p=14,d=9007199254740991,m=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],h=1e7,f=1e9;function y(e){var t=0|e;return e>0||e===t?t:t-1}function g(e){for(var t,n,r=1,i=e.length,a=e[0]+"";r<i;){for(t=e[r++]+"",n=p-t.length;n--;t="0"+t);a+=t}for(i=a.length;48===a.charCodeAt(--i););return a.slice(0,i+1||1)}function w(e,t){var n,r,i=e.c,a=t.c,s=e.s,o=t.s,c=e.e,u=t.e;if(!s||!o)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-o:s;if(s!=o)return s;if(n=s<0,r=c==u,!i||!a)return r?0:!i^n?1:-1;if(!r)return c>u^n?1:-1;for(o=(c=i.length)<(u=a.length)?c:u,s=0;s<o;s++)if(i[s]!=a[s])return i[s]>a[s]^n?1:-1;return c==u?0:c>u^n?1:-1}function N(e,t,n,r){if(e<t||e>n||e!==o(e))throw Error(c+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function v(e){var t=e.c.length-1;return y(e.e/p)==t&&e.c[t]%2!=0}function b(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function x(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}i=function e(t){var n,r,i,_,T,C,S,A,P,E,z=V.prototype={constructor:V,toString:null,valueOf:null},I=new V(1),M=20,q=4,R=-7,O=21,k=-1e7,B=1e7,$=!1,U=1,L=0,G={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},F="0123456789abcdefghijklmnopqrstuvwxyz",D=!0;function V(e,t){var n,s,c,l,m,h,f,y,g=this;if(!(g instanceof V))return new V(e,t);if(null==t){if(e&&!0===e._isBigNumber)return g.s=e.s,void(!e.c||e.e>B?g.c=g.e=null:e.e<k?g.c=[g.e=0]:(g.e=e.e,g.c=e.c.slice()));if((h="number"==typeof e)&&0*e==0){if(g.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,m=e;m>=10;m/=10,l++);return void(l>B?g.c=g.e=null:(g.e=l,g.c=[e]))}y=String(e)}else{if(!a.test(y=String(e)))return i(g,y,h);g.s=45==y.charCodeAt(0)?(y=y.slice(1),-1):1}(l=y.indexOf("."))>-1&&(y=y.replace(".","")),(m=y.search(/e/i))>0?(l<0&&(l=m),l+=+y.slice(m+1),y=y.substring(0,m)):l<0&&(l=y.length)}else{if(N(t,2,F.length,"Base"),10==t&&D)return W(g=new V(e),M+g.e+1,q);if(y=String(e),h="number"==typeof e){if(0*e!=0)return i(g,y,h,t);if(g.s=1/e<0?(y=y.slice(1),-1):1,V.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(u+e)}else g.s=45===y.charCodeAt(0)?(y=y.slice(1),-1):1;for(n=F.slice(0,t),l=m=0,f=y.length;m<f;m++)if(n.indexOf(s=y.charAt(m))<0){if("."==s){if(m>l){l=f;continue}}else if(!c&&(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase()))){c=!0,m=-1,l=0;continue}return i(g,String(e),h,t)}h=!1,(l=(y=r(y,t,10,g.s)).indexOf("."))>-1?y=y.replace(".",""):l=y.length}for(m=0;48===y.charCodeAt(m);m++);for(f=y.length;48===y.charCodeAt(--f););if(y=y.slice(m,++f)){if(f-=m,h&&V.DEBUG&&f>15&&(e>d||e!==o(e)))throw Error(u+g.s*e);if((l=l-m-1)>B)g.c=g.e=null;else if(l<k)g.c=[g.e=0];else{if(g.e=l,g.c=[],m=(l+1)%p,l<0&&(m+=p),m<f){for(m&&g.c.push(+y.slice(0,m)),f-=p;m<f;)g.c.push(+y.slice(m,m+=p));m=p-(y=y.slice(m)).length}else m-=f;for(;m--;y+="0");g.c.push(+y)}}else g.c=[g.e=0]}function j(e,t,n,r){var i,a,s,o,c;if(null==n?n=q:N(n,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)c=g(e.c),c=1==r||2==r&&(s<=R||s>=O)?b(c,s):x(c,s,"0");else if(a=(e=W(new V(e),t,n)).e,o=(c=g(e.c)).length,1==r||2==r&&(t<=a||a<=R)){for(;o<t;c+="0",o++);c=b(c,a)}else if(t-=s,c=x(c,a,"0"),a+1>o){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=a-o)>0)for(a+1==o&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function H(e,t){for(var n,r,i=1,a=new V(e[0]);i<e.length;i++)(!(r=new V(e[i])).s||(n=w(a,r))===t||0===n&&a.s===t)&&(a=r);return a}function J(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*p-1)>B?e.c=e.e=null:n<k?e.c=[e.e=0]:(e.e=n,e.c=t),e}function W(e,t,n,r){var i,a,c,u,d,h,f,y=e.c,g=m;if(y){e:{for(i=1,u=y[0];u>=10;u/=10,i++);if((a=t-i)<0)a+=p,c=t,d=y[h=0],f=o(d/g[i-c-1]%10);else if((h=s((a+1)/p))>=y.length){if(!r)break e;for(;y.length<=h;y.push(0));d=f=0,i=1,c=(a%=p)-p+1}else{for(d=u=y[h],i=1;u>=10;u/=10,i++);f=(c=(a%=p)-p+i)<0?0:o(d/g[i-c-1]%10)}if(r=r||t<0||null!=y[h+1]||(c<0?d:d%g[i-c-1]),r=n<4?(f||r)&&(0==n||n==(e.s<0?3:2)):f>5||5==f&&(4==n||r||6==n&&(a>0?c>0?d/g[i-c]:0:y[h-1])%10&1||n==(e.s<0?8:7)),t<1||!y[0])return y.length=0,r?(t-=e.e+1,y[0]=g[(p-t%p)%p],e.e=-t||0):y[0]=e.e=0,e;if(0==a?(y.length=h,u=1,h--):(y.length=h+1,u=g[p-a],y[h]=c>0?o(d/g[i-c]%g[c])*u:0),r)for(;;){if(0==h){for(a=1,c=y[0];c>=10;c/=10,a++);for(c=y[0]+=u,u=1;c>=10;c/=10,u++);a!=u&&(e.e++,y[0]==l&&(y[0]=1));break}if(y[h]+=u,y[h]!=l)break;y[h--]=0,u=1}for(a=y.length;0===y[--a];y.pop());}e.e>B?e.c=e.e=null:e.e<k&&(e.c=[e.e=0])}return e}function Y(e){var t,n=e.e;return null===n?e.toString():(t=g(e.c),t=n<=R||n>=O?b(t,n):x(t,n,"0"),e.s<0?"-"+t:t)}return V.clone=e,V.ROUND_UP=0,V.ROUND_DOWN=1,V.ROUND_CEIL=2,V.ROUND_FLOOR=3,V.ROUND_HALF_UP=4,V.ROUND_HALF_DOWN=5,V.ROUND_HALF_EVEN=6,V.ROUND_HALF_CEIL=7,V.ROUND_HALF_FLOOR=8,V.EUCLID=9,V.config=V.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(N(n=e[t],0,f,t),M=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(N(n=e[t],0,8,t),q=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(N(n[0],-f,0,t),N(n[1],0,f,t),R=n[0],O=n[1]):(N(n,-f,f,t),R=-(O=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)N(n[0],-f,-1,t),N(n[1],1,f,t),k=n[0],B=n[1];else{if(N(n,-f,f,t),!n)throw Error(c+t+" cannot be zero: "+n);k=-(B=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(c+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw $=!n,Error(c+"crypto unavailable");$=n}else $=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(N(n=e[t],0,9,t),U=n),e.hasOwnProperty(t="POW_PRECISION")&&(N(n=e[t],0,f,t),L=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(c+t+" not an object: "+n);G=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(c+t+" invalid: "+n);D="0123456789"==n.slice(0,10),F=n}}return{DECIMAL_PLACES:M,ROUNDING_MODE:q,EXPONENTIAL_AT:[R,O],RANGE:[k,B],CRYPTO:$,MODULO_MODE:U,POW_PRECISION:L,FORMAT:G,ALPHABET:F}},V.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!V.DEBUG)return!0;var t,n,r=e.c,i=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===a||-1===a)&&i>=-f&&i<=f&&i===o(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%p)<1&&(t+=p),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=l||n!==o(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===a||1===a||-1===a))return!0;throw Error(c+"Invalid BigNumber: "+e)},V.maximum=V.max=function(){return H(arguments,-1)},V.minimum=V.min=function(){return H(arguments,1)},V.random=(_=9007199254740992,T=Math.random()*_&2097151?function(){return o(Math.random()*_)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,i,a,u=0,l=[],d=new V(I);if(null==e?e=M:N(e,0,f),i=s(e/p),$)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));u<i;)(a=131072*t[u]+(t[u+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[u]=n[0],t[u+1]=n[1]):(l.push(a%1e14),u+=2);u=i/2}else{if(!crypto.randomBytes)throw $=!1,Error(c+"crypto unavailable");for(t=crypto.randomBytes(i*=7);u<i;)(a=281474976710656*(31&t[u])+1099511627776*t[u+1]+4294967296*t[u+2]+16777216*t[u+3]+(t[u+4]<<16)+(t[u+5]<<8)+t[u+6])>=9e15?crypto.randomBytes(7).copy(t,u):(l.push(a%1e14),u+=7);u=i/7}if(!$)for(;u<i;)(a=T())<9e15&&(l[u++]=a%1e14);for(i=l[--u],e%=p,i&&e&&(a=m[p-e],l[u]=o(i/a)*a);0===l[u];l.pop(),u--);if(u<0)l=[r=0];else{for(r=-1;0===l[0];l.splice(0,1),r-=p);for(u=1,a=l[0];a>=10;a/=10,u++);u<p&&(r-=p-u)}return d.e=r,d.c=l,d}),V.sum=function(){for(var e=1,t=arguments,n=new V(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){var e="0123456789";function t(e,t,n,r){for(var i,a,s=[0],o=0,c=e.length;o<c;){for(a=s.length;a--;s[a]*=t);for(s[0]+=r.indexOf(e.charAt(o++)),i=0;i<s.length;i++)s[i]>n-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/n|0,s[i]%=n)}return s.reverse()}return function(r,i,a,s,o){var c,u,l,p,d,m,h,f,y=r.indexOf("."),w=M,N=q;for(y>=0&&(p=L,L=0,r=r.replace(".",""),m=(f=new V(i)).pow(r.length-y),L=p,f.c=t(x(g(m.c),m.e,"0"),10,a,e),f.e=f.c.length),l=p=(h=t(r,i,a,o?(c=F,e):(c=e,F))).length;0==h[--p];h.pop());if(!h[0])return c.charAt(0);if(y<0?--l:(m.c=h,m.e=l,m.s=s,h=(m=n(m,f,w,N,a)).c,d=m.r,l=m.e),y=h[u=l+w+1],p=a/2,d=d||u<0||null!=h[u+1],d=N<4?(null!=y||d)&&(0==N||N==(m.s<0?3:2)):y>p||y==p&&(4==N||d||6==N&&1&h[u-1]||N==(m.s<0?8:7)),u<1||!h[0])r=d?x(c.charAt(1),-w,c.charAt(0)):c.charAt(0);else{if(h.length=u,d)for(--a;++h[--u]>a;)h[u]=0,u||(++l,h=[1].concat(h));for(p=h.length;!h[--p];);for(y=0,r="";y<=p;r+=c.charAt(h[y++]));r=x(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,a,s,o=0,c=e.length,u=t%h,l=t/h|0;for(e=e.slice();c--;)o=((i=u*(a=e[c]%h)+(r=l*a+(s=e[c]/h|0)*u)%h*h+o)/n|0)+(r/h|0)+l*s,e[c]=i%n;return o&&(e=[o].concat(e)),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,a,s,c){var u,d,m,h,f,g,w,N,v,b,x,_,T,C,S,A,P,E=r.s==i.s?1:-1,z=r.c,I=i.c;if(!(z&&z[0]&&I&&I[0]))return new V(r.s&&i.s&&(z?!I||z[0]!=I[0]:I)?z&&0==z[0]||!I?0*E:E/0:NaN);for(v=(N=new V(E)).c=[],E=a+(d=r.e-i.e)+1,c||(c=l,d=y(r.e/p)-y(i.e/p),E=E/p|0),m=0;I[m]==(z[m]||0);m++);if(I[m]>(z[m]||0)&&d--,E<0)v.push(1),h=!0;else{for(C=z.length,A=I.length,m=0,E+=2,(f=o(c/(I[0]+1)))>1&&(I=e(I,f,c),z=e(z,f,c),A=I.length,C=z.length),T=A,x=(b=z.slice(0,A)).length;x<A;b[x++]=0);P=I.slice(),P=[0].concat(P),S=I[0],I[1]>=c/2&&S++;do{if(f=0,(u=t(I,b,A,x))<0){if(_=b[0],A!=x&&(_=_*c+(b[1]||0)),(f=o(_/S))>1)for(f>=c&&(f=c-1),w=(g=e(I,f,c)).length,x=b.length;1==t(g,b,w,x);)f--,n(g,A<w?P:I,w,c),w=g.length,u=1;else 0==f&&(u=f=1),w=(g=I.slice()).length;if(w<x&&(g=[0].concat(g)),n(b,g,x,c),x=b.length,-1==u)for(;t(I,b,A,x)<1;)f++,n(b,A<x?P:I,x,c),x=b.length}else 0===u&&(f++,b=[0]);v[m++]=f,b[0]?b[x++]=z[T]||0:(b=[z[T]],x=1)}while((T++<C||null!=b[0])&&E--);h=null!=b[0],v[0]||v.splice(0,1)}if(c==l){for(m=1,E=v[0];E>=10;E/=10,m++);W(N,a+(N.e=m+d*p-1)+1,s,h)}else N.e=d,N.r=+h;return N}}(),C=/^(-?)0([xbo])(?=\w[\w.]*$)/i,S=/^([^.]+)\.$/,A=/^\.([^.]+)$/,P=/^-?(Infinity|NaN)$/,E=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,n,r){var i,a=n?t:t.replace(E,"");if(P.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(C,(function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t})),r&&(i=r,a=a.replace(S,"$1").replace(A,"0.$1")),t!=a))return new V(a,i);if(V.DEBUG)throw Error(c+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},z.absoluteValue=z.abs=function(){var e=new V(this);return e.s<0&&(e.s=1),e},z.comparedTo=function(e,t){return w(this,new V(e,t))},z.decimalPlaces=z.dp=function(e,t){var n,r,i,a=this;if(null!=e)return N(e,0,f),null==t?t=q:N(t,0,8),W(new V(a),e+a.e+1,t);if(!(n=a.c))return null;if(r=((i=n.length-1)-y(this.e/p))*p,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},z.dividedBy=z.div=function(e,t){return n(this,new V(e,t),M,q)},z.dividedToIntegerBy=z.idiv=function(e,t){return n(this,new V(e,t),0,1)},z.exponentiatedBy=z.pow=function(e,t){var n,r,i,a,u,l,d,m,h=this;if((e=new V(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+Y(e));if(null!=t&&(t=new V(t)),u=e.e>14,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return m=new V(Math.pow(+Y(h),u?e.s*(2-v(e)):+Y(e))),t?m.mod(t):m;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new V(NaN);(r=!l&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(e.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||u&&h.c[1]>=24e7:h.c[0]<8e13||u&&h.c[0]<=9999975e7)))return a=h.s<0&&v(e)?-0:0,h.e>-1&&(a=1/a),new V(l?1/a:a);L&&(a=s(L/p+2))}for(u?(n=new V(.5),l&&(e.s=1),d=v(e)):d=(i=Math.abs(+Y(e)))%2,m=new V(I);;){if(d){if(!(m=m.times(h)).c)break;a?m.c.length>a&&(m.c.length=a):r&&(m=m.mod(t))}if(i){if(0===(i=o(i/2)))break;d=i%2}else if(W(e=e.times(n),e.e+1,1),e.e>14)d=v(e);else{if(0==(i=+Y(e)))break;d=i%2}h=h.times(h),a?h.c&&h.c.length>a&&(h.c.length=a):r&&(h=h.mod(t))}return r?m:(l&&(m=I.div(m)),t?m.mod(t):a?W(m,L,q,void 0):m)},z.integerValue=function(e){var t=new V(this);return null==e?e=q:N(e,0,8),W(t,t.e+1,e)},z.isEqualTo=z.eq=function(e,t){return 0===w(this,new V(e,t))},z.isFinite=function(){return!!this.c},z.isGreaterThan=z.gt=function(e,t){return w(this,new V(e,t))>0},z.isGreaterThanOrEqualTo=z.gte=function(e,t){return 1===(t=w(this,new V(e,t)))||0===t},z.isInteger=function(){return!!this.c&&y(this.e/p)>this.c.length-2},z.isLessThan=z.lt=function(e,t){return w(this,new V(e,t))<0},z.isLessThanOrEqualTo=z.lte=function(e,t){return-1===(t=w(this,new V(e,t)))||0===t},z.isNaN=function(){return!this.s},z.isNegative=function(){return this.s<0},z.isPositive=function(){return this.s>0},z.isZero=function(){return!!this.c&&0==this.c[0]},z.minus=function(e,t){var n,r,i,a,s=this,o=s.s;if(t=(e=new V(e,t)).s,!o||!t)return new V(NaN);if(o!=t)return e.s=-t,s.plus(e);var c=s.e/p,u=e.e/p,d=s.c,m=e.c;if(!c||!u){if(!d||!m)return d?(e.s=-t,e):new V(m?s:NaN);if(!d[0]||!m[0])return m[0]?(e.s=-t,e):new V(d[0]?s:3==q?-0:0)}if(c=y(c),u=y(u),d=d.slice(),o=c-u){for((a=o<0)?(o=-o,i=d):(u=c,i=m),i.reverse(),t=o;t--;i.push(0));i.reverse()}else for(r=(a=(o=d.length)<(t=m.length))?o:t,o=t=0;t<r;t++)if(d[t]!=m[t]){a=d[t]<m[t];break}if(a&&(i=d,d=m,m=i,e.s=-e.s),(t=(r=m.length)-(n=d.length))>0)for(;t--;d[n++]=0);for(t=l-1;r>o;){if(d[--r]<m[r]){for(n=r;n&&!d[--n];d[n]=t);--d[n],d[r]+=l}d[r]-=m[r]}for(;0==d[0];d.splice(0,1),--u);return d[0]?J(e,d,u):(e.s=3==q?-1:1,e.c=[e.e=0],e)},z.modulo=z.mod=function(e,t){var r,i,a=this;return e=new V(e,t),!a.c||!e.s||e.c&&!e.c[0]?new V(NaN):!e.c||a.c&&!a.c[0]?new V(a):(9==U?(i=e.s,e.s=1,r=n(a,e,0,3),e.s=i,r.s*=i):r=n(a,e,0,U),(e=a.minus(r.times(e))).c[0]||1!=U||(e.s=a.s),e)},z.multipliedBy=z.times=function(e,t){var n,r,i,a,s,o,c,u,d,m,f,g,w,N,v,b=this,x=b.c,_=(e=new V(e,t)).c;if(!(x&&_&&x[0]&&_[0]))return!b.s||!e.s||x&&!x[0]&&!_||_&&!_[0]&&!x?e.c=e.e=e.s=null:(e.s*=b.s,x&&_?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=y(b.e/p)+y(e.e/p),e.s*=b.s,(c=x.length)<(m=_.length)&&(w=x,x=_,_=w,i=c,c=m,m=i),i=c+m,w=[];i--;w.push(0));for(N=l,v=h,i=m;--i>=0;){for(n=0,f=_[i]%v,g=_[i]/v|0,a=i+(s=c);a>i;)n=((u=f*(u=x[--s]%v)+(o=g*u+(d=x[s]/v|0)*f)%v*v+w[a]+n)/N|0)+(o/v|0)+g*d,w[a--]=u%N;w[a]=n}return n?++r:w.splice(0,1),J(e,w,r)},z.negated=function(){var e=new V(this);return e.s=-e.s||null,e},z.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new V(e,t)).s,!i||!t)return new V(NaN);if(i!=t)return e.s=-t,r.minus(e);var a=r.e/p,s=e.e/p,o=r.c,c=e.c;if(!a||!s){if(!o||!c)return new V(i/0);if(!o[0]||!c[0])return c[0]?e:new V(o[0]?r:0*i)}if(a=y(a),s=y(s),o=o.slice(),i=a-s){for(i>0?(s=a,n=c):(i=-i,n=o),n.reverse();i--;n.push(0));n.reverse()}for((i=o.length)-(t=c.length)<0&&(n=c,c=o,o=n,t=i),i=0;t;)i=(o[--t]=o[t]+c[t]+i)/l|0,o[t]=l===o[t]?0:o[t]%l;return i&&(o=[i].concat(o),++s),J(e,o,s)},z.precision=z.sd=function(e,t){var n,r,i,a=this;if(null!=e&&e!==!!e)return N(e,1,f),null==t?t=q:N(t,0,8),W(new V(a),e,t);if(!(n=a.c))return null;if(r=(i=n.length-1)*p+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&a.e+1>r&&(r=a.e+1),r},z.shiftedBy=function(e){return N(e,-9007199254740991,d),this.times("1e"+e)},z.squareRoot=z.sqrt=function(){var e,t,r,i,a,s=this,o=s.c,c=s.s,u=s.e,l=M+4,p=new V("0.5");if(1!==c||!o||!o[0])return new V(!c||c<0&&(!o||o[0])?NaN:o?s:1/0);if(0==(c=Math.sqrt(+Y(s)))||c==1/0?(((t=g(o)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=y((u+1)/2)-(u<0||u%2),r=new V(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new V(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(a=r,r=p.times(a.plus(n(s,a,l,1))),g(a.c).slice(0,c)===(t=g(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(W(r,r.e+M+2,1),e=!r.times(r).eq(s));break}if(!i&&(W(a,a.e+M+2,0),a.times(a).eq(s))){r=a;break}l+=4,c+=4,i=1}return W(r,r.e+M+1,q,e)},z.toExponential=function(e,t){return null!=e&&(N(e,0,f),e++),j(this,e,t,1)},z.toFixed=function(e,t){return null!=e&&(N(e,0,f),e=e+this.e+1),j(this,e,t)},z.toFormat=function(e,t,n){var r,i=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=G;else if("object"!=typeof n)throw Error(c+"Argument not an object: "+n);if(r=i.toFixed(e,t),i.c){var a,s=r.split("."),o=+n.groupSize,u=+n.secondaryGroupSize,l=n.groupSeparator||"",p=s[0],d=s[1],m=i.s<0,h=m?p.slice(1):p,f=h.length;if(u&&(a=o,o=u,u=a,f-=a),o>0&&f>0){for(a=f%o||o,p=h.substr(0,a);a<f;a+=o)p+=l+h.substr(a,o);u>0&&(p+=l+h.slice(a)),m&&(p="-"+p)}r=d?p+(n.decimalSeparator||"")+((u=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):p}return(n.prefix||"")+r+(n.suffix||"")},z.toFraction=function(e){var t,r,i,a,s,o,u,l,d,h,f,y,w=this,N=w.c;if(null!=e&&(!(u=new V(e)).isInteger()&&(u.c||1!==u.s)||u.lt(I)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+Y(u));if(!N)return new V(w);for(t=new V(I),d=r=new V(I),i=l=new V(I),y=g(N),s=t.e=y.length-w.e-1,t.c[0]=m[(o=s%p)<0?p+o:o],e=!e||u.comparedTo(t)>0?s>0?t:d:u,o=B,B=1/0,u=new V(y),l.c[0]=0;h=n(u,t,0,1),1!=(a=r.plus(h.times(i))).comparedTo(e);)r=i,i=a,d=l.plus(h.times(a=d)),l=a,t=u.minus(h.times(a=t)),u=a;return a=n(e.minus(r),i,0,1),l=l.plus(a.times(d)),r=r.plus(a.times(i)),l.s=d.s=w.s,f=n(d,i,s*=2,q).minus(w).abs().comparedTo(n(l,r,s,q).minus(w).abs())<1?[d,i]:[l,r],B=o,f},z.toNumber=function(){return+Y(this)},z.toPrecision=function(e,t){return null!=e&&N(e,1,f),j(this,e,t,2)},z.toString=function(e){var t,n=this,i=n.s,a=n.e;return null===a?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=a<=R||a>=O?b(g(n.c),a):x(g(n.c),a,"0"):10===e&&D?t=x(g((n=W(new V(n),M+a+1,q)).c),n.e,"0"):(N(e,2,F.length,"Base"),t=r(x(g(n.c),a,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},z.valueOf=z.toJSON=function(){return Y(this)},z._isBigNumber=!0,null!=t&&V.set(t),V}(),i.default=i.BigNumber=i,void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()},4156:function(e,t,n){const r=n(829);function i(e,t,n){const r=e[t]+e[n];let i=e[t+1]+e[n+1];r>=4294967296&&i++,e[t]=r,e[t+1]=i}function a(e,t,n,r){let i=e[t]+n;n<0&&(i+=4294967296);let a=e[t+1]+r;i>=4294967296&&a++,e[t]=i,e[t+1]=a}function s(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function o(e,t,n,r,s,o){const c=p[s],u=p[s+1],d=p[o],m=p[o+1];i(l,e,t),a(l,e,c,u);let h=l[r]^l[e],f=l[r+1]^l[e+1];l[r]=f,l[r+1]=h,i(l,n,r),h=l[t]^l[n],f=l[t+1]^l[n+1],l[t]=h>>>24^f<<8,l[t+1]=f>>>24^h<<8,i(l,e,t),a(l,e,d,m),h=l[r]^l[e],f=l[r+1]^l[e+1],l[r]=h>>>16^f<<16,l[r+1]=f>>>16^h<<16,i(l,n,r),h=l[t]^l[n],f=l[t+1]^l[n+1],l[t]=f>>>31^h<<1,l[t+1]=h>>>31^f<<1}const c=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),u=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map((function(e){return 2*e}))),l=new Uint32Array(32),p=new Uint32Array(32);function d(e,t){let n=0;for(n=0;n<16;n++)l[n]=e.h[n],l[n+16]=c[n];for(l[24]=l[24]^e.t,l[25]=l[25]^e.t/4294967296,t&&(l[28]=~l[28],l[29]=~l[29]),n=0;n<32;n++)p[n]=s(e.b,4*n);for(n=0;n<12;n++)o(0,8,16,24,u[16*n+0],u[16*n+1]),o(2,10,18,26,u[16*n+2],u[16*n+3]),o(4,12,20,28,u[16*n+4],u[16*n+5]),o(6,14,22,30,u[16*n+6],u[16*n+7]),o(0,10,20,30,u[16*n+8],u[16*n+9]),o(2,12,22,24,u[16*n+10],u[16*n+11]),o(4,14,16,26,u[16*n+12],u[16*n+13]),o(6,8,18,28,u[16*n+14],u[16*n+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^l[n]^l[n+16]}const m=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function h(e,t,n,r){if(0===e||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(t&&t.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(n&&16!==n.length)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(r&&16!==r.length)throw new Error("Illegal personal, expected Uint8Array with length is 16");const i={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};m.fill(0),m[0]=e,t&&(m[1]=t.length),m[2]=1,m[3]=1,n&&m.set(n,32),r&&m.set(r,48);for(let e=0;e<16;e++)i.h[e]=c[e]^s(m,4*e);return t&&(f(i,t),i.c=128),i}function f(e,t){for(let n=0;n<t.length;n++)128===e.c&&(e.t+=e.c,d(e,!1),e.c=0),e.b[e.c++]=t[n]}function y(e){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0;d(e,!0);const t=new Uint8Array(e.outlen);for(let n=0;n<e.outlen;n++)t[n]=e.h[n>>2]>>8*(3&n);return t}function g(e,t,n,i,a){n=n||64,e=r.normalizeInput(e),i&&(i=r.normalizeInput(i)),a&&(a=r.normalizeInput(a));const s=h(n,t,i,a);return f(s,e),y(s)}e.exports={blake2b:g,blake2bHex:function(e,t,n,i,a){const s=g(e,t,n,i,a);return r.toHex(s)},blake2bInit:h,blake2bUpdate:f,blake2bFinal:y}},829:function(e){function t(e){return(4294967296+e).toString(16).substring(1)}e.exports={normalizeInput:function(e){let t;if(e instanceof Uint8Array)t=e;else{if("string"!=typeof e)throw new Error("Input must be an string, Buffer or Uint8Array");t=(new TextEncoder).encode(e)}return t},toHex:function(e){return Array.prototype.map.call(e,(function(e){return(e<16?"0":"")+e.toString(16)})).join("")},debugPrint:function(e,n,r){let i="\n"+e+" = ";for(let a=0;a<n.length;a+=2){if(32===r)i+=t(n[a]).toUpperCase(),i+=" ",i+=t(n[a+1]).toUpperCase();else{if(64!==r)throw new Error("Invalid size "+r);i+=t(n[a+1]).toUpperCase(),i+=t(n[a]).toUpperCase()}a%6==4?i+="\n"+new Array(e.length+4).join(" "):a<n.length-2&&(i+=" ")}console.log(i)},testSpeed:function(e,t,n){let r=(new Date).getTime();const i=new Uint8Array(t);for(let e=0;e<t;e++)i[e]=e%256;const a=(new Date).getTime();console.log("Generated random input in "+(a-r)+"ms"),r=a;for(let a=0;a<n;a++){const n=e(i),a=(new Date).getTime(),s=a-r;r=a,console.log("Hashed in "+s+"ms: "+n.substring(0,20)+"..."),console.log(Math.round(t/(1<<20)/(s/1e3)*100)/100+" MB PER SECOND")}}}},8287:function(e,t,n){"use strict";const r=n(7526),i=n(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function o(e){if(e>s)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,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return p(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|f(e,t);let r=o(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Y(e,Uint8Array)){const t=new Uint8Array(e);return m(t.buffer,t.byteOffset,t.byteLength)}return d(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(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return m(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return m(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return c.from(r,t,n);const i=function(e){if(c.isBuffer(e)){const t=0|h(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||K(e.length)?o(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,n);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 p(e){return l(e),o(e<0?0:0|h(e))}function d(e){const t=e.length<0?0:0|h(e.length),n=o(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function m(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,c.prototype),r}function h(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function f(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(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 n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(i)return r?-1:H(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return z(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return P(this,t,n);case"latin1":case"binary":return E(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function w(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),K(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:N(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):N(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function N(e,t,n,r,i){let a,s=1,o=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,o/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let r=-1;for(a=n;a<o;a++)if(u(e,a)===u(t,-1===r?0:a-r)){if(-1===r&&(r=a),a-r+1===c)return r*s}else-1!==r&&(a-=a-r),r=-1}else for(n+c>o&&(n=o-c),a=n;a>=0;a--){let n=!0;for(let r=0;r<c;r++)if(u(e,a+r)!==u(t,r)){n=!1;break}if(n)return a}return-1}function v(e,t,n,r){n=Number(n)||0;const i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;const a=t.length;let s;for(r>a/2&&(r=a/2),s=0;s<r;++s){const r=parseInt(t.substr(2*s,2),16);if(K(r))return s;e[n+s]=r}return s}function b(e,t,n,r){return W(H(t,e.length-n),e,n,r)}function x(e,t,n,r){return W(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function _(e,t,n,r){return W(J(t),e,n,r)}function T(e,t,n,r){return W(function(e,t){let n,r,i;const a=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i<n;){const t=e[i];let a=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=n){let n,r,o,c;switch(s){case 1:t<128&&(a=t);break;case 2:n=e[i+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(a=c));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:n=e[i+1],r=e[i+2],o=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&o)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&o,c>65535&&c<1114112&&(a=c))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return function(e){const t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=A));return n}(r)}t.kMaxLength=s,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,n){return u(e,t,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,n){return function(e,t,n){return l(e),e<=0?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},c.allocUnsafe=function(e){return p(e)},c.allocUnsafeSlow=function(e){return p(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(Y(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),Y(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 n=e.length,r=t.length;for(let i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?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 n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=c.allocUnsafe(t);let i=0;for(n=0;n<e.length;++n){let t=e[n];if(Y(t,Uint8Array))i+t.length>r.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},c.byteLength=f,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)g(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)g(this,t,t+3),g(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)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?S(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 n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,i){if(Y(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===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let a=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0);const o=Math.min(a,s),u=this.slice(r,i),l=e.slice(t,n);for(let e=0;e<o;++e)if(u[e]!==l[e]){a=u[e],s=l[e];break}return a<s?-1:s<a?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return w(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return w(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let a=!1;for(;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":case"latin1":case"binary":return x(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function P(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function E(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function z(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=t;r<n;++r)i+=Q[e[r]];return i}function I(e,t,n){const r=e.slice(t,n);let i="";for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+256*r[e+1]);return i}function M(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function q(e,t,n,r,i,a){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r,i){F(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,n}function O(e,t,n,r,i){F(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=s,s>>=8,e[n+2]=s,s>>=8,e[n+1]=s,s>>=8,e[n]=s,n+8}function k(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,a){return t=+t,n>>>=0,a||k(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function $(e,t,n,r,a){return t=+t,n>>>=0,a||k(e,0,n,8),i.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,c.prototype),r},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return r},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(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||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=X((function(e){D(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))})),c.prototype.readBigUInt64BE=X((function(e){D(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=t,i=1,a=this[e+--r];for(;r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},c.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(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||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=X((function(e){D(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=X((function(e){D(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||M(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||q(this,e,t,n,Math.pow(2,8*n)-1,0);let i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||q(this,e,t,n,Math.pow(2,8*n)-1,0);let i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||q(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,n){return e=+e,t>>>=0,n||q(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,n){return e=+e,t>>>=0,n||q(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,n){return e=+e,t>>>=0,n||q(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 R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=X((function(e,t=0){return O(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);q(this,e,t,n,r-1,-r)}let i=0,a=1,s=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a|0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);q(this,e,t,n,r-1,-r)}let i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a|0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||q(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,n){return e=+e,t>>>=0,n||q(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 R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=X((function(e,t=0){return O(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return $(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return $(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{const a=c.isBuffer(e)?e:c.from(e,r),s=a.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=a[i%s]}return this};const U={};function L(e,t,n){U[e]=class extends n{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 G(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function F(e,t,n,r,i,a){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let i;throw i=a>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(a+1)}${r}`:`>= -(2${r} ** ${8*(a+1)-1}${r}) and < 2 ** ${8*(a+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new U.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){D(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||V(t,e.length-(n+1))}(r,i,a)}function D(e,t){if("number"!=typeof e)throw new U.ERR_INVALID_ARG_TYPE(t,"number",e)}function V(e,t,n){if(Math.floor(e)!==e)throw D(e,n),new U.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?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,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=G(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=G(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r}),RangeError);const j=/[^+/0-9A-Za-z-_]/g;function H(e,t){let n;t=t||1/0;const r=e.length;let i=null;const a=[];for(let s=0;s<r;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function J(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!=e}const Q=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},2341:function(e){"use strict";e.exports=function e(t){if("number"==typeof t&&isNaN(t))throw new Error("NaN is not allowed");if("number"==typeof t&&!isFinite(t))throw new Error("Infinity is not allowed");return null===t||"object"!=typeof t?JSON.stringify(t):t.toJSON instanceof Function?e(t.toJSON()):Array.isArray(t)?`[${t.reduce(((t,n,r)=>`${t}${0===r?"":","}${e(void 0===n||"symbol"==typeof n?null:n)}`),"")}]`:`{${Object.keys(t).sort().reduce(((n,r)=>void 0===t[r]||"symbol"==typeof t[r]?n:`${n}${0===n.length?"":","}${e(r)}:${e(t[r])}`),"")}}`}},4903:function(e){var t=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;if("object"==typeof globalThis&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return t()}try{return __global__||t()}finally{delete Object.prototype.__global__}}()},228:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,r,a,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new i(r,a||e,s),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],o]:e._events[c].push(o):(e._events[c]=o,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),o.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},o.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,a=r.length,s=new Array(a);i<a;i++)s[i]=r[i].fn;return s},o.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},o.prototype.emit=function(e,t,r,i,a,s){var o=n?n+e:e;if(!this._events[o])return!1;var c,u,l=this._events[o],p=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),p){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,r),!0;case 4:return l.fn.call(l.context,t,r,i),!0;case 5:return l.fn.call(l.context,t,r,i,a),!0;case 6:return l.fn.call(l.context,t,r,i,a,s),!0}for(u=1,c=new Array(p-1);u<p;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var d,m=l.length;for(u=0;u<m;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),p){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,r);break;case 4:l[u].fn.call(l[u].context,t,r,i);break;default:if(!c)for(d=1,c=new Array(p-1);d<p;d++)c[d-1]=arguments[d];l[u].fn.apply(l[u].context,c)}}return!0},o.prototype.on=function(e,t,n){return a(this,e,t,n,!1)},o.prototype.once=function(e,t,n){return a(this,e,t,n,!0)},o.prototype.removeListener=function(e,t,r,i){var a=n?n+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn!==t||i&&!o.once||r&&o.context!==r||s(this,a);else{for(var c=0,u=[],l=o.length;c<l;c++)(o[c].fn!==t||i&&!o[c].once||r&&o[c].context!==r)&&u.push(o[c]);u.length?this._events[a]=1===u.length?u[0]:u:s(this,a)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o},7007:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}f(e,t,a,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&f(e,"error",t,{once:!0})}(e,i)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function o(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var i,a,s,u;if(o(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),s=a[t]),void 0===s)s=a[t]=n,++e._eventsCount;else if("function"==typeof s?s=a[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=l.bind(r);return i.listener=n,r.wrapFn=i,i}function d(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):h(i,i.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function f(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(a){r.once&&e.removeEventListener(t,i),n(a)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var c=a[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var u=c.length,l=h(c,u);for(n=0;n<u;++n)r(l[n],this,t)}return!0},a.prototype.addListener=function(e,t){return u(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return u(this,e,t,!0)},a.prototype.once=function(e,t){return o(t),this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,a,s;if(o(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){s=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},251:function(e,t){t.read=function(e,t,n,r,i){var a,s,o=8*i-r-1,c=(1<<o)-1,u=c>>1,l=-7,p=n?i-1:0,d=n?-1:1,m=e[t+p];for(p+=d,a=m&(1<<-l)-1,m>>=-l,l+=o;l>0;a=256*a+e[t+p],p+=d,l-=8);for(s=a&(1<<-l)-1,a>>=-l,l+=r;l>0;s=256*s+e[t+p],p+=d,l-=8);if(0===a)a=1-u;else{if(a===c)return s?NaN:1/0*(m?-1:1);s+=Math.pow(2,r),a-=u}return(m?-1:1)*s*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var s,o,c,u=8*a-i-1,l=(1<<u)-1,p=l>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:a-1,h=r?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+p>=1?d/c:d*Math.pow(2,1-p))*c>=2&&(s++,c/=2),s+p>=l?(o=0,s=l):s+p>=1?(o=(t*c-1)*Math.pow(2,i),s+=p):(o=t*Math.pow(2,p-1)*Math.pow(2,i),s=0));i>=8;e[n+m]=255&o,m+=h,o/=256,i-=8);for(s=s<<i|o,u+=i;u>0;e[n+m]=255&s,m+=h,s/=256,u-=8);e[n+m-h]|=128*f}},6698:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},1013:function(e,t,n){var r=n(7372).stringify,i=n(8146);e.exports=function(e){return{parse:i(e),stringify:r}},e.exports.parse=i(),e.exports.stringify=r},8146:function(e,t,n){var r=null;const i=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,a=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;e.exports=function(e){"use strict";var t={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(null!=e){if(!0===e.strict&&(t.strict=!0),!0===e.storeAsString&&(t.storeAsString=!0),t.alwaysParseAsBig=!0===e.alwaysParseAsBig&&e.alwaysParseAsBig,t.useNativeBigInt=!0===e.useNativeBigInt&&e.useNativeBigInt,void 0!==e.constructorAction){if("error"!==e.constructorAction&&"ignore"!==e.constructorAction&&"preserve"!==e.constructorAction)throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${e.constructorAction}`);t.constructorAction=e.constructorAction}if(void 0!==e.protoAction){if("error"!==e.protoAction&&"ignore"!==e.protoAction&&"preserve"!==e.protoAction)throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${e.protoAction}`);t.protoAction=e.protoAction}}var s,o,c,u,l={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},p=function(e){throw{name:"SyntaxError",message:e,at:s,text:c}},d=function(e){return e&&e!==o&&p("Expected '"+e+"' instead of '"+o+"'"),o=c.charAt(s),s+=1,o},m=function(){var e,i="";for("-"===o&&(i="-",d("-"));o>="0"&&o<="9";)i+=o,d();if("."===o)for(i+=".";d()&&o>="0"&&o<="9";)i+=o;if("e"===o||"E"===o)for(i+=o,d(),"-"!==o&&"+"!==o||(i+=o,d());o>="0"&&o<="9";)i+=o,d();if(e=+i,isFinite(e))return null==r&&(r=n(1594)),i.length>15?t.storeAsString?i:t.useNativeBigInt?BigInt(i):new r(i):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(e):new r(e):e;p("Bad number")},h=function(){var e,t,n,r="";if('"'===o)for(var i=s;d();){if('"'===o)return s-1>i&&(r+=c.substring(i,s-1)),d(),r;if("\\"===o){if(s-1>i&&(r+=c.substring(i,s-1)),d(),"u"===o){for(n=0,t=0;t<4&&(e=parseInt(d(),16),isFinite(e));t+=1)n=16*n+e;r+=String.fromCharCode(n)}else{if("string"!=typeof l[o])break;r+=l[o]}i=s}}p("Bad string")},f=function(){for(;o&&o<=" ";)d()};return u=function(){switch(f(),o){case"{":return function(){var e,n=Object.create(null);if("{"===o){if(d("{"),f(),"}"===o)return d("}"),n;for(;o;){if(e=h(),f(),d(":"),!0===t.strict&&Object.hasOwnProperty.call(n,e)&&p('Duplicate key "'+e+'"'),!0===i.test(e)?"error"===t.protoAction?p("Object contains forbidden prototype property"):"ignore"===t.protoAction?u():n[e]=u():!0===a.test(e)?"error"===t.constructorAction?p("Object contains forbidden constructor property"):"ignore"===t.constructorAction?u():n[e]=u():n[e]=u(),f(),"}"===o)return d("}"),n;d(","),f()}}p("Bad object")}();case"[":return function(){var e=[];if("["===o){if(d("["),f(),"]"===o)return d("]"),e;for(;o;){if(e.push(u()),f(),"]"===o)return d("]"),e;d(","),f()}}p("Bad array")}();case'"':return h();case"-":return m();default:return o>="0"&&o<="9"?m():function(){switch(o){case"t":return d("t"),d("r"),d("u"),d("e"),!0;case"f":return d("f"),d("a"),d("l"),d("s"),d("e"),!1;case"n":return d("n"),d("u"),d("l"),d("l"),null}p("Unexpected '"+o+"'")}()}},function(e,t){var n;return c=e+"",s=0,o=" ",n=u(),f(),o&&p("Syntax error"),"function"==typeof t?function e(n,r){var i,a=n[r];return a&&"object"==typeof a&&Object.keys(a).forEach((function(t){void 0!==(i=e(a,t))?a[t]=i:delete a[t]})),t.call(n,r,a)}({"":n},""):n}}},7372:function(e,t,n){var r=n(1594),i=e.exports;!function(){"use strict";var e,t,n,a=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function o(e){return a.lastIndex=0,a.test(e)?'"'+e.replace(a,(function(e){var t=s[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function c(i,a){var s,u,l,p,d,m=e,h=a[i],f=null!=h&&(h instanceof r||r.isBigNumber(h));switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(i)),"function"==typeof n&&(h=n.call(a,i,h)),typeof h){case"string":return f?h:o(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":case"bigint":return String(h);case"object":if(!h)return"null";if(e+=t,d=[],"[object Array]"===Object.prototype.toString.apply(h)){for(p=h.length,s=0;s<p;s+=1)d[s]=c(s,h)||"null";return l=0===d.length?"[]":e?"[\n"+e+d.join(",\n"+e)+"\n"+m+"]":"["+d.join(",")+"]",e=m,l}if(n&&"object"==typeof n)for(p=n.length,s=0;s<p;s+=1)"string"==typeof n[s]&&(l=c(u=n[s],h))&&d.push(o(u)+(e?": ":":")+l);else Object.keys(h).forEach((function(t){var n=c(t,h);n&&d.push(o(t)+(e?": ":":")+n)}));return l=0===d.length?"{}":e?"{\n"+e+d.join(",\n"+e)+"\n"+m+"}":"{"+d.join(",")+"}",e=m,l}}"function"!=typeof i.stringify&&(i.stringify=function(r,i,a){var s;if(e="",t="","number"==typeof a)for(s=0;s<a;s+=1)t+=" ";else"string"==typeof a&&(t=a);if(n=i,i&&"function"!=typeof i&&("object"!=typeof i||"number"!=typeof i.length))throw new Error("JSON.stringify");return c("",{"":r})})}()},5606:function(e){var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var o,c=[],u=!1,l=-1;function p(){u&&o&&(u=!1,o.length?c=o.concat(c):l=-1,c.length&&d())}function d(){if(!u){var e=s(p);u=!0;for(var t=c.length;t;){for(o=c,c=[];++l<t;)o&&o[l].run();l=-1,t=c.length}o=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new m(e,t)),1!==c.length||u||s(d)},m.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},858:function(e,t){"use strict";function n(e){if(Array.isArray(e)){const t=[];for(let r=0;r<e.length;r++)t.push(n(e[r]));const r=d(...t);return d(a(r.length,192),r)}const t=y(e);return 1===t.length&&t[0]<128?t:d(a(t.length,128),t)}function r(e,t,n){if(n>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,n)}function i(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return l(u(e))}function a(e,t){if(e<56)return Uint8Array.from([e+t]);const n=h(e),r=h(t+55+n.length/2);return Uint8Array.from(p(r+n))}function s(e,t=!1){if(!e||0===e.length)return Uint8Array.from([]);const n=o(y(e));if(t)return n;if(0!==n.remainder.length)throw new Error("invalid RLP: remainder must be zero");return n.data}function o(e){let t,n,a,s,c;const u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,a=128===l?Uint8Array.from([]):r(e,1,t),2===t&&a[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:a,remainder:e.slice(t)}}if(l<=191){if(n=l-182,e.length-1<n)throw new Error("invalid RLP: not enough bytes for string length");if(t=i(r(e,1,n)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return a=r(e,n,t+n),{data:a,remainder:e.slice(t+n)}}if(l<=247){for(t=l-191,s=r(e,1,t);s.length;)c=o(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(t)}}{if(n=l-246,t=i(r(e,1,n)),t<56)throw new Error("invalid RLP: encoded list too short");const a=n+t;if(a>e.length)throw new Error("invalid RLP: total length is larger than the data");for(s=r(e,n,a);s.length;)c=o(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(a)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.utils=t.decode=t.encode=void 0,t.encode=n,t.decode=s;const c=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function u(e){let t="";for(let n=0;n<e.length;n++)t+=c[e[n]];return t}function l(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function p(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let n=0;n<t.length;n++){const r=2*n;t[n]=l(e.slice(r,r+2))}return t}function d(...e){if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n}function m(e){return(new TextEncoder).encode(e)}function h(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function f(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function y(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return f(e)?p((t="string"!=typeof(n=e)?n:f(n)?n.slice(2):n).length%2?`0${t}`:t):m(e);var t,n;if("number"==typeof e||"bigint"==typeof e)return e?p(h(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}t.utils={bytesToHex:u,concatBytes:d,hexToBytes:p,utf8ToBytes:m};const g={encode:n,decode:s};t.default=g},2861:function(e,t,n){var r=n(8287),i=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=s),s.prototype=Object.create(i.prototype),a(i,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},392:function(e,t,n){var r=n(2861).Buffer;function i(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var n=this._block,i=this._blockSize,a=e.length,s=this._len,o=0;o<a;){for(var c=s%i,u=Math.min(a-o,i-c),l=0;l<u;l++)n[c+l]=e[o+l];o+=u,(s+=u)%i==0&&this._update(n)}return this._len+=a,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},4107:function(e,t,n){var r=n(6698),i=n(392),a=n(2861).Buffer,s=[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],o=new Array(64);function c(){this.init(),this._w=o,i.call(this,64,56)}function u(e,t,n){return n^e&(t^n)}function l(e,t,n){return e&t|n&(e|t)}function p(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function m(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(c,i),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,a=0|this._c,o=0|this._d,c=0|this._e,h=0|this._f,f=0|this._g,y=0|this._h,g=0;g<16;++g)n[g]=e.readInt32BE(4*g);for(;g<64;++g)n[g]=0|(((t=n[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[g-7]+m(n[g-15])+n[g-16];for(var w=0;w<64;++w){var N=y+d(c)+u(c,h,f)+s[w]+n[w]|0,v=p(r)+l(r,i,a)|0;y=f,f=h,h=c,c=o+N|0,o=a,a=i,i=r,r=N+v|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=c+this._e|0,this._f=h+this._f|0,this._g=f+this._g|0,this._h=y+this._h|0},c.prototype._hash=function(){var e=a.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=c},9234:function(e,t,n){!function(t,r){"use strict";e.exports?e.exports=r(n(8947)):t.nacl.auth=r(t.nacl)}(this,(function(e){"use strict";if(!e)throw new Error("tweetnacl not loaded");var t=128;function n(n,r){var i,a,s=new Uint8Array(t+Math.max(64,n.length));for(r.length>t&&(r=e.hash(r)),i=0;i<t;i++)s[i]=54;for(i=0;i<r.length;i++)s[i]^=r[i];for(s.set(n,t),a=e.hash(s.subarray(0,t+n.length)),i=0;i<t;i++)s[i]=92;for(i=0;i<r.length;i++)s[i]^=r[i];return s.set(a,t),e.hash(s.subarray(0,t+a.length))}function r(e,t){var r=new Uint8Array(32);return r.set(n(e,t).subarray(0,32)),r}return r.full=function(e,t){return n(e,t)},r.authLength=32,r.authFullLength=64,r.keyLength=32,r}))},8947:function(e,t,n){!function(e){"use strict";var t=function(e){var t,n=new Float64Array(16);if(e)for(t=0;t<e.length;t++)n[t]=e[t];return n},r=function(){throw new Error("no PRNG")},i=new Uint8Array(16),a=new Uint8Array(32);a[0]=9;var s=t(),o=t([1]),c=t([56129,1]),u=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),p=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),d=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),m=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function h(e,t,n,r){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n,e[t+4]=r>>24&255,e[t+5]=r>>16&255,e[t+6]=r>>8&255,e[t+7]=255&r}function f(e,t,n,r,i){var a,s=0;for(a=0;a<i;a++)s|=e[t+a]^n[r+a];return(1&s-1>>>8)-1}function y(e,t,n,r){return f(e,t,n,r,16)}function g(e,t,n,r){return f(e,t,n,r,32)}function w(e,t,n,r){!function(e,t,n,r){for(var i,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,p=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,m=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,h=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,f=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,w=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,N=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,v=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,b=a,x=s,_=o,T=c,C=u,S=l,A=p,P=d,E=m,z=h,I=f,M=y,q=g,R=w,O=N,k=v,B=0;B<20;B+=2)b^=(i=(q^=(i=(E^=(i=(C^=(i=b+q|0)<<7|i>>>25)+b|0)<<9|i>>>23)+C|0)<<13|i>>>19)+E|0)<<18|i>>>14,S^=(i=(x^=(i=(R^=(i=(z^=(i=S+x|0)<<7|i>>>25)+S|0)<<9|i>>>23)+z|0)<<13|i>>>19)+R|0)<<18|i>>>14,I^=(i=(A^=(i=(_^=(i=(O^=(i=I+A|0)<<7|i>>>25)+I|0)<<9|i>>>23)+O|0)<<13|i>>>19)+_|0)<<18|i>>>14,k^=(i=(M^=(i=(P^=(i=(T^=(i=k+M|0)<<7|i>>>25)+k|0)<<9|i>>>23)+T|0)<<13|i>>>19)+P|0)<<18|i>>>14,b^=(i=(T^=(i=(_^=(i=(x^=(i=b+T|0)<<7|i>>>25)+b|0)<<9|i>>>23)+x|0)<<13|i>>>19)+_|0)<<18|i>>>14,S^=(i=(C^=(i=(P^=(i=(A^=(i=S+C|0)<<7|i>>>25)+S|0)<<9|i>>>23)+A|0)<<13|i>>>19)+P|0)<<18|i>>>14,I^=(i=(z^=(i=(E^=(i=(M^=(i=I+z|0)<<7|i>>>25)+I|0)<<9|i>>>23)+M|0)<<13|i>>>19)+E|0)<<18|i>>>14,k^=(i=(O^=(i=(R^=(i=(q^=(i=k+O|0)<<7|i>>>25)+k|0)<<9|i>>>23)+q|0)<<13|i>>>19)+R|0)<<18|i>>>14;b=b+a|0,x=x+s|0,_=_+o|0,T=T+c|0,C=C+u|0,S=S+l|0,A=A+p|0,P=P+d|0,E=E+m|0,z=z+h|0,I=I+f|0,M=M+y|0,q=q+g|0,R=R+w|0,O=O+N|0,k=k+v|0,e[0]=b>>>0&255,e[1]=b>>>8&255,e[2]=b>>>16&255,e[3]=b>>>24&255,e[4]=x>>>0&255,e[5]=x>>>8&255,e[6]=x>>>16&255,e[7]=x>>>24&255,e[8]=_>>>0&255,e[9]=_>>>8&255,e[10]=_>>>16&255,e[11]=_>>>24&255,e[12]=T>>>0&255,e[13]=T>>>8&255,e[14]=T>>>16&255,e[15]=T>>>24&255,e[16]=C>>>0&255,e[17]=C>>>8&255,e[18]=C>>>16&255,e[19]=C>>>24&255,e[20]=S>>>0&255,e[21]=S>>>8&255,e[22]=S>>>16&255,e[23]=S>>>24&255,e[24]=A>>>0&255,e[25]=A>>>8&255,e[26]=A>>>16&255,e[27]=A>>>24&255,e[28]=P>>>0&255,e[29]=P>>>8&255,e[30]=P>>>16&255,e[31]=P>>>24&255,e[32]=E>>>0&255,e[33]=E>>>8&255,e[34]=E>>>16&255,e[35]=E>>>24&255,e[36]=z>>>0&255,e[37]=z>>>8&255,e[38]=z>>>16&255,e[39]=z>>>24&255,e[40]=I>>>0&255,e[41]=I>>>8&255,e[42]=I>>>16&255,e[43]=I>>>24&255,e[44]=M>>>0&255,e[45]=M>>>8&255,e[46]=M>>>16&255,e[47]=M>>>24&255,e[48]=q>>>0&255,e[49]=q>>>8&255,e[50]=q>>>16&255,e[51]=q>>>24&255,e[52]=R>>>0&255,e[53]=R>>>8&255,e[54]=R>>>16&255,e[55]=R>>>24&255,e[56]=O>>>0&255,e[57]=O>>>8&255,e[58]=O>>>16&255,e[59]=O>>>24&255,e[60]=k>>>0&255,e[61]=k>>>8&255,e[62]=k>>>16&255,e[63]=k>>>24&255}(e,t,n,r)}function N(e,t,n,r){!function(e,t,n,r){for(var i,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,p=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,m=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,h=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,f=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,w=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,N=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,v=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,b=0;b<20;b+=2)a^=(i=(g^=(i=(m^=(i=(u^=(i=a+g|0)<<7|i>>>25)+a|0)<<9|i>>>23)+u|0)<<13|i>>>19)+m|0)<<18|i>>>14,l^=(i=(s^=(i=(w^=(i=(h^=(i=l+s|0)<<7|i>>>25)+l|0)<<9|i>>>23)+h|0)<<13|i>>>19)+w|0)<<18|i>>>14,f^=(i=(p^=(i=(o^=(i=(N^=(i=f+p|0)<<7|i>>>25)+f|0)<<9|i>>>23)+N|0)<<13|i>>>19)+o|0)<<18|i>>>14,v^=(i=(y^=(i=(d^=(i=(c^=(i=v+y|0)<<7|i>>>25)+v|0)<<9|i>>>23)+c|0)<<13|i>>>19)+d|0)<<18|i>>>14,a^=(i=(c^=(i=(o^=(i=(s^=(i=a+c|0)<<7|i>>>25)+a|0)<<9|i>>>23)+s|0)<<13|i>>>19)+o|0)<<18|i>>>14,l^=(i=(u^=(i=(d^=(i=(p^=(i=l+u|0)<<7|i>>>25)+l|0)<<9|i>>>23)+p|0)<<13|i>>>19)+d|0)<<18|i>>>14,f^=(i=(h^=(i=(m^=(i=(y^=(i=f+h|0)<<7|i>>>25)+f|0)<<9|i>>>23)+y|0)<<13|i>>>19)+m|0)<<18|i>>>14,v^=(i=(N^=(i=(w^=(i=(g^=(i=v+N|0)<<7|i>>>25)+v|0)<<9|i>>>23)+g|0)<<13|i>>>19)+w|0)<<18|i>>>14;e[0]=a>>>0&255,e[1]=a>>>8&255,e[2]=a>>>16&255,e[3]=a>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=f>>>0&255,e[9]=f>>>8&255,e[10]=f>>>16&255,e[11]=f>>>24&255,e[12]=v>>>0&255,e[13]=v>>>8&255,e[14]=v>>>16&255,e[15]=v>>>24&255,e[16]=p>>>0&255,e[17]=p>>>8&255,e[18]=p>>>16&255,e[19]=p>>>24&255,e[20]=d>>>0&255,e[21]=d>>>8&255,e[22]=d>>>16&255,e[23]=d>>>24&255,e[24]=m>>>0&255,e[25]=m>>>8&255,e[26]=m>>>16&255,e[27]=m>>>24&255,e[28]=h>>>0&255,e[29]=h>>>8&255,e[30]=h>>>16&255,e[31]=h>>>24&255}(e,t,n,r)}var v=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function b(e,t,n,r,i,a,s){var o,c,u=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=a[c];for(;i>=64;){for(w(l,u,s,v),c=0;c<64;c++)e[t+c]=n[r+c]^l[c];for(o=1,c=8;c<16;c++)o=o+(255&u[c])|0,u[c]=255&o,o>>>=8;i-=64,t+=64,r+=64}if(i>0)for(w(l,u,s,v),c=0;c<i;c++)e[t+c]=n[r+c]^l[c];return 0}function x(e,t,n,r,i){var a,s,o=new Uint8Array(16),c=new Uint8Array(64);for(s=0;s<16;s++)o[s]=0;for(s=0;s<8;s++)o[s]=r[s];for(;n>=64;){for(w(c,o,i,v),s=0;s<64;s++)e[t+s]=c[s];for(a=1,s=8;s<16;s++)a=a+(255&o[s])|0,o[s]=255&a,a>>>=8;n-=64,t+=64}if(n>0)for(w(c,o,i,v),s=0;s<n;s++)e[t+s]=c[s];return 0}function _(e,t,n,r,i){var a=new Uint8Array(32);N(a,r,i,v);for(var s=new Uint8Array(8),o=0;o<8;o++)s[o]=r[o+16];return x(e,t,n,s,a)}function T(e,t,n,r,i,a,s){var o=new Uint8Array(32);N(o,a,s,v);for(var c=new Uint8Array(8),u=0;u<8;u++)c[u]=a[u+16];return b(e,t,n,r,i,c,o)}var C=function(e){var t,n,r,i,a,s,o,c;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,n=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|n<<3),r=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(n>>>10|r<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(r>>>7|i<<9),a=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|a<<12),this.r[5]=a>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(a>>>14|s<<2),o=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|o<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(o>>>8|c<<8),this.r[9]=c>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function S(e,t,n,r,i,a){var s=new C(a);return s.update(n,r,i),s.finish(e,t),0}function A(e,t,n,r,i,a){var s=new Uint8Array(16);return S(s,0,n,r,i,a),y(e,t,s,0)}function P(e,t,n,r,i){var a;if(n<32)return-1;for(T(e,0,t,0,n,r,i),S(e,16,e,32,n-32,e),a=0;a<16;a++)e[a]=0;return 0}function E(e,t,n,r,i){var a,s=new Uint8Array(32);if(n<32)return-1;if(_(s,0,32,r,i),0!==A(t,16,t,32,n-32,s))return-1;for(T(e,0,t,0,n,r,i),a=0;a<32;a++)e[a]=0;return 0}function z(e,t){var n;for(n=0;n<16;n++)e[n]=0|t[n]}function I(e){var t,n,r=1;for(t=0;t<16;t++)n=e[t]+r+65535,r=Math.floor(n/65536),e[t]=n-65536*r;e[0]+=r-1+37*(r-1)}function M(e,t,n){for(var r,i=~(n-1),a=0;a<16;a++)r=i&(e[a]^t[a]),e[a]^=r,t[a]^=r}function q(e,n){var r,i,a,s=t(),o=t();for(r=0;r<16;r++)o[r]=n[r];for(I(o),I(o),I(o),i=0;i<2;i++){for(s[0]=o[0]-65517,r=1;r<15;r++)s[r]=o[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=o[15]-32767-(s[14]>>16&1),a=s[15]>>16&1,s[14]&=65535,M(o,s,1-a)}for(r=0;r<16;r++)e[2*r]=255&o[r],e[2*r+1]=o[r]>>8}function R(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return q(n,e),q(r,t),g(n,0,r,0)}function O(e){var t=new Uint8Array(32);return q(t,e),1&t[0]}function k(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function B(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]+n[r]}function $(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]-n[r]}function U(e,t,n){var r,i,a=0,s=0,o=0,c=0,u=0,l=0,p=0,d=0,m=0,h=0,f=0,y=0,g=0,w=0,N=0,v=0,b=0,x=0,_=0,T=0,C=0,S=0,A=0,P=0,E=0,z=0,I=0,M=0,q=0,R=0,O=0,k=n[0],B=n[1],$=n[2],U=n[3],L=n[4],G=n[5],F=n[6],D=n[7],V=n[8],j=n[9],H=n[10],J=n[11],W=n[12],Y=n[13],K=n[14],Q=n[15];a+=(r=t[0])*k,s+=r*B,o+=r*$,c+=r*U,u+=r*L,l+=r*G,p+=r*F,d+=r*D,m+=r*V,h+=r*j,f+=r*H,y+=r*J,g+=r*W,w+=r*Y,N+=r*K,v+=r*Q,s+=(r=t[1])*k,o+=r*B,c+=r*$,u+=r*U,l+=r*L,p+=r*G,d+=r*F,m+=r*D,h+=r*V,f+=r*j,y+=r*H,g+=r*J,w+=r*W,N+=r*Y,v+=r*K,b+=r*Q,o+=(r=t[2])*k,c+=r*B,u+=r*$,l+=r*U,p+=r*L,d+=r*G,m+=r*F,h+=r*D,f+=r*V,y+=r*j,g+=r*H,w+=r*J,N+=r*W,v+=r*Y,b+=r*K,x+=r*Q,c+=(r=t[3])*k,u+=r*B,l+=r*$,p+=r*U,d+=r*L,m+=r*G,h+=r*F,f+=r*D,y+=r*V,g+=r*j,w+=r*H,N+=r*J,v+=r*W,b+=r*Y,x+=r*K,_+=r*Q,u+=(r=t[4])*k,l+=r*B,p+=r*$,d+=r*U,m+=r*L,h+=r*G,f+=r*F,y+=r*D,g+=r*V,w+=r*j,N+=r*H,v+=r*J,b+=r*W,x+=r*Y,_+=r*K,T+=r*Q,l+=(r=t[5])*k,p+=r*B,d+=r*$,m+=r*U,h+=r*L,f+=r*G,y+=r*F,g+=r*D,w+=r*V,N+=r*j,v+=r*H,b+=r*J,x+=r*W,_+=r*Y,T+=r*K,C+=r*Q,p+=(r=t[6])*k,d+=r*B,m+=r*$,h+=r*U,f+=r*L,y+=r*G,g+=r*F,w+=r*D,N+=r*V,v+=r*j,b+=r*H,x+=r*J,_+=r*W,T+=r*Y,C+=r*K,S+=r*Q,d+=(r=t[7])*k,m+=r*B,h+=r*$,f+=r*U,y+=r*L,g+=r*G,w+=r*F,N+=r*D,v+=r*V,b+=r*j,x+=r*H,_+=r*J,T+=r*W,C+=r*Y,S+=r*K,A+=r*Q,m+=(r=t[8])*k,h+=r*B,f+=r*$,y+=r*U,g+=r*L,w+=r*G,N+=r*F,v+=r*D,b+=r*V,x+=r*j,_+=r*H,T+=r*J,C+=r*W,S+=r*Y,A+=r*K,P+=r*Q,h+=(r=t[9])*k,f+=r*B,y+=r*$,g+=r*U,w+=r*L,N+=r*G,v+=r*F,b+=r*D,x+=r*V,_+=r*j,T+=r*H,C+=r*J,S+=r*W,A+=r*Y,P+=r*K,E+=r*Q,f+=(r=t[10])*k,y+=r*B,g+=r*$,w+=r*U,N+=r*L,v+=r*G,b+=r*F,x+=r*D,_+=r*V,T+=r*j,C+=r*H,S+=r*J,A+=r*W,P+=r*Y,E+=r*K,z+=r*Q,y+=(r=t[11])*k,g+=r*B,w+=r*$,N+=r*U,v+=r*L,b+=r*G,x+=r*F,_+=r*D,T+=r*V,C+=r*j,S+=r*H,A+=r*J,P+=r*W,E+=r*Y,z+=r*K,I+=r*Q,g+=(r=t[12])*k,w+=r*B,N+=r*$,v+=r*U,b+=r*L,x+=r*G,_+=r*F,T+=r*D,C+=r*V,S+=r*j,A+=r*H,P+=r*J,E+=r*W,z+=r*Y,I+=r*K,M+=r*Q,w+=(r=t[13])*k,N+=r*B,v+=r*$,b+=r*U,x+=r*L,_+=r*G,T+=r*F,C+=r*D,S+=r*V,A+=r*j,P+=r*H,E+=r*J,z+=r*W,I+=r*Y,M+=r*K,q+=r*Q,N+=(r=t[14])*k,v+=r*B,b+=r*$,x+=r*U,_+=r*L,T+=r*G,C+=r*F,S+=r*D,A+=r*V,P+=r*j,E+=r*H,z+=r*J,I+=r*W,M+=r*Y,q+=r*K,R+=r*Q,v+=(r=t[15])*k,s+=38*(x+=r*$),o+=38*(_+=r*U),c+=38*(T+=r*L),u+=38*(C+=r*G),l+=38*(S+=r*F),p+=38*(A+=r*D),d+=38*(P+=r*V),m+=38*(E+=r*j),h+=38*(z+=r*H),f+=38*(I+=r*J),y+=38*(M+=r*W),g+=38*(q+=r*Y),w+=38*(R+=r*K),N+=38*(O+=r*Q),a=(r=(a+=38*(b+=r*B))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),s=(r=s+i+65535)-65536*(i=Math.floor(r/65536)),o=(r=o+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),w=(r=w+i+65535)-65536*(i=Math.floor(r/65536)),N=(r=N+i+65535)-65536*(i=Math.floor(r/65536)),v=(r=v+i+65535)-65536*(i=Math.floor(r/65536)),a=(r=(a+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),s=(r=s+i+65535)-65536*(i=Math.floor(r/65536)),o=(r=o+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),w=(r=w+i+65535)-65536*(i=Math.floor(r/65536)),N=(r=N+i+65535)-65536*(i=Math.floor(r/65536)),v=(r=v+i+65535)-65536*(i=Math.floor(r/65536)),a+=i-1+37*(i-1),e[0]=a,e[1]=s,e[2]=o,e[3]=c,e[4]=u,e[5]=l,e[6]=p,e[7]=d,e[8]=m,e[9]=h,e[10]=f,e[11]=y,e[12]=g,e[13]=w,e[14]=N,e[15]=v}function L(e,t){U(e,t,t)}function G(e,n){var r,i=t();for(r=0;r<16;r++)i[r]=n[r];for(r=253;r>=0;r--)L(i,i),2!==r&&4!==r&&U(i,i,n);for(r=0;r<16;r++)e[r]=i[r]}function F(e,n){var r,i=t();for(r=0;r<16;r++)i[r]=n[r];for(r=250;r>=0;r--)L(i,i),1!==r&&U(i,i,n);for(r=0;r<16;r++)e[r]=i[r]}function D(e,n,r){var i,a,s=new Uint8Array(32),o=new Float64Array(80),u=t(),l=t(),p=t(),d=t(),m=t(),h=t();for(a=0;a<31;a++)s[a]=n[a];for(s[31]=127&n[31]|64,s[0]&=248,k(o,r),a=0;a<16;a++)l[a]=o[a],d[a]=u[a]=p[a]=0;for(u[0]=d[0]=1,a=254;a>=0;--a)M(u,l,i=s[a>>>3]>>>(7&a)&1),M(p,d,i),B(m,u,p),$(u,u,p),B(p,l,d),$(l,l,d),L(d,m),L(h,u),U(u,p,u),U(p,l,m),B(m,u,p),$(u,u,p),L(l,u),$(p,d,h),U(u,p,c),B(u,u,d),U(p,p,u),U(u,d,h),U(d,l,o),L(l,m),M(u,l,i),M(p,d,i);for(a=0;a<16;a++)o[a+16]=u[a],o[a+32]=p[a],o[a+48]=l[a],o[a+64]=d[a];var f=o.subarray(32),y=o.subarray(16);return G(f,f),U(y,y,f),q(e,y),0}function V(e,t){return D(e,t,a)}function j(e,t){return r(t,32),V(e,t)}function H(e,t,n){var r=new Uint8Array(32);return D(r,n,t),N(e,i,r,v)}C.prototype.blocks=function(e,t,n){for(var r,i,a,s,o,c,u,l,p,d,m,h,f,y,g,w,N,v,b,x=this.fin?0:2048,_=this.h[0],T=this.h[1],C=this.h[2],S=this.h[3],A=this.h[4],P=this.h[5],E=this.h[6],z=this.h[7],I=this.h[8],M=this.h[9],q=this.r[0],R=this.r[1],O=this.r[2],k=this.r[3],B=this.r[4],$=this.r[5],U=this.r[6],L=this.r[7],G=this.r[8],F=this.r[9];n>=16;)d=p=0,d+=(_+=8191&(r=255&e[t+0]|(255&e[t+1])<<8))*q,d+=(T+=8191&(r>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*F),d+=(C+=8191&(i>>>10|(a=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*G),d+=(S+=8191&(a>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*L),p=(d+=(A+=8191&(s>>>4|(o=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*U))>>>13,d&=8191,d+=(P+=o>>>1&8191)*(5*$),d+=(E+=8191&(o>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*B),d+=(z+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*k),d+=(I+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*O),m=p+=(d+=(M+=l>>>5|x)*(5*R))>>>13,m+=_*R,m+=T*q,m+=C*(5*F),m+=S*(5*G),p=(m+=A*(5*L))>>>13,m&=8191,m+=P*(5*U),m+=E*(5*$),m+=z*(5*B),m+=I*(5*k),p+=(m+=M*(5*O))>>>13,m&=8191,h=p,h+=_*O,h+=T*R,h+=C*q,h+=S*(5*F),p=(h+=A*(5*G))>>>13,h&=8191,h+=P*(5*L),h+=E*(5*U),h+=z*(5*$),h+=I*(5*B),f=p+=(h+=M*(5*k))>>>13,f+=_*k,f+=T*O,f+=C*R,f+=S*q,p=(f+=A*(5*F))>>>13,f&=8191,f+=P*(5*G),f+=E*(5*L),f+=z*(5*U),f+=I*(5*$),y=p+=(f+=M*(5*B))>>>13,y+=_*B,y+=T*k,y+=C*O,y+=S*R,p=(y+=A*q)>>>13,y&=8191,y+=P*(5*F),y+=E*(5*G),y+=z*(5*L),y+=I*(5*U),g=p+=(y+=M*(5*$))>>>13,g+=_*$,g+=T*B,g+=C*k,g+=S*O,p=(g+=A*R)>>>13,g&=8191,g+=P*q,g+=E*(5*F),g+=z*(5*G),g+=I*(5*L),w=p+=(g+=M*(5*U))>>>13,w+=_*U,w+=T*$,w+=C*B,w+=S*k,p=(w+=A*O)>>>13,w&=8191,w+=P*R,w+=E*q,w+=z*(5*F),w+=I*(5*G),N=p+=(w+=M*(5*L))>>>13,N+=_*L,N+=T*U,N+=C*$,N+=S*B,p=(N+=A*k)>>>13,N&=8191,N+=P*O,N+=E*R,N+=z*q,N+=I*(5*F),v=p+=(N+=M*(5*G))>>>13,v+=_*G,v+=T*L,v+=C*U,v+=S*$,p=(v+=A*B)>>>13,v&=8191,v+=P*k,v+=E*O,v+=z*R,v+=I*q,b=p+=(v+=M*(5*F))>>>13,b+=_*F,b+=T*G,b+=C*L,b+=S*U,p=(b+=A*$)>>>13,b&=8191,b+=P*B,b+=E*k,b+=z*O,b+=I*R,_=d=8191&(p=(p=((p+=(b+=M*q)>>>13)<<2)+p|0)+(d&=8191)|0),T=m+=p>>>=13,C=h&=8191,S=f&=8191,A=y&=8191,P=g&=8191,E=w&=8191,z=N&=8191,I=v&=8191,M=b&=8191,t+=16,n-=16;this.h[0]=_,this.h[1]=T,this.h[2]=C,this.h[3]=S,this.h[4]=A,this.h[5]=P,this.h[6]=E,this.h[7]=z,this.h[8]=I,this.h[9]=M},C.prototype.finish=function(e,t){var n,r,i,a,s=new Uint16Array(10);if(this.leftover){for(a=this.leftover,this.buffer[a++]=1;a<16;a++)this.buffer[a]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,a=2;a<10;a++)this.h[a]+=n,n=this.h[a]>>>13,this.h[a]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,s[0]=this.h[0]+5,n=s[0]>>>13,s[0]&=8191,a=1;a<10;a++)s[a]=this.h[a]+n,n=s[a]>>>13,s[a]&=8191;for(s[9]-=8192,r=(1^n)-1,a=0;a<10;a++)s[a]&=r;for(r=~r,a=0;a<10;a++)this.h[a]=this.h[a]&r|s[a];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,a=1;a<8;a++)i=(this.h[a]+this.pad[a]|0)+(i>>>16)|0,this.h[a]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},C.prototype.update=function(e,t,n){var r,i;if(this.leftover){for((i=16-this.leftover)>n&&(i=n),r=0;r<i;r++)this.buffer[this.leftover+r]=e[t+r];if(n-=i,t+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(i=n-n%16,this.blocks(e,t,i),t+=i,n-=i),n){for(r=0;r<n;r++)this.buffer[this.leftover+r]=e[t+r];this.leftover+=n}};var J=P,W=E,Y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function K(e,t,n,r){for(var i,a,s,o,c,u,l,p,d,m,h,f,y,g,w,N,v,b,x,_,T,C,S,A,P,E,z=new Int32Array(16),I=new Int32Array(16),M=e[0],q=e[1],R=e[2],O=e[3],k=e[4],B=e[5],$=e[6],U=e[7],L=t[0],G=t[1],F=t[2],D=t[3],V=t[4],j=t[5],H=t[6],J=t[7],W=0;r>=128;){for(x=0;x<16;x++)_=8*x+W,z[x]=n[_+0]<<24|n[_+1]<<16|n[_+2]<<8|n[_+3],I[x]=n[_+4]<<24|n[_+5]<<16|n[_+6]<<8|n[_+7];for(x=0;x<80;x++)if(i=M,a=q,s=R,o=O,c=k,u=B,l=$,d=L,m=G,h=F,f=D,y=V,g=j,w=H,S=65535&(C=J),A=C>>>16,P=65535&(T=U),E=T>>>16,S+=65535&(C=(V>>>14|k<<18)^(V>>>18|k<<14)^(k>>>9|V<<23)),A+=C>>>16,P+=65535&(T=(k>>>14|V<<18)^(k>>>18|V<<14)^(V>>>9|k<<23)),E+=T>>>16,S+=65535&(C=V&j^~V&H),A+=C>>>16,P+=65535&(T=k&B^~k&$),E+=T>>>16,S+=65535&(C=Y[2*x+1]),A+=C>>>16,P+=65535&(T=Y[2*x]),E+=T>>>16,T=z[x%16],A+=(C=I[x%16])>>>16,P+=65535&T,E+=T>>>16,P+=(A+=(S+=65535&C)>>>16)>>>16,S=65535&(C=b=65535&S|A<<16),A=C>>>16,P=65535&(T=v=65535&P|(E+=P>>>16)<<16),E=T>>>16,S+=65535&(C=(L>>>28|M<<4)^(M>>>2|L<<30)^(M>>>7|L<<25)),A+=C>>>16,P+=65535&(T=(M>>>28|L<<4)^(L>>>2|M<<30)^(L>>>7|M<<25)),E+=T>>>16,A+=(C=L&G^L&F^G&F)>>>16,P+=65535&(T=M&q^M&R^q&R),E+=T>>>16,p=65535&(P+=(A+=(S+=65535&C)>>>16)>>>16)|(E+=P>>>16)<<16,N=65535&S|A<<16,S=65535&(C=f),A=C>>>16,P=65535&(T=o),E=T>>>16,A+=(C=b)>>>16,P+=65535&(T=v),E+=T>>>16,q=i,R=a,O=s,k=o=65535&(P+=(A+=(S+=65535&C)>>>16)>>>16)|(E+=P>>>16)<<16,B=c,$=u,U=l,M=p,G=d,F=m,D=h,V=f=65535&S|A<<16,j=y,H=g,J=w,L=N,x%16==15)for(_=0;_<16;_++)T=z[_],S=65535&(C=I[_]),A=C>>>16,P=65535&T,E=T>>>16,T=z[(_+9)%16],S+=65535&(C=I[(_+9)%16]),A+=C>>>16,P+=65535&T,E+=T>>>16,v=z[(_+1)%16],S+=65535&(C=((b=I[(_+1)%16])>>>1|v<<31)^(b>>>8|v<<24)^(b>>>7|v<<25)),A+=C>>>16,P+=65535&(T=(v>>>1|b<<31)^(v>>>8|b<<24)^v>>>7),E+=T>>>16,v=z[(_+14)%16],A+=(C=((b=I[(_+14)%16])>>>19|v<<13)^(v>>>29|b<<3)^(b>>>6|v<<26))>>>16,P+=65535&(T=(v>>>19|b<<13)^(b>>>29|v<<3)^v>>>6),E+=T>>>16,E+=(P+=(A+=(S+=65535&C)>>>16)>>>16)>>>16,z[_]=65535&P|E<<16,I[_]=65535&S|A<<16;S=65535&(C=L),A=C>>>16,P=65535&(T=M),E=T>>>16,T=e[0],A+=(C=t[0])>>>16,P+=65535&T,E+=T>>>16,E+=(P+=(A+=(S+=65535&C)>>>16)>>>16)>>>16,e[0]=M=65535&P|E<<16,t[0]=L=65535&S|A<<16,S=65535&(C=G),A=C>>>16,P=65535&(T=q),E=T>>>16,T=e[1],A+=(C=t[1])>>>16,P+=65535&T,E+=T>>>16,E+=(P+=(A+=(S+=65535&C)>>>16)>>>16)>>>16,e[1]=q=65535&P|E<<16,t[1]=G=65535&S|A<<16,S=65535&(C=F),A=C>>>16,P=65535&(T=R),E=T>>>16,T=e[2],A+=(C=t[2])>>>16,P+=65535&T,E+=T>>>16,E+=(P+=(A+=(S+=65535&C)>>>16)>>>16)>>>16,e[2]=R=65535&P|E<<16,t[2]=F=65535&S|A<<16,S=65535&(C=D),A=C>>>16,P=65535&(T=O),E=T>>>16,T=e[3],A+=(C=t[3])>>>16,P+=65535&T,E+=T>>>16,E+=(P+=(A+=(S+=65535&C)>>>16)>>>16)>>>16,e[3]=O=65535&P|E<<16,t[3]=D=65535&S|A<<16,S=65535&(C=V),A=C>>>16,P=65535&(T=k),E=T>>>16,T=e[4],A+=(C=t[4])>>>16,P+=65535&T,E+=T>>>16,E+=(P+=(A+=(S+=65535&C)>>>16)>>>16)>>>16,e[4]=k=65535&P|E<<16,t[4]=V=65535&S|A<<16,S=65535&(C=j),A=C>>>16,P=65535&(T=B),E=T>>>16,T=e[5],A+=(C=t[5])>>>16,P+=65535&T,E+=T>>>16,E+=(P+=(A+=(S+=65535&C)>>>16)>>>16)>>>16,e[5]=B=65535&P|E<<16,t[5]=j=65535&S|A<<16,S=65535&(C=H),A=C>>>16,P=65535&(T=$),E=T>>>16,T=e[6],A+=(C=t[6])>>>16,P+=65535&T,E+=T>>>16,E+=(P+=(A+=(S+=65535&C)>>>16)>>>16)>>>16,e[6]=$=65535&P|E<<16,t[6]=H=65535&S|A<<16,S=65535&(C=J),A=C>>>16,P=65535&(T=U),E=T>>>16,T=e[7],A+=(C=t[7])>>>16,P+=65535&T,E+=T>>>16,E+=(P+=(A+=(S+=65535&C)>>>16)>>>16)>>>16,e[7]=U=65535&P|E<<16,t[7]=J=65535&S|A<<16,W+=128,r-=128}return r}function Q(e,t,n){var r,i=new Int32Array(8),a=new Int32Array(8),s=new Uint8Array(256),o=n;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,a[0]=4089235720,a[1]=2227873595,a[2]=4271175723,a[3]=1595750129,a[4]=2917565137,a[5]=725511199,a[6]=4215389547,a[7]=327033209,K(i,a,t,n),n%=128,r=0;r<n;r++)s[r]=t[o-n+r];for(s[n]=128,s[(n=256-128*(n<112?1:0))-9]=0,h(s,n-8,o/536870912|0,o<<3),K(i,a,s,n),r=0;r<8;r++)h(e,8*r,i[r],a[r]);return 0}function X(e,n){var r=t(),i=t(),a=t(),s=t(),o=t(),c=t(),u=t(),p=t(),d=t();$(r,e[1],e[0]),$(d,n[1],n[0]),U(r,r,d),B(i,e[0],e[1]),B(d,n[0],n[1]),U(i,i,d),U(a,e[3],n[3]),U(a,a,l),U(s,e[2],n[2]),B(s,s,s),$(o,i,r),$(c,s,a),B(u,s,a),B(p,i,r),U(e[0],o,c),U(e[1],p,u),U(e[2],u,c),U(e[3],o,p)}function Z(e,t,n){var r;for(r=0;r<4;r++)M(e[r],t[r],n)}function ee(e,n){var r=t(),i=t(),a=t();G(a,n[2]),U(r,n[0],a),U(i,n[1],a),q(e,i),e[31]^=O(r)<<7}function te(e,t,n){var r,i;for(z(e[0],s),z(e[1],o),z(e[2],o),z(e[3],s),i=255;i>=0;--i)Z(e,t,r=n[i/8|0]>>(7&i)&1),X(t,e),X(e,e),Z(e,t,r)}function ne(e,n){var r=[t(),t(),t(),t()];z(r[0],p),z(r[1],d),z(r[2],o),U(r[3],p,d),te(e,r,n)}function re(e,n,i){var a,s=new Uint8Array(64),o=[t(),t(),t(),t()];for(i||r(n,32),Q(s,n,32),s[0]&=248,s[31]&=127,s[31]|=64,ne(o,s),ee(e,o),a=0;a<32;a++)n[a+32]=e[a];return 0}var ie=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ae(e,t){var n,r,i,a;for(r=63;r>=32;--r){for(n=0,i=r-32,a=r-12;i<a;++i)t[i]+=n-16*t[r]*ie[i-(r-32)],n=Math.floor((t[i]+128)/256),t[i]-=256*n;t[i]+=n,t[r]=0}for(n=0,i=0;i<32;i++)t[i]+=n-(t[31]>>4)*ie[i],n=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=n*ie[i];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function se(e){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=e[t];for(t=0;t<64;t++)e[t]=0;ae(e,n)}function oe(e,n,r,i){var a,s,o=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),p=[t(),t(),t(),t()];Q(o,i,32),o[0]&=248,o[31]&=127,o[31]|=64;var d=r+64;for(a=0;a<r;a++)e[64+a]=n[a];for(a=0;a<32;a++)e[32+a]=o[32+a];for(Q(u,e.subarray(32),r+32),se(u),ne(p,u),ee(e,p),a=32;a<64;a++)e[a]=i[a];for(Q(c,e,r+64),se(c),a=0;a<64;a++)l[a]=0;for(a=0;a<32;a++)l[a]=u[a];for(a=0;a<32;a++)for(s=0;s<32;s++)l[a+s]+=c[a]*o[s];return ae(e.subarray(32),l),d}function ce(e,n,r,i){var a,c=new Uint8Array(32),l=new Uint8Array(64),p=[t(),t(),t(),t()],d=[t(),t(),t(),t()];if(r<64)return-1;if(function(e,n){var r=t(),i=t(),a=t(),c=t(),l=t(),p=t(),d=t();return z(e[2],o),k(e[1],n),L(a,e[1]),U(c,a,u),$(a,a,e[2]),B(c,e[2],c),L(l,c),L(p,l),U(d,p,l),U(r,d,a),U(r,r,c),F(r,r),U(r,r,a),U(r,r,c),U(r,r,c),U(e[0],r,c),L(i,e[0]),U(i,i,c),R(i,a)&&U(e[0],e[0],m),L(i,e[0]),U(i,i,c),R(i,a)?-1:(O(e[0])===n[31]>>7&&$(e[0],s,e[0]),U(e[3],e[0],e[1]),0)}(d,i))return-1;for(a=0;a<r;a++)e[a]=n[a];for(a=0;a<32;a++)e[a+32]=i[a];if(Q(l,e,r),se(l),te(p,d,l),ne(d,n.subarray(32)),X(p,d),ee(c,p),r-=64,g(n,0,c,0)){for(a=0;a<r;a++)e[a]=0;return-1}for(a=0;a<r;a++)e[a]=n[a+64];return r}var ue=64,le=32,pe=64;function de(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function me(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function he(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:N,crypto_stream_xor:T,crypto_stream:_,crypto_stream_salsa20_xor:b,crypto_stream_salsa20:x,crypto_onetimeauth:S,crypto_onetimeauth_verify:A,crypto_verify_16:y,crypto_verify_32:g,crypto_secretbox:P,crypto_secretbox_open:E,crypto_scalarmult:D,crypto_scalarmult_base:V,crypto_box_beforenm:H,crypto_box_afternm:J,crypto_box:function(e,t,n,r,i,a){var s=new Uint8Array(32);return H(s,i,a),J(e,t,n,r,s)},crypto_box_open:function(e,t,n,r,i,a){var s=new Uint8Array(32);return H(s,i,a),W(e,t,n,r,s)},crypto_box_keypair:j,crypto_hash:Q,crypto_sign:oe,crypto_sign_keypair:re,crypto_sign_open:ce,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ue,crypto_sign_PUBLICKEYBYTES:le,crypto_sign_SECRETKEYBYTES:pe,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:u,L:ie,pack25519:q,unpack25519:k,M:U,A:B,S:L,Z:$,pow2523:F,add:X,set25519:z,modL:ae,scalarmult:te,scalarbase:ne},e.randomBytes=function(e){var t=new Uint8Array(e);return r(t,e),t},e.secretbox=function(e,t,n){me(e,t,n),de(n,t);for(var r=new Uint8Array(32+e.length),i=new Uint8Array(r.length),a=0;a<e.length;a++)r[a+32]=e[a];return P(i,r,r.length,t,n),i.subarray(16)},e.secretbox.open=function(e,t,n){me(e,t,n),de(n,t);for(var r=new Uint8Array(16+e.length),i=new Uint8Array(r.length),a=0;a<e.length;a++)r[a+16]=e[a];return r.length<32||0!==E(i,r,r.length,t,n)?null:i.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(me(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var n=new Uint8Array(32);return D(n,e,t),n},e.scalarMult.base=function(e){if(me(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return V(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,n,r,i){var a=e.box.before(r,i);return e.secretbox(t,n,a)},e.box.before=function(e,t){me(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var n=new Uint8Array(32);return H(n,e,t),n},e.box.after=e.secretbox,e.box.open=function(t,n,r,i){var a=e.box.before(r,i);return e.secretbox.open(t,n,a)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return j(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(me(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return V(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(me(e,t),t.length!==pe)throw new Error("bad secret key size");var n=new Uint8Array(ue+e.length);return oe(n,e,e.length,t),n},e.sign.open=function(e,t){if(me(e,t),t.length!==le)throw new Error("bad public key size");var n=new Uint8Array(e.length),r=ce(n,e,e.length,t);if(r<0)return null;for(var i=new Uint8Array(r),a=0;a<i.length;a++)i[a]=n[a];return i},e.sign.detached=function(t,n){for(var r=e.sign(t,n),i=new Uint8Array(ue),a=0;a<i.length;a++)i[a]=r[a];return i},e.sign.detached.verify=function(e,t,n){if(me(e,t,n),t.length!==ue)throw new Error("bad signature size");if(n.length!==le)throw new Error("bad public key size");var r,i=new Uint8Array(ue+e.length),a=new Uint8Array(ue+e.length);for(r=0;r<ue;r++)i[r]=t[r];for(r=0;r<e.length;r++)i[r+ue]=e[r];return ce(a,i,i.length,n)>=0},e.sign.keyPair=function(){var e=new Uint8Array(le),t=new Uint8Array(pe);return re(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(me(e),e.length!==pe)throw new Error("bad secret key size");for(var t=new Uint8Array(le),n=0;n<t.length;n++)t[n]=e[32+n];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(me(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(le),n=new Uint8Array(pe),r=0;r<32;r++)n[r]=e[r];return re(t,n,!0),{publicKey:t,secretKey:n}},e.sign.publicKeyLength=le,e.sign.secretKeyLength=pe,e.sign.seedLength=32,e.sign.signatureLength=ue,e.hash=function(e){me(e);var t=new Uint8Array(64);return Q(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return me(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===f(e,0,t,0,e.length)},e.setPRNG=function(e){r=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;t&&t.getRandomValues?e.setPRNG((function(e,n){var r,i=new Uint8Array(n);for(r=0;r<n;r+=65536)t.getRandomValues(i.subarray(r,r+Math.min(n-r,65536)));for(r=0;r<n;r++)e[r]=i[r];he(i)})):(t=n(1281))&&t.randomBytes&&e.setPRNG((function(e,n){var r,i=t.randomBytes(n);for(r=0;r<n;r++)e[r]=i[r];he(i)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},952:function(e,t,n){var r;if("object"==typeof globalThis)r=globalThis;else try{r=n(4903)}catch(e){}finally{if(r||"undefined"==typeof window||(r=window),!r)throw new Error("Could not determine global this")}var i=r.WebSocket||r.MozWebSocket,a=n(9840);function s(e,t){return t?new i(e,t):new i(e)}i&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(e){Object.defineProperty(s,e,{get:function(){return i[e]}})})),e.exports={w3cwebsocket:i?s:null,version:a}},9840:function(e,t,n){e.exports=n(9003).version},1281:function(){},1487:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");const t=new Uint8Array(256);for(let e=0;e<t.length;e++)t[e]=255;for(let n=0;n<e.length;n++){const r=e.charAt(n),i=r.charCodeAt(0);if(255!==t[i])throw new TypeError(r+" is ambiguous");t[i]=n}const n=e.length,r=e.charAt(0),i=Math.log(n)/Math.log(256),a=Math.log(256)/Math.log(n);function s(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;let a=0,s=0,o=0;for(;e[a]===r;)s++,a++;const c=(e.length-a)*i+1>>>0,u=new Uint8Array(c);for(;e[a];){let r=t[e.charCodeAt(a)];if(255===r)return;let i=0;for(let e=c-1;(0!==r||i<o)&&-1!==e;e--,i++)r+=n*u[e]>>>0,u[e]=r%256>>>0,r=r/256>>>0;if(0!==r)throw new Error("Non-zero carry");o=i,a++}let l=c-o;for(;l!==c&&0===u[l];)l++;const p=new Uint8Array(s+(c-l));let d=s;for(;l!==c;)p[d++]=u[l++];return p}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";let i=0,s=0,o=0;const c=t.length;for(;o!==c&&0===t[o];)o++,i++;const u=(c-o)*a+1>>>0,l=new Uint8Array(u);for(;o!==c;){let e=t[o],r=0;for(let t=u-1;(0!==e||r<s)&&-1!==t;t--,r++)e+=256*l[t]>>>0,l[t]=e%n>>>0,e=e/n>>>0;if(0!==e)throw new Error("Non-zero carry");s=r,o++}let p=u-s;for(;p!==u&&0===l[p];)p++;let d=r.repeat(i);for(;p<u;++p)d+=e.charAt(l[p]);return d},decodeUnsafe:s,decode:function(e){const t=s(e);if(t)return t;throw new Error("Non-base"+n+" character")}}}},8957:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(1487));t.default=(0,i.default)("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},6040:function(e,t,n){"use strict";var r=n(8251);e.exports=r},7264:function(e,t,n){"use strict";var r=n(4139);n(768),n(8549),n(7152),n(1372),e.exports=r},9692:function(e,t,n){"use strict";var r=n(7045);e.exports=r},5663:function(e,t,n){"use strict";var r=n(70);e.exports=r},1926:function(e,t,n){"use strict";n(6750);var r=n(2046).Object,i=e.exports=function(e,t,n){return r.defineProperty(e,t,n)};r.defineProperty.sham&&(i.sham=!0)},3842:function(e,t,n){"use strict";n(8545),n(3643),n(4452),n(3997),n(5084),n(2596),n(5721),n(4954),n(4123),n(3377),n(2230),n(5344),n(1660),n(4610),n(3669),n(4810),n(3325),n(7024),n(8172),n(5205);var r=n(2046);e.exports=r.Symbol},1730:function(e,t,n){"use strict";n(9363),n(3643),n(7057),n(4954);var r=n(560);e.exports=r.f("iterator")},1661:function(e,t,n){"use strict";n(8537),n(3669);var r=n(560);e.exports=r.f("toPrimitive")},4997:function(e,t,n){"use strict";var r=n(6040);e.exports=r},2321:function(e,t,n){"use strict";var r=n(7264);n(3939),n(1785),n(1697),n(4664),n(3422),n(36),n(8703),n(6878),n(9671),n(359),e.exports=r},2231:function(e,t,n){"use strict";var r=n(9692);e.exports=r},9280:function(e,t,n){"use strict";var r=n(5663);e.exports=r},2159:function(e,t,n){"use strict";var r=n(2250),i=n(4640),a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+" is not a function")}},43:function(e,t,n){"use strict";var r=n(4018),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a("Can't set "+i(e)+" as a prototype")}},2156:function(e){"use strict";e.exports=function(){}},6624:function(e,t,n){"use strict";var r=n(6285),i=String,a=TypeError;e.exports=function(e){if(r(e))return e;throw new a(i(e)+" is not an object")}},4436:function(e,t,n){"use strict";var r=n(7374),i=n(4849),a=n(575),s=function(e){return function(t,n,s){var o=r(t),c=a(o);if(0===c)return!e&&-1;var u,l=i(s,c);if(e&&n!=n){for(;c>l;)if((u=o[l++])!=u)return!0}else for(;c>l;l++)if((e||l in o)&&o[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},726:function(e,t,n){"use strict";var r=n(8311),i=n(1907),a=n(6946),s=n(9298),o=n(575),c=n(6968),u=i([].push),l=function(e){var t=1===e,n=2===e,i=3===e,l=4===e,p=6===e,d=7===e,m=5===e||p;return function(h,f,y,g){for(var w,N,v=s(h),b=a(v),x=o(b),_=r(f,y),T=0,C=g||c,S=t?C(h,x):n||d?C(h,0):void 0;x>T;T++)if((m||T in b)&&(N=_(w=b[T],T,v),e))if(t)S[T]=N;else if(N)switch(e){case 3:return!0;case 5:return w;case 6:return T;case 2:u(S,w)}else switch(e){case 4:return!1;case 7:u(S,w)}return p?-1:i||l?l:S}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},7171:function(e,t,n){"use strict";var r=n(8828),i=n(6264),a=n(798),s=i("species");e.exports=function(e){return a>=51||!r((function(){var t=[];return(t.constructor={})[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},3427:function(e,t,n){"use strict";var r=n(1907);e.exports=r([].slice)},4010:function(e,t,n){"use strict";var r=n(1793),i=n(5468),a=n(6285),s=n(6264)("species"),o=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(i(t)&&(t===o||r(t.prototype))||a(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?o:t}},6968:function(e,t,n){"use strict";var r=n(4010);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},5807:function(e,t,n){"use strict";var r=n(1907),i=r({}.toString),a=r("".slice);e.exports=function(e){return a(i(e),8,-1)}},3948:function(e,t,n){"use strict";var r=n(2623),i=n(2250),a=n(5807),s=n(6264)("toStringTag"),o=Object,c="Arguments"===a(function(){return arguments}());e.exports=r?a:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=o(e),s))?n:c?a(t):"Object"===(r=a(t))&&i(t.callee)?"Arguments":r}},7382:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},9550:function(e){"use strict";e.exports=function(e,t){return{value:e,done:t}}},1626:function(e,t,n){"use strict";var r=n(9447),i=n(4284),a=n(5817);e.exports=r?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},5817:function(e){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},5543:function(e,t,n){"use strict";var r=n(9447),i=n(4284),a=n(5817);e.exports=function(e,t,n){r?i.f(e,t,a(0,n)):e[t]=n}},9251:function(e,t,n){"use strict";var r=n(4284);e.exports=function(e,t,n){return r.f(e,t,n)}},8055:function(e,t,n){"use strict";var r=n(1626);e.exports=function(e,t,n,i){return i&&i.enumerable?e[t]=n:r(e,t,n),e}},2532:function(e,t,n){"use strict";var r=n(5951),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},9447:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},9552:function(e,t,n){"use strict";var r=n(5951),i=n(6285),a=r.document,s=i(a)&&i(a.createElement);e.exports=function(e){return s?a.createElement(e):{}}},8024:function(e){"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},9287:function(e){"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},376:function(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6794:function(e,t,n){"use strict";var r=n(5951).navigator,i=r&&r.userAgent;e.exports=i?String(i):""},798:function(e,t,n){"use strict";var r,i,a=n(5951),s=n(6794),o=a.process,c=a.Deno,u=o&&o.versions||c&&c.version,l=u&&u.v8;l&&(i=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(i=+r[1]),e.exports=i},1091:function(e,t,n){"use strict";var r=n(5951),i=n(6024),a=n(2361),s=n(2250),o=n(3846).f,c=n(7463),u=n(2046),l=n(8311),p=n(1626),d=n(9724);n(3747);var m=function(e){var t=function(n,r,a){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,a)}return i(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,i,h,f,y,g,w,N,v,b=e.target,x=e.global,_=e.stat,T=e.proto,C=x?r:_?r[b]:r[b]&&r[b].prototype,S=x?u:u[b]||p(u,b,{})[b],A=S.prototype;for(f in t)i=!(n=c(x?f:b+(_?".":"#")+f,e.forced))&&C&&d(C,f),g=S[f],i&&(w=e.dontCallGetSet?(v=o(C,f))&&v.value:C[f]),y=i&&w?w:t[f],(n||T||typeof g!=typeof y)&&(N=e.bind&&i?l(y,r):e.wrap&&i?m(y):T&&s(y)?a(y):y,(e.sham||y&&y.sham||g&&g.sham)&&p(N,"sham",!0),p(S,f,N),T&&(d(u,h=b+"Prototype")||p(u,h,{}),p(u[h],f,y),e.real&&A&&(n||!A[f])&&p(A,f,y)))}},8828:function(e){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},6024:function(e,t,n){"use strict";var r=n(1505),i=Function.prototype,a=i.apply,s=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?s.bind(a):function(){return s.apply(a,arguments)})},8311:function(e,t,n){"use strict";var r=n(2361),i=n(2159),a=n(1505),s=r(r.bind);e.exports=function(e,t){return i(e),void 0===t?e:a?s(e,t):function(){return e.apply(t,arguments)}}},1505:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},3930:function(e,t,n){"use strict";var r=n(1505),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},6833:function(e,t,n){"use strict";var r=n(9447),i=n(9724),a=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,o=i(a,"name"),c=o&&"something"===function(){}.name,u=o&&(!r||r&&s(a,"name").configurable);e.exports={EXISTS:o,PROPER:c,CONFIGURABLE:u}},1871:function(e,t,n){"use strict";var r=n(1907),i=n(2159);e.exports=function(e,t,n){try{return r(i(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},2361:function(e,t,n){"use strict";var r=n(5807),i=n(1907);e.exports=function(e){if("Function"===r(e))return i(e)}},1907:function(e,t,n){"use strict";var r=n(1505),i=Function.prototype,a=i.call,s=r&&i.bind.bind(a,a);e.exports=r?s:function(e){return function(){return a.apply(e,arguments)}}},5582:function(e,t,n){"use strict";var r=n(2046),i=n(5951),a=n(2250),s=function(e){return a(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?s(r[e])||s(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},6656:function(e,t,n){"use strict";var r=n(1907),i=n(1793),a=n(2250),s=n(5807),o=n(160),c=r([].push);e.exports=function(e){if(a(e))return e;if(i(e)){for(var t=e.length,n=[],r=0;r<t;r++){var u=e[r];"string"==typeof u?c(n,u):"number"!=typeof u&&"Number"!==s(u)&&"String"!==s(u)||c(n,o(u))}var l=n.length,p=!0;return function(e,t){if(p)return p=!1,t;if(i(this))return t;for(var r=0;r<l;r++)if(n[r]===e)return t}}}},9367:function(e,t,n){"use strict";var r=n(2159),i=n(7136);e.exports=function(e,t){var n=e[t];return i(n)?void 0:r(n)}},5951:function(e,t,n){"use strict";var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9724:function(e,t,n){"use strict";var r=n(1907),i=n(9298),a=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(i(e),t)}},8530:function(e){"use strict";e.exports={}},2416:function(e,t,n){"use strict";var r=n(5582);e.exports=r("document","documentElement")},3648:function(e,t,n){"use strict";var r=n(9447),i=n(8828),a=n(9552);e.exports=!r&&!i((function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},6946:function(e,t,n){"use strict";var r=n(1907),i=n(8828),a=n(5807),s=Object,o=r("".split);e.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"===a(e)?o(e,""):s(e)}:s},2647:function(e,t,n){"use strict";var r=n(1907),i=n(2250),a=n(3747),s=r(Function.toString);i(a.inspectSource)||(a.inspectSource=function(e){return s(e)}),e.exports=a.inspectSource},4932:function(e,t,n){"use strict";var r,i,a,s=n(551),o=n(5951),c=n(6285),u=n(1626),l=n(9724),p=n(3747),d=n(2522),m=n(8530),h="Object already initialized",f=o.TypeError,y=o.WeakMap;if(s||p.state){var g=p.state||(p.state=new y);g.get=g.get,g.has=g.has,g.set=g.set,r=function(e,t){if(g.has(e))throw new f(h);return t.facade=e,g.set(e,t),t},i=function(e){return g.get(e)||{}},a=function(e){return g.has(e)}}else{var w=d("state");m[w]=!0,r=function(e,t){if(l(e,w))throw new f(h);return t.facade=e,u(e,w,t),t},i=function(e){return l(e,w)?e[w]:{}},a=function(e){return l(e,w)}}e.exports={set:r,get:i,has:a,enforce:function(e){return a(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=i(t)).type!==e)throw new f("Incompatible receiver, "+e+" required");return n}}}},1793:function(e,t,n){"use strict";var r=n(5807);e.exports=Array.isArray||function(e){return"Array"===r(e)}},2250:function(e){"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},5468:function(e,t,n){"use strict";var r=n(1907),i=n(8828),a=n(2250),s=n(3948),o=n(5582),c=n(2647),u=function(){},l=o("Reflect","construct"),p=/^\s*(?:class|function)\b/,d=r(p.exec),m=!p.test(u),h=function(e){if(!a(e))return!1;try{return l(u,[],e),!0}catch(e){return!1}},f=function(e){if(!a(e))return!1;switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return m||!!d(p,c(e))}catch(e){return!0}};f.sham=!0,e.exports=!l||i((function(){var e;return h(h.call)||!h(Object)||!h((function(){e=!0}))||e}))?f:h},7463:function(e,t,n){"use strict";var r=n(8828),i=n(2250),a=/#|\.prototype\./,s=function(e,t){var n=c[o(e)];return n===l||n!==u&&(i(t)?r(t):!!t)},o=s.normalize=function(e){return String(e).replace(a,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";e.exports=s},7136:function(e){"use strict";e.exports=function(e){return null==e}},6285:function(e,t,n){"use strict";var r=n(2250);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},4018:function(e,t,n){"use strict";var r=n(6285);e.exports=function(e){return r(e)||null===e}},7376:function(e){"use strict";e.exports=!0},5594:function(e,t,n){"use strict";var r=n(5582),i=n(2250),a=n(8280),s=n(1175),o=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return i(t)&&a(t.prototype,o(e))}},7181:function(e,t,n){"use strict";var r=n(5116).IteratorPrototype,i=n(8075),a=n(5817),s=n(4840),o=n(3742),c=function(){return this};e.exports=function(e,t,n,u){var l=t+" Iterator";return e.prototype=i(r,{next:a(+!u,n)}),s(e,l,!1,!0),o[l]=c,e}},183:function(e,t,n){"use strict";var r=n(1091),i=n(3930),a=n(7376),s=n(6833),o=n(2250),c=n(7181),u=n(5972),l=n(9192),p=n(4840),d=n(1626),m=n(8055),h=n(6264),f=n(3742),y=n(5116),g=s.PROPER,w=s.CONFIGURABLE,N=y.IteratorPrototype,v=y.BUGGY_SAFARI_ITERATORS,b=h("iterator"),x="keys",_="values",T="entries",C=function(){return this};e.exports=function(e,t,n,s,h,y,S){c(n,t,s);var A,P,E,z=function(e){if(e===h&&O)return O;if(!v&&e&&e in q)return q[e];switch(e){case x:case _:case T:return function(){return new n(this,e)}}return function(){return new n(this)}},I=t+" Iterator",M=!1,q=e.prototype,R=q[b]||q["@@iterator"]||h&&q[h],O=!v&&R||z(h),k="Array"===t&&q.entries||R;if(k&&(A=u(k.call(new e)))!==Object.prototype&&A.next&&(a||u(A)===N||(l?l(A,N):o(A[b])||m(A,b,C)),p(A,I,!0,!0),a&&(f[I]=C)),g&&h===_&&R&&R.name!==_&&(!a&&w?d(q,"name",_):(M=!0,O=function(){return i(R,this)})),h)if(P={values:z(_),keys:y?O:z(x),entries:z(T)},S)for(E in P)(v||M||!(E in q))&&m(q,E,P[E]);else r({target:t,proto:!0,forced:v||M},P);return a&&!S||q[b]===O||m(q,b,O,{name:h}),f[t]=O,P}},5116:function(e,t,n){"use strict";var r,i,a,s=n(8828),o=n(2250),c=n(6285),u=n(8075),l=n(5972),p=n(8055),d=n(6264),m=n(7376),h=d("iterator"),f=!1;[].keys&&("next"in(a=[].keys())?(i=l(l(a)))!==Object.prototype&&(r=i):f=!0),!c(r)||s((function(){var e={};return r[h].call(e)!==e}))?r={}:m&&(r=u(r)),o(r[h])||p(r,h,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:f}},3742:function(e){"use strict";e.exports={}},575:function(e,t,n){"use strict";var r=n(3121);e.exports=function(e){return r(e.length)}},1176:function(e){"use strict";var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},8075:function(e,t,n){"use strict";var r,i=n(6624),a=n(2220),s=n(376),o=n(8530),c=n(2416),u=n(9552),l=n(2522),p="prototype",d="script",m=l("IE_PROTO"),h=function(){},f=function(e){return"<"+d+">"+e+"</"+d+">"},y=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;g="undefined"!=typeof document?document.domain&&r?y(r):(t=u("iframe"),n="java"+d+":",t.style.display="none",c.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F):y(r);for(var i=s.length;i--;)delete g[p][s[i]];return g()};o[m]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h[p]=i(e),n=new h,h[p]=null,n[m]=e):n=g(),void 0===t?n:a.f(n,t)}},2220:function(e,t,n){"use strict";var r=n(9447),i=n(8661),a=n(4284),s=n(6624),o=n(7374),c=n(2875);t.f=r&&!i?Object.defineProperties:function(e,t){s(e);for(var n,r=o(t),i=c(t),u=i.length,l=0;u>l;)a.f(e,n=i[l++],r[n]);return e}},4284:function(e,t,n){"use strict";var r=n(9447),i=n(3648),a=n(8661),s=n(6624),o=n(470),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,p="enumerable",d="configurable",m="writable";t.f=r?a?function(e,t,n){if(s(e),t=o(t),s(n),"function"==typeof e&&"prototype"===t&&"value"in n&&m in n&&!n[m]){var r=l(e,t);r&&r[m]&&(e[t]=n.value,n={configurable:d in n?n[d]:r[d],enumerable:p in n?n[p]:r[p],writable:!1})}return u(e,t,n)}:u:function(e,t,n){if(s(e),t=o(t),s(n),i)try{return u(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},3846:function(e,t,n){"use strict";var r=n(9447),i=n(3930),a=n(2574),s=n(5817),o=n(7374),c=n(470),u=n(9724),l=n(3648),p=Object.getOwnPropertyDescriptor;t.f=r?p:function(e,t){if(e=o(e),t=c(t),l)try{return p(e,t)}catch(e){}if(u(e,t))return s(!i(a.f,e,t),e[t])}},5407:function(e,t,n){"use strict";var r=n(5807),i=n(7374),a=n(4443).f,s=n(3427),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"Window"===r(e)?function(e){try{return a(e)}catch(e){return s(o)}}(e):a(i(e))}},4443:function(e,t,n){"use strict";var r=n(3045),i=n(376).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},7170:function(e,t){"use strict";t.f=Object.getOwnPropertySymbols},5972:function(e,t,n){"use strict";var r=n(9724),i=n(2250),a=n(9298),s=n(2522),o=n(7382),c=s("IE_PROTO"),u=Object,l=u.prototype;e.exports=o?u.getPrototypeOf:function(e){var t=a(e);if(r(t,c))return t[c];var n=t.constructor;return i(n)&&t instanceof n?n.prototype:t instanceof u?l:null}},8280:function(e,t,n){"use strict";var r=n(1907);e.exports=r({}.isPrototypeOf)},3045:function(e,t,n){"use strict";var r=n(1907),i=n(9724),a=n(7374),s=n(4436).indexOf,o=n(8530),c=r([].push);e.exports=function(e,t){var n,r=a(e),u=0,l=[];for(n in r)!i(o,n)&&i(r,n)&&c(l,n);for(;t.length>u;)i(r,n=t[u++])&&(~s(l,n)||c(l,n));return l}},2875:function(e,t,n){"use strict";var r=n(3045),i=n(376);e.exports=Object.keys||function(e){return r(e,i)}},2574:function(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},9192:function(e,t,n){"use strict";var r=n(1871),i=n(6285),a=n(4239),s=n(43);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return a(n),s(r),i(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},4878:function(e,t,n){"use strict";var r=n(2623),i=n(3948);e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},581:function(e,t,n){"use strict";var r=n(3930),i=n(2250),a=n(6285),s=TypeError;e.exports=function(e,t){var n,o;if("string"===t&&i(n=e.toString)&&!a(o=r(n,e)))return o;if(i(n=e.valueOf)&&!a(o=r(n,e)))return o;if("string"!==t&&i(n=e.toString)&&!a(o=r(n,e)))return o;throw new s("Can't convert object to primitive value")}},2046:function(e){"use strict";e.exports={}},4239:function(e,t,n){"use strict";var r=n(7136),i=TypeError;e.exports=function(e){if(r(e))throw new i("Can't call method on "+e);return e}},4840:function(e,t,n){"use strict";var r=n(2623),i=n(4284).f,a=n(1626),s=n(9724),o=n(4878),c=n(6264)("toStringTag");e.exports=function(e,t,n,u){var l=n?e:e&&e.prototype;l&&(s(l,c)||i(l,c,{configurable:!0,value:t}),u&&!r&&a(l,"toString",o))}},2522:function(e,t,n){"use strict";var r=n(5816),i=n(6499),a=r("keys");e.exports=function(e){return a[e]||(a[e]=i(e))}},3747:function(e,t,n){"use strict";var r=n(7376),i=n(5951),a=n(2532),s="__core-js_shared__",o=e.exports=i[s]||a(s,{});(o.versions||(o.versions=[])).push({version:"3.38.1",mode:r?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5816:function(e,t,n){"use strict";var r=n(3747);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},1470:function(e,t,n){"use strict";var r=n(1907),i=n(5482),a=n(160),s=n(4239),o=r("".charAt),c=r("".charCodeAt),u=r("".slice),l=function(e){return function(t,n){var r,l,p=a(s(t)),d=i(n),m=p.length;return d<0||d>=m?e?"":void 0:(r=c(p,d))<55296||r>56319||d+1===m||(l=c(p,d+1))<56320||l>57343?e?o(p,d):r:e?u(p,d,d+2):l-56320+(r-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},9846:function(e,t,n){"use strict";var r=n(798),i=n(8828),a=n(5951).String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol("symbol detection");return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3467:function(e,t,n){"use strict";var r=n(3930),i=n(5582),a=n(6264),s=n(8055);e.exports=function(){var e=i("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,o=a("toPrimitive");t&&!t[o]&&s(t,o,(function(e){return r(n,this)}),{arity:1})}},2595:function(e,t,n){"use strict";var r=n(5582),i=n(1907),a=r("Symbol"),s=a.keyFor,o=i(a.prototype.valueOf);e.exports=a.isRegisteredSymbol||function(e){try{return void 0!==s(o(e))}catch(e){return!1}}},9197:function(e,t,n){"use strict";for(var r=n(5816),i=n(5582),a=n(1907),s=n(5594),o=n(6264),c=i("Symbol"),u=c.isWellKnownSymbol,l=i("Object","getOwnPropertyNames"),p=a(c.prototype.valueOf),d=r("wks"),m=0,h=l(c),f=h.length;m<f;m++)try{var y=h[m];s(c[y])&&o(y)}catch(e){}e.exports=function(e){if(u&&u(e))return!0;try{for(var t=p(e),n=0,r=l(d),i=r.length;n<i;n++)if(d[r[n]]==t)return!0}catch(e){}return!1}},4411:function(e,t,n){"use strict";var r=n(9846);e.exports=r&&!!Symbol.for&&!!Symbol.keyFor},4849:function(e,t,n){"use strict";var r=n(5482),i=Math.max,a=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):a(n,t)}},7374:function(e,t,n){"use strict";var r=n(6946),i=n(4239);e.exports=function(e){return r(i(e))}},5482:function(e,t,n){"use strict";var r=n(1176);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},3121:function(e,t,n){"use strict";var r=n(5482),i=Math.min;e.exports=function(e){var t=r(e);return t>0?i(t,9007199254740991):0}},9298:function(e,t,n){"use strict";var r=n(4239),i=Object;e.exports=function(e){return i(r(e))}},6028:function(e,t,n){"use strict";var r=n(3930),i=n(6285),a=n(5594),s=n(9367),o=n(581),c=n(6264),u=TypeError,l=c("toPrimitive");e.exports=function(e,t){if(!i(e)||a(e))return e;var n,c=s(e,l);if(c){if(void 0===t&&(t="default"),n=r(c,e,t),!i(n)||a(n))return n;throw new u("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},470:function(e,t,n){"use strict";var r=n(6028),i=n(5594);e.exports=function(e){var t=r(e,"string");return i(t)?t:t+""}},2623:function(e,t,n){"use strict";var r={};r[n(6264)("toStringTag")]="z",e.exports="[object z]"===String(r)},160:function(e,t,n){"use strict";var r=n(3948),i=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return i(e)}},4640:function(e){"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},6499:function(e,t,n){"use strict";var r=n(1907),i=0,a=Math.random(),s=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++i+a,36)}},1175:function(e,t,n){"use strict";var r=n(9846);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8661:function(e,t,n){"use strict";var r=n(9447),i=n(8828);e.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},551:function(e,t,n){"use strict";var r=n(5951),i=n(2250),a=r.WeakMap;e.exports=i(a)&&/native code/.test(String(a))},366:function(e,t,n){"use strict";var r=n(2046),i=n(9724),a=n(560),s=n(4284).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||s(t,e,{value:a.f(e)})}},560:function(e,t,n){"use strict";var r=n(6264);t.f=r},6264:function(e,t,n){"use strict";var r=n(5951),i=n(5816),a=n(9724),s=n(6499),o=n(9846),c=n(1175),u=r.Symbol,l=i("wks"),p=c?u.for||u:u&&u.withoutSetter||s;e.exports=function(e){return a(l,e)||(l[e]=o&&a(u,e)?u[e]:p("Symbol."+e)),l[e]}},8545:function(e,t,n){"use strict";var r=n(1091),i=n(8828),a=n(1793),s=n(6285),o=n(9298),c=n(575),u=n(8024),l=n(5543),p=n(6968),d=n(7171),m=n(6264),h=n(798),f=m("isConcatSpreadable"),y=h>=51||!i((function(){var e=[];return e[f]=!1,e.concat()[0]!==e})),g=function(e){if(!s(e))return!1;var t=e[f];return void 0!==t?!!t:a(e)};r({target:"Array",proto:!0,arity:1,forced:!y||!d("concat")},{concat:function(e){var t,n,r,i,a,s=o(this),d=p(s,0),m=0;for(t=-1,r=arguments.length;t<r;t++)if(g(a=-1===t?s:arguments[t]))for(i=c(a),u(m+i),n=0;n<i;n++,m++)n in a&&l(d,m,a[n]);else u(m+1),l(d,m++,a);return d.length=m,d}})},9363:function(e,t,n){"use strict";var r=n(7374),i=n(2156),a=n(3742),s=n(4932),o=n(4284).f,c=n(183),u=n(9550),l=n(7376),p=n(9447),d="Array Iterator",m=s.set,h=s.getterFor(d);e.exports=c(Array,"Array",(function(e,t){m(this,{type:d,target:r(e),index:0,kind:t})}),(function(){var e=h(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,u(void 0,!0);switch(e.kind){case"keys":return u(n,!1);case"values":return u(t[n],!1)}return u([n,t[n]],!1)}),"values");var f=a.Arguments=a.Array;if(i("keys"),i("values"),i("entries"),!l&&p&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}},8537:function(){},9721:function(e,t,n){"use strict";var r=n(1091),i=n(5582),a=n(6024),s=n(3930),o=n(1907),c=n(8828),u=n(2250),l=n(5594),p=n(3427),d=n(6656),m=n(9846),h=String,f=i("JSON","stringify"),y=o(/./.exec),g=o("".charAt),w=o("".charCodeAt),N=o("".replace),v=o(1..toString),b=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,_=/^[\uDC00-\uDFFF]$/,T=!m||c((function(){var e=i("Symbol")("stringify detection");return"[null]"!==f([e])||"{}"!==f({a:e})||"{}"!==f(Object(e))})),C=c((function(){return'"\\udf06\\ud834"'!==f("\udf06\ud834")||'"\\udead"'!==f("\udead")})),S=function(e,t){var n=p(arguments),r=d(t);if(u(r)||void 0!==e&&!l(e))return n[1]=function(e,t){if(u(r)&&(t=s(r,this,h(e),t)),!l(t))return t},a(f,null,n)},A=function(e,t,n){var r=g(n,t-1),i=g(n,t+1);return y(x,e)&&!y(_,i)||y(_,e)&&!y(x,r)?"\\u"+v(w(e,0),16):e};f&&r({target:"JSON",stat:!0,arity:3,forced:T||C},{stringify:function(e,t,n){var r=p(arguments),i=a(T?S:f,null,r);return C&&"string"==typeof i?N(i,b,A):i}})},7024:function(e,t,n){"use strict";var r=n(5951);n(4840)(r.JSON,"JSON",!0)},8172:function(){},6750:function(e,t,n){"use strict";var r=n(1091),i=n(9447),a=n(4284).f;r({target:"Object",stat:!0,forced:Object.defineProperty!==a,sham:!i},{defineProperty:a})},5264:function(e,t,n){"use strict";var r=n(1091),i=n(9846),a=n(8828),s=n(7170),o=n(9298);r({target:"Object",stat:!0,forced:!i||a((function(){s.f(1)}))},{getOwnPropertySymbols:function(e){var t=s.f;return t?t(o(e)):[]}})},3643:function(){},5205:function(){},7057:function(e,t,n){"use strict";var r=n(1470).charAt,i=n(160),a=n(4932),s=n(183),o=n(9550),c="String Iterator",u=a.set,l=a.getterFor(c);s(String,"String",(function(e){u(this,{type:c,string:i(e),index:0})}),(function(){var e,t=l(this),n=t.string,i=t.index;return i>=n.length?o(void 0,!0):(e=r(n,i),t.index+=e.length,o(e,!1))}))},3997:function(e,t,n){"use strict";n(366)("asyncIterator")},3674:function(e,t,n){"use strict";var r=n(1091),i=n(5951),a=n(3930),s=n(1907),o=n(7376),c=n(9447),u=n(9846),l=n(8828),p=n(9724),d=n(8280),m=n(6624),h=n(7374),f=n(470),y=n(160),g=n(5817),w=n(8075),N=n(2875),v=n(4443),b=n(5407),x=n(7170),_=n(3846),T=n(4284),C=n(2220),S=n(2574),A=n(8055),P=n(9251),E=n(5816),z=n(2522),I=n(8530),M=n(6499),q=n(6264),R=n(560),O=n(366),k=n(3467),B=n(4840),$=n(4932),U=n(726).forEach,L=z("hidden"),G="Symbol",F="prototype",D=$.set,V=$.getterFor(G),j=Object[F],H=i.Symbol,J=H&&H[F],W=i.RangeError,Y=i.TypeError,K=i.QObject,Q=_.f,X=T.f,Z=b.f,ee=S.f,te=s([].push),ne=E("symbols"),re=E("op-symbols"),ie=E("wks"),ae=!K||!K[F]||!K[F].findChild,se=function(e,t,n){var r=Q(j,t);r&&delete j[t],X(e,t,n),r&&e!==j&&X(j,t,r)},oe=c&&l((function(){return 7!==w(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?se:X,ce=function(e,t){var n=ne[e]=w(J);return D(n,{type:G,tag:e,description:t}),c||(n.description=t),n},ue=function(e,t,n){e===j&&ue(re,t,n),m(e);var r=f(t);return m(n),p(ne,r)?(n.enumerable?(p(e,L)&&e[L][r]&&(e[L][r]=!1),n=w(n,{enumerable:g(0,!1)})):(p(e,L)||X(e,L,g(1,w(null))),e[L][r]=!0),oe(e,r,n)):X(e,r,n)},le=function(e,t){m(e);var n=h(t),r=N(n).concat(he(n));return U(r,(function(t){c&&!a(pe,n,t)||ue(e,t,n[t])})),e},pe=function(e){var t=f(e),n=a(ee,this,t);return!(this===j&&p(ne,t)&&!p(re,t))&&(!(n||!p(this,t)||!p(ne,t)||p(this,L)&&this[L][t])||n)},de=function(e,t){var n=h(e),r=f(t);if(n!==j||!p(ne,r)||p(re,r)){var i=Q(n,r);return!i||!p(ne,r)||p(n,L)&&n[L][r]||(i.enumerable=!0),i}},me=function(e){var t=Z(h(e)),n=[];return U(t,(function(e){p(ne,e)||p(I,e)||te(n,e)})),n},he=function(e){var t=e===j,n=Z(t?re:h(e)),r=[];return U(n,(function(e){!p(ne,e)||t&&!p(j,e)||te(r,ne[e])})),r};u||(H=function(){if(d(J,this))throw new Y("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,t=M(e),n=function(e){var r=void 0===this?i:this;r===j&&a(n,re,e),p(r,L)&&p(r[L],t)&&(r[L][t]=!1);var s=g(1,e);try{oe(r,t,s)}catch(e){if(!(e instanceof W))throw e;se(r,t,s)}};return c&&ae&&oe(j,t,{configurable:!0,set:n}),ce(t,e)},A(J=H[F],"toString",(function(){return V(this).tag})),A(H,"withoutSetter",(function(e){return ce(M(e),e)})),S.f=pe,T.f=ue,C.f=le,_.f=de,v.f=b.f=me,x.f=he,R.f=function(e){return ce(q(e),e)},c&&(P(J,"description",{configurable:!0,get:function(){return V(this).description}}),o||A(j,"propertyIsEnumerable",pe,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:H}),U(N(ie),(function(e){O(e)})),r({target:G,stat:!0,forced:!u},{useSetter:function(){ae=!0},useSimple:function(){ae=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!c},{create:function(e,t){return void 0===t?w(e):le(w(e),t)},defineProperty:ue,defineProperties:le,getOwnPropertyDescriptor:de}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:me}),k(),B(H,G),I[L]=!0},5084:function(){},3313:function(e,t,n){"use strict";var r=n(1091),i=n(5582),a=n(9724),s=n(160),o=n(5816),c=n(4411),u=o("string-to-symbol-registry"),l=o("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{for:function(e){var t=s(e);if(a(u,t))return u[t];var n=i("Symbol")(t);return u[t]=n,l[n]=t,n}})},2596:function(e,t,n){"use strict";n(366)("hasInstance")},5721:function(e,t,n){"use strict";n(366)("isConcatSpreadable")},4954:function(e,t,n){"use strict";n(366)("iterator")},4452:function(e,t,n){"use strict";n(3674),n(3313),n(751),n(9721),n(5264)},751:function(e,t,n){"use strict";var r=n(1091),i=n(9724),a=n(5594),s=n(4640),o=n(5816),c=n(4411),u=o("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{keyFor:function(e){if(!a(e))throw new TypeError(s(e)+" is not a symbol");if(i(u,e))return u[e]}})},3377:function(e,t,n){"use strict";n(366)("matchAll")},4123:function(e,t,n){"use strict";n(366)("match")},2230:function(e,t,n){"use strict";n(366)("replace")},5344:function(e,t,n){"use strict";n(366)("search")},1660:function(e,t,n){"use strict";n(366)("species")},4610:function(e,t,n){"use strict";n(366)("split")},3669:function(e,t,n){"use strict";var r=n(366),i=n(3467);r("toPrimitive"),i()},4810:function(e,t,n){"use strict";var r=n(5582),i=n(366),a=n(4840);i("toStringTag"),a(r("Symbol"),"Symbol")},3325:function(e,t,n){"use strict";n(366)("unscopables")},768:function(e,t,n){"use strict";var r=n(6264),i=n(4284).f,a=r("metadata"),s=Function.prototype;void 0===s[a]&&i(s,a,{value:null})},8549:function(e,t,n){"use strict";n(366)("asyncDispose")},1697:function(e,t,n){"use strict";n(366)("customMatcher")},7152:function(e,t,n){"use strict";n(366)("dispose")},3939:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0},{isRegisteredSymbol:n(2595)})},3422:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:n(2595)})},1785:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:n(9197)})},36:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:n(9197)})},8703:function(e,t,n){"use strict";n(366)("matcher")},6878:function(e,t,n){"use strict";n(366)("metadataKey")},1372:function(e,t,n){"use strict";n(366)("metadata")},4664:function(e,t,n){"use strict";n(366)("observable")},9671:function(e,t,n){"use strict";n(366)("patternMatch")},359:function(e,t,n){"use strict";n(366)("replaceAll")},2560:function(e,t,n){"use strict";n(9363);var r=n(9287),i=n(5951),a=n(4840),s=n(3742);for(var o in r)a(i[o],o),s[o]=s.Array},8251:function(e,t,n){"use strict";var r=n(1926);e.exports=r},4139:function(e,t,n){"use strict";var r=n(3842);n(2560),e.exports=r},7045:function(e,t,n){"use strict";var r=n(1730);n(2560),e.exports=r},70:function(e,t,n){"use strict";var r=n(1661);e.exports=r},9003:function(e){"use strict";e.exports={version:"1.0.35"}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";n.r(r),n.d(r,{AE_AMOUNT_FORMATS:function(){return Ke},AbiVersion:function(){return jr},AccountBase:function(){return il},AccountError:function(){return I},AccountGeneralized:function(){return Fm},AccountLedger:function(){return jm},AccountLedgerFactory:function(){return Zm},AccountMetamask:function(){return ah},AccountMetamaskFactory:function(){return mh},AccountMnemonicFactory:function(){return Bm},AeSdk:function(){return Ip},AeSdkAepp:function(){return ld},AeSdkBase:function(){return zp},AeSdkMethods:function(){return Ap},AeSdkWallet:function(){return kd},AensError:function(){return M},AensPointerContextError:function(){return ie},AeppError:function(){return q},AlreadyConnectedError:function(){return Je},AmbiguousEventDefinitionError:function(){return ze},ArgumentCountMismatchError:function(){return D},ArgumentError:function(){return G},BaseError:function(){return z},BrowserRuntimeConnection:function(){return zb},BrowserWindowMessageConnection:function(){return Tb},BytecodeMismatchError:function(){return Ne},CallReturnType:function(){return Ta},Channel:function(){return Kf},ChannelCallError:function(){return de},ChannelConnectionError:function(){return me},ChannelError:function(){return R},ChannelIncomingMessageError:function(){return ye},ChannelPingTimedOutError:function(){return he},CompilerBase:function(){return yh},CompilerError:function(){return O},CompilerHttp:function(){return pf},ConsensusProtocolVersion:function(){return Dr},Contract:function(){return tp},ContractError:function(){return k},CryptographyError:function(){return B},DRY_RUN_ACCOUNT:function(){return Or},DecodeError:function(){return $e},DelegationTag:function(){return Ol},DryRunError:function(){return Le},DuplicateContractError:function(){return ve},DuplicateNodeError:function(){return ke},Encoded:function(){return e},Encoding:function(){return ir},EntryTag:function(){return Ca},IllegalArgumentError:function(){return F},IllegalBidFeeError:function(){return Ge},InactiveContractError:function(){return be},InsufficientBalanceError:function(){return V},InsufficientNameFeeError:function(){return ae},InternalError:function(){return te},InvalidAensNameError:function(){return se},InvalidAuthDataError:function(){return we},InvalidChecksumError:function(){return Ie},InvalidMethodInvocationError:function(){return xe},InvalidRpcMessageError:function(){return oe},InvalidSignatureError:function(){return Fe},InvalidTxError:function(){return _l},LogicError:function(){return ee},MAX_AUTH_FUN_GAS:function(){return kr},MESSAGE_DIRECTION:function(){return Mp},METHODS:function(){return Op},MIN_GAS_PRICE:function(){return Br},MemoryAccount:function(){return fl},MerkleTreeHashMismatchError:function(){return Me},Middleware:function(){return hb},MiddlewarePageMissed:function(){return pb},MiddlewareSubscriber:function(){return dy},MiddlewareSubscriberDisconnected:function(){return oy},MiddlewareSubscriberError:function(){return sy},MissingCallbackError:function(){return ce},MissingContractAddressError:function(){return _e},MissingContractDefError:function(){return Te},MissingEventDefinitionError:function(){return Ee},MissingFunctionNameError:function(){return Ce},MissingNodeInTreeError:function(){return qe},MissingParamError:function(){return j},NAME_BID_RANGES:function(){return Fr},NAME_BID_TIMEOUT_BLOCKS:function(){return Lr},NAME_FEE_BID_INCREMENT:function(){return Ur},NAME_FEE_MULTIPLIER:function(){return $r},NAME_MAX_LENGTH_FEE:function(){return Gr},Name:function(){return Vl},NoSerializerFoundError:function(){return H},NoSuchContractFunctionError:function(){return Ae},NoWalletConnectedError:function(){return We},Node:function(){return nl},NodeError:function(){return $},NodeInvocationError:function(){return Se},NodeNotFoundError:function(){return Be},NotImplementedError:function(){return X},NotPayableFunctionError:function(){return Pe},ORACLE_TTL_TYPES:function(){return Sa},Oracle:function(){return cp},OracleClient:function(){return up},PayloadLengthError:function(){return Ue},PrefixNotFoundError:function(){return De},RPC_STATUS:function(){return kp},RequestTimedOutError:function(){return J},RpcConnectionDenyError:function(){return Fp},RpcConnectionError:function(){return Ye},RpcError:function(){return $p},RpcInternalError:function(){return jp},RpcInvalidTransactionError:function(){return Up},RpcMethodNotFoundError:function(){return Jp},RpcNoNetworkById:function(){return Hp},RpcNotAuthorizeError:function(){return Dp},RpcPermissionDenyError:function(){return Vp},RpcRejectedByUserError:function(){return Lp},RpcUnsupportedProtocolError:function(){return Gp},SUBSCRIPTION_TYPES:function(){return Rp},SchemaNotFoundError:function(){return Ve},Tag:function(){return Hr},TagNotFoundError:function(){return je},TransactionError:function(){return U},TxNotInChainError:function(){return He},TxTimedOutError:function(){return W},TypeError:function(){return Y},UnAuthorizedAccountError:function(){return ue},UnavailableAccountError:function(){return re},UnexpectedChannelMessageError:function(){return fe},UnexpectedTsError:function(){return ne},UnknownChannelStateError:function(){return ge},UnknownNodeLengthError:function(){return Re},UnknownPathNibbleError:function(){return Oe},UnknownRpcClientError:function(){return le},UnsubscribedAccountError:function(){return pe},UnsupportedPlatformError:function(){return K},UnsupportedProtocolError:function(){return Q},UnsupportedVersionError:function(){return Z},VmVersion:function(){return Vr},WALLET_TYPE:function(){return qp},WalletConnectorFrame:function(){return Sd},WalletConnectorFrameWithNode:function(){return zd},WalletError:function(){return L},_getPollInterval:function(){return ui},awaitHeight:function(){return mi},buildAuthTxHash:function(){return fp},buildAuthTxHashByGaMetaTx:function(){return yp},buildContractId:function(){return Wr},buildContractIdByContractTx:function(){return Ts},buildTx:function(){return vs},buildTxAsync:function(){return bs},buildTxHash:function(){return _s},commitmentHash:function(){return Zr},computeAuctionEndBlock:function(){return oi},computeBidFee:function(){return si},connectionProxy:function(){return fb},createGeneralizedAccount:function(){return hp},decode:function(){return vr},encode:function(){return br},encodeContractAddress:function(){return Ar},encodeUnsigned:function(){return Cr},ensureJwt:function(){return ql},ensureName:function(){return ti},formatAmount:function(){return Xe},genSalt:function(){return Tr},getAccount:function(){return fi},getBalance:function(){return yi},getContract:function(){return Si},getContractByteCode:function(){return Ci},getCurrentGeneration:function(){return gi},getDefaultPointerKey:function(){return ii},getExecutionCost:function(){return yl},getExecutionCostBySignedTx:function(){return gl},getExecutionCostUsingNode:function(){return wl},getGeneration:function(){return wi},getHeight:function(){return pi},getKeyBlock:function(){return vi},getMicroBlockHeader:function(){return bi},getMicroBlockTransactions:function(){return Ni},getMinimumNameFee:function(){return ai},getName:function(){return Ai},getTransactionSignerAddress:function(){return rl},hash:function(){return Sr},hashDomain:function(){return ul},hashJson:function(){return cl},hashTypedData:function(){return ll},isAddressValid:function(){return _r},isAuctionName:function(){return ci},isJwt:function(){return Ml},isNameValid:function(){return ni},messageToHash:function(){return Ir},oracleQueryId:function(){return Yr},packDelegation:function(){return Ll},packEntry:function(){return gs},payForTransaction:function(){return dp},poll:function(){return di},prefixedAmount:function(){return it},produceNameId:function(){return Xr},readInt:function(){return ei},resolveName:function(){return Pi},sendTransaction:function(){return Tl},signJwt:function(){return zl},spend:function(){return lp},toAe:function(){return Ze},toAettos:function(){return et},toBytes:function(){return Rr},transferFunds:function(){return pp},txDryRun:function(){return Ti},unpackDelegation:function(){return Gl},unpackEntry:function(){return ws},unpackJwt:function(){return Il},unpackTx:function(){return xs},verify:function(){return Pr},verifyJwt:function(){return Rl},verifyMessage:function(){return Mr},verifyTransaction:function(){return xl},waitForTxConfirm:function(){return hi},walletDetector:function(){return Cb}});var e={};n.r(e),n.d(e,{Encoding:function(){return ir}});var t={};n.r(t),n.d(t,{_getPollInterval:function(){return ui},awaitHeight:function(){return mi},getAccount:function(){return fi},getBalance:function(){return yi},getContract:function(){return Si},getContractByteCode:function(){return Ci},getCurrentGeneration:function(){return gi},getGeneration:function(){return wi},getHeight:function(){return pi},getKeyBlock:function(){return vi},getMicroBlockHeader:function(){return bi},getMicroBlockTransactions:function(){return Ni},getName:function(){return Ai},poll:function(){return di},resolveName:function(){return Pi},txDryRun:function(){return Ti},waitForTxConfirm:function(){return hi}});var i={};n.r(i),n.d(i,{Account:function(){return vo},AuctionEntry:function(){return Io},ByteCode:function(){return Ro},Channel:function(){return Mo},ChannelCloseMutualTx:function(){return hc},ChannelCloseSoloTx:function(){return fc},ChannelCreateTx:function(){return yc},ChannelDepositTx:function(){return gc},ChannelForceProgressTx:function(){return wc},ChannelSetDelegatesTx:function(){return Nc},ChannelSettleTx:function(){return vc},ChannelSlashTx:function(){return bc},ChannelSnapshotSoloTx:function(){return xc},ChannelWithdrawTx:function(){return _c},CheckTxInPoolResponse:function(){return Tc},CommitmentId:function(){return Cc},ContractCallObject:function(){return jo},ContractCallTx:function(){return Sc},ContractCreateTx:function(){return Ac},ContractObject:function(){return qo},CountResponse:function(){return Zo},CreateContractUnsignedTx:function(){return tu},Currency:function(){return ko},Delegates:function(){return So},DryRunAccount:function(){return Uo},DryRunCallContext:function(){return Fo},DryRunCallReq:function(){return Go},DryRunInput:function(){return $o},DryRunInputItem:function(){return Lo},DryRunResult:function(){return Vo},DryRunResults:function(){return Do},EncodedTx:function(){return lc},ErrorModel:function(){return bo},Event:function(){return Ho},GAAttachTx:function(){return Ec},GAMetaTx:function(){return zc},GAObject:function(){return mc},GasPricesItem:function(){return ac},Generation:function(){return Jo},HashResponse:function(){return Ko},Header:function(){return Yo},HeightResponse:function(){return Qo},Image:function(){return Bo},KeyBlock:function(){return Wo},MicroBlockHeader:function(){return Xo},NameClaimTx:function(){return Ic},NameEntry:function(){return ec},NameHash:function(){return Mc},NamePointer:function(){return zo},NamePreclaimTx:function(){return qc},NameRevokeTx:function(){return Rc},NameTransferTx:function(){return Oc},NameUpdateTx:function(){return kc},NextNonceResponse:function(){return xo},OffChainCallContract:function(){return Kc},OffChainDeposit:function(){return Qc},OffChainNewContract:function(){return Xc},OffChainTransfer:function(){return Zc},OffChainUpdate:function(){return Ao},OffChainWithdrawal:function(){return eu},OracleExtendTx:function(){return $c},OracleQueries:function(){return nc},OracleQuery:function(){return rc},OracleQueryTx:function(){return Uc},OracleRegisterTx:function(){return Lc},OracleRespondTx:function(){return Gc},PayingForTx:function(){return Fc},PeerConnections:function(){return cc},PeerCount:function(){return Dc},PeerCountAvailable:function(){return jc},PeerCountConnected:function(){return Vc},PeerDetails:function(){return Bc},PeerPubKey:function(){return ic},Peers:function(){return Hc},PoI:function(){return Oo},PostTxResponse:function(){return pc},Protocol:function(){return oc},PubKey:function(){return Jc},RegisteredOracle:function(){return tc},RelativeTTL:function(){return Po},SignedTx:function(){return To},SignedTxs:function(){return _o},SpendTx:function(){return Wc},Status:function(){return sc},SyncStatus:function(){return uc},TokenSupply:function(){return Yc},Ttl:function(){return Eo},Tx:function(){return Co},TxInfoObject:function(){return dc},UnsignedTx:function(){return Pc},discriminators:function(){return nu}});var a={};n.r(a),n.d(a,{payForTransaction:function(){return dp},spend:function(){return lp},transferFunds:function(){return pp}});var s={};n.r(s),n.d(s,{buildAuthTxHash:function(){return fp},buildAuthTxHashByGaMetaTx:function(){return yp},createGeneralizedAccount:function(){return hp}});var o={};n.r(o),n.d(o,{ApiVersion:function(){return Oh},ByteCodeInput:function(){return Ih},BytecodeCallResultInput:function(){return _h},Calldata:function(){return Sh},CompileOpts:function(){return wh},CompileResult:function(){return bh},CompilerError:function(){return Nh},CompilerVersion:function(){return Rh},Contract:function(){return gh},DecodeCalldataBytecode:function(){return Ah},DecodeCalldataSource:function(){return zh},DecodedCalldata:function(){return Ph},DecodedCallresult:function(){return Th},ErrorModel:function(){return Eh},ErrorPos:function(){return vh},FateAssembler:function(){return Mh},FunctionCallInput:function(){return Ch},SophiaBinaryData:function(){return kh},SophiaCallResultInput:function(){return xh},SophiaJsonData:function(){return Bh},ValidateByteCodeInput:function(){return qh}});var c={};n.r(c),n.d(c,{appendSignature:function(){return Af},awaitingChannelCreateTx:function(){return Rf},awaitingCompletion:function(){return zf},awaitingConnection:function(){return If},awaitingLeave:function(){return Lf},awaitingOnChainTx:function(){return Of},awaitingReconnection:function(){return qf},awaitingReestablish:function(){return Mf},awaitingShutdownTx:function(){return Uf},channelClosed:function(){return Gf},channelOpen:function(){return Bf},handleUnexpectedMessage:function(){return Ef},signAndNotify:function(){return Pf}});var u={};n.r(u),n.d(u,{Activity:function(){return dg},ActivityPayload:function(){return mg},Aex141Response:function(){return jg},Aex141TemplateTokensResponse:function(){return Yg},Aex141TemplatesResponse:function(){return Jg},Aex141TokenResponse:function(){return rg},Aex141TransferEvent:function(){return Zg},Aex9BalanceResponse:function(){return og},Aex9ContractBalanceResponse:function(){return iw},Aex9Response:function(){return tw},Aex9TransferEvent:function(){return hN},Aex9TransferResponse:function(){return fN},Auction:function(){return Cw},AuctionLastBid:function(){return Sw},Channel:function(){return uw},Contract:function(){return hw},ContractCall:function(){return pw},ContractLog:function(){return mw},DeltaStat:function(){return nN},DexSwap:function(){return ug},DexSwapAmounts:function(){return lg},ErrorResponse:function(){return ag},Get200ApplicationJsonAllOfPropertiesItemsItem:function(){return ow},Get200ApplicationJsonProperties:function(){return wg},InternalContractCallEvent:function(){return yN},InternalTransferEvent:function(){return gN},KeyBlock:function(){return ww},MicroBlock:function(){return vw},Miner:function(){return iN},Name:function(){return Tw},NameClaim:function(){return Mw},NameClaimEvent:function(){return wN},NameOwnership:function(){return Aw},NameTransfer:function(){return Ow},NameTx:function(){return Pw},NameTxTx:function(){return Ew},NameUpdate:function(){return Bw},NotFoundResponse:function(){return yg},Oracle:function(){return Uw},OracleExtend:function(){return jw},OracleExtendTx:function(){return Hw},OracleExtendTxOracleTtl:function(){return Jw},OracleFormat:function(){return Lw},OracleQuery:function(){return Yw},OracleResponse:function(){return Kw},OracleTx:function(){return Gw},OracleTxOracleTtl:function(){return Dw},OracleTxTx:function(){return Fw},PaginatedResponse:function(){return ig},Paths107D9HzV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx:function(){return $g},Paths108B3VtV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchemaAllof1:function(){return sw},Paths10Kk1UxV3ContractsLogsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return dw},Paths10OmbqhV3MinerstatsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return rN},Paths10T1AqyV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx:function(){return Ag},Paths1159W94V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchema:function(){return $N},Paths12S1Nd4V3NamesGetResponses200ContentApplicationJsonSchema:function(){return LN},Paths139X1XaV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx:function(){return Rg},Paths13Ss1Q2V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx:function(){return Tg},Paths150Ou6YV3StatisticsTransactionsGetResponses200ContentApplicationJsonSchema:function(){return ev},Paths15Bkk50V3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchema:function(){return UN},Paths15Mi2TaV3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchema:function(){return SN},Paths16B89KuV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx:function(){return Fg},Paths181AjwxV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchema:function(){return CN},Paths181Cs9V3NamesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return _w},Paths184Oz8CV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx:function(){return Lg},Paths18L84JcV3ContractsCallsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return lw},Paths19IxhsmV3Aex9CountGetResponses200ContentApplicationJsonSchema:function(){return nw},Paths1A8Ah39V3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Xg},Paths1Ceolv9V3AccountsAccountIdDexSwapsGetResponses200ContentApplicationJsonSchema:function(){return bN},Paths1Cnk4LbV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx:function(){return _g},Paths1Di8FnjV3DexSwapsGetResponses200ContentApplicationJsonSchema:function(){return ON},Paths1E14NekV3OraclesGetResponses200ContentApplicationJsonSchema:function(){return jN},Paths1Ec8CltV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchema:function(){return VN},Paths1Ent1R1V3AccountsIdActivitiesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return pg},Paths1F98AqgV3NamesIdClaimsGetResponses200ContentApplicationJsonSchema:function(){return FN},Paths1Fbvaw8V3Aex141ContractidTokensTokenidGetResponses200ContentApplicationJsonSchema:function(){return Qg},Paths1Gc4HwtV3AccountsIdNamesPointeesGetResponses200ContentApplicationJsonSchema:function(){return _N},Paths1Gime4MV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx:function(){return Cg},Paths1Hacjy0V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx:function(){return qg},Paths1L5C64RV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchema:function(){return HN},Paths1Ljyzq7V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx:function(){return Dg},Paths1N61UurV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchema:function(){return zN},Paths1O7Q6IhV3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchema:function(){return PN},Paths1Opead5V3AccountsIdActivitiesGetResponses200ContentApplicationJsonSchema:function(){return xN},Paths1Pymq07V3TransactionsGetResponses200ContentApplicationJsonSchema:function(){return tv},Paths1Q9E32FV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return ng},Paths1R08F8HV3NamesAuctionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return zw},Paths1R3Fb8MV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx:function(){return Og},Paths1Raw8PV3NamesIdTransfersGetResponses200ContentApplicationJsonSchema:function(){return DN},Paths1RkuxepV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx:function(){return Ig},Paths1Syc8AnV3StatisticsTransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return cN},Paths1Tcj5A9V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Qw},Paths1TkisghV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Kg},Paths1Txblx8V3ContractsCallsGetResponses200ContentApplicationJsonSchema:function(){return qN},Paths1Ukwk06V3NamesIdTransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Rw},Paths1Uni7AtV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Ww},Paths1Uqqby0V3Aex9GetResponses200ContentApplicationJsonSchemaAllof0:function(){return ew},Paths1Uybd4PV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchema:function(){return IN},Paths1VkyqhtV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx:function(){return Bg},Paths1Vms155V3TotalstatsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return sN},Paths1Vr3Y2EV3Aex9GetResponses200ContentApplicationJsonSchema:function(){return EN},Paths1W3C1Z4V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx:function(){return vg},Paths1XwlyjtV3Aex141GetResponses200ContentApplicationJsonSchema:function(){return TN},Paths1Ymnu9GV3AccountsAccountIdDexSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return cg},Paths277OngV3KeyBlocksGetResponses200ContentApplicationJsonSchema:function(){return BN},Paths3EzhapV3ChannelsGetResponses200ContentApplicationJsonSchema:function(){return MN},Paths3Hsv3GV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchema:function(){return NN},Paths5Shu25V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesContractCreateTx:function(){return zg},Paths6Vze8ZV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return yw},Paths7A1M6RV3ContractsLogsGetResponses200ContentApplicationJsonSchema:function(){return RN},Paths8722JhV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchema:function(){return JN},Paths8I0YgwV3Aex141GetResponses200ContentApplicationJsonSchemaAllof0:function(){return Vg},Paths9Yfxl2V3DexSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return fw},PathsA7P0KiV3TransfersGetResponses200ContentApplicationJsonSchema:function(){return nv},PathsAc89GqV3StatisticsNamesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return aN},PathsC0UvfgV3AccountsIdNamesPointeesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return hg},PathsChduayV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx:function(){return Eg},PathsCrb9BgV3NamesAuctionsIdClaimsGetResponses200ContentApplicationJsonSchema:function(){return Iw},PathsD2HmjxV3StatisticsNamesGetResponses200ContentApplicationJsonSchema:function(){return XN},PathsEeiffwV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return rw},PathsEue6HzV3KeyBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return gw},PathsFrvc1LV3TotalstatsGetResponses200ContentApplicationJsonSchema:function(){return ZN},PathsGcr9MrV3OraclesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return $w},PathsHa9C78V3TransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return pN},PathsJd68YV3StatisticsBlocksGetResponses200ContentApplicationJsonSchema:function(){return YN},PathsKcpsuzV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx:function(){return Ng},PathsKjq4D4V3NamesAuctionsGetResponses200ContentApplicationJsonSchema:function(){return GN},PathsKm52GqV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchema:function(){return vN},PathsKr825V3Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema:function(){return aw},PathsKwxlzlV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchema:function(){return kN},PathsLm5DjtV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx:function(){return Gg},PathsLv15NfV3TransactionsCountIdGetResponses200ContentApplicationJsonSchema:function(){return gg},PathsMxcme6V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx:function(){return xg},PathsMyl4W2V3NamesIdClaimsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return qw},PathsNn60D7V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Nw},PathsQklaaxV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx:function(){return Mg},PathsQmewnaV3ChannelsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return cw},PathsQtodvgV3DeltastatsGetResponses200ContentApplicationJsonSchema:function(){return KN},PathsRay4X0V3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Wg},PathsRcnvllV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return kw},PathsS6Nx2KV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx:function(){return Ug},PathsTr523PV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx:function(){return Pg},PathsTvtzmvV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx:function(){return bg},PathsV2Gh3TV3StatisticsBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Zw},PathsVdg67V3TransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return dN},PathsVn5L1LV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx:function(){return Sg},PathsVron83V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchema:function(){return WN},PathsWkpcwaV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Hg},PathsWl652MV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchema:function(){return AN},PathsXhlqwrV3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return bw},PathsYpljbvV3DeltastatsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return tN},PathsZ2B507V3MinerstatsGetResponses200ContentApplicationJsonSchema:function(){return QN},PathsZ4L2QlV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Vw},PathsZ92TkfV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchemaAllof1:function(){return sg},PathsZdcclfV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx:function(){return kg},Pointee:function(){return fg},Stat:function(){return eN},Stats:function(){return Xw},Status:function(){return uN},StatusMdwAsyncTasks:function(){return lN},TotalStat:function(){return oN},Transaction:function(){return xw},Transfer:function(){return mN}});var l=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,p=Math.ceil,d=Math.floor,m="[BigNumber Error] ",h=m+"Number primitive has more than 15 significant digits: ",f=1e14,y=14,g=9007199254740991,w=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],N=1e7,v=1e9;function b(e){var t=0|e;return e>0||e===t?t:t-1}function x(e){for(var t,n,r=1,i=e.length,a=e[0]+"";r<i;){for(t=e[r++]+"",n=y-t.length;n--;t="0"+t);a+=t}for(i=a.length;48===a.charCodeAt(--i););return a.slice(0,i+1||1)}function _(e,t){var n,r,i=e.c,a=t.c,s=e.s,o=t.s,c=e.e,u=t.e;if(!s||!o)return null;if(n=i&&!i[0],r=a&&!a[0],n||r)return n?r?0:-o:s;if(s!=o)return s;if(n=s<0,r=c==u,!i||!a)return r?0:!i^n?1:-1;if(!r)return c>u^n?1:-1;for(o=(c=i.length)<(u=a.length)?c:u,s=0;s<o;s++)if(i[s]!=a[s])return i[s]>a[s]^n?1:-1;return c==u?0:c>u^n?1:-1}function T(e,t,n,r){if(e<t||e>n||e!==d(e))throw Error(m+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function C(e){var t=e.c.length-1;return b(e.e/y)==t&&e.c[t]%2!=0}function S(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function A(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var P=function e(t){var n,r,i,a,s,o,c,u,P,E,z=V.prototype={constructor:V,toString:null,valueOf:null},I=new V(1),M=20,q=4,R=-7,O=21,k=-1e7,B=1e7,$=!1,U=1,L=0,G={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},F="0123456789abcdefghijklmnopqrstuvwxyz",D=!0;function V(e,t){var n,a,s,o,c,u,p,m,f=this;if(!(f instanceof V))return new V(e,t);if(null==t){if(e&&!0===e._isBigNumber)return f.s=e.s,void(!e.c||e.e>B?f.c=f.e=null:e.e<k?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(o=0,c=e;c>=10;c/=10,o++);return void(o>B?f.c=f.e=null:(f.e=o,f.c=[e]))}m=String(e)}else{if(!l.test(m=String(e)))return i(f,m,u);f.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(o=m.indexOf("."))>-1&&(m=m.replace(".","")),(c=m.search(/e/i))>0?(o<0&&(o=c),o+=+m.slice(c+1),m=m.substring(0,c)):o<0&&(o=m.length)}else{if(T(t,2,F.length,"Base"),10==t&&D)return W(f=new V(e),M+f.e+1,q);if(m=String(e),u="number"==typeof e){if(0*e!=0)return i(f,m,u,t);if(f.s=1/e<0?(m=m.slice(1),-1):1,V.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(h+e)}else f.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(n=F.slice(0,t),o=c=0,p=m.length;c<p;c++)if(n.indexOf(a=m.charAt(c))<0){if("."==a){if(c>o){o=p;continue}}else if(!s&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){s=!0,c=-1,o=0;continue}return i(f,String(e),u,t)}u=!1,(o=(m=r(m,t,10,f.s)).indexOf("."))>-1?m=m.replace(".",""):o=m.length}for(c=0;48===m.charCodeAt(c);c++);for(p=m.length;48===m.charCodeAt(--p););if(m=m.slice(c,++p)){if(p-=c,u&&V.DEBUG&&p>15&&(e>g||e!==d(e)))throw Error(h+f.s*e);if((o=o-c-1)>B)f.c=f.e=null;else if(o<k)f.c=[f.e=0];else{if(f.e=o,f.c=[],c=(o+1)%y,o<0&&(c+=y),c<p){for(c&&f.c.push(+m.slice(0,c)),p-=y;c<p;)f.c.push(+m.slice(c,c+=y));c=y-(m=m.slice(c)).length}else c-=p;for(;c--;m+="0");f.c.push(+m)}}else f.c=[f.e=0]}function j(e,t,n,r){var i,a,s,o,c;if(null==n?n=q:T(n,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)c=x(e.c),c=1==r||2==r&&(s<=R||s>=O)?S(c,s):A(c,s,"0");else if(a=(e=W(new V(e),t,n)).e,o=(c=x(e.c)).length,1==r||2==r&&(t<=a||a<=R)){for(;o<t;c+="0",o++);c=S(c,a)}else if(t-=s,c=A(c,a,"0"),a+1>o){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=a-o)>0)for(a+1==o&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function H(e,t){for(var n,r,i=1,a=new V(e[0]);i<e.length;i++)(!(r=new V(e[i])).s||(n=_(a,r))===t||0===n&&a.s===t)&&(a=r);return a}function J(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*y-1)>B?e.c=e.e=null:n<k?e.c=[e.e=0]:(e.e=n,e.c=t),e}function W(e,t,n,r){var i,a,s,o,c,u,l,m=e.c,h=w;if(m){e:{for(i=1,o=m[0];o>=10;o/=10,i++);if((a=t-i)<0)a+=y,s=t,c=m[u=0],l=d(c/h[i-s-1]%10);else if((u=p((a+1)/y))>=m.length){if(!r)break e;for(;m.length<=u;m.push(0));c=l=0,i=1,s=(a%=y)-y+1}else{for(c=o=m[u],i=1;o>=10;o/=10,i++);l=(s=(a%=y)-y+i)<0?0:d(c/h[i-s-1]%10)}if(r=r||t<0||null!=m[u+1]||(s<0?c:c%h[i-s-1]),r=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(a>0?s>0?c/h[i-s]:0:m[u-1])%10&1||n==(e.s<0?8:7)),t<1||!m[0])return m.length=0,r?(t-=e.e+1,m[0]=h[(y-t%y)%y],e.e=-t||0):m[0]=e.e=0,e;if(0==a?(m.length=u,o=1,u--):(m.length=u+1,o=h[y-a],m[u]=s>0?d(c/h[i-s]%h[s])*o:0),r)for(;;){if(0==u){for(a=1,s=m[0];s>=10;s/=10,a++);for(s=m[0]+=o,o=1;s>=10;s/=10,o++);a!=o&&(e.e++,m[0]==f&&(m[0]=1));break}if(m[u]+=o,m[u]!=f)break;m[u--]=0,o=1}for(a=m.length;0===m[--a];m.pop());}e.e>B?e.c=e.e=null:e.e<k&&(e.c=[e.e=0])}return e}function Y(e){var t,n=e.e;return null===n?e.toString():(t=x(e.c),t=n<=R||n>=O?S(t,n):A(t,n,"0"),e.s<0?"-"+t:t)}return V.clone=e,V.ROUND_UP=0,V.ROUND_DOWN=1,V.ROUND_CEIL=2,V.ROUND_FLOOR=3,V.ROUND_HALF_UP=4,V.ROUND_HALF_DOWN=5,V.ROUND_HALF_EVEN=6,V.ROUND_HALF_CEIL=7,V.ROUND_HALF_FLOOR=8,V.EUCLID=9,V.config=V.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(m+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(T(n=e[t],0,v,t),M=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(T(n=e[t],0,8,t),q=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(T(n[0],-v,0,t),T(n[1],0,v,t),R=n[0],O=n[1]):(T(n,-v,v,t),R=-(O=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)T(n[0],-v,-1,t),T(n[1],1,v,t),k=n[0],B=n[1];else{if(T(n,-v,v,t),!n)throw Error(m+t+" cannot be zero: "+n);k=-(B=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(m+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw $=!n,Error(m+"crypto unavailable");$=n}else $=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(T(n=e[t],0,9,t),U=n),e.hasOwnProperty(t="POW_PRECISION")&&(T(n=e[t],0,v,t),L=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(m+t+" not an object: "+n);G=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(m+t+" invalid: "+n);D="0123456789"==n.slice(0,10),F=n}}return{DECIMAL_PLACES:M,ROUNDING_MODE:q,EXPONENTIAL_AT:[R,O],RANGE:[k,B],CRYPTO:$,MODULO_MODE:U,POW_PRECISION:L,FORMAT:G,ALPHABET:F}},V.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!V.DEBUG)return!0;var t,n,r=e.c,i=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===a||-1===a)&&i>=-v&&i<=v&&i===d(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break e}if((t=(i+1)%y)<1&&(t+=y),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=f||n!==d(n))break e;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===a||1===a||-1===a))return!0;throw Error(m+"Invalid BigNumber: "+e)},V.maximum=V.max=function(){return H(arguments,-1)},V.minimum=V.min=function(){return H(arguments,1)},V.random=(a=9007199254740992,s=Math.random()*a&2097151?function(){return d(Math.random()*a)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,i,a,o=0,c=[],u=new V(I);if(null==e?e=M:T(e,0,v),i=p(e/y),$)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));o<i;)(a=131072*t[o]+(t[o+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[o]=n[0],t[o+1]=n[1]):(c.push(a%1e14),o+=2);o=i/2}else{if(!crypto.randomBytes)throw $=!1,Error(m+"crypto unavailable");for(t=crypto.randomBytes(i*=7);o<i;)(a=281474976710656*(31&t[o])+1099511627776*t[o+1]+4294967296*t[o+2]+16777216*t[o+3]+(t[o+4]<<16)+(t[o+5]<<8)+t[o+6])>=9e15?crypto.randomBytes(7).copy(t,o):(c.push(a%1e14),o+=7);o=i/7}if(!$)for(;o<i;)(a=s())<9e15&&(c[o++]=a%1e14);for(i=c[--o],e%=y,i&&e&&(a=w[y-e],c[o]=d(i/a)*a);0===c[o];c.pop(),o--);if(o<0)c=[r=0];else{for(r=-1;0===c[0];c.splice(0,1),r-=y);for(o=1,a=c[0];a>=10;a/=10,o++);o<y&&(r-=y-o)}return u.e=r,u.c=c,u}),V.sum=function(){for(var e=1,t=arguments,n=new V(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){var e="0123456789";function t(e,t,n,r){for(var i,a,s=[0],o=0,c=e.length;o<c;){for(a=s.length;a--;s[a]*=t);for(s[0]+=r.indexOf(e.charAt(o++)),i=0;i<s.length;i++)s[i]>n-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/n|0,s[i]%=n)}return s.reverse()}return function(r,i,a,s,o){var c,u,l,p,d,m,h,f,y=r.indexOf("."),g=M,w=q;for(y>=0&&(p=L,L=0,r=r.replace(".",""),m=(f=new V(i)).pow(r.length-y),L=p,f.c=t(A(x(m.c),m.e,"0"),10,a,e),f.e=f.c.length),l=p=(h=t(r,i,a,o?(c=F,e):(c=e,F))).length;0==h[--p];h.pop());if(!h[0])return c.charAt(0);if(y<0?--l:(m.c=h,m.e=l,m.s=s,h=(m=n(m,f,g,w,a)).c,d=m.r,l=m.e),y=h[u=l+g+1],p=a/2,d=d||u<0||null!=h[u+1],d=w<4?(null!=y||d)&&(0==w||w==(m.s<0?3:2)):y>p||y==p&&(4==w||d||6==w&&1&h[u-1]||w==(m.s<0?8:7)),u<1||!h[0])r=d?A(c.charAt(1),-g,c.charAt(0)):c.charAt(0);else{if(h.length=u,d)for(--a;++h[--u]>a;)h[u]=0,u||(++l,h=[1].concat(h));for(p=h.length;!h[--p];);for(y=0,r="";y<=p;r+=c.charAt(h[y++]));r=A(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,a,s,o=0,c=e.length,u=t%N,l=t/N|0;for(e=e.slice();c--;)o=((i=u*(a=e[c]%N)+(r=l*a+(s=e[c]/N|0)*u)%N*N+o)/n|0)+(r/N|0)+l*s,e[c]=i%n;return o&&(e=[o].concat(e)),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,a,s,o){var c,u,l,p,m,h,g,w,N,v,x,_,T,C,S,A,P,E=r.s==i.s?1:-1,z=r.c,I=i.c;if(!(z&&z[0]&&I&&I[0]))return new V(r.s&&i.s&&(z?!I||z[0]!=I[0]:I)?z&&0==z[0]||!I?0*E:E/0:NaN);for(N=(w=new V(E)).c=[],E=a+(u=r.e-i.e)+1,o||(o=f,u=b(r.e/y)-b(i.e/y),E=E/y|0),l=0;I[l]==(z[l]||0);l++);if(I[l]>(z[l]||0)&&u--,E<0)N.push(1),p=!0;else{for(C=z.length,A=I.length,l=0,E+=2,(m=d(o/(I[0]+1)))>1&&(I=e(I,m,o),z=e(z,m,o),A=I.length,C=z.length),T=A,x=(v=z.slice(0,A)).length;x<A;v[x++]=0);P=I.slice(),P=[0].concat(P),S=I[0],I[1]>=o/2&&S++;do{if(m=0,(c=t(I,v,A,x))<0){if(_=v[0],A!=x&&(_=_*o+(v[1]||0)),(m=d(_/S))>1)for(m>=o&&(m=o-1),g=(h=e(I,m,o)).length,x=v.length;1==t(h,v,g,x);)m--,n(h,A<g?P:I,g,o),g=h.length,c=1;else 0==m&&(c=m=1),g=(h=I.slice()).length;if(g<x&&(h=[0].concat(h)),n(v,h,x,o),x=v.length,-1==c)for(;t(I,v,A,x)<1;)m++,n(v,A<x?P:I,x,o),x=v.length}else 0===c&&(m++,v=[0]);N[l++]=m,v[0]?v[x++]=z[T]||0:(v=[z[T]],x=1)}while((T++<C||null!=v[0])&&E--);p=null!=v[0],N[0]||N.splice(0,1)}if(o==f){for(l=1,E=N[0];E>=10;E/=10,l++);W(w,a+(w.e=l+u*y-1)+1,s,p)}else w.e=u,w.r=+p;return w}}(),o=/^(-?)0([xbo])(?=\w[\w.]*$)/i,c=/^([^.]+)\.$/,u=/^\.([^.]+)$/,P=/^-?(Infinity|NaN)$/,E=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,n,r){var i,a=n?t:t.replace(E,"");if(P.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(o,(function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t})),r&&(i=r,a=a.replace(c,"$1").replace(u,"0.$1")),t!=a))return new V(a,i);if(V.DEBUG)throw Error(m+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},z.absoluteValue=z.abs=function(){var e=new V(this);return e.s<0&&(e.s=1),e},z.comparedTo=function(e,t){return _(this,new V(e,t))},z.decimalPlaces=z.dp=function(e,t){var n,r,i,a=this;if(null!=e)return T(e,0,v),null==t?t=q:T(t,0,8),W(new V(a),e+a.e+1,t);if(!(n=a.c))return null;if(r=((i=n.length-1)-b(this.e/y))*y,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},z.dividedBy=z.div=function(e,t){return n(this,new V(e,t),M,q)},z.dividedToIntegerBy=z.idiv=function(e,t){return n(this,new V(e,t),0,1)},z.exponentiatedBy=z.pow=function(e,t){var n,r,i,a,s,o,c,u,l=this;if((e=new V(e)).c&&!e.isInteger())throw Error(m+"Exponent not an integer: "+Y(e));if(null!=t&&(t=new V(t)),s=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 V(Math.pow(+Y(l),s?e.s*(2-C(e)):+Y(e))),t?u.mod(t):u;if(o=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new V(NaN);(r=!o&&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||s&&l.c[1]>=24e7:l.c[0]<8e13||s&&l.c[0]<=9999975e7)))return a=l.s<0&&C(e)?-0:0,l.e>-1&&(a=1/a),new V(o?1/a:a);L&&(a=p(L/y+2))}for(s?(n=new V(.5),o&&(e.s=1),c=C(e)):c=(i=Math.abs(+Y(e)))%2,u=new V(I);;){if(c){if(!(u=u.times(l)).c)break;a?u.c.length>a&&(u.c.length=a):r&&(u=u.mod(t))}if(i){if(0===(i=d(i/2)))break;c=i%2}else if(W(e=e.times(n),e.e+1,1),e.e>14)c=C(e);else{if(0==(i=+Y(e)))break;c=i%2}l=l.times(l),a?l.c&&l.c.length>a&&(l.c.length=a):r&&(l=l.mod(t))}return r?u:(o&&(u=I.div(u)),t?u.mod(t):a?W(u,L,q,void 0):u)},z.integerValue=function(e){var t=new V(this);return null==e?e=q:T(e,0,8),W(t,t.e+1,e)},z.isEqualTo=z.eq=function(e,t){return 0===_(this,new V(e,t))},z.isFinite=function(){return!!this.c},z.isGreaterThan=z.gt=function(e,t){return _(this,new V(e,t))>0},z.isGreaterThanOrEqualTo=z.gte=function(e,t){return 1===(t=_(this,new V(e,t)))||0===t},z.isInteger=function(){return!!this.c&&b(this.e/y)>this.c.length-2},z.isLessThan=z.lt=function(e,t){return _(this,new V(e,t))<0},z.isLessThanOrEqualTo=z.lte=function(e,t){return-1===(t=_(this,new V(e,t)))||0===t},z.isNaN=function(){return!this.s},z.isNegative=function(){return this.s<0},z.isPositive=function(){return this.s>0},z.isZero=function(){return!!this.c&&0==this.c[0]},z.minus=function(e,t){var n,r,i,a,s=this,o=s.s;if(t=(e=new V(e,t)).s,!o||!t)return new V(NaN);if(o!=t)return e.s=-t,s.plus(e);var c=s.e/y,u=e.e/y,l=s.c,p=e.c;if(!c||!u){if(!l||!p)return l?(e.s=-t,e):new V(p?s:NaN);if(!l[0]||!p[0])return p[0]?(e.s=-t,e):new V(l[0]?s:3==q?-0:0)}if(c=b(c),u=b(u),l=l.slice(),o=c-u){for((a=o<0)?(o=-o,i=l):(u=c,i=p),i.reverse(),t=o;t--;i.push(0));i.reverse()}else for(r=(a=(o=l.length)<(t=p.length))?o:t,o=t=0;t<r;t++)if(l[t]!=p[t]){a=l[t]<p[t];break}if(a&&(i=l,l=p,p=i,e.s=-e.s),(t=(r=p.length)-(n=l.length))>0)for(;t--;l[n++]=0);for(t=f-1;r>o;){if(l[--r]<p[r]){for(n=r;n&&!l[--n];l[n]=t);--l[n],l[r]+=f}l[r]-=p[r]}for(;0==l[0];l.splice(0,1),--u);return l[0]?J(e,l,u):(e.s=3==q?-1:1,e.c=[e.e=0],e)},z.modulo=z.mod=function(e,t){var r,i,a=this;return e=new V(e,t),!a.c||!e.s||e.c&&!e.c[0]?new V(NaN):!e.c||a.c&&!a.c[0]?new V(a):(9==U?(i=e.s,e.s=1,r=n(a,e,0,3),e.s=i,r.s*=i):r=n(a,e,0,U),(e=a.minus(r.times(e))).c[0]||1!=U||(e.s=a.s),e)},z.multipliedBy=z.times=function(e,t){var n,r,i,a,s,o,c,u,l,p,d,m,h,g,w,v=this,x=v.c,_=(e=new V(e,t)).c;if(!(x&&_&&x[0]&&_[0]))return!v.s||!e.s||x&&!x[0]&&!_||_&&!_[0]&&!x?e.c=e.e=e.s=null:(e.s*=v.s,x&&_?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=b(v.e/y)+b(e.e/y),e.s*=v.s,(c=x.length)<(p=_.length)&&(h=x,x=_,_=h,i=c,c=p,p=i),i=c+p,h=[];i--;h.push(0));for(g=f,w=N,i=p;--i>=0;){for(n=0,d=_[i]%w,m=_[i]/w|0,a=i+(s=c);a>i;)n=((u=d*(u=x[--s]%w)+(o=m*u+(l=x[s]/w|0)*d)%w*w+h[a]+n)/g|0)+(o/w|0)+m*l,h[a--]=u%g;h[a]=n}return n?++r:h.splice(0,1),J(e,h,r)},z.negated=function(){var e=new V(this);return e.s=-e.s||null,e},z.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new V(e,t)).s,!i||!t)return new V(NaN);if(i!=t)return e.s=-t,r.minus(e);var a=r.e/y,s=e.e/y,o=r.c,c=e.c;if(!a||!s){if(!o||!c)return new V(i/0);if(!o[0]||!c[0])return c[0]?e:new V(o[0]?r:0*i)}if(a=b(a),s=b(s),o=o.slice(),i=a-s){for(i>0?(s=a,n=c):(i=-i,n=o),n.reverse();i--;n.push(0));n.reverse()}for((i=o.length)-(t=c.length)<0&&(n=c,c=o,o=n,t=i),i=0;t;)i=(o[--t]=o[t]+c[t]+i)/f|0,o[t]=f===o[t]?0:o[t]%f;return i&&(o=[i].concat(o),++s),J(e,o,s)},z.precision=z.sd=function(e,t){var n,r,i,a=this;if(null!=e&&e!==!!e)return T(e,1,v),null==t?t=q:T(t,0,8),W(new V(a),e,t);if(!(n=a.c))return null;if(r=(i=n.length-1)*y+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return e&&a.e+1>r&&(r=a.e+1),r},z.shiftedBy=function(e){return T(e,-9007199254740991,g),this.times("1e"+e)},z.squareRoot=z.sqrt=function(){var e,t,r,i,a,s=this,o=s.c,c=s.s,u=s.e,l=M+4,p=new V("0.5");if(1!==c||!o||!o[0])return new V(!c||c<0&&(!o||o[0])?NaN:o?s:1/0);if(0==(c=Math.sqrt(+Y(s)))||c==1/0?(((t=x(o)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=b((u+1)/2)-(u<0||u%2),r=new V(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new V(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(a=r,r=p.times(a.plus(n(s,a,l,1))),x(a.c).slice(0,c)===(t=x(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(W(r,r.e+M+2,1),e=!r.times(r).eq(s));break}if(!i&&(W(a,a.e+M+2,0),a.times(a).eq(s))){r=a;break}l+=4,c+=4,i=1}return W(r,r.e+M+1,q,e)},z.toExponential=function(e,t){return null!=e&&(T(e,0,v),e++),j(this,e,t,1)},z.toFixed=function(e,t){return null!=e&&(T(e,0,v),e=e+this.e+1),j(this,e,t)},z.toFormat=function(e,t,n){var r,i=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=G;else if("object"!=typeof n)throw Error(m+"Argument not an object: "+n);if(r=i.toFixed(e,t),i.c){var a,s=r.split("."),o=+n.groupSize,c=+n.secondaryGroupSize,u=n.groupSeparator||"",l=s[0],p=s[1],d=i.s<0,h=d?l.slice(1):l,f=h.length;if(c&&(a=o,o=c,c=a,f-=a),o>0&&f>0){for(a=f%o||o,l=h.substr(0,a);a<f;a+=o)l+=u+h.substr(a,o);c>0&&(l+=u+h.slice(a)),d&&(l="-"+l)}r=p?l+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?p.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):p):l}return(n.prefix||"")+r+(n.suffix||"")},z.toFraction=function(e){var t,r,i,a,s,o,c,u,l,p,d,h,f=this,g=f.c;if(null!=e&&(!(c=new V(e)).isInteger()&&(c.c||1!==c.s)||c.lt(I)))throw Error(m+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+Y(c));if(!g)return new V(f);for(t=new V(I),l=r=new V(I),i=u=new V(I),h=x(g),s=t.e=h.length-f.e-1,t.c[0]=w[(o=s%y)<0?y+o:o],e=!e||c.comparedTo(t)>0?s>0?t:l:c,o=B,B=1/0,c=new V(h),u.c[0]=0;p=n(c,t,0,1),1!=(a=r.plus(p.times(i))).comparedTo(e);)r=i,i=a,l=u.plus(p.times(a=l)),u=a,t=c.minus(p.times(a=t)),c=a;return a=n(e.minus(r),i,0,1),u=u.plus(a.times(l)),r=r.plus(a.times(i)),u.s=l.s=f.s,d=n(l,i,s*=2,q).minus(f).abs().comparedTo(n(u,r,s,q).minus(f).abs())<1?[l,i]:[u,r],B=o,d},z.toNumber=function(){return+Y(this)},z.toPrecision=function(e,t){return null!=e&&T(e,1,v),j(this,e,t,2)},z.toString=function(e){var t,n=this,i=n.s,a=n.e;return null===a?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=a<=R||a>=O?S(x(n.c),a):A(x(n.c),a,"0"):10===e&&D?t=A(x((n=W(new V(n),M+a+1,q)).c),n.e,"0"):(T(e,2,F.length,"Base"),t=r(A(x(n.c),a,"0"),10,e,i,!0)),i<0&&n.c[0]&&(t="-"+t)),t},z.valueOf=z.toJSON=function(){return Y(this)},z._isBigNumber=!0,z[Symbol.toStringTag]="BigNumber",z[Symbol.for("nodejs.util.inspect.custom")]=z.valueOf,null!=t&&V.set(t),V}();const E=e=>e.integerValue(P.ROUND_CEIL);class z extends Error{constructor(e){super(e),this.name="BaseError"}}class I extends z{constructor(e){super(e),this.name="AccountError"}}class M extends z{constructor(e){super(e),this.name="AensError"}}class q extends z{constructor(e){super(e),this.name="AeppError"}}class R extends z{constructor(e){super(e),this.name="ChannelError"}}class O extends z{constructor(e){super(e),this.name="CompilerError"}}class k extends z{constructor(e){super(e),this.name="ContractError"}}class B extends z{constructor(e){super(e),this.name="CryptographyError"}}class $ extends z{constructor(e){super(e),this.name="NodeError"}}class U extends z{constructor(e){super(e),this.name="TransactionError"}}class L extends z{constructor(e){super(e),this.name="WalletError"}}class G extends z{constructor(e,t,n){super(`${e} should be ${t}, got ${n} instead`),this.name="ArgumentError"}}class F extends B{constructor(e){super(e),this.name="IllegalArgumentError"}}class D extends z{constructor(e,t,n){super(`${e} expects ${t} arguments, got ${n} instead`),this.name="ArgumentCountMismatchError"}}class V extends z{constructor(e){super(e),this.name="InsufficientBalanceError"}}class j extends z{constructor(e){super(e),this.name="MissingParamError"}}class H extends z{constructor(){super("Byte serialization not supported"),this.name="NoSerializerFoundError"}}class J extends z{constructor(e){super(`Giving up at height ${e}`),this.name="RequestTimedOutError"}}class W extends z{constructor(e,t){super(`Giving up after ${e} blocks mined, transaction hash: ${t}`),this.name="TxTimedOutError"}}class Y extends z{constructor(e){super(e),this.name="TypeError"}}class K extends z{constructor(e){super(e),this.name="UnsupportedPlatformError"}}class Q extends z{constructor(e){super(e),this.name="UnsupportedProtocolError"}}class X extends z{constructor(e){super(e),this.name="NotImplementedError"}}class Z extends z{constructor(e,t,n,r){super(`Unsupported ${e} version ${t}. Supported: >= ${n}`+(null==r?"":` < ${r}`)),this.name="UnsupportedVersionError"}}class ee extends z{constructor(e){super(e),this.name="LogicError"}}class te extends z{constructor(e){super(e),this.name="InternalError"}}class ne extends te{constructor(e="Expected to not happen, required for TS"){super(e),this.name="UnexpectedTsError"}}class re extends I{constructor(e){super(`Account for ${e} not available`),this.name="UnavailableAccountError"}}class ie extends M{constructor(e,t){super(`Name ${e} don't have pointers for ${t}`),this.name="AensPointerContextError"}}class ae extends M{constructor(e,t){super(`the provided fee ${e.toString()} is not enough to execute the claim, required: ${t.toString()}`),this.name="InsufficientNameFeeError"}}class se extends M{constructor(e){super(e),this.name="InvalidAensNameError"}}class oe extends q{constructor(e){super(`Received invalid message: ${e}`),this.name="InvalidRpcMessageError"}}class ce extends q{constructor(e){super(`Can't find callback for this messageId ${e}`),this.name="MissingCallbackError"}}class ue extends q{constructor(e){super(`You do not have access to account ${e}`),this.name="UnAuthorizedAccountError"}}class le extends q{constructor(e){super(`RpcClient with id ${e} do not exist`),this.name="UnknownRpcClientError"}}class pe extends q{constructor(){super("You are not subscribed for an account."),this.name="UnsubscribedAccountError"}}class de extends R{constructor(e){super(e),this.name="ChannelCallError"}}class me extends R{constructor(e){super(e),this.name="ChannelConnectionError"}}class he extends R{constructor(){super("Server pong timed out"),this.name="ChannelPingTimedOutError"}}class fe extends R{constructor(e){super(e),this.name="UnexpectedChannelMessageError"}}class ye extends R{constructor(e,t){super(e.message),this.handlerError=e,this.incomingMessage=t,this.name="ChannelIncomingMessageError"}}class ge extends R{constructor(){super("State Channels FSM entered unknown state"),this.name="UnknownChannelStateError"}}class we extends O{constructor(e){super(e),this.name="InvalidAuthDataError"}}class Ne extends k{constructor(e){super(`Contract ${e} do not correspond to the bytecode deployed on the chain`),this.name="BytecodeMismatchError"}}class ve extends k{constructor(){super("Contract already deployed"),this.name="DuplicateContractError"}}class be extends k{constructor(e){super(`Contract with address ${e} not active`),this.name="InactiveContractError"}}class xe extends k{constructor(e){super(e),this.name="InvalidMethodInvocationError"}}class _e extends k{constructor(e){super(e),this.name="MissingContractAddressError"}}class Te extends k{constructor(){super("Either ACI or sourceCode or sourceCodePath is required"),this.name="MissingContractDefError"}}class Ce extends k{constructor(){super("Function name is required"),this.name="MissingFunctionNameError"}}class Se extends k{constructor(e,t){super("Invocation failed"+(null==e?"":`: "${e}"`)),this.name="NodeInvocationError",this.transaction=t}}class Ae extends k{constructor(e){super(`Function ${e} doesn't exist in contract`),this.name="NoSuchContractFunctionError"}}class Pe extends k{constructor(e,t){super(`You try to pay "${e}" to function "${t}" which is not payable. Only payable function can accept coins`),this.name="NotPayableFunctionError"}}class Ee extends k{constructor(e,t){super(`Can't find definition of ${e} event emitted by ${t} (use omitUnknown option to ignore events like this)`),this.name="MissingEventDefinitionError"}}class ze extends k{constructor(e,t){super(`Found multiple definitions of "${t[0][1]}" event with different types emitted by ${e} in ${t.map((([e])=>`"${e}"`)).join(", ")} contracts (use contractAddressToName option to specify contract name corresponding to address)`),this.name="AmbiguousEventDefinitionError"}}class Ie extends B{constructor(){super("Invalid checksum"),this.name="InvalidChecksumError"}}class Me extends B{constructor(){super("Node hash is not equal to provided one"),this.name="MerkleTreeHashMismatchError"}}class qe extends B{constructor(e){super(e),this.name="MissingNodeInTreeError"}}class Re extends B{constructor(e){super(`Unknown node length: ${e}`),this.name="UnknownNodeLengthError"}}class Oe extends B{constructor(e){super(`Unknown path nibble: ${e}`),this.name="UnknownPathNibbleError"}}class ke extends ${constructor(e){super(`Node with name ${e} already exist`),this.name="DuplicateNodeError"}}class Be extends ${constructor(e){super(e),this.name="NodeNotFoundError"}}class $e extends U{constructor(e){super(e),this.name="DecodeError"}}class Ue extends U{constructor(e){super(e),this.name="PayloadLengthError"}}class Le extends U{constructor(e){super(e),this.name="DryRunError"}}class Ge extends U{constructor(e){super(e),this.name="IllegalBidFeeError"}}class Fe extends U{constructor(e){super(e),this.name="InvalidSignatureError"}}class De extends U{constructor(e){super(`Prefix for id-tag ${e} not found.`),this.name="PrefixNotFoundError"}}class Ve extends U{constructor(e,t){super(`Transaction schema not implemented for tag ${e} version ${t}`),this.name="SchemaNotFoundError"}}class je extends U{constructor(e){super(`Id tag for prefix ${e} not found.`),this.name="DecodeError"}}class He extends U{constructor(e){super(`Transaction ${e} is removed from chain`),this.name="TxNotInChainError"}}class Je extends L{constructor(e){super(e),this.name="AlreadyConnectedError"}}class We extends L{constructor(e){super(e),this.name="NoWalletConnectedError"}}class Ye extends L{constructor(e){super(e),this.name="RpcConnectionError"}}let Ke=function(e){return e.AE="ae",e.MILI_AE="miliAE",e.MICRO_AE="microAE",e.NANO_AE="nanoAE",e.PICO_AE="picoAE",e.FEMTO_AE="femtoAE",e.AETTOS="aettos",e}({});const Qe={[Ke.AE]:0,[Ke.MILI_AE]:-3,[Ke.MICRO_AE]:-6,[Ke.NANO_AE]:-9,[Ke.PICO_AE]:-12,[Ke.FEMTO_AE]:-15,[Ke.AETTOS]:-18},Xe=(e,{denomination:t=Ke.AETTOS,targetDenomination:n=Ke.AETTOS})=>{if(!(e=>"bigint"==typeof e||["number","object","string"].includes(typeof e)&&(!isNaN(e)||Number.isInteger(e)||P.isBigNumber(e)))(e))throw new G("value","a number",e);return new P("bigint"==typeof e?e.toString():e).shiftedBy(Qe[t]-Qe[n]).toFixed()},Ze=(e,{denomination:t=Ke.AETTOS}={})=>Xe(e,{denomination:t,targetDenomination:Ke.AE}),et=(e,{denomination:t=Ke.AE}={})=>Xe(e,{denomination:t}),tt=[{name:"exa",magnitude:18},{name:"giga",magnitude:9},{name:"",magnitude:0},{name:"pico",magnitude:-12}],nt=e=>tt.reduce(((t,n)=>Math.abs(n.magnitude-e)<Math.abs(t.magnitude-e)?n:t)),rt=e=>{var t;return null!==(t=tt.find((t=>t.magnitude<=e)))&&void 0!==t?t:tt[tt.length-1]},it=e=>{var t;const n=new P(e),r=null!==(t=n.e)&&void 0!==t?t:0,{name:i,magnitude:a}=(r<0?nt:rt)(r);return`${n.shiftedBy(-a).precision(9+Math.min(r-a,0)).toFixed()}${""!==i?" ":""}${i}`},at=new Set(["Deserialize","Serialize","Retry","Sign"]);class st{constructor(e){var t;this._policies=[],this._policies=null!==(t=null==e?void 0:e.slice(0))&&void 0!==t?t:[],this._orderedPolicies=void 0}addPolicy(e,t={}){if(t.phase&&t.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(t.phase&&!at.has(t.phase))throw new Error(`Invalid phase name: ${t.phase}`);if(t.afterPhase&&!at.has(t.afterPhase))throw new Error(`Invalid afterPhase name: ${t.afterPhase}`);this._policies.push({policy:e,options:t}),this._orderedPolicies=void 0}removePolicy(e){const t=[];return this._policies=this._policies.filter((n=>!(e.name&&n.policy.name===e.name||e.phase&&n.options.phase===e.phase)||(t.push(n.policy),!1))),this._orderedPolicies=void 0,t}sendRequest(e,t){return this.getOrderedPolicies().reduceRight(((e,t)=>n=>t.sendRequest(n,e)),(t=>e.sendRequest(t)))(t)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new st(this._policies)}static create(){return new st}orderPolicies(){const e=[],t=new Map;function n(e){return{name:e,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}const r=n("Serialize"),i=n("None"),a=n("Deserialize"),s=n("Retry"),o=n("Sign"),c=[r,i,a,s,o];function u(e){return"Retry"===e?s:"Serialize"===e?r:"Deserialize"===e?a:"Sign"===e?o:i}for(const e of this._policies){const n=e.policy,r=e.options,i=n.name;if(t.has(i))throw new Error("Duplicate policy names not allowed in pipeline");const a={policy:n,dependsOn:new Set,dependants:new Set};r.afterPhase&&(a.afterPhase=u(r.afterPhase),a.afterPhase.hasAfterPolicies=!0),t.set(i,a),u(r.phase).policies.add(a)}for(const e of this._policies){const{policy:n,options:r}=e,i=n.name,a=t.get(i);if(!a)throw new Error(`Missing node for policy ${i}`);if(r.afterPolicies)for(const e of r.afterPolicies){const n=t.get(e);n&&(a.dependsOn.add(n),n.dependants.add(a))}if(r.beforePolicies)for(const e of r.beforePolicies){const n=t.get(e);n&&(n.dependsOn.add(a),a.dependants.add(n))}}function l(n){n.hasRun=!0;for(const r of n.policies)if((!r.afterPhase||r.afterPhase.hasRun&&!r.afterPhase.policies.size)&&0===r.dependsOn.size){e.push(r.policy);for(const e of r.dependants)e.dependsOn.delete(r);t.delete(r.policy.name),n.policies.delete(r)}}function p(){for(const e of c){if(l(e),e.policies.size>0&&e!==i)return void(i.hasRun||l(i));e.hasAfterPolicies&&l(i)}}let d=0;for(;t.size>0;){d++;const t=e.length;if(p(),e.length<=t&&d>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}}var ot=n(5606);const ct=void 0!==ot&&ot.env&&ot.env.DEBUG||void 0;let ut,lt=[],pt=[];const dt=[];ct&&ht(ct);const mt=Object.assign((e=>yt(e)),{enable:ht,enabled:ft,disable:function(){const e=ut||"";return ht(""),e},log:function(...e){if(e.length>0){const t=String(e[0]);t.includes(":error")?console.error(...e):t.includes(":warning")?console.warn(...e):t.includes(":info")?console.info(...e):(t.includes(":verbose"),console.debug(...e))}}});function ht(e){ut=e,lt=[],pt=[];const t=/\*/g,n=e.split(",").map((e=>e.trim().replace(t,".*?")));for(const e of n)e.startsWith("-")?pt.push(new RegExp(`^${e.substr(1)}$`)):lt.push(new RegExp(`^${e}$`));for(const e of dt)e.enabled=ft(e.namespace)}function ft(e){if(e.endsWith("*"))return!0;for(const t of pt)if(t.test(e))return!1;for(const t of lt)if(t.test(e))return!0;return!1}function yt(e){const t=Object.assign((function(...n){t.enabled&&(n.length>0&&(n[0]=`${e} ${n[0]}`),t.log(...n))}),{enabled:ft(e),destroy:gt,log:mt.log,namespace:e,extend:wt});return dt.push(t),t}function gt(){const e=dt.indexOf(this);return e>=0&&(dt.splice(e,1),!0)}function wt(e){const t=yt(`${this.namespace}:${e}`);return t.log=this.log,t}var Nt=mt,vt=n(5606);const bt=new Set,xt=void 0!==vt&&vt.env&&vt.env.AZURE_LOG_LEVEL||void 0;let _t;const Tt=Nt("azure");Tt.log=(...e)=>{Nt.log(...e)};const Ct=["verbose","info","warning","error"];xt&&(It(xt)?function(e){if(e&&!It(e))throw new Error(`Unknown log level '${e}'. Acceptable values: ${Ct.join(",")}`);_t=e;const t=[];for(const e of bt)zt(e)&&t.push(e.namespace);Nt.enable(t.join(","))}(xt):console.error(`AZURE_LOG_LEVEL set to unknown log level '${xt}'; logging is not enabled. Acceptable values: ${Ct.join(", ")}.`));const St={verbose:400,info:300,warning:200,error:100};function At(e){const t=Tt.extend(e);return Pt(Tt,t),{error:Et(t,"error"),warning:Et(t,"warning"),info:Et(t,"info"),verbose:Et(t,"verbose")}}function Pt(e,t){t.log=(...t)=>{e.log(...t)}}function Et(e,t){const n=Object.assign(e.extend(t),{level:t});if(Pt(e,n),zt(n)){const e=Nt.disable();Nt.enable(e+","+n.namespace)}return bt.add(n),n}function zt(e){return Boolean(_t&&St[e.level]<=St[_t])}function It(e){return Ct.includes(e)}const Mt=At("core-rest-pipeline");class qt extends Error{constructor(e){super(e),this.name="AbortError"}}function Rt(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function Ot(e){if(Rt(e)){const t="string"==typeof e.name,n="string"==typeof e.message;return t&&n}return!1}function kt(e){if(Ot(e))return e.message;{let t;try{t="object"==typeof e&&e?JSON.stringify(e):String(e)}catch(e){t="[unable to stringify input]"}return`Unknown error ${t}`}}function Bt(e,t){switch(t){case"utf-8":return function(e){return(new TextEncoder).encode(e)}(e);case"base64":return $t(e);case"base64url":return function(e){return $t(e.replace(/-/g,"+").replace(/_/g,"/"))}(e);case"hex":return function(e){const t=new Uint8Array(e.length/2);for(let n=0;n<e.length/2;++n){const r=e[2*n],i=e[2*n+1];if(!Ut.has(r)||!Ut.has(i))return t.slice(0,n);t[n]=parseInt(`${r}${i}`,16)}return t}(e)}}function $t(e){return new Uint8Array([...atob(e)].map((e=>e.charCodeAt(0))))}const Ut=new Set("0123456789abcdefABCDEF");var Lt;const Gt="function"==typeof(null===(Lt=null===globalThis||void 0===globalThis?void 0:globalThis.crypto)||void 0===Lt?void 0:Lt.randomUUID)?globalThis.crypto.randomUUID.bind(globalThis.crypto):function(){let e="";for(let t=0;t<32;t++){const n=Math.floor(16*Math.random());e+=12===t?"4":16===t?3&n|8:n.toString(16),7!==t&&11!==t&&15!==t&&19!==t||(e+="-")}return e};function Ft(){return Gt()}var Dt,Vt,jt,Ht;"undefined"!=typeof window&&window.document,"object"==typeof self&&"function"==typeof(null===self||void 0===self?void 0:self.importScripts)&&("DedicatedWorkerGlobalScope"===(null===(Dt=self.constructor)||void 0===Dt?void 0:Dt.name)||"ServiceWorkerGlobalScope"===(null===(Vt=self.constructor)||void 0===Vt?void 0:Vt.name)||null===(jt=self.constructor)||void 0===jt||jt.name),"undefined"!=typeof Deno&&void 0!==Deno.version&&Deno.version.deno,"undefined"!=typeof Bun&&Bun.version;const Jt=void 0!==globalThis.process&&Boolean(globalThis.process.version)&&Boolean(null===(Ht=globalThis.process.versions)||void 0===Ht?void 0:Ht.node),Wt=("undefined"!=typeof navigator&&(null===navigator||void 0===navigator||navigator.product),"REDACTED"),Yt=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],Kt=["api-version"];class Qt{constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:t=[]}={}){e=Yt.concat(e),t=Kt.concat(t),this.allowedHeaderNames=new Set(e.map((e=>e.toLowerCase()))),this.allowedQueryParameters=new Set(t.map((e=>e.toLowerCase())))}sanitize(e){const t=new Set;return JSON.stringify(e,((e,n)=>{if(n instanceof Error)return Object.assign(Object.assign({},n),{name:n.name,message:n.message});if("headers"===e)return this.sanitizeHeaders(n);if("url"===e)return this.sanitizeUrl(n);if("query"===e)return this.sanitizeQuery(n);if("body"!==e&&"response"!==e&&"operationSpec"!==e){if(Array.isArray(n)||Rt(n)){if(t.has(n))return"[Circular]";t.add(n)}return n}}),2)}sanitizeUrl(e){if("string"!=typeof e||null===e||""===e)return e;const t=new URL(e);if(!t.search)return e;for(const[e]of t.searchParams)this.allowedQueryParameters.has(e.toLowerCase())||t.searchParams.set(e,Wt);return t.toString()}sanitizeHeaders(e){const t={};for(const n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?t[n]=e[n]:t[n]=Wt;return t}sanitizeQuery(e){if("object"!=typeof e||null===e)return e;const t={};for(const n of Object.keys(e))this.allowedQueryParameters.has(n.toLowerCase())?t[n]=e[n]:t[n]=Wt;return t}}const Xt=["GET","HEAD"];function Zt(e={}){const{maxRetries:t=20}=e;return{name:"redirectPolicy",async sendRequest(e,n){const r=await n(e);return en(n,r,t)}}}async function en(e,t,n,r=0){const{request:i,status:a,headers:s}=t,o=s.get("location");if(o&&(300===a||301===a&&Xt.includes(i.method)||302===a&&Xt.includes(i.method)||303===a&&"POST"===i.method||307===a)&&r<n){const t=new URL(o,i.url);i.url=t.toString(),303===a&&(i.method="GET",i.headers.delete("Content-Length"),delete i.body),i.headers.delete("Authorization");const s=await e(i);return en(e,s,n,r+1)}return t}const tn="1.17.0";async function nn(e){const t=new Map;t.set("core-rest-pipeline",tn),await async function(e){const t=globalThis.navigator;let n="unknown";if(null==t?void 0:t.userAgentData){const r=await t.userAgentData.getHighEntropyValues(["architecture","platformVersion"]);n=`${r.architecture}-${r.platform}-${r.platformVersion}`;const i=function(e){const t=["Google Chrome","Microsoft Edge","Opera","Brave","Chromium"];for(const n of t){const t=e.find((e=>e.brand===n));if(t)return t}}(t.userAgentData.brands);i&&e.set(i.brand,i.version)}else if(null==t?void 0:t.platform){n=t.platform;const r=function(e){const t=[{name:"Firefox",regex:/Firefox\/([\d.]+)/},{name:"Safari",regex:/Version\/([\d.]+).*Safari/}];for(const n of t){const t=e.match(n.regex);if(t)return{brand:n.name,version:t[1]}}}(t.userAgent);r&&e.set(r.brand,r.version)}else"string"==typeof globalThis.EdgeRuntime&&e.set("EdgeRuntime",globalThis.EdgeRuntime);e.set("OS",n)}(t);const n=function(e){const t=[];for(const[n,r]of e){const e=r?`${n}/${r}`:n;t.push(e)}return t.join(" ")}(t);return e?`${e} ${n}`:n}const rn="x-ms-useragent",an="userAgentPolicy",sn=Symbol("rawContent");function on(e){return"function"==typeof e[sn]?e[sn]():e.stream()}function cn(e){return Boolean(e&&"function"==typeof e.pipe)}function un(e){return Boolean(e&&"function"==typeof e.getReader&&"function"==typeof e.tee)}async function ln(e){if(e instanceof Blob||e instanceof Uint8Array)return e;if(un(e))return new Response(e).blob();const t=on(e);if(cn(t))throw new Error("Encountered unexpected type. In the browser, `concat` supports Web ReadableStream, Blob, Uint8Array, and files created using `createFile` only.");return ln(t)}function pn(e){let t="";for(const[n,r]of e)t+=`${n}: ${r}\r\n`;return t}function dn(e){return e instanceof Uint8Array?e.byteLength:"function"==typeof e.stream?-1===e.size?void 0:e.size:void 0}const mn="multipartPolicy",hn=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function fn(){return{name:mn,async sendRequest(e,t){var n;if(!e.multipartBody)return t(e);if(e.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=e.multipartBody.boundary;const i=null!==(n=e.headers.get("Content-Type"))&&void 0!==n?n:"multipart/mixed",a=i.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!a)throw new Error(`Got multipart request body, but content-type header was not multipart: ${i}`);const[,s,o]=a;if(o&&r&&o!==r)throw new Error(`Multipart boundary was specified as ${o} in the header, but got ${r} in the request body`);return null!=r||(r=o),r?function(e){if(e.length>70)throw new Error(`Multipart boundary "${e}" exceeds maximum length of 70 characters`);if(Array.from(e).some((e=>!hn.has(e))))throw new Error(`Multipart boundary "${e}" contains invalid characters`)}(r):r=`----AzSDKFormBoundary${Ft()}`,e.headers.set("Content-Type",`${s}; boundary=${r}`),await async function(e,t,n){const r=[Bt(`--${n}`,"utf-8"),...t.flatMap((e=>[Bt("\r\n","utf-8"),Bt(pn(e.headers),"utf-8"),Bt("\r\n","utf-8"),e.body,Bt(`\r\n--${n}`,"utf-8")])),Bt("--\r\n\r\n","utf-8")],i=function(e){let t=0;for(const n of e){const e=dn(n);if(void 0===e)return;t+=e}return t}(r);i&&e.headers.set("Content-Length",i),e.body=await async function(e){const t=[];for(const n of e)t.push(await ln("function"==typeof n?n():n));return new Blob(t)}(r)}(e,e.multipartBody.parts,r),e.multipartBody=void 0,t(e)}}}function yn(e,t,n){return new Promise(((r,i)=>{let a,s;const o=()=>i(new qt((null==n?void 0:n.abortErrorMsg)?null==n?void 0:n.abortErrorMsg:"The operation was aborted.")),c=()=>{(null==n?void 0:n.abortSignal)&&s&&n.abortSignal.removeEventListener("abort",s)};if(s=()=>(a&&clearTimeout(a),c(),o()),(null==n?void 0:n.abortSignal)&&n.abortSignal.aborted)return o();a=setTimeout((()=>{c(),r(t)}),e),(null==n?void 0:n.abortSignal)&&n.abortSignal.addEventListener("abort",s)}))}function gn(e,t){const n=e.headers.get(t);if(!n)return;const r=Number(n);return Number.isNaN(r)?void 0:r}const wn="Retry-After",Nn=["retry-after-ms","x-ms-retry-after-ms",wn];function vn(e){if(e&&[429,503].includes(e.status))try{for(const t of Nn){const n=gn(e,t);if(0===n||n)return n*(t===wn?1e3:1)}const t=e.headers.get(wn);if(!t)return;const n=Date.parse(t)-Date.now();return Number.isFinite(n)?Math.max(0,n):void 0}catch(e){return}}function bn(e={}){var t,n;const r=null!==(t=e.retryDelayInMs)&&void 0!==t?t:1e3,i=null!==(n=e.maxRetryDelayInMs)&&void 0!==n?n:64e3;let a=r;return{name:"exponentialRetryStrategy",retry({retryCount:t,response:n,responseError:r}){const s=!!(p=r)&&("ETIMEDOUT"===p.code||"ESOCKETTIMEDOUT"===p.code||"ECONNREFUSED"===p.code||"ECONNRESET"===p.code||"ENOENT"===p.code||"ENOTFOUND"===p.code),o=s&&e.ignoreSystemErrors,c=function(e){return Boolean(e&&void 0!==e.status&&(e.status>=500||408===e.status)&&501!==e.status&&505!==e.status)}(n),u=c&&e.ignoreHttpStatusCodes,l=n&&(function(e){return Number.isFinite(vn(e))}(n)||!c);var p;if(l||u||o)return{skipStrategy:!0};if(r&&!s&&!c)return{errorToThrow:r};const d=a*Math.pow(2,t),m=Math.min(i,d);var h,f;return a=m/2+(h=0,f=m/2,h=Math.ceil(h),f=Math.floor(f),Math.floor(Math.random()*(f-h+1))+h),{retryAfterInMs:a}}}}const xn=At("core-rest-pipeline retryPolicy");function _n(e,t={maxRetries:3}){const n=t.logger||xn;return{name:"retryPolicy",async sendRequest(r,i){var a,s;let o,c,u=-1;e:for(;;){u+=1,o=void 0,c=void 0;try{n.info(`Retry ${u}: Attempting to send request`,r.requestId),o=await i(r),n.info(`Retry ${u}: Received a response from request`,r.requestId)}catch(e){if(n.error(`Retry ${u}: Received an error from request`,r.requestId),c=e,!e||"RestError"!==c.name)throw e;o=c.response}if(null===(a=r.abortSignal)||void 0===a?void 0:a.aborted)throw n.error(`Retry ${u}: Request aborted.`),new qt;if(u>=(null!==(s=t.maxRetries)&&void 0!==s?s:3)){if(n.info(`Retry ${u}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),c)throw c;if(o)return o;throw new Error("Maximum retries reached with no response or error to throw")}n.info(`Retry ${u}: Processing ${e.length} retry strategies.`);t:for(const t of e){const e=t.logger||xn;e.info(`Retry ${u}: Processing retry strategy ${t.name}.`);const n=t.retry({retryCount:u,response:o,responseError:c});if(n.skipStrategy){e.info(`Retry ${u}: Skipped.`);continue t}const{errorToThrow:i,retryAfterInMs:a,redirectTo:s}=n;if(i)throw e.error(`Retry ${u}: Retry strategy ${t.name} throws error:`,i),i;if(a||0===a){e.info(`Retry ${u}: Retry strategy ${t.name} retries after ${a}`),await yn(a,void 0,{abortSignal:r.abortSignal});continue e}if(s){e.info(`Retry ${u}: Retry strategy ${t.name} redirects to ${s}`),r.url=s;continue e}}if(c)throw n.info("None of the retry strategies could work with the received error. Throwing it."),c;if(o)return n.info("None of the retry strategies could work with the received response. Returning it."),o}}}}function Tn(e){return e.toLowerCase()}class Cn{constructor(e){if(this._headersMap=new Map,e)for(const t of Object.keys(e))this.set(t,e[t])}set(e,t){this._headersMap.set(Tn(e),{name:e,value:String(t).trim()})}get(e){var t;return null===(t=this._headersMap.get(Tn(e)))||void 0===t?void 0:t.value}has(e){return this._headersMap.has(Tn(e))}delete(e){this._headersMap.delete(Tn(e))}toJSON(e={}){const t={};if(e.preserveCase)for(const e of this._headersMap.values())t[e.name]=e.value;else for(const[e,n]of this._headersMap)t[e]=n.value;return t}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return function*(e){for(const t of e.values())yield[t.name,t.value]}(this._headersMap)}}function Sn(e){return new Cn(e)}const An="setClientRequestIdPolicy",Pn={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function En(e={}){let t=new zn(e.parentContext);return e.span&&(t=t.setValue(Pn.span,e.span)),e.namespace&&(t=t.setValue(Pn.namespace,e.namespace)),t}class zn{constructor(e){this._contextMap=e instanceof zn?new Map(e._contextMap):new Map}setValue(e,t){const n=new zn(this);return n._contextMap.set(e,t),n}getValue(e){return this._contextMap.get(e)}deleteValue(e){const t=new zn(this);return t._contextMap.delete(e),t}}const In={instrumenterImplementation:void 0};function Mn(){return In.instrumenterImplementation||(In.instrumenterImplementation={createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(e,t)=>({span:{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{},addEvent:()=>{}},tracingContext:En({parentContext:t.tracingContext})}),withContext(e,t,...n){return t(...n)}}),In.instrumenterImplementation}const qn={},Rn=new Qt;class On extends Error{constructor(e,t={}){super(e),this.name="RestError",this.code=t.code,this.statusCode=t.statusCode,Object.defineProperty(this,"request",{value:t.request,enumerable:!1}),Object.defineProperty(this,"response",{value:t.response,enumerable:!1}),Object.setPrototypeOf(this,On.prototype)}[qn](){return`RestError: ${this.message} \n ${Rn.sanitize(Object.assign(Object.assign({},this),{request:this.request,response:this.response}))}`}}function kn(e){var t;const n=st.create();var r;return Jt&&(e.tlsOptions&&n.addPolicy((r=e.tlsOptions,{name:"tlsPolicy",sendRequest:async(e,t)=>(e.tlsSettings||(e.tlsSettings=r),t(e))})),n.addPolicy(function(){throw new Error("proxyPolicy is not supported in browser environment")}(e.proxyOptions)),n.addPolicy(function(){throw new Error("decompressResponsePolicy is not supported in browser environment")}())),n.addPolicy({name:"formDataPolicy",async sendRequest(e,t){if(Jt&&"undefined"!=typeof FormData&&e.body instanceof FormData&&(e.formData=function(e){var t;const n={};for(const[r,i]of e.entries())null!==(t=n[r])&&void 0!==t||(n[r]=[]),n[r].push(i);return n}(e.body),e.body=void 0),e.formData){const t=e.headers.get("Content-Type");t&&-1!==t.indexOf("application/x-www-form-urlencoded")?e.body=function(e){const t=new URLSearchParams;for(const[n,r]of Object.entries(e))if(Array.isArray(r))for(const e of r)t.append(n,e.toString());else t.append(n,r.toString());return t.toString()}(e.formData):await async function(e,t){const n=t.headers.get("Content-Type");if(n&&!n.startsWith("multipart/form-data"))return;t.headers.set("Content-Type",null!=n?n:"multipart/form-data");const r=[];for(const[t,n]of Object.entries(e))for(const e of Array.isArray(n)?n:[n])if("string"==typeof e)r.push({headers:Sn({"Content-Disposition":`form-data; name="${t}"`}),body:Bt(e,"utf-8")});else{if(null==e||"object"!=typeof e)throw new Error(`Unexpected value for key ${t}: ${e}. Value should be serialized to string first.`);{const n=e.name||"blob",i=Sn();i.set("Content-Disposition",`form-data; name="${t}"; filename="${n}"`),i.set("Content-Type",e.type||"application/octet-stream"),r.push({headers:i,body:e})}}t.multipartBody={parts:r}}(e.formData,e),e.formData=void 0}return t(e)}},{beforePolicies:[mn]}),n.addPolicy(function(e={}){const t=nn(e.userAgentPrefix);return{name:an,async sendRequest(e,n){return e.headers.has(rn)||e.headers.set(rn,await t),n(e)}}}(e.userAgentOptions)),n.addPolicy(function(e="x-ms-client-request-id"){return{name:An,async sendRequest(t,n){return t.headers.has(e)||t.headers.set(e,t.requestId),n(t)}}}(null===(t=e.telemetryOptions)||void 0===t?void 0:t.clientRequestIdHeaderName)),n.addPolicy(fn(),{afterPhase:"Deserialize"}),n.addPolicy(function(e={}){var t;return{name:"defaultRetryPolicy",sendRequest:_n([{name:"throttlingRetryStrategy",retry({response:e}){const t=vn(e);return Number.isFinite(t)?{retryAfterInMs:t}:{skipStrategy:!0}}},bn(e)],{maxRetries:null!==(t=e.maxRetries)&&void 0!==t?t:3}).sendRequest}}(e.retryOptions),{phase:"Retry"}),n.addPolicy(function(e={}){const t=nn(e.userAgentPrefix),n=new Qt({additionalAllowedQueryParameters:e.additionalAllowedQueryParameters}),r=function(){try{return function(e){const{namespace:t,packageName:n,packageVersion:r}=e;function i(e,i,a){var s;const o=Mn().startSpan(e,Object.assign(Object.assign({},a),{packageName:n,packageVersion:r,tracingContext:null===(s=null==i?void 0:i.tracingOptions)||void 0===s?void 0:s.tracingContext}));let c=o.tracingContext;const u=o.span;return c.getValue(Pn.namespace)||(c=c.setValue(Pn.namespace,t)),u.setAttribute("az.namespace",c.getValue(Pn.namespace)),{span:u,updatedOptions:Object.assign({},i,{tracingOptions:Object.assign(Object.assign({},null==i?void 0:i.tracingOptions),{tracingContext:c})})}}function a(e,t,...n){return Mn().withContext(e,t,...n)}return{startSpan:i,withSpan:async function(e,t,n,r){const{span:s,updatedOptions:o}=i(e,t,r);try{const e=await a(o.tracingOptions.tracingContext,(()=>Promise.resolve(n(o,s))));return s.setStatus({status:"success"}),e}catch(e){throw s.setStatus({status:"error",error:e}),e}finally{s.end()}},withContext:a,parseTraceparentHeader:function(e){return Mn().parseTraceparentHeader(e)},createRequestHeaders:function(e){return Mn().createRequestHeaders(e)}}}({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:tn})}catch(e){return void Mt.warning(`Error when creating the TracingClient: ${kt(e)}`)}}();return{name:"tracingPolicy",async sendRequest(e,i){var a;if(!r)return i(e);const s=await t,o={"http.url":n.sanitizeUrl(e.url),"http.method":e.method,"http.user_agent":s,requestId:e.requestId};s&&(o["http.user_agent"]=s);const{span:c,tracingContext:u}=null!==(a=function(e,t,n){try{const{span:r,updatedOptions:i}=e.startSpan(`HTTP ${t.method}`,{tracingOptions:t.tracingOptions},{spanKind:"client",spanAttributes:n});if(!r.isRecording())return void r.end();const a=e.createRequestHeaders(i.tracingOptions.tracingContext);for(const[e,n]of Object.entries(a))t.headers.set(e,n);return{span:r,tracingContext:i.tracingOptions.tracingContext}}catch(e){return void Mt.warning(`Skipping creating a tracing span due to an error: ${kt(e)}`)}}(r,e,o))&&void 0!==a?a:{};if(!c||!u)return i(e);try{const t=await r.withContext(u,i,e);return function(e,t){try{e.setAttribute("http.status_code",t.status);const n=t.headers.get("x-ms-request-id");n&&e.setAttribute("serviceRequestId",n),e.setStatus({status:"success"}),e.end()}catch(e){Mt.warning(`Skipping tracing span processing due to an error: ${kt(e)}`)}}(c,t),t}catch(e){throw function(e,t){try{e.setStatus({status:"error",error:Ot(t)?t:void 0}),((n=t)instanceof On||Ot(n)&&"RestError"===n.name)&&t.statusCode&&e.setAttribute("http.status_code",t.statusCode),e.end()}catch(n){Mt.warning(`Skipping tracing span processing due to an error: ${kt(n)}`)}var n}(c,e),e}}}}(Object.assign(Object.assign({},e.userAgentOptions),e.loggingOptions)),{afterPhase:"Retry"}),Jt&&n.addPolicy(Zt(e.redirectOptions),{afterPhase:"Retry"}),n.addPolicy(function(e={}){var t;const n=null!==(t=e.logger)&&void 0!==t?t:Mt.info,r=new Qt({additionalAllowedHeaderNames:e.additionalAllowedHeaderNames,additionalAllowedQueryParameters:e.additionalAllowedQueryParameters});return{name:"logPolicy",async sendRequest(e,t){if(!n.enabled)return t(e);n(`Request: ${r.sanitize(e)}`);const i=await t(e);return n(`Response status code: ${i.status}`),n(`Headers: ${r.sanitize(i.headers)}`),i}}}(e.loggingOptions),{afterPhase:"Sign"}),n}On.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",On.PARSE_ERROR="PARSE_ERROR";class Bn{async sendRequest(e){if("https:"!==new URL(e.url).protocol&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);if(e.proxySettings)throw new Error("HTTP proxy is not supported in browser environment");try{return await async function(e){const{abortController:t,abortControllerCleanup:n}=function(e){const t=new AbortController;let n,r;if(e.abortSignal){if(e.abortSignal.aborted)throw new qt("The operation was aborted.");r=e=>{"abort"===e.type&&t.abort()},e.abortSignal.addEventListener("abort",r),n=()=>{var t;r&&(null===(t=e.abortSignal)||void 0===t||t.removeEventListener("abort",r))}}return e.timeout>0&&setTimeout((()=>{t.abort()}),e.timeout),{abortController:t,abortControllerCleanup:n}}(e);try{const r=function(e){const t=new Headers;for(const[n,r]of e)t.append(n,r);return t}(e.headers),{streaming:i,body:a}=function(e){const t="function"==typeof e.body?e.body():e.body;if(cn(t))throw new Error("Node streams are not supported in browser environment.");return un(t)?{streaming:!0,body:$n(t,{onProgress:e.onUploadProgress})}:{streaming:!1,body:t}}(e),s=Object.assign(Object.assign({body:a,method:e.method,headers:r,signal:t.signal},"credentials"in Request.prototype?{credentials:e.withCredentials?"include":"same-origin"}:{}),"cache"in Request.prototype?{cache:"no-store"}:{});i&&(s.duplex="half");const o=await fetch(e.url,s);return function(e){return("function"==typeof Blob||"object"==typeof Blob)&&e instanceof Blob}(e.body)&&e.onUploadProgress&&e.onUploadProgress({loadedBytes:e.body.size}),async function(e,t,n){var r,i;const a=function(e){const t=Sn();for(const[n,r]of e.headers)t.set(n,r);return t}(e),s={request:t,headers:a,status:e.status},o=un(e.body)?$n(e.body,{onProgress:t.onDownloadProgress,onEnd:n}):e.body;if((null===(r=t.streamResponseStatusCodes)||void 0===r?void 0:r.has(Number.POSITIVE_INFINITY))||(null===(i=t.streamResponseStatusCodes)||void 0===i?void 0:i.has(s.status)))if(t.enableBrowserStreams)s.browserStreamBody=null!=o?o:void 0;else{const e=new Response(o);s.blobBody=e.blob(),null==n||n()}else{const e=new Response(o);s.bodyAsText=await e.text(),null==n||n()}return s}(o,e,n)}catch(e){throw null==n||n(),e}}(e)}catch(t){throw function(e,t){var n;return e&&"AbortError"===(null==e?void 0:e.name)?e:new On(`Error sending request: ${e.message}`,{code:null!==(n=null==e?void 0:e.code)&&void 0!==n?n:On.REQUEST_SEND_ERROR,request:t})}(t,e)}}}function $n(e,t={}){let n=0;const{onProgress:r,onEnd:i}=t;if(function(e){return void 0!==e.pipeThrough&&void 0!==self.TransformStream}(e))return e.pipeThrough(new TransformStream({transform(e,t){null!==e?(t.enqueue(e),n+=e.length,r&&r({loadedBytes:n})):t.terminate()},flush(){null==i||i()}}));{const t=e.getReader();return new ReadableStream({async pull(e){var a;const{done:s,value:o}=await t.read();if(s||!o)return null==i||i(),e.close(),void t.releaseLock();n+=null!==(a=null==o?void 0:o.length)&&void 0!==a?a:0,e.enqueue(o),r&&r({loadedBytes:n})},cancel(e){return null==i||i(),t.cancel(e)}})}}class Un{constructor(e){var t,n,r,i,a,s,o;this.url=e.url,this.body=e.body,this.headers=null!==(t=e.headers)&&void 0!==t?t:Sn(),this.method=null!==(n=e.method)&&void 0!==n?n:"GET",this.timeout=null!==(r=e.timeout)&&void 0!==r?r:0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=null!==(i=e.disableKeepAlive)&&void 0!==i&&i,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=null!==(a=e.withCredentials)&&void 0!==a&&a,this.abortSignal=e.abortSignal,this.tracingOptions=e.tracingOptions,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||Ft(),this.allowInsecureConnection=null!==(s=e.allowInsecureConnection)&&void 0!==s&&s,this.enableBrowserStreams=null!==(o=e.enableBrowserStreams)&&void 0!==o&&o}}const Ln={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:12e4};async function Gn(e){const{scopes:t,getAccessToken:n,request:r}=e,i={abortSignal:r.abortSignal,tracingOptions:r.tracingOptions},a=await n(t,i);a&&e.request.headers.set("Authorization",`Bearer ${a.token}`)}var Fn=n(8287).Buffer;const Dn=async e=>new Promise((t=>{setTimeout(t,e)})),Vn=(e,t)=>Object.fromEntries(Object.entries(e).map(t)),jn=(()=>{try{return Fn.concat([Uint8Array.from([])]),!1}catch(e){return!0}})()?(e,t)=>Fn.concat(e.map((e=>Fn.from(e))),t):Fn.concat;function Hn(e,t){return e in t}function Jn(e,t){return t.includes(e)}function Wn(e){return e instanceof On&&404===e.statusCode&&e.message.includes("Account not found")}function Yn(e){if(!(e instanceof Error))throw e}function Kn(e){return new Proxy({},Object.fromEntries(["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf","get","has"].map((t=>[t,(n,...r)=>{const i=e();if(null==i)throw new G("wrapped value","defined",i);if("get"===t&&"_wrappedValue"===r[0])return i;const a=Reflect[t](i,...r);return"function"==typeof a&&"get"===t?a.bind(i):a}]))))}var Qn=n(8947),Xn=n.n(Qn),Zn=n(4156);const er="0123456789abcdefABCDEF";er.split("").map((e=>e.codePointAt(0))),Array(256).fill(!0).map(((e,t)=>{const n=String.fromCodePoint(t),r=er.indexOf(n);return r<0?void 0:r<16?r:r-6})),new TextEncoder,new TextDecoder;const tr=e=>{if(e<0||e>0xffffffffffffffffn)throw new RangeError("value out of range")};function nr(e){"number"==typeof e?function(e){if(e<0||e>Number.MAX_SAFE_INTEGER||e%1!=0)throw new RangeError("value out of range")}(e):tr(e)}function rr(e,t,n){nr(e),void 0===n&&(n=0),void 0===t&&(t=new Uint8Array(function(e){return nr(e),e<253?1:e<=65535?3:e<=4294967295?5:9}(e)));let r=0;return e<253?(t.set([Number(e)],n),r=1):e<=65535?(t.set([253],n),function(e,t,n,r){if(t+2>e.length)throw new Error("Offset is outside the bounds of Uint8Array");if(r=r.toUpperCase(),n>65535)throw new Error(`The value of "value" is out of range. It must be >= 0 and <= 65535. Received ${n}`);"LE"===r?(e[t]=255&n,e[t+1]=n>>8&255):(e[t]=n>>8&255,e[t+1]=255&n)}(t,n+1,Number(e),"LE"),r=3):e<=4294967295?(t.set([254],n),function(e,t,n,r){if(t+4>e.length)throw new Error("Offset is outside the bounds of Uint8Array");if(r=r.toUpperCase(),n>4294967295)throw new Error(`The value of "value" is out of range. It must be >= 0 and <= 4294967295. Received ${n}`);"LE"===r?(e[t]=255&n,e[t+1]=n>>8&255,e[t+2]=n>>16&255,e[t+3]=n>>24&255):(e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n)}(t,n+1,Number(e),"LE"),r=5):(t.set([255],n),function(e,t,n,r){if(t+8>e.length)throw new Error("Offset is outside the bounds of Uint8Array");if(r=r.toUpperCase(),n>0xffffffffffffffffn)throw new Error(`The value of "value" is out of range. It must be >= 0 and <= 18446744073709551615. Received ${n}`);"LE"===r?(e[t]=Number(0xffn&n),e[t+1]=Number(n>>8n&0xffn),e[t+2]=Number(n>>16n&0xffn),e[t+3]=Number(n>>24n&0xffn),e[t+4]=Number(n>>32n&0xffn),e[t+5]=Number(n>>40n&0xffn),e[t+6]=Number(n>>48n&0xffn),e[t+7]=Number(n>>56n&0xffn)):(e[t]=Number(n>>56n&0xffn),e[t+1]=Number(n>>48n&0xffn),e[t+2]=Number(n>>40n&0xffn),e[t+3]=Number(n>>32n&0xffn),e[t+4]=Number(n>>24n&0xffn),e[t+5]=Number(n>>16n&0xffn),e[t+6]=Number(n>>8n&0xffn),e[t+7]=Number(0xffn&n))}(t,n+1,BigInt(e),"LE"),r=9),{buffer:t,bytes:r}}let ir=function(e){return e.KeyBlockHash="kh",e.MicroBlockHash="mh",e.BlockPofHash="bf",e.BlockTxHash="bx",e.BlockStateHash="bs",e.Channel="ch",e.ContractAddress="ct",e.ContractBytearray="cb",e.ContractStoreKey="ck",e.ContractStoreValue="cv",e.Transaction="tx",e.TxHash="th",e.OracleAddress="ok",e.OracleQuery="ov",e.OracleQueryId="oq",e.OracleResponse="or",e.AccountAddress="ak",e.AccountSecretKey="sk",e.Signature="sg",e.Commitment="cm",e.PeerPubkey="pp",e.Name="nm",e.State="st",e.Poi="pi",e.StateTrees="ss",e.CallStateTree="cs",e.Bytearray="ba",e}({});var ar=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");const t=new Uint8Array(256);for(let e=0;e<t.length;e++)t[e]=255;for(let n=0;n<e.length;n++){const r=e.charAt(n),i=r.charCodeAt(0);if(255!==t[i])throw new TypeError(r+" is ambiguous");t[i]=n}const n=e.length,r=e.charAt(0),i=Math.log(n)/Math.log(256),a=Math.log(256)/Math.log(n);function s(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;let a=0,s=0,o=0;for(;e[a]===r;)s++,a++;const c=(e.length-a)*i+1>>>0,u=new Uint8Array(c);for(;e[a];){let r=t[e.charCodeAt(a)];if(255===r)return;let i=0;for(let e=c-1;(0!==r||i<o)&&-1!==e;e--,i++)r+=n*u[e]>>>0,u[e]=r%256>>>0,r=r/256>>>0;if(0!==r)throw new Error("Non-zero carry");o=i,a++}let l=c-o;for(;l!==c&&0===u[l];)l++;const p=new Uint8Array(s+(c-l));let d=s;for(;l!==c;)p[d++]=u[l++];return p}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";let i=0,s=0,o=0;const c=t.length;for(;o!==c&&0===t[o];)o++,i++;const u=(c-o)*a+1>>>0,l=new Uint8Array(u);for(;o!==c;){let e=t[o],r=0;for(let t=u-1;(0!==e||r<s)&&-1!==t;t--,r++)e+=256*l[t]>>>0,l[t]=e%n>>>0,e=e/n>>>0;if(0!==e)throw new Error("Non-zero carry");s=r,o++}let p=u-s;for(;p!==u&&0===l[p];)p++;let d=r.repeat(i);for(;p<u;++p)d+=e.charAt(l[p]);return d},decodeUnsafe:s,decode:function(e){const t=s(e);if(t)return t;throw new Error("Non-base"+n+" character")}}}("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),sr=n(4107),or=n.n(sr),cr=n(8287).Buffer;function ur(e){return(new(or())).update(e).digest()}const lr=[ir.ContractBytearray,ir.ContractStoreKey,ir.ContractStoreValue,ir.Transaction,ir.OracleQuery,ir.OracleResponse,ir.State,ir.Poi,ir.StateTrees,ir.CallStateTree,ir.Bytearray],pr=[ir.KeyBlockHash,ir.MicroBlockHash,ir.BlockPofHash,ir.BlockTxHash,ir.BlockStateHash,ir.Channel,ir.ContractAddress,ir.TxHash,ir.OracleAddress,ir.OracleQueryId,ir.AccountAddress,ir.AccountSecretKey,ir.Signature,ir.Commitment,ir.PeerPubkey,ir.Name],dr={[ir.KeyBlockHash]:32,[ir.MicroBlockHash]:32,[ir.BlockPofHash]:32,[ir.BlockTxHash]:32,[ir.BlockStateHash]:32,[ir.Channel]:32,[ir.ContractAddress]:32,[ir.TxHash]:32,[ir.OracleAddress]:32,[ir.OracleQueryId]:32,[ir.AccountAddress]:32,[ir.AccountSecretKey]:32,[ir.Signature]:64,[ir.Commitment]:32,[ir.PeerPubkey]:32,[ir.State]:32};function mr(e,t){if(!Hn(t,dr))return;const n=dr[t];if(null!=n&&e.length!==n)throw new Ue(`Payload should be ${n} bytes, got ${e.length} instead`)}const hr=e=>ur(ur(e)).slice(0,4),fr=e=>jn([e,hr(e)]);function yr(e){const t=e.slice(0,-4);if(!hr(t).equals(e.slice(-4)))throw new Ie;return t}const gr={encode:e=>fr(e).toString("base64"),decode:e=>yr(cr.from(e,"base64"))},wr={encode:e=>ar.encode(fr(e)),decode:e=>yr(cr.from(ar.decode(e)))},Nr=e=>{const t=lr.find((t=>t===e));if(null!=t)return[t,gr];const n=pr.find((t=>t===e));if(null!=n)return[n,wr];throw new G("prefix",`one of ${[...pr,...lr].join(", ")}`,e)};function vr(e){const[t,n,r]=e.split("_");if(null==n)throw new $e(`Encoded string missing payload: ${e}`);if(null!=r)throw new $e(`Encoded string have extra parts: ${e}`);const[i,a]=Nr(t),s=a.decode(n);return mr(s,i),s}function br(e,t){const[,n]=Nr(t);return mr(e,t),`${t}_${n.encode(e)}`}var xr=n(8287).Buffer;function _r(e,...t){0===t.length&&(t=[ir.AccountAddress]);try{vr(e);const n=e.split("_")[0];if(!Jn(n,t))throw new G("Encoded string type",t.length>1?`one of ${t.join(", ")}`:t[0],n);return!0}catch(e){return!1}}function Tr(){const[e]=new BigUint64Array(Xn().randomBytes(8).buffer);return Number(e%BigInt(Number.MAX_SAFE_INTEGER))}function Cr(e){const t=xr.allocUnsafe(4);return t.writeUInt32BE(e),t.slice(t.findIndex((e=>0!==e)))}function Sr(e){return xr.from((0,Zn.blake2b)(e,void 0,32))}function Ar(e,t){const n=vr(e);return br(Sr(jn([n,Cr(t)])),ir.ContractAddress)}function Pr(e,t,n){return Xn().sign.detached.verify(e,t,vr(n))}const Er=xr.from("aeternity Signed Message:\n","utf8"),zr=rr(Er.length).buffer;function Ir(e){const t=xr.from(e,"utf8");return Sr(jn([zr,Er,rr(t.length).buffer,t]))}function Mr(e,t,n){return Pr(Ir(e),t,n)}var qr=n(8287).Buffer;function Rr(e,t=!1){if(null==e)return qr.from([]);if(Number.isInteger(e)||P.isBigNumber(e)||t){if(P.isBigNumber(e)||(e=new P(e)),!e.isInteger())throw new Y(`Unexpected not integer value: ${e.toFixed()}`);let t=e.toString(16);return t.length%2==1&&(t=`0${t}`),qr.from(t,"hex")}if("string"==typeof e)return qr.from(e);throw new H}const Or={pub:"ak_11111111111111111111111111111111273Yts",amount:100000000000000000000000000000000000n},kr=5e4,Br=1e9,$r=1e14,Ur=.05,Lr=480,Gr=31,Fr=Vn({31:3,30:5,29:8,28:13,27:21,26:34,25:55,24:89,23:144,22:233,21:377,20:610,19:987,18:1597,17:2584,16:4181,15:6765,14:10946,13:17711,12:28657,11:46368,10:75025,9:121393,8:196418,7:317811,6:514229,5:832040,4:1346269,3:2178309,2:3524578,1:5702887},(([e,t])=>[e,new P(t).times($r)]));let Dr=function(e){return e[e.Ceres=6]="Ceres",e}({}),Vr=function(e){return e[e.NoVm=0]="NoVm",e[e.Sophia=1]="Sophia",e[e.SophiaImprovementsMinerva=3]="SophiaImprovementsMinerva",e[e.SophiaImprovementsFortuna=4]="SophiaImprovementsFortuna",e[e.Fate=5]="Fate",e[e.SophiaImprovementsLima=6]="SophiaImprovementsLima",e[e.Fate2=7]="Fate2",e[e.Fate3=8]="Fate3",e}({}),jr=function(e){return e[e.NoAbi=0]="NoAbi",e[e.Sophia=1]="Sophia",e[e.Fate=3]="Fate",e}({}),Hr=function(e){return e[e.SignedTx=11]="SignedTx",e[e.SpendTx=12]="SpendTx",e[e.OracleRegisterTx=22]="OracleRegisterTx",e[e.OracleQueryTx=23]="OracleQueryTx",e[e.OracleResponseTx=24]="OracleResponseTx",e[e.OracleExtendTx=25]="OracleExtendTx",e[e.NameClaimTx=32]="NameClaimTx",e[e.NamePreclaimTx=33]="NamePreclaimTx",e[e.NameUpdateTx=34]="NameUpdateTx",e[e.NameRevokeTx=35]="NameRevokeTx",e[e.NameTransferTx=36]="NameTransferTx",e[e.ContractCreateTx=42]="ContractCreateTx",e[e.ContractCallTx=43]="ContractCallTx",e[e.ChannelCreateTx=50]="ChannelCreateTx",e[e.ChannelDepositTx=51]="ChannelDepositTx",e[e.ChannelWithdrawTx=52]="ChannelWithdrawTx",e[e.ChannelForceProgressTx=521]="ChannelForceProgressTx",e[e.ChannelCloseMutualTx=53]="ChannelCloseMutualTx",e[e.ChannelCloseSoloTx=54]="ChannelCloseSoloTx",e[e.ChannelSlashTx=55]="ChannelSlashTx",e[e.ChannelSettleTx=56]="ChannelSettleTx",e[e.ChannelOffChainTx=57]="ChannelOffChainTx",e[e.ChannelSnapshotSoloTx=59]="ChannelSnapshotSoloTx",e[e.GaAttachTx=80]="GaAttachTx",e[e.GaMetaTx=81]="GaMetaTx",e[e.PayingForTx=82]="PayingForTx",e}({});var Jr=n(8287).Buffer;function Wr(e,t){return br(Sr(Jr.from([...vr(e),...Rr(t)])),ir.ContractAddress)}function Yr(e,t,n){return br(Sr(Jr.from([...vr(e),...function(e){const t=Rr(e,!0);return jn([Jr.alloc(32-t.length),t])}(t),...vr(n)])),ir.OracleQueryId)}const Kr=".chain";function Qr(e){const[t,n,...r]=e.split(".");if(0!==r.length)throw new G("aens name","including only one dot",e);if(n!==Kr.slice(1))throw new G("aens name",`suffixed with ${Kr}`,e);if(/\p{Emoji_Presentation}/u.test(t))throw new G("aens name","not containing emoji",e);if("-"===t[2]&&"-"===t[3])throw new G("aens name",'without "-" char in both the third and fourth positions',e);if("-"===t[0])throw new G("aens name",'starting with no "-" char',e);if("-"===t.at(-1))throw new G("aens name",'ending with no "-" char',e);let i;try{const r=new URL(`http://${t}.${n}`);if(r.username+r.password+r.port+r.search+r.hash!==""||"/"!==r.pathname)throw new G("aens name","valid",e);i=r.host}catch(t){if(t instanceof TypeError&&t.message.includes("Invalid URL"))throw new G("aens name","valid",e);throw t}if(!/^[a-z0-9.-]+$/i.test(i))throw new G("aens name","without illegal chars",e);if(i.length>63+Kr.length)throw new G("aens name","not too long",e);return i}function Xr(e){return br(Sr(Qr(e)),ir.Name)}function Zr(e,t=Tr()){return br(Sr(jn([Jr.from(Qr(e)),Jr.from(t.toString(16).padStart(64,"0"),"hex")])),ir.Commitment)}function ei(e=Jr.from([])){return new P(Jr.from(e).toString("hex"),16).toString(10)}function ti(e){Qr(e)}function ni(e){try{return ti(e),!0}catch(e){return!1}}const ri=[[ir.AccountAddress,"account_pubkey"],[ir.OracleAddress,"oracle_pubkey"],[ir.ContractAddress,"contract_pubkey"],[ir.Channel,"channel"]];function ii(e){vr(e);const t=e.substring(0,2),n=ri.find((([e])=>e===t))?.[1];if(null!=n)return n;throw new G("identifier",`prefixed with one of ${ri.map((([e])=>`${e}_`)).join(", ")}`,e)}function ai(e){const t=Qr(e).length-Kr.length;return Fr[Math.min(t,Gr)]}function si(e,{startFee:t,increment:n=Ur}={}){if(Number(n)!==n||n%1==0)throw new Ge(`Increment must be float. Current increment ${n}`);if(n<Ur)throw new Ge(`minimum increment percentage is ${Ur}`);return E(new P(null!=t?t:ai(e)).times(new P(Ur).plus(1)))}function oi(e,t){var n,r,i;const a=Qr(e).length-Kr.length;return(null!==(n=null!==(r=null!==(i=a<=4?62*Lr:null)&&void 0!==i?i:a<=8?31*Lr:null)&&void 0!==r?r:a<=12?Lr:null)&&void 0!==n?n:0)+t}function ci(e){return Qr(e).length<13+Kr.length}async function ui(e,{_expectedMineRate:t,_microBlockCycle:n,onNode:r}){var i,a;const s=async(t,n,i,a)=>t!==e?null:null!=n?n:"ae_dev"===await(r?.getNetworkId())?i:a,o=null!==(i=null!==(a=await s("key-block",t,0,18e4))&&void 0!==a?a:await s("micro-block",n,0,3e3))&&void 0!==i?i:(()=>{throw new te(`Unknown type: ${e}`)})();return Math.floor(o/3)}const li=new WeakMap;async function pi({cached:e=!1,...t}){const n=null!==(i=(r=t.onNode)._wrappedValue)&&void 0!==i?i:r;var r,i;if(e){const e=li.get(n);if(null!=e&&e.time>Date.now()-await ui("key-block",t))return e.height}const{height:a}=await n.getCurrentKeyBlockHeight();return li.set(n,{height:a,time:Date.now()}),a}async function di(e,{blocks:t=5,interval:n,...r}){var i;let a;null!==(i=n)&&void 0!==i||(n=await ui("micro-block",r));do{const i=await r.onNode.getTransactionByHash(e);if(-1!==i.blockHeight)return i;null==a&&(a=0!==i.tx.ttl?-1:await pi({...r,cached:!0})+t),await Dn(n)}while(-1===a||await pi({...r,cached:!0})<a);throw new W(t,e)}async function mi(e,{interval:t,...n}){var r;let i;null!==(r=t)&&void 0!==r||(t=Math.min(await ui("key-block",n),5e3));do{null!=i&&await Dn(t),i=await pi(n)}while(i<e);return i}async function hi(e,{confirm:t=3,onNode:n,...r}){const{blockHeight:i}=await n.getTransactionByHash(e),a=await mi(i+t,{onNode:n,...r}),{blockHeight:s}=await n.getTransactionByHash(e);switch(s){case-1:throw new He(e);case i:return a;default:return hi(e,{onNode:n,confirm:t,...r})}}async function fi(e,{height:t,hash:n,onNode:r}){return null!=t?r.getAccountByPubkeyAndHeight(e,t):null!=n?r.getAccountByPubkeyAndHash(e,n):r.getAccountByPubkey(e)}async function yi(e,{format:t=Ke.AETTOS,...n}){const r=e.startsWith("ok_")?br(vr(e),ir.AccountAddress):e,{balance:i}=await fi(r,n).catch((e=>{if(!Wn(e))throw e;return{balance:0n}}));return Xe(i,{targetDenomination:t})}async function gi({onNode:e}){return e.getCurrentGeneration()}async function wi(e,{onNode:t}){return"number"==typeof e?t.getGenerationByHeight(e):t.getGenerationByHash(e)}async function Ni(e,{onNode:t}){return(await t.getMicroBlockTransactionsByHash(e)).transactions}async function vi(e,{onNode:t}){return"number"==typeof e?t.getKeyBlockByHeight(e):t.getKeyBlockByHash(e)}async function bi(e,{onNode:t}){return t.getMicroBlockHeaderByHash(e)}const xi=new Map;async function _i(e,t){const n=xi.get(e);if(xi.delete(e),null==n)throw new te("Can't get dry-run request");let r;try{const e="number"==typeof n[0].top?(await vi(n[0].top,{onNode:t})).hash:n[0].top;r=await t.protectedDryRunTxs({top:e,txEvents:n[0].txEvents,txs:n.map((e=>({tx:e.tx}))),accounts:Array.from(new Set(n.map((e=>e.accountAddress)))).map((e=>({pubKey:e,amount:Or.amount})))})}catch(e){return void n.forEach((({reject:t})=>t(e)))}const{results:i,txEvents:a}=r;i.forEach((({result:e,reason:t,...r},i)=>{const{resolve:s,reject:o,tx:c,accountAddress:u}=n[i];"ok"===e?s({...r,txEvents:a}):o(Object.assign(new Le(t),{tx:c,accountAddress:u}))}))}async function Ti(e,t,{top:n,txEvents:r,combine:i,onNode:a}){var s;const o=!0===i?[n,r].join():"immediate",c=null!==(s=xi.get(o))&&void 0!==s?s:[];return xi.set(o,c),new Promise(((s,u)=>{var l;c.push({tx:e,accountAddress:t,top:n,txEvents:r,resolve:s,reject:u}),!0===i?null!==(l=c.timeout)&&void 0!==l||(c.timeout=setTimeout((()=>{_i(o,a)}))):_i(o,a)}))}async function Ci(e,{onNode:t}){return t.getContractCode(e)}async function Si(e,{onNode:t}){return t.getContract(e)}async function Ai(e,{onNode:t}){return t.getNameEntryByName(e)}async function Pi(e,t,{verify:n=!0,resolveByNode:r=!1,onNode:i}){if(ni(e)){if(n||r){const n=(await i.getNameEntryByName(e)).pointers.find((e=>e.key===t));if(null==n)throw new ie(e,t);if(r)return n.id}return Xr(e)}try{return vr(e),e}catch(t){throw new se(`Invalid name or address: ${e}`)}}var Ei=n(8287).Buffer;const zi={[Dr.Ceres]:{"contract-create":{vmVersion:[Vr.Fate3],abiVersion:[jr.Fate]},"contract-call":{vmVersion:[],abiVersion:[jr.Fate]},"oracle-call":{vmVersion:[],abiVersion:[jr.NoAbi,jr.Fate]}}};function Ii(e,t){var n;const r=zi[e][t];return{vmVersion:null!==(n=r.vmVersion[0])&&void 0!==n?n:Vr.Fate2,abiVersion:r.abiVersion[0]}}var Mi={serialize(e,t,{consensusProtocolVersion:n=Dr.Ceres}){var r;return null!==(r=e)&&void 0!==r||(e=Ii(n,"contract-create")),Ei.from([e.vmVersion,0,e.abiVersion])},async prepare(e,t,n){return null!=e?e:null==n.consensusProtocolVersion&&2!==Object.keys(Dr).length&&null!=n.onNode?Ii((await n.onNode.getNodeInfo()).consensusProtocolVersion,"contract-create"):void 0},deserialize(e){const[t,,n]=e;return{vmVersion:+t,abiVersion:+n}}},qi=n(8287).Buffer,Ri={_getProtocolDetails(e,t){return Ii(e,Hr.ContractCallTx===t||Hr.GaMetaTx===t?"contract-call":"oracle-call").abiVersion},serialize(e,{tag:t},{consensusProtocolVersion:n=Dr.Ceres}){const r=null!=e?e:this._getProtocolDetails(n,t);return qi.from([r])},async prepare(e,{tag:t},n){return null!=e?e:null==n.consensusProtocolVersion&&2!==Object.keys(Dr).length&&null!=n.onNode?this._getProtocolDetails((await n.onNode.getNodeInfo()).consensusProtocolVersion,t):void 0},deserialize(e){return e[0]}},Oi=n(8287).Buffer;const ki=[ir.AccountAddress,ir.Name,ir.Commitment,ir.OracleAddress,ir.ContractAddress,ir.Channel];function Bi(...e){return{serialize(t){const n=t.slice(0,2);if(!Jn(n,ki))throw new je(n);if(!Jn(n,e))throw new G("Address encoding",e.join(", "),n);const r=ki.indexOf(n)+1;return Oi.from([...Rr(r),...vr(t)])},deserialize(t){const n=Oi.from(t).readUIntBE(0,1),r=ki[n-1];if(null==r)throw new De(n);if(!Jn(r,e))throw new G("Address encoding",e.join(", "),r);return br(t.subarray(1),r)}}}function $i(e){return{serialize(t,n){return t.map((t=>e.serialize(t,n)))},deserialize(t,n){return t.map((t=>e.deserialize(t,n)))}}}var Ui={serialize(e){if(Number(e)<0)throw new G("value","greater or equal to 0",e);return Rr(e,!0)},deserialize(e){return ei(e)}},Li={...Ui,serializeAettos(e,t,n){return null!=e?e:"0"},serialize(e,t,{denomination:n=Ke.AETTOS,...r}){return Ui.serialize(this.serializeAettos(null!=e?Xe(e,{denomination:n}):e,t,r))}},Gi=n(8287).Buffer;function Fi(e,t){return{serialize(e){if(null==e){if(!0===t)return Gi.from([]);throw new G("Encoded data","provided",e)}return vr(e)},deserialize(t){return br(t,e)}}}var Di=n(8287).Buffer;function Vi(e){return{serialize(t,{packEntry:n}){return ArrayBuffer.isView(t)?Di.from(t):"string"==typeof t&&t.startsWith("tx_")?vr(t):vr(n({...t,...null!=e&&{tag:e}}))},deserialize(t,{unpackEntry:n}){return n(br(t,ir.Bytearray),e)}}}var ji=n(8287).Buffer;function Hi(e){const t=Object.values(e).filter((e=>"number"==typeof e));return{serialize(e){if("number"!=typeof e)throw new G("value","to be a number",e);if(e>255)throw new G("value","to be less than 256",e);if(!Jn(e,t))throw new G("value","to be a value of Enum",e);return ji.from([e])},deserialize(e){if(1!==e.length)throw new G("buffer","to have single element",e.length);const n=e[0];if(!Jn(n,t))throw new G("value","to be a value of Enum",n);return n}}}const Ji=new WeakMap;async function Wi(e){const t=Ji.get(e);if(null!=t&&t.time>Date.now()-2e4)return t.gasPrice;const{minGasPrice:n,utilization:r}=(await e.getRecentGasPrices())[0];let i=r<70?0n:BigInt(new P(n.toString()).times(1.01).integerValue().toFixed());const a=100000n*BigInt(Br);return i>a&&(console.warn(`Estimated gas price ${i} exceeds the maximum safe value for unknown reason. It will be limited to ${a}. To overcome this restriction provide \`gasPrice\`/\`fee\` in options.`),i=a),Ji.set(e,{gasPrice:i,time:Date.now()}),i}var Yi={...Li,async prepare(e,t,{onNode:n,denomination:r}){if(null!=e)return e;if(null==n)throw new G("onNode","provided (or provide `gasPrice` instead)",n);const i=await Wi(n);return 0n!==i?Xe(i,{targetDenomination:r}):void 0},serializeAettos(e=Br.toString()){if(+e<Br)throw new F(`Gas price ${e.toString()} must be bigger than ${Br}`);return e}};function Ki(e){const t={[Hr.OracleRegisterTx]:"oracleTtlValue",[Hr.OracleExtendTx]:"oracleTtlValue",[Hr.OracleQueryTx]:"queryTtlValue",[Hr.OracleResponseTx]:"responseTtlValue"},{tag:n}=e;return Hn(n,t)?e[t[n]]:1}function Qi(e,t,n){const{length:r}=vr(e),i=t(e);let a=0;return i.tag!==Hr.GaMetaTx&&i.tag!==Hr.PayingForTx||(a=vr(n(i.tx.encodedTx)).length),(e=>{var t;return 15e3*(null!==(t={[Hr.ChannelForceProgressTx]:30,[Hr.ChannelOffChainTx]:0,[Hr.ContractCreateTx]:5,[Hr.ContractCallTx]:12,[Hr.GaAttachTx]:5,[Hr.GaMetaTx]:5,[Hr.PayingForTx]:.2}[e])&&void 0!==t?t:1)})(i.tag)+((e,t,{relativeTtl:n,innerTxSize:r})=>{switch(e){case Hr.OracleRegisterTx:case Hr.OracleExtendTx:case Hr.OracleQueryTx:case Hr.OracleResponseTx:return 20*t+Math.ceil(32e3*n/Math.floor(175200));case Hr.GaMetaTx:case Hr.PayingForTx:return 20*(t-r);default:return 20*t}})(i.tag,r,{relativeTtl:Ki(i),innerTxSize:a})}const Xi="_gas-price:";var Zi={...Li,async prepare(e,t,{onNode:n}){if(null!=e)return e;if(null==n)throw new G("onNode","provided (or provide `fee` instead)",n);const r=await Wi(n);return 0n!==r?Xi+r:void 0},serializeAettos(e,{rebuildTx:t,unpackTx:n,buildTx:r,_computingMinFee:i},{_canIncreaseFee:a}){if(null!=i)return i.toFixed();const s=function(e,t,n){let r,i=new P(0);do{r=i,i=new P(Br).times(Qi(e(i),t,n))}while(!i.eq(r));return i}((e=>t({_computingMinFee:e})),n,r),o=!0===e?.startsWith(Xi)?s.dividedBy(Br).times(e.replace(Xi,"")):new P(null!=e?e:s);if(s.gt(o)){if(!0===a)return s.toFixed();throw new F(`Fee ${o.toString()} must be bigger than ${s}`)}return o.toFixed()},serialize(e,t,n){return"string"==typeof e&&e.startsWith(Xi)?Ui.serialize(this.serializeAettos(e,t,n)):Li.serialize.call(this,e,t,n)}},ea={serialize(e){return Ui.serialize(e)},deserialize(e){return+Ui.deserialize(e)}},ta={...ea,serialize(e,{tag:t,rebuildTx:n,unpackTx:r,buildTx:i,_computingGasLimit:a},{gasMax:s=6e6}){if(null!=a)return ea.serialize(a);const o=t===Hr.GaMetaTx?kr:function(e,t,n,r){return e-+Qi(t(e),n,r)}(s,(e=>n({_computingGasLimit:e,_canIncreaseFee:!0})),r,i),c=null!=e?e:o;if(c>o)throw new F(`Gas limit ${c} must be less or equal to ${o}`);return ea.serialize(c)}},na=n(8287).Buffer,ra={serialize(e){return na.from(e)},deserialize(e){return e.toString()}},ia={serialize(e){return ra.serialize(e)},deserialize(e){return ra.deserialize(e)}},aa={...Li,serializeAettos(e,t){const n=ai(t.name),r=new P(null!=e?e:n);if(n.gt(r))throw new ae(r,n);return r.toFixed()},serialize(e,t,n){return Li.serialize.call(this,e,t,n)}};const sa=Bi(ir.Name);var oa={...sa,serialize(e){return sa.serialize(ni(e)?Xr(e):e)}};function ca(e){return{...ea,serialize(e,{tag:t}){if(Hr.GaAttachTx===t&&1!==e)throw new G("nonce","equal 1 if GaAttachTx",e);return ea.serialize(e)},async prepare(t,n,r){if(null!=t)return t;const{onNode:i,strategy:a}=r,s=r[e],o="provided (or provide `nonce` instead)";if(null==i)throw new G("onNode",o,i);if(null==s)throw new G("senderId",o,s);return(await i.getAccountNextNonce(s.replace(/^ok_/,"ak_"),{strategy:a}).catch((e=>{if(!Wn(e))throw e;return{nextNonce:1}}))).nextNonce},senderKey:e}}var ua=n(8287).Buffer;const la=ua.from([1]),pa=ua.from([2]),da=Bi(...ki);var ma=e=>({serialize(t){if(t.length>32)throw new F(`Expected 32 pointers or less, got ${t.length} instead`);return t.map((({key:t,id:n})=>{let r;if(_r(n,...ki)&&(r=[...e?[la]:[],da.serialize(n)]),_r(n,ir.Bytearray)){const e=vr(n);if(e.length>1024)throw new G("Raw pointer","shorter than 1025 bytes",`${e.length} bytes`);r=[pa,e]}if(null==r)throw new $e(`Unknown AENS pointer value: ${n}`);return[Rr(t),ua.concat(r)]}))},deserialize(t){return t.map((([t,n])=>{if(!e)return{key:t.toString(),id:da.deserialize(n)};const r=n.subarray(0,1),i=n.subarray(1);let a;if(r.equals(la)&&(a=da.deserialize(i)),r.equals(pa)&&(a=br(i,ir.Bytearray)),null==a)throw new $e(`Unknown AENS pointer tag: ${r}`);return{key:t.toString(),id:a}}))}}),ha={...Li,async prepare(e,t,n){if(null!=e)return e;const{onNode:r,oracleId:i}=n,a="provided (or provide `queryFee` instead)";if(null==r)throw new G("onNode",a,r);if(null==i)throw new G("oracleId",a,i);return(await r.getOracleByPubkey(i)).queryFee.toString()}},fa=n(8287).Buffer,ya={serialize(e){return fa.from(e)},deserialize(e){return e}};function ga(e,t){return{serialize(n){if((!0!==t||null!=n)&&n!==e)throw new G("ShortUIntConst",e,n);return ea.serialize(e)},deserialize(t){const n=ea.deserialize(t);if(n!==e)throw new G("ShortUIntConst",e,n);return e},constValue:e,constValueOptional:!0===t}}var wa={serialize(e){return Rr(e)},deserialize(e){return e.toString()}},Na=n(8287).Buffer;function va(e){return{serialize(t,{buildTx:n}){return ArrayBuffer.isView(t)?Na.from(t):"string"==typeof t&&t.startsWith("tx_")?vr(t):vr(n({...t,...null!=e&&{tag:e}}))},deserialize(t,{unpackTx:n}){return n(br(t,ir.Transaction),e)}}}var ba={...ea,serialize(e){return ea.serialize(null!=e?e:0)},async prepare(e,t,{onNode:n,absoluteTtl:r,_isInternalBuild:i,...a}){if(!0!==r&&0!==e&&(null!=e||!0===i)){var s;if(null==n)throw new G("onNode","provided",n);e=(null!==(s=e)&&void 0!==s?s:3)+await pi({...a,onNode:n,cached:!0})}return e}};function xa(e,t){return{...t,serialize(n,r){return t.serialize(null!=n?n:e,r)}}}function _a(e,t){return{...t,serialize(n,r,i){return t.serialize(e(n),r,i)}}}let Ta=function(e){return e[e.Ok=0]="Ok",e[e.Error=1]="Error",e[e.Revert=2]="Revert",e}({}),Ca=function(e){return e[e.Account=10]="Account",e[e.Oracle=20]="Oracle",e[e.Name=30]="Name",e[e.Contract=40]="Contract",e[e.ContractCall=41]="ContractCall",e[e.ChannelOffChainUpdateTransfer=570]="ChannelOffChainUpdateTransfer",e[e.ChannelOffChainUpdateDeposit=571]="ChannelOffChainUpdateDeposit",e[e.ChannelOffChainUpdateWithdraw=572]="ChannelOffChainUpdateWithdraw",e[e.ChannelOffChainUpdateCreateContract=573]="ChannelOffChainUpdateCreateContract",e[e.ChannelOffChainUpdateCallContract=574]="ChannelOffChainUpdateCallContract",e[e.Channel=58]="Channel",e[e.TreesPoi=60]="TreesPoi",e[e.StateTrees=62]="StateTrees",e[e.Mtree=63]="Mtree",e[e.MtreeValue=64]="MtreeValue",e[e.ContractsMtree=621]="ContractsMtree",e[e.CallsMtree=622]="CallsMtree",e[e.ChannelsMtree=623]="ChannelsMtree",e[e.NameserviceMtree=624]="NameserviceMtree",e[e.OraclesMtree=625]="OraclesMtree",e[e.AccountsMtree=626]="AccountsMtree",e[e.GaMetaTxAuthData=810]="GaMetaTxAuthData",e}({}),Sa=function(e){return e[e.delta=0]="delta",e[e.block=1]="block",e}({});const Aa=va(),Pa=va(Hr.SignedTx),Ea=Vi(Ca.TreesPoi),za=xa(3600,ea),Ia=_a((e=>{var t;const n=18e4;if(null!==(t=e)&&void 0!==t||(e=n),e>=1&&e<=n)return e;throw new G("nameTtl","a number between 1 and 180000 blocks",e)}),ea),Ma=[{tag:ga(Hr.SignedTx),version:ga(1,!0),signatures:$i(ya),encodedTx:Aa},{tag:ga(Hr.SpendTx),version:ga(1,!0),senderId:Bi(ir.AccountAddress),recipientId:Bi(ir.AccountAddress,ir.ContractAddress,ir.Name),amount:Li,fee:Zi,ttl:ba,nonce:ca("senderId"),payload:Fi(ir.Bytearray,!0)},{tag:ga(Hr.NamePreclaimTx),version:ga(1,!0),accountId:Bi(ir.AccountAddress),nonce:ca("accountId"),commitmentId:Bi(ir.Commitment),fee:Zi,ttl:ba},{tag:ga(Hr.NameClaimTx),version:ga(2,!0),accountId:Bi(ir.AccountAddress),nonce:ca("accountId"),name:ia,nameSalt:xa(0,Ui),nameFee:aa,fee:Zi,ttl:ba},{tag:ga(Hr.NameUpdateTx),version:ga(1,!0),accountId:Bi(ir.AccountAddress),nonce:ca("accountId"),nameId:oa,nameTtl:Ia,pointers:ma(!1),clientTtl:za,fee:Zi,ttl:ba},{tag:ga(Hr.NameUpdateTx),version:ga(2),accountId:Bi(ir.AccountAddress),nonce:ca("accountId"),nameId:oa,nameTtl:Ia,pointers:ma(!0),clientTtl:za,fee:Zi,ttl:ba},{tag:ga(Hr.NameTransferTx),version:ga(1,!0),accountId:Bi(ir.AccountAddress),nonce:ca("accountId"),nameId:oa,recipientId:Bi(ir.AccountAddress,ir.Name),fee:Zi,ttl:ba},{tag:ga(Hr.NameRevokeTx),version:ga(1,!0),accountId:Bi(ir.AccountAddress),nonce:ca("accountId"),nameId:oa,fee:Zi,ttl:ba},{tag:ga(Hr.ContractCreateTx),version:ga(1,!0),ownerId:Bi(ir.AccountAddress),nonce:ca("ownerId"),code:Fi(ir.ContractBytearray),ctVersion:Mi,fee:Zi,ttl:ba,deposit:_a(((e=0)=>{if(0==+e)return e;throw new G("deposit","equal 0 (because is not refundable)",e)}),Li),amount:Li,gasLimit:ta,gasPrice:Yi,callData:Fi(ir.ContractBytearray)},{tag:ga(Hr.ContractCallTx),version:ga(1,!0),callerId:Bi(ir.AccountAddress),nonce:ca("callerId"),contractId:Bi(ir.ContractAddress,ir.Name),abiVersion:Ri,fee:Zi,ttl:ba,amount:Li,gasLimit:ta,gasPrice:Yi,callData:Fi(ir.ContractBytearray)},{tag:ga(Hr.OracleRegisterTx),version:ga(1,!0),accountId:Bi(ir.AccountAddress),nonce:ca("accountId"),queryFormat:wa,responseFormat:wa,queryFee:Li,oracleTtlType:xa(Sa.delta,Hi(Sa)),oracleTtlValue:xa(500,ea),fee:Zi,ttl:ba,abiVersion:Ri},{tag:ga(Hr.OracleExtendTx),version:ga(1,!0),oracleId:Bi(ir.OracleAddress,ir.Name),nonce:ca("oracleId"),oracleTtlType:xa(Sa.delta,Hi(Sa)),oracleTtlValue:xa(500,ea),fee:Zi,ttl:ba},{tag:ga(Hr.OracleQueryTx),version:ga(1,!0),senderId:Bi(ir.AccountAddress),nonce:ca("senderId"),oracleId:Bi(ir.OracleAddress,ir.Name),query:wa,queryFee:ha,queryTtlType:xa(Sa.delta,Hi(Sa)),queryTtlValue:xa(10,ea),responseTtlType:xa(Sa.delta,Hi(Sa)),responseTtlValue:xa(10,ea),fee:Zi,ttl:ba},{tag:ga(Hr.OracleResponseTx),version:ga(1,!0),oracleId:Bi(ir.OracleAddress),nonce:ca("oracleId"),queryId:Fi(ir.OracleQueryId),response:wa,responseTtlType:xa(Sa.delta,Hi(Sa)),responseTtlValue:xa(10,ea),fee:Zi,ttl:ba},{tag:ga(Hr.ChannelCreateTx),version:ga(2,!0),initiator:Bi(ir.AccountAddress),initiatorAmount:Ui,responder:Bi(ir.AccountAddress),responderAmount:Ui,channelReserve:Ui,lockPeriod:Ui,ttl:ba,fee:Zi,initiatorDelegateIds:$i(Bi(...ki)),responderDelegateIds:$i(Bi(...ki)),stateHash:Fi(ir.State),nonce:ca("initiator")},{tag:ga(Hr.ChannelCloseMutualTx),version:ga(1,!0),channelId:Bi(ir.Channel),fromId:Bi(ir.AccountAddress),initiatorAmountFinal:Ui,responderAmountFinal:Ui,ttl:ba,fee:Zi,nonce:ca("fromId")},{tag:ga(Hr.ChannelCloseSoloTx),version:ga(1,!0),channelId:Bi(ir.Channel),fromId:Bi(ir.AccountAddress),payload:Fi(ir.Transaction),poi:Ea,ttl:ba,fee:Zi,nonce:ca("fromId")},{tag:ga(Hr.ChannelSlashTx),version:ga(1,!0),channelId:Bi(ir.Channel),fromId:Bi(ir.AccountAddress),payload:Fi(ir.Transaction),poi:Ea,ttl:ba,fee:Zi,nonce:ca("fromId")},{tag:ga(Hr.ChannelDepositTx),version:ga(1,!0),channelId:Bi(ir.Channel),fromId:Bi(ir.AccountAddress),amount:Ui,ttl:ba,fee:Zi,stateHash:Fi(ir.State),round:ea,nonce:ca("fromId")},{tag:ga(Hr.ChannelWithdrawTx),version:ga(1,!0),channelId:Bi(ir.Channel),toId:Bi(ir.AccountAddress),amount:Ui,ttl:ba,fee:Zi,stateHash:Fi(ir.State),round:ea,nonce:ca("fromId")},{tag:ga(Hr.ChannelSettleTx),version:ga(1,!0),channelId:Bi(ir.Channel),fromId:Bi(ir.AccountAddress),initiatorAmountFinal:Ui,responderAmountFinal:Ui,ttl:ba,fee:Zi,nonce:ca("fromId")},{tag:ga(Hr.ChannelForceProgressTx),version:ga(1,!0),channelId:Bi(ir.Channel),fromId:Bi(ir.AccountAddress),payload:Fi(ir.Transaction),round:ea,update:Fi(ir.ContractBytearray),stateHash:Fi(ir.State),offChainTrees:Fi(ir.StateTrees),ttl:ba,fee:Zi,nonce:ca("fromId")},{tag:ga(Hr.ChannelOffChainTx),version:ga(2,!0),channelId:Bi(ir.Channel),round:ea,stateHash:Fi(ir.State)},{tag:ga(Hr.ChannelSnapshotSoloTx),version:ga(1,!0),channelId:Bi(ir.Channel),fromId:Bi(ir.AccountAddress),payload:Fi(ir.Transaction),ttl:ba,fee:Zi,nonce:ca("fromId")},{tag:ga(Hr.GaAttachTx),version:ga(1,!0),ownerId:Bi(ir.AccountAddress),nonce:ca("ownerId"),code:Fi(ir.ContractBytearray),authFun:ya,ctVersion:Mi,fee:Zi,ttl:ba,gasLimit:ta,gasPrice:Yi,callData:Fi(ir.ContractBytearray)},{tag:ga(Hr.GaMetaTx),version:ga(2,!0),gaId:Bi(ir.AccountAddress),authData:Fi(ir.ContractBytearray),abiVersion:Ri,fee:Zi,gasLimit:ta,gasPrice:Yi,tx:Pa},{tag:ga(Hr.PayingForTx),version:ga(1,!0),payerId:Bi(ir.AccountAddress),nonce:ca("payerId"),fee:Zi,tx:Pa}];var qa=n(858);function Ra(e,t,n,r){const i=e.filter((e=>e.tag.constValue===n));if(0===i.length)throw new Ve(`${t[n]} (${n})`,0);if(null==r){const e=i.find((e=>e.version.constValueOptional));if(null==e)throw new te(`Can't find default schema of ${t[n]} (${n})`);r=e.version.constValue}const a=i.find((e=>e.version.constValue===r));if(null==a)throw new Ve(`${t[n]} (${n})`,r);return Object.entries(a)}function Oa(e,t,n,r,i){const a=Ra(e,t,n.tag,n.version).map((([e,t])=>t.serialize(n[e],{...n,...r},n)));return br((0,qa.encode)(a),i)}function ka(e,t,n,r,i){const a=(0,qa.decode)(vr(n)),s=+ei(a[0]),o=Ra(e,t,s,+ei(a[1]));if(null!=r&&r!==s)throw new $e(`Expected ${t[r]} tag, got ${t[s]} instead`);if(a.length!==o.length)throw new G("RLP length",o.length,a.length);return Object.fromEntries(o.map((([e,t],n)=>[e,t.deserialize(a[n],i)])))}var Ba=n(8287).Buffer,$a={serialize(e){return Ba.from([e?1:0])},deserialize(e){return 1===e[0]}};function Ua(e,t){return{serialize(e,{packEntry:n}){return vr(n({tag:Ca.Mtree,values:Object.entries(e).map((([e,r])=>({tag:Ca.MtreeValue,key:vr(e),value:vr(n({...r,tag:t}))})))}))},deserialize(n,{unpackEntry:r}){const{values:i}=r(br(n,ir.Bytearray),Ca.Mtree);return Object.fromEntries(i.filter((({key:t})=>e!==ir.ContractAddress||32===t.length)).map((({key:n,value:i})=>[br(n,e),r(br(i,ir.Bytearray),t)])))},recursiveType:!0}}var La,Ga=n(8287).Buffer;function Fa(e,t,n){Da(e,t),t.set(e,n)}function Da(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Va(e,t,n){return e.set(Ha(e,t),n),n}function ja(e,t){return e.get(Ha(e,t))}function Ha(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ja=function(e){return e[e.Branch=0]="Branch",e[e.Extension=1]="Extension",e[e.Leaf=2]="Leaf",e}(Ja||{}),Wa=new WeakMap,Ya=new WeakMap,Ka=new WeakMap,Qa=new WeakMap,Xa=new WeakMap,Za=new WeakMap,es=new WeakSet;class ts{get isComplete(){return ja(Ya,this)}constructor(e,t,n,r){var i;if(Da(this,i=es),i.add(this),Fa(this,Wa,void 0),Fa(this,Ya,!0),Fa(this,Ka,void 0),Fa(this,Qa,void 0),Fa(this,Xa,void 0),Fa(this,Za,void 0),Va(Qa,this,t),Va(Xa,this,n),Va(Za,this,r),Va(Wa,this,e[0].toString("hex")),Va(Ka,this,Object.fromEntries(e[1].map((e=>[e[0].toString("hex"),e[1]])))),null!=ja(Ka,this)[ja(Wa,this)])Object.entries(ja(Ka,this)).forEach((([e,t])=>{if(ns.call(ts,t)!==e)throw new Me;const{type:n}=rs.call(ts,t);switch(n){case Ja.Branch:t.slice(0,16).filter((e=>e.length)).forEach((e=>{null==ja(Ka,this)[e.toString("hex")]&&Va(Ya,this,!1)}));break;case Ja.Extension:if(null==ja(Ka,this)[t[1].toString("hex")])throw new qe("Can't find a node by hash in extension node");break;case Ja.Leaf:break;default:throw new te(`Unknown MPTree node type: ${n}`)}}));else{if(0!==Object.keys(ja(Ka,this)).length)throw new qe("Can't find a node by root hash");Va(Ya,this,!1)}}isEqual(e){return ja(Wa,this)===ja(Wa,e)}serialize(){return[Ga.from(ja(Wa,this),"hex"),Object.entries(ja(Ka,this)).map((([e,t])=>[Ga.from(e,"hex"),t]))]}get(e){const t=Ha(es,this,is).call(this,vr(e).toString("hex"));return null==t?t:ja(Za,this).call(this,br(t,ir.Bytearray),ja(Xa,this))}toObject(){return Object.fromEntries(Ha(es,this,as).call(this).filter((([e])=>ja(Qa,this)!==ir.ContractAddress||66!==e.length)).map((([e,t])=>[br(Ga.from(e,"hex"),ja(Qa,this)),ja(Za,this).call(this,br(t,ir.Bytearray),ja(Xa,this))])))}}function ns(e){return Ga.from(Sr((0,qa.encode)(e))).toString("hex")}function rs(e){switch(e.length){case 17:return{type:Ja.Branch,...0!==e[16].length&&{value:e[16]}};case 2:{const t=e[0][0]>>4;if(t>3)throw new Oe(t);const n=t<=1?Ja.Extension:Ja.Leaf,r=[0,2].includes(t)?2:1;return{type:n,...n===Ja.Leaf&&{value:e[1]},path:e[0].toString("hex").slice(r)}}default:throw new Re(e.length)}}function is(e){let t=ja(Wa,this),n=e;for(;;){const e=ja(Ka,this)[t];if(null==e){if(!this.isComplete)return;throw new te("Can't find node in complete tree")}const{type:r,value:i,path:a}=rs.call(La,e);switch(r){case Ja.Branch:if(0===n.length)return i;t=e[+`0x${n[0]}`].toString("hex"),n=n.substring(1);break;case Ja.Extension:if(n.substring(0,a?.length)!==a)return;t=e[1].toString("hex"),n=n.substring(a.length);break;case Ja.Leaf:if(a!==n)return;return i;default:throw new te(`Unknown MPTree node type: ${r}`)}}}function as(){const e=[],t=(n,r)=>{const i=ja(Ka,this)[n];if(null==i){if(!this.isComplete)return;throw new te("Can't find node in complete tree")}const{type:a,value:s,path:o}=rs.call(La,i);switch(a){case Ja.Branch:i.slice(0,16).map(((e,t)=>[e,t])).filter((([e])=>e.length)).forEach((([e,n])=>t(e.toString("hex"),r+n.toString(16)))),null!=s&&e.push([r,s]);break;case Ja.Extension:t(i[1].toString("hex"),r+o);break;case Ja.Leaf:if(null==s)throw new ne;e.push([r+o,s]);break;default:throw new te(`Unknown MPTree node type: ${a}`)}};return t(ja(Wa,this),""),e}function ss(e,t){return{serialize(e){return e.serialize()},deserialize(n,{unpackEntry:r}){return new ts(n,e,t,r)}}}function os(e){return{serialize(t,{packEntry:n}){return vr(n({tag:e,payload:t}))},deserialize(t,{unpackEntry:n}){return n(br(t,ir.Bytearray),e).payload},recursiveType:!0}}La=ts;const cs=$i(Vi(Ca.MtreeValue)),us=Ua(ir.ContractAddress,Ca.Contract),ls=Ua(ir.AccountAddress,Ca.Account),ps=Ua(ir.Bytearray,Ca.ContractCall),ds=Ua(ir.Channel,Ca.Channel),ms=Ua(ir.Name,Ca.Name),hs=Ua(ir.OracleAddress,Ca.Oracle),fs=[{tag:ga(Ca.Account),version:ga(1),nonce:ea,balance:Ui},{tag:ga(Ca.Account),version:ga(2,!0),flags:Ui,nonce:ea,balance:Ui,gaContract:Bi(ir.ContractAddress,ir.Name),gaAuthFun:Fi(ir.ContractBytearray)},{tag:ga(Ca.Name),version:ga(1,!0),accountId:Bi(ir.AccountAddress),nameTtl:ea,status:ya,clientTtl:ea,pointers:ma},{tag:ga(Ca.Contract),version:ga(1,!0),owner:Bi(ir.AccountAddress),ctVersion:Mi,code:Fi(ir.ContractBytearray),log:Fi(ir.ContractBytearray),active:$a,referers:$i(Bi(ir.AccountAddress)),deposit:Li},{tag:ga(Ca.ContractCall),version:ga(2,!0),callerId:Bi(ir.AccountAddress),callerNonce:ea,height:ea,contractId:Bi(ir.ContractAddress),gasPrice:Ui,gasUsed:ea,returnValue:Fi(ir.ContractBytearray),returnType:Hi(Ta),log:$i(ya)},{tag:ga(Ca.Oracle),version:ga(1,!0),accountId:Bi(ir.AccountAddress),queryFormat:wa,responseFormat:wa,queryFee:Li,oracleTtlValue:ea,abiVersion:Ri},{tag:ga(Ca.Channel),version:ga(3,!0),initiator:Bi(ir.AccountAddress),responder:Bi(ir.AccountAddress),channelAmount:Ui,initiatorAmount:Ui,responderAmount:Ui,channelReserve:Ui,initiatorDelegateIds:$i(Bi(...ki)),responderDelegateIds:$i(Bi(...ki)),stateHash:Fi(ir.State),round:ea,soloRound:Ui,lockPeriod:Ui,lockedUntil:Ui,initiatorAuth:Fi(ir.ContractBytearray),responderAuth:Fi(ir.ContractBytearray)},{tag:ga(Ca.ChannelOffChainUpdateTransfer),version:ga(1,!0),from:Bi(ir.AccountAddress),to:Bi(ir.AccountAddress),amount:Ui},{tag:ga(Ca.ChannelOffChainUpdateDeposit),version:ga(1,!0),from:Bi(ir.AccountAddress),amount:Ui},{tag:ga(Ca.ChannelOffChainUpdateWithdraw),version:ga(1,!0),from:Bi(ir.AccountAddress),amount:Ui},{tag:ga(Ca.ChannelOffChainUpdateCreateContract),version:ga(1,!0),owner:Bi(ir.AccountAddress),ctVersion:Mi,code:Fi(ir.ContractBytearray),deposit:Ui,callData:Fi(ir.ContractBytearray)},{tag:ga(Ca.ChannelOffChainUpdateCallContract),version:ga(1,!0),caller:Bi(ir.AccountAddress),contract:Bi(ir.ContractAddress),abiVersion:Ri,amount:Ui,callData:Fi(ir.ContractBytearray),callStack:ya,gasPrice:Yi,gasLimit:ta},{tag:ga(Ca.TreesPoi),version:ga(1,!0),accounts:$i(ss(ir.AccountAddress,Ca.Account)),calls:$i(ss(ir.Bytearray,Ca.ContractCall)),channels:$i(ss(ir.Channel,Ca.Channel)),contracts:$i(ss(ir.ContractAddress,Ca.Contract)),ns:$i(ss(ir.Name,Ca.Name)),oracles:$i(ss(ir.OracleAddress,Ca.Oracle))},{tag:ga(Ca.StateTrees),version:ga(0,!0),contracts:os(Ca.ContractsMtree),calls:os(Ca.CallsMtree),channels:os(Ca.ChannelsMtree),ns:os(Ca.NameserviceMtree),oracles:os(Ca.OraclesMtree),accounts:os(Ca.AccountsMtree)},{tag:ga(Ca.Mtree),version:ga(1,!0),values:cs},{tag:ga(Ca.MtreeValue),version:ga(1,!0),key:ya,value:ya},{tag:ga(Ca.ContractsMtree),version:ga(1,!0),payload:us},{tag:ga(Ca.CallsMtree),version:ga(1,!0),payload:ps},{tag:ga(Ca.ChannelsMtree),version:ga(1,!0),payload:ds},{tag:ga(Ca.NameserviceMtree),version:ga(1,!0),payload:ms},{tag:ga(Ca.OraclesMtree),version:ga(1,!0),payload:hs},{tag:ga(Ca.AccountsMtree),version:ga(1,!0),payload:ls},{tag:ga(Ca.GaMetaTxAuthData),version:ga(1,!0),fee:Li,gasPrice:Yi,txHash:Fi(ir.TxHash)}],ys=[[Ca.CallsMtree,ir.CallStateTree],[Ca.StateTrees,ir.StateTrees],[Ca.TreesPoi,ir.Poi]];function gs(e){var t;const n=null!==(t=ys.find((([t])=>t===e.tag))?.[1])&&void 0!==t?t:ir.Bytearray;return Oa(fs,Ca,e,{packEntry:gs},n)}function ws(e,t){var n;return null!==(n=t)&&void 0!==n||(t=ys.find((([,t])=>e.startsWith(t)))?.[0]),ka(fs,Ca,e,t,{unpackEntry:ws})}function Ns(e,t){return Ra(Ma,Hr,e,t)}function vs(e){return Oa(Ma,Hr,e,{unpackTx:xs,buildTx:vs,rebuildTx:t=>vs({...e,...t}),packEntry:gs},ir.Transaction)}async function bs(e){return await Promise.all(Ns(e.tag,e.version).map((async([t,n])=>{null!=n.prepare&&(e[t]=await n.prepare(e[t],e,e))}))),vs(e)}function xs(e,t){return ka(Ma,Hr,e,t,{unpackTx:xs,unpackEntry:ws})}function _s(e){return br(Sr("string"==typeof e&&e.startsWith("tx_")?vr(e):e),ir.TxHash)}function Ts(e){let t=xs(e);if(Hr.SignedTx===t.tag&&(t=t.encodedTx),Hr.ContractCreateTx!==t.tag&&Hr.GaAttachTx!==t.tag)throw new G("contractTx","a contractCreateTx or gaAttach",t.tag);return Wr(t.ownerId,t.nonce)}function Cs(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function Ss(e){const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}const As="$",Ps="_",Es=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,zs=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;function Is(e,t){var n,r;const i=e.parsedHeaders;if("HEAD"===e.request.method)return Object.assign(Object.assign({},i),{body:e.parsedBody});const a=t&&t.bodyMapper,s=Boolean(null==a?void 0:a.nullable),o=null==a?void 0:a.type.name;if("Stream"===o)return Object.assign(Object.assign({},i),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody});const c="Composite"===o&&a.type.modelProperties||{},u=Object.keys(c).some((e=>""===c[e].serializedName));if("Sequence"===o||u){const t=null!==(n=e.parsedBody)&&void 0!==n?n:[];for(const n of Object.keys(c))c[n].serializedName&&(t[n]=null===(r=e.parsedBody)||void 0===r?void 0:r[n]);if(i)for(const e of Object.keys(i))t[e]=i[e];return!s||e.parsedBody||i||0!==Object.getOwnPropertyNames(c).length?t:null}return function(e){const t=Object.assign(Object.assign({},e.headers),e.body);return e.hasNullableType&&0===Object.getOwnPropertyNames(t).length?e.shouldWrapBody?{body:null}:null:e.shouldWrapBody?Object.assign(Object.assign({},e.headers),{body:e.body}):t}({body:e.parsedBody,headers:i,hasNullableType:s,shouldWrapBody:(l=e.parsedBody,p=o,"Composite"!==p&&"Dictionary"!==p&&("string"==typeof l||"number"==typeof l||"boolean"==typeof l||null!==(null==p?void 0:p.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i))||null==l))});var l,p}class Ms{constructor(e={},t=!1){this.modelMappers=e,this.isXML=t}validateConstraints(e,t,n){const r=(e,r)=>{throw new Error(`"${n}" with value "${t}" should satisfy the constraint "${e}": ${r}.`)};if(e.constraints&&null!=t){const{ExclusiveMaximum:n,ExclusiveMinimum:i,InclusiveMaximum:a,InclusiveMinimum:s,MaxItems:o,MaxLength:c,MinItems:u,MinLength:l,MultipleOf:p,Pattern:d,UniqueItems:m}=e.constraints;if(void 0!==n&&t>=n&&r("ExclusiveMaximum",n),void 0!==i&&t<=i&&r("ExclusiveMinimum",i),void 0!==a&&t>a&&r("InclusiveMaximum",a),void 0!==s&&t<s&&r("InclusiveMinimum",s),void 0!==o&&t.length>o&&r("MaxItems",o),void 0!==c&&t.length>c&&r("MaxLength",c),void 0!==u&&t.length<u&&r("MinItems",u),void 0!==l&&t.length<l&&r("MinLength",l),void 0!==p&&t%p!=0&&r("MultipleOf",p),d){const e="string"==typeof d?new RegExp(d):d;"string"==typeof t&&null!==t.match(e)||r("Pattern",d)}m&&t.some(((e,t,n)=>n.indexOf(e)!==t))&&r("UniqueItems",m)}}serialize(e,t,n,r={xml:{}}){var i,a,s;const o={xml:{rootName:null!==(i=r.xml.rootName)&&void 0!==i?i:"",includeRoot:null!==(a=r.xml.includeRoot)&&void 0!==a&&a,xmlCharKey:null!==(s=r.xml.xmlCharKey)&&void 0!==s?s:Ps}};let c={};const u=e.type.name;n||(n=e.serializedName),null!==u.match(/^Sequence$/i)&&(c=[]),e.isConstant&&(t=e.defaultValue);const{required:l,nullable:p}=e;if(l&&p&&void 0===t)throw new Error(`${n} cannot be undefined.`);if(l&&!p&&null==t)throw new Error(`${n} cannot be null or undefined.`);if(!l&&!1===p&&null===t)throw new Error(`${n} cannot be null.`);return null==t||null!==u.match(/^any$/i)?c=t:null!==u.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)?c=function(e,t,n){if(null!=n)if(null!==e.match(/^Number$/i)){if("number"!=typeof n)throw new Error(`${t} with value ${n} must be of type number.`)}else if(null!==e.match(/^String$/i)){if("string"!=typeof n.valueOf())throw new Error(`${t} with value "${n}" must be of type string.`)}else if(null!==e.match(/^Uuid$/i)){if("string"!=typeof n.valueOf()||(r=n,!zs.test(r)))throw new Error(`${t} with value "${n}" must be of type string and a valid uuid.`)}else if(null!==e.match(/^Boolean$/i)){if("boolean"!=typeof n)throw new Error(`${t} with value ${n} must be of type boolean.`)}else if(null!==e.match(/^Stream$/i)){const e=typeof n;if(!("string"===e||"function"==typeof n.pipe||"function"==typeof n.tee||n instanceof ArrayBuffer||ArrayBuffer.isView(n)||("function"==typeof Blob||"object"==typeof Blob)&&n instanceof Blob||"function"===e))throw new Error(`${t} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`)}var r;return n}(u,n,t):null!==u.match(/^Enum$/i)?c=function(e,t,n){if(!t)throw new Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`);if(!t.some((e=>"string"==typeof e.valueOf()?e.toLowerCase()===n.toLowerCase():e===n)))throw new Error(`${n} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`);return n}(n,e.type.allowedValues,t):null!==u.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)?c=function(e,t,n){if(null!=t)if(null!==e.match(/^Date$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(null!==e.match(/^DateTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(null!==e.match(/^DateTimeRfc1123$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in RFC-1123 format.`);t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(null!==e.match(/^UnixTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`);t=function(e){if(e)return"string"==typeof e.valueOf()&&(e=new Date(e)),Math.floor(e.getTime()/1e3)}(t)}else if(null!==e.match(/^TimeSpan$/i)&&!function(e){return Es.test(e)}(t))throw new Error(`${n} must be a string in ISO 8601 format. Instead was "${t}".`);return t}(u,t,n):null!==u.match(/^ByteArray$/i)?c=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);t=Cs(t)}return t}(n,t):null!==u.match(/^Base64Url$/i)?c=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);t=function(e){if(e){if(!(e instanceof Uint8Array))throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.");return function(e){let t=e.length;for(;t-1>=0&&"="===e[t-1];)--t;return e.substr(0,t)}(Cs(e)).replace(/\+/g,"-").replace(/\//g,"_")}}(t)}return t}(n,t):null!==u.match(/^Sequence$/i)?c=function(e,t,n,r,i,a){var s;if(!Array.isArray(n))throw new Error(`${r} must be of type Array.`);let o=t.type.element;if(!o||"object"!=typeof o)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${r}.`);"Composite"===o.type.name&&o.type.className&&(o=null!==(s=e.modelMappers[o.type.className])&&void 0!==s?s:o);const c=[];for(let t=0;t<n.length;t++){const s=e.serialize(o,n[t],r,a);if(i&&o.xmlNamespace){const e=o.xmlNamespacePrefix?`xmlns:${o.xmlNamespacePrefix}`:"xmlns";"Composite"===o.type.name?(c[t]=Object.assign({},s),c[t][As]={[e]:o.xmlNamespace}):(c[t]={},c[t][a.xml.xmlCharKey]=s,c[t][As]={[e]:o.xmlNamespace})}else c[t]=s}return c}(this,e,t,n,Boolean(this.isXML),o):null!==u.match(/^Dictionary$/i)?c=function(e,t,n,r,i,a){if("object"!=typeof n)throw new Error(`${r} must be of type object.`);const s=t.type.value;if(!s||"object"!=typeof s)throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${r}.`);const o={};for(const t of Object.keys(n)){const c=e.serialize(s,n[t],r,a);o[t]=Bs(s,c,i,a)}if(i&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns",n=o;return n[As]={[e]:t.xmlNamespace},n}return o}(this,e,t,n,Boolean(this.isXML),o):null!==u.match(/^Composite$/i)&&(c=function(e,t,n,r,i,a){if(Ls(e,t)&&(t=Us(e,t,n,"clientName")),null!=n){const s={},o=ks(e,t,r);for(const c of Object.keys(o)){const u=o[c];if(u.readOnly)continue;let l,p=s;if(e.isXML)l=u.xmlIsWrapped?u.xmlName:u.xmlElementName||u.xmlName;else{const e=Rs(u.serializedName);l=e.pop();for(const t of e){null==p[t]&&(void 0!==n[c]&&null!==n[c]||void 0!==u.defaultValue)&&(p[t]={}),p=p[t]}}if(null!=p){if(i&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns";p[As]=Object.assign(Object.assign({},p[As]),{[e]:t.xmlNamespace})}const s=""!==u.serializedName?r+"."+u.serializedName:r;let o=n[c];const d=Ls(e,t);d&&d.clientName===c&&null==o&&(o=t.serializedName);const m=e.serialize(u,o,s,a);if(void 0!==m&&null!=l){const e=Bs(u,m,i,a);i&&u.xmlIsAttribute?(p[As]=p[As]||{},p[As][l]=m):i&&u.xmlIsWrapped?p[l]={[u.xmlElementName]:e}:p[l]=e}}}const c=function(e,t,n){const r=t.type.additionalProperties;if(!r&&t.type.className){const r=Os(e,t,n);return null==r?void 0:r.type.additionalProperties}return r}(e,t,r);if(c){const t=Object.keys(o);for(const i in n)t.every((e=>e!==i))&&(s[i]=e.serialize(c,n[i],r+'["'+i+'"]',a))}return s}return n}(this,e,t,n,Boolean(this.isXML),o)),c}deserialize(e,t,n,r={xml:{}}){var i,a,s,o;const c={xml:{rootName:null!==(i=r.xml.rootName)&&void 0!==i?i:"",includeRoot:null!==(a=r.xml.includeRoot)&&void 0!==a&&a,xmlCharKey:null!==(s=r.xml.xmlCharKey)&&void 0!==s?s:Ps},ignoreUnknownProperties:null!==(o=r.ignoreUnknownProperties)&&void 0!==o&&o};if(null==t)return this.isXML&&"Sequence"===e.type.name&&!e.xmlIsWrapped&&(t=[]),void 0!==e.defaultValue&&(t=e.defaultValue),t;let u;const l=e.type.name;if(n||(n=e.serializedName),null!==l.match(/^Composite$/i))u=function(e,t,n,r,i){var a,s;const o=null!==(a=i.xml.xmlCharKey)&&void 0!==a?a:Ps;Ls(e,t)&&(t=Us(e,t,n,"serializedName"));const c=ks(e,t,r);let u={};const l=[];for(const a of Object.keys(c)){const p=c[a],d=Rs(c[a].serializedName);l.push(d[0]);const{serializedName:m,xmlName:h,xmlElementName:f}=p;let y=r;""!==m&&void 0!==m&&(y=r+"."+m);const g=p.headerCollectionPrefix;if(g){const t={};for(const r of Object.keys(n))r.startsWith(g)&&(t[r.substring(g.length)]=e.deserialize(p.type.value,n[r],y,i)),l.push(r);u[a]=t}else if(e.isXML)if(p.xmlIsAttribute&&n[As])u[a]=e.deserialize(p,n[As][h],y,i);else if(p.xmlIsMsText)void 0!==n[o]?u[a]=n[o]:"string"==typeof n&&(u[a]=n);else{const t=f||h||m;if(p.xmlIsWrapped){const t=n[h],r=null!==(s=null==t?void 0:t[f])&&void 0!==s?s:[];u[a]=e.deserialize(p,r,y,i),l.push(h)}else{const r=n[t];u[a]=e.deserialize(p,r,y,i),l.push(t)}}else{let r,s=n,o=0;for(const e of d){if(!s)break;o++,s=s[e]}null===s&&o<d.length&&(s=void 0),r=s;const l=t.type.polymorphicDiscriminator;let m;if(l&&a===l.clientName&&null==r&&(r=t.serializedName),Array.isArray(n[a])&&""===c[a].serializedName){r=n[a];const t=e.deserialize(p,r,y,i);for(const[e,n]of Object.entries(u))Object.prototype.hasOwnProperty.call(t,e)||(t[e]=n);u=t}else void 0===r&&void 0===p.defaultValue||(m=e.deserialize(p,r,y,i),u[a]=m)}}const p=t.type.additionalProperties;if(p){const t=e=>{for(const t in c)if(Rs(c[t].serializedName)[0]===e)return!1;return!0};for(const a in n)t(a)&&(u[a]=e.deserialize(p,n[a],r+'["'+a+'"]',i))}else if(n&&!i.ignoreUnknownProperties)for(const e of Object.keys(n))void 0!==u[e]||l.includes(e)||$s(e,i)||(u[e]=n[e]);return u}(this,e,t,n,c);else{if(this.isXML){const e=c.xml.xmlCharKey;void 0!==t[As]&&void 0!==t[e]&&(t=t[e])}null!==l.match(/^Number$/i)?(u=parseFloat(t),isNaN(u)&&(u=t)):null!==l.match(/^Boolean$/i)?u="true"===t||"false"!==t&&t:null!==l.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)?u=t:null!==l.match(/^(Date|DateTime|DateTimeRfc1123)$/i)?u=new Date(t):null!==l.match(/^UnixTime$/i)?u=function(e){if(e)return new Date(1e3*e)}(t):null!==l.match(/^ByteArray$/i)?u=Ss(t):null!==l.match(/^Base64Url$/i)?u=function(e){if(e){if(e&&"string"!=typeof e.valueOf())throw new Error("Please provide an input of type string for converting to Uint8Array");return Ss(e=e.replace(/-/g,"+").replace(/_/g,"/"))}}(t):null!==l.match(/^Sequence$/i)?u=function(e,t,n,r,i){var a;let s=t.type.element;if(!s||"object"!=typeof s)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${r}`);if(n){Array.isArray(n)||(n=[n]),"Composite"===s.type.name&&s.type.className&&(s=null!==(a=e.modelMappers[s.type.className])&&void 0!==a?a:s);const t=[];for(let a=0;a<n.length;a++)t[a]=e.deserialize(s,n[a],`${r}[${a}]`,i);return t}return n}(this,e,t,n,c):null!==l.match(/^Dictionary$/i)&&(u=function(e,t,n,r,i){const a=t.type.value;if(!a||"object"!=typeof a)throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${r}`);if(n){const t={};for(const s of Object.keys(n))t[s]=e.deserialize(a,n[s],r,i);return t}return n}(this,e,t,n,c))}return e.isConstant&&(u=e.defaultValue),u}}function qs(e={},t=!1){return new Ms(e,t)}function Rs(e){const t=[];let n="";if(e){const r=e.split(".");for(const e of r)"\\"===e.charAt(e.length-1)?n+=e.substr(0,e.length-1)+".":(n+=e,t.push(n),n="")}return t}function Os(e,t,n){const r=t.type.className;if(!r)throw new Error(`Class name for model "${n}" is not provided in the mapper "${JSON.stringify(t,void 0,2)}".`);return e.modelMappers[r]}function ks(e,t,n){let r=t.type.modelProperties;if(!r){const i=Os(e,t,n);if(!i)throw new Error(`mapper() cannot be null or undefined for model "${t.type.className}".`);if(r=null==i?void 0:i.type.modelProperties,!r)throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(i)}" of type "${t.type.className}" for object "${n}".`)}return r}function Bs(e,t,n,r){if(!n||!e.xmlNamespace)return t;const i=e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:"xmlns",a={[i]:e.xmlNamespace};if(["Composite"].includes(e.type.name)){if(t[As])return t;{const e=Object.assign({},t);return e[As]=a,e}}const s={};return s[r.xml.xmlCharKey]=t,s[As]=a,s}function $s(e,t){return[As,t.xml.xmlCharKey].includes(e)}function Us(e,t,n,r){var i;const a=Ls(e,t);if(a){let s=a[r];if(s){"serializedName"===r&&(s=s.replace(/\\/gi,""));const a=n[s],o=null!==(i=t.type.uberParent)&&void 0!==i?i:t.type.className;if("string"==typeof a&&o){const n=function(e,t,n){const r=[n];for(;r.length;){const n=r.shift(),i=t===n?t:n+"."+t;if(Object.prototype.hasOwnProperty.call(e,i))return e[i];for(const[t,i]of Object.entries(e))t.startsWith(n+".")&&i.type.uberParent===n&&i.type.className&&r.push(i.type.className)}}(e.modelMappers.discriminators,a,o);n&&(t=n)}}}return t}function Ls(e,t){return t.type.polymorphicDiscriminator||Gs(e,t.type.uberParent)||Gs(e,t.type.className)}function Gs(e,t){return t&&e.modelMappers[t]&&e.modelMappers[t].type.polymorphicDiscriminator}const Fs="Sequence",Ds="Stream",Vs={operationRequestMap:new WeakMap};function js(e,t,n){let r=t.parameterPath;const i=t.mapper;let a;if("string"==typeof r&&(r=[r]),Array.isArray(r)){if(r.length>0)if(i.isConstant)a=i.defaultValue;else{let t=Hs(e,r);!t.propertyFound&&n&&(t=Hs(n,r));let s=!1;t.propertyFound||(s=i.required||"options"===r[0]&&2===r.length),a=s?i.defaultValue:t.propertyValue}}else{i.required&&(a={});for(const t in r){const s=i.type.modelProperties[t],o=js(e,{parameterPath:r[t],mapper:s},n);void 0!==o&&(a||(a={}),a[t]=o)}}return a}function Hs(e,t){const n={propertyFound:!1};let r=0;for(;r<t.length;++r){const n=t[r];if(!e||!(n in e))break;e=e[n]}return r===t.length&&(n.propertyValue=e,n.propertyFound=!0),n}const Js=Symbol.for("@azure/core-client original request");function Ws(e){if(function(e){return Js in e}(e))return Ws(e[Js]);let t=Vs.operationRequestMap.get(e);return t||(t={},Vs.operationRequestMap.set(e,t)),t}const Ys=["application/json","text/json"],Ks=["application/xml","application/atom+xml"];function Qs(e){const{parameterPath:t,mapper:n}=e;let r;return r="string"==typeof t?t:Array.isArray(t)?t.join("."):n.serializedName,r}function Xs(e={}){const t=kn(null!=e?e:{});return e.credentialOptions&&t.addPolicy(function(e){var t;const{credential:n,scopes:r,challengeCallbacks:i}=e,a=e.logger||Mt,s=Object.assign({authorizeRequest:null!==(t=null==i?void 0:i.authorizeRequest)&&void 0!==t?t:Gn,authorizeRequestOnChallenge:null==i?void 0:i.authorizeRequestOnChallenge},i),o=n?function(e,t){let n,r=null,i=null;const a=Object.assign(Object.assign({},Ln),t),s={get isRefreshing(){return null!==r},get shouldRefresh(){var e;return!s.isRefreshing&&(!!((null==i?void 0:i.refreshAfterTimestamp)&&i.refreshAfterTimestamp<Date.now())||(null!==(e=null==i?void 0:i.expiresOnTimestamp)&&void 0!==e?e:0)-a.refreshWindowInMs<Date.now())},get mustRefresh(){return null===i||i.expiresOnTimestamp-a.forcedRefreshWindowInMs<Date.now()}};function o(t,o){var c;return s.isRefreshing||(r=async function(e,t,n){async function r(){if(!(Date.now()<n)){const t=await e();if(null===t)throw new Error("Failed to refresh access token.");return t}try{return await e()}catch(e){return null}}let i=await r();for(;null===i;)await yn(t),i=await r();return i}((()=>e.getToken(t,o)),a.retryIntervalInMs,null!==(c=null==i?void 0:i.expiresOnTimestamp)&&void 0!==c?c:Date.now()).then((e=>(r=null,i=e,n=o.tenantId,i))).catch((e=>{throw r=null,i=null,n=void 0,e}))),r}return async(e,t)=>{const r=Boolean(t.claims),a=n!==t.tenantId;return r&&(i=null),a||r||s.mustRefresh?o(e,t):(s.shouldRefresh&&o(e,t),i)}}(n):()=>Promise.resolve(null);return{name:"bearerTokenAuthenticationPolicy",async sendRequest(e,t){if(!e.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");let n,i;await s.authorizeRequest({scopes:Array.isArray(r)?r:[r],request:e,getAccessToken:o,logger:a});try{n=await t(e)}catch(e){i=e,n=e.response}if(s.authorizeRequestOnChallenge&&401===(null==n?void 0:n.status)&&function(e){const t=e.headers.get("WWW-Authenticate");if(401===e.status&&t)return t}(n)&&await s.authorizeRequestOnChallenge({scopes:Array.isArray(r)?r:[r],request:e,response:n,getAccessToken:o,logger:a}))return t(e);if(i)throw i;return n}}}({credential:e.credentialOptions.credential,scopes:e.credentialOptions.credentialScopes})),t.addPolicy(function(e={}){const t=e.stringifyXML;return{name:"serializationPolicy",async sendRequest(e,n){const r=Ws(e),i=null==r?void 0:r.operationSpec,a=null==r?void 0:r.operationArguments;return i&&a&&(function(e,t,n){var r,i;if(n.headerParameters)for(const r of n.headerParameters){let i=js(t,r);if(null!=i||r.mapper.required){i=n.serializer.serialize(r.mapper,i,Qs(r));const t=r.mapper.headerCollectionPrefix;if(t)for(const n of Object.keys(i))e.headers.set(t+n,i[n]);else e.headers.set(r.mapper.serializedName||Qs(r),i)}}const a=null===(i=null===(r=t.options)||void 0===r?void 0:r.requestOptions)||void 0===i?void 0:i.customHeaders;if(a)for(const t of Object.keys(a))e.headers.set(t,a[t])}(e,a,i),function(e,t,n,r=function(){throw new Error("XML serialization unsupported!")}){var i,a,s,o,c;const u=null===(i=t.options)||void 0===i?void 0:i.serializerOptions,l={xml:{rootName:null!==(a=null==u?void 0:u.xml.rootName)&&void 0!==a?a:"",includeRoot:null!==(s=null==u?void 0:u.xml.includeRoot)&&void 0!==s&&s,xmlCharKey:null!==(o=null==u?void 0:u.xml.xmlCharKey)&&void 0!==o?o:Ps}},p=l.xml.xmlCharKey;if(n.requestBody&&n.requestBody.mapper){e.body=js(t,n.requestBody);const i=n.requestBody.mapper,{required:a,serializedName:s,xmlName:o,xmlElementName:u,xmlNamespace:d,xmlNamespacePrefix:m,nullable:h}=i,f=i.type.name;try{if(void 0!==e.body&&null!==e.body||h&&null===e.body||a){const t=Qs(n.requestBody);e.body=n.serializer.serialize(i,e.body,t,l);const a=f===Ds;if(n.isXML){const t=m?`xmlns:${m}`:"xmlns",n=function(e,t,n,r,i){if(e&&!["Composite","Sequence","Dictionary"].includes(n)){const n={};return n[i.xml.xmlCharKey]=r,n[As]={[t]:e},n}return r}(d,t,f,e.body,l);f===Fs?e.body=r(function(e,t,n,r){if(Array.isArray(e)||(e=[e]),!n||!r)return{[t]:e};const i={[t]:e};return i[As]={[n]:r},i}(n,u||o||s,t,d),{rootName:o||s,xmlCharKey:p}):a||(e.body=r(n,{rootName:o||s,xmlCharKey:p}))}else{if("String"===f&&((null===(c=n.contentType)||void 0===c?void 0:c.match("text/plain"))||"text"===n.mediaType))return;a||(e.body=JSON.stringify(e.body))}}}catch(e){throw new Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(s,void 0," ")}.`)}}else if(n.formDataParameters&&n.formDataParameters.length>0){e.formData={};for(const r of n.formDataParameters){const i=js(t,r);if(null!=i){const t=r.mapper.serializedName||Qs(r);e.formData[t]=n.serializer.serialize(r.mapper,i,Qs(r),l)}}}}(e,a,i,t)),n(e)}}}(e.serializationOptions),{phase:"Serialize"}),t.addPolicy(function(e={}){var t,n,r,i,a,s,o;const c=null!==(n=null===(t=e.expectedContentTypes)||void 0===t?void 0:t.json)&&void 0!==n?n:Ys,u=null!==(i=null===(r=e.expectedContentTypes)||void 0===r?void 0:r.xml)&&void 0!==i?i:Ks,l=e.parseXML,p=e.serializerOptions,d={xml:{rootName:null!==(a=null==p?void 0:p.xml.rootName)&&void 0!==a?a:"",includeRoot:null!==(s=null==p?void 0:p.xml.includeRoot)&&void 0!==s&&s,xmlCharKey:null!==(o=null==p?void 0:p.xml.xmlCharKey)&&void 0!==o?o:Ps}};return{name:"deserializationPolicy",async sendRequest(e,t){const n=await t(e);return async function(e,t,n,r,i){const a=await async function(e,t,n,r,i){var a;if(!(null===(a=n.request.streamResponseStatusCodes)||void 0===a?void 0:a.has(n.status))&&n.bodyAsText){const a=n.bodyAsText,s=n.headers.get("Content-Type")||"",o=s?s.split(";").map((e=>e.toLowerCase())):[];try{if(0===o.length||o.some((t=>-1!==e.indexOf(t))))return n.parsedBody=JSON.parse(a),n;if(o.some((e=>-1!==t.indexOf(e)))){if(!i)throw new Error("Parsing XML not supported.");const e=await i(a,r.xml);return n.parsedBody=e,n}}catch(e){const t=`Error "${e}" occurred while parsing the response body - ${n.bodyAsText}.`,r=e.code||On.PARSE_ERROR;throw new On(t,{code:r,statusCode:n.status,request:n.request,response:n})}}return n}(e,t,n,r,i);if(!function(e){const t=Ws(e.request),n=null==t?void 0:t.shouldDeserialize;let r;return r=void 0===n||("boolean"==typeof n?n:n(e)),r}(a))return a;const s=Ws(a.request),o=null==s?void 0:s.operationSpec;if(!o||!o.responses)return a;const c=function(e){let t;const n=Ws(e.request),r=null==n?void 0:n.operationSpec;return r&&(t=(null==n?void 0:n.operationResponseGetter)?null==n?void 0:n.operationResponseGetter(r,e):r.responses[e.status]),t}(a),{error:u,shouldReturnResponse:l}=function(e,t,n,r){var i;const a=200<=e.status&&e.status<300,s=function(e){const t=Object.keys(e.responses);return 0===t.length||1===t.length&&"default"===t[0]}(t)?a:!!n;if(s){if(!n)return{error:null,shouldReturnResponse:!1};if(!n.isError)return{error:null,shouldReturnResponse:!1}}const o=null!=n?n:t.responses.default,c=(null===(i=e.request.streamResponseStatusCodes)||void 0===i?void 0:i.has(e.status))?`Unexpected status code: ${e.status}`:e.bodyAsText,u=new On(c,{statusCode:e.status,request:e.request,response:e});if(!o)throw u;const l=o.bodyMapper,p=o.headersMapper;try{if(e.parsedBody){const n=e.parsedBody;let i;if(l){let e=n;if(t.isXML&&l.type.name===Fs){e=[];const t=l.xmlElementName;"object"==typeof n&&t&&(e=n[t])}i=t.serializer.deserialize(l,e,"error.response.parsedBody",r)}const a=n.error||i||n;u.code=a.code,a.message&&(u.message=a.message),l&&(u.response.parsedBody=i)}e.headers&&p&&(u.response.parsedHeaders=t.serializer.deserialize(p,e.headers.toJSON(),"operationRes.parsedHeaders"))}catch(t){u.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:u,shouldReturnResponse:!1}}(a,o,c,r);if(u)throw u;if(l)return a;if(c){if(c.bodyMapper){let e=a.parsedBody;o.isXML&&c.bodyMapper.type.name===Fs&&(e="object"==typeof e?e[c.bodyMapper.xmlElementName]:[]);try{a.parsedBody=o.serializer.deserialize(c.bodyMapper,e,"operationRes.parsedBody",r)}catch(e){throw new On(`Error ${e} occurred in deserializing the responseBody - ${a.bodyAsText}`,{statusCode:a.status,request:a.request,response:a})}}else"HEAD"===o.httpMethod&&(a.parsedBody=n.status>=200&&n.status<300);c.headersMapper&&(a.parsedHeaders=o.serializer.deserialize(c.headersMapper,a.headers.toJSON(),"operationRes.parsedHeaders",{xml:{},ignoreUnknownProperties:!0}))}return a}(c,u,n,d,l)}}}(e.deserializationOptions),{phase:"Deserialize"}),t}let Zs;const eo={CSV:",",SSV:" ",Multi:"Multi",TSV:"\t",Pipes:"|"};function to(e,t,n,r){const i=function(e,t,n){var r;const i=new Map;if(null===(r=e.urlParameters)||void 0===r?void 0:r.length)for(const r of e.urlParameters){let a=js(t,r,n);const s=Qs(r);a=e.serializer.serialize(r.mapper,a,s),r.skipEncoding||(a=encodeURIComponent(a)),i.set(`{${r.mapper.serializedName||s}}`,a)}return i}(t,n,r);let a=!1,s=no(e,i);if(t.path){let e=no(t.path,i);"/{nextLink}"===t.path&&e.startsWith("/")&&(e=e.substring(1)),e.includes("://")?(s=e,a=!0):s=function(e,t){if(!t)return e;const n=new URL(e);let r=n.pathname;r.endsWith("/")||(r=`${r}/`),t.startsWith("/")&&(t=t.substring(1));const i=t.indexOf("?");if(-1!==i){const e=t.substring(0,i),a=t.substring(i+1);r+=e,a&&(n.search=n.search?`${n.search}&${a}`:a)}else r+=t;return n.pathname=r,n.toString()}(s,e)}const{queryParams:o,sequenceParams:c}=function(e,t,n){var r;const i=new Map,a=new Set;if(null===(r=e.queryParameters)||void 0===r?void 0:r.length)for(const r of e.queryParameters){"Sequence"===r.mapper.type.name&&r.mapper.serializedName&&a.add(r.mapper.serializedName);let s=js(t,r,n);if(null!=s||r.mapper.required){s=e.serializer.serialize(r.mapper,s,Qs(r));const t=r.collectionFormat?eo[r.collectionFormat]:"";if(Array.isArray(s)&&(s=s.map((e=>null==e?"":e))),"Multi"===r.collectionFormat&&0===s.length)continue;!Array.isArray(s)||"SSV"!==r.collectionFormat&&"TSV"!==r.collectionFormat||(s=s.join(t)),r.skipEncoding||(s=Array.isArray(s)?s.map((e=>encodeURIComponent(e))):encodeURIComponent(s)),!Array.isArray(s)||"CSV"!==r.collectionFormat&&"Pipes"!==r.collectionFormat||(s=s.join(t)),i.set(r.mapper.serializedName||Qs(r),s)}}return{queryParams:i,sequenceParams:a}}(t,n,r);return s=function(e,t,n,r=!1){if(0===t.size)return e;const i=new URL(e),a=function(e){const t=new Map;if(!e||"?"!==e[0])return t;const n=(e=e.slice(1)).split("&");for(const e of n){const[n,r]=e.split("=",2),i=t.get(n);i?Array.isArray(i)?i.push(r):t.set(n,[i,r]):t.set(n,r)}return t}(i.search);for(const[e,i]of t){const t=a.get(e);if(Array.isArray(t))if(Array.isArray(i)){t.push(...i);const n=new Set(t);a.set(e,Array.from(n))}else t.push(i);else t?(Array.isArray(i)?i.unshift(t):n.has(e)&&a.set(e,[t,i]),r||a.set(e,i)):a.set(e,i)}const s=[];for(const[e,t]of a)if("string"==typeof t)s.push(`${e}=${t}`);else if(Array.isArray(t))for(const n of t)s.push(`${e}=${n}`);else s.push(`${e}=${t}`);return i.search=s.length?`?${s.join("&")}`:"",i.toString()}(s,o,c,a),s}function no(e,t){let n=e;for(const[e,r]of t)n=n.split(e).join(r);return n}const ro=At("core-client");class io{constructor(e={}){var t,n;if(this._requestContentType=e.requestContentType,this._endpoint=null!==(t=e.endpoint)&&void 0!==t?t:e.baseUri,e.baseUri&&ro.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."),this._allowInsecureConnection=e.allowInsecureConnection,this._httpClient=e.httpClient||(Zs||(Zs=new Bn),Zs),this.pipeline=e.pipeline||function(e){const t=function(e){if(e.credentialScopes)return e.credentialScopes;if(e.endpoint)return`${e.endpoint}/.default`;if(e.baseUri)return`${e.baseUri}/.default`;if(e.credential&&!e.credentialScopes)throw new Error("When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy")}(e),n=e.credential&&t?{credentialScopes:t,credential:e.credential}:void 0;return Xs(Object.assign(Object.assign({},e),{credentialOptions:n}))}(e),null===(n=e.additionalPolicies)||void 0===n?void 0:n.length)for(const{policy:t,position:n}of e.additionalPolicies){const e="perRetry"===n?"Sign":void 0;this.pipeline.addPolicy(t,{afterPhase:e})}}async sendRequest(e){return this.pipeline.sendRequest(this._httpClient,e)}async sendOperationRequest(e,t){const n=t.baseUrl||this._endpoint;if(!n)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.");const r=function(e){return new Un(e)}({url:to(n,t,e,this)});r.method=t.httpMethod;const i=Ws(r);i.operationSpec=t,i.operationArguments=e;const a=t.contentType||this._requestContentType;a&&t.requestBody&&r.headers.set("Content-Type",a);const s=e.options;if(s){const e=s.requestOptions;e&&(e.timeout&&(r.timeout=e.timeout),e.onUploadProgress&&(r.onUploadProgress=e.onUploadProgress),e.onDownloadProgress&&(r.onDownloadProgress=e.onDownloadProgress),void 0!==e.shouldDeserialize&&(i.shouldDeserialize=e.shouldDeserialize),e.allowInsecureConnection&&(r.allowInsecureConnection=!0)),s.abortSignal&&(r.abortSignal=s.abortSignal),s.tracingOptions&&(r.tracingOptions=s.tracingOptions)}this._allowInsecureConnection&&(r.allowInsecureConnection=!0),void 0===r.streamResponseStatusCodes&&(r.streamResponseStatusCodes=function(e){const t=new Set;for(const n in e.responses){const r=e.responses[n];r.bodyMapper&&r.bodyMapper.type.name===Ds&&t.add(Number(n))}return t}(t));try{const e=await this.sendRequest(r),n=Is(e,t.responses[e.status]);return(null==s?void 0:s.onResponse)&&s.onResponse(e,n),n}catch(e){if("object"==typeof e&&(null==e?void 0:e.response)){const n=e.response,r=Is(n,t.responses[e.statusCode]||t.responses.default);e.details=r,(null==s?void 0:s.onResponse)&&s.onResponse(n,r,e)}throw e}}}function ao(e,t){const n=e=>e.split(/[-+]/)[0].split(".").map((e=>+e)),r=n(e),i=n(t),a=Math.max(...r,...i)+1,s=e=>e.reverse().reduce(((e,t,n)=>e+t*a**n),0);return s(r)-s(i)}function so(e,t,n){return ao(e,t)>=0&&(null==n||ao(e,n)<0)}const oo="_sdk-big-int-",co=(...e)=>{const t=qs(...e),{serialize:n,deserialize:r}=t;return Object.assign(t,{serialize(...[e,t,r,i]){if("BigInt"!==e.type.name||null==t)return n.call(this,e,t,r,i);var a;if("bigint"!=typeof t)throw null!==(a=r)&&void 0!==a||(r=e.serializedName),new Error(`${r} with value ${t} must be of type bigint.`);return t.toString()},deserialize(...[e,t,n,i]){if("BigInt"!==e.type.name||null==t){"string"==typeof t&&t.startsWith(oo)&&(console.warn(`AeSdk internal error: BigInt value ${t} handled incorrectly`),t=+t.replace(oo,""));const a=r.call(this,e,t,n,i);return a instanceof Date?new Date(+a/1e3):a}if("number"==typeof t&&t>Number.MAX_SAFE_INTEGER)throw new te(`Number ${t} is not accurate to be converted to BigInt`);return BigInt(t.toString().replace(oo,""))}})},uo=Number.MAX_SAFE_INTEGER.toString().length,lo=new RegExp(String.raw`("\w+":\s*)(\d{${uo},})(\s*[,}])`,"m"),po=new RegExp(String.raw`([[,]\s*)(\d{${uo},})\b`,"m"),mo={name:"parse-big-int",async sendRequest(e,t){const n=await t(e);return null==n.bodyAsText||(n.bodyAsText=n.bodyAsText.replaceAll(new RegExp(lo,"g"),(e=>{const t=e.match(lo);if(null==t)throw new ne;const[,n,r,i]=t;return[n,+r>Number.MAX_SAFE_INTEGER?`"${oo}${r}"`:r,i].join("")})),n.bodyAsText=n.bodyAsText.replaceAll(new RegExp(po,"g"),(e=>{const t=e.match(po);if(null==t)throw new ne;const[,n,r]=t;return`${n}"${oo}${r}"`}))),n}},ho=()=>{const e=new Map;return{policy:{name:"request-queues",async sendRequest(t,n){var r;const i=t.headers.get("__queue");t.headers.delete("__queue");const a=async()=>n(t);if(null==i)return a();const s=(null!==(r=e.get(i))&&void 0!==r?r:Promise.resolve()).then(a);return e.set(i,s.catch((()=>{}))),s}},position:"perCall"}},fo=()=>{const e=new Map;return{policy:{name:"combine-get-requests",async sendRequest(t,n){var r;if("GET"!==t.method)return n(t);const i=JSON.stringify([t.url,t.body]),a=null!==(r=e.get(i))&&void 0!==r?r:n(t);e.set(i,a);try{return await a}finally{e.delete(i)}}},position:"perCall"}},yo=()=>{const e=new Map;return{policy:{name:"aggressive-cache-get-responses",async sendRequest(t,n){var r;if("GET"!==t.method)return n(t);const i=JSON.stringify([t.url,t.body]),a=null!==(r=e.get(i))&&void 0!==r?r:n(t);return e.set(i,a),a}},position:"perCall"}},go=e=>({policy:{name:"error-formatter",async sendRequest(t,n){try{return await n(t)}catch(t){if(!(t instanceof On)||null==t.request||t.message.startsWith("Error "))throw t;const n=`${new URL(t.request.url).pathname.slice(1)} error`;if(null==t.response?.bodyAsText)throw""===t.message&&(t.message=`${n}: ${t.code}`),t;const r=t.response.parsedBody;t.message=n;const i=null==r?` ${t.response.status} status code`:e(r);throw""!==i&&(t.message+=`:${i}`),t}}},position:"perCall"}),wo=(e,t,n,r)=>({policy:{name:"version-check",async sendRequest(i,a){if(i.headers.has("__version-check"))return i.headers.delete("__version-check"),a(i);const s=[await t({requestOptions:{customHeaders:{"__version-check":"true"}}}),n,r];if(!so(...s))throw new Z(e,...s);return a(i)}},position:"perCall"}),No=(e,t)=>({policy:{name:"retry-on-failure",async sendRequest(n,r){var i;const a=null!==(i=n.headers.get("__retry-code"))&&void 0!==i?i:NaN;n.headers.delete("__retry-code");const s=[200,400,403,410,500].filter((e=>e!==+a)),o=new Array(e).fill(0).map(((t,n)=>((n+1)/e)**2)),c=o.reduce(((e,t)=>e+t),0),u=o.map((e=>Math.floor(e/c*t)));let l=new On("Not expected to be thrown");for(let t=0;t<=e;t+=1){if(0!==t){await Dn(u[t-1]);const e=new URL(n.url);e.searchParams.set("__sdk-retry",t.toString()),n.url=e.toString()}try{return await r(n)}catch(e){var p;if(!(e instanceof On))throw e;if(s.includes(null!==(p=e.response?.status)&&void 0!==p?p:0))throw e;l=e}}throw l}},position:"perCall"}),vo={type:{name:"Composite",className:"Account",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},balance:{constraints:{InclusiveMinimum:0},serializedName:"balance",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},payable:{serializedName:"payable",type:{name:"Boolean"}},kind:{serializedName:"kind",type:{name:"Enum",allowedValues:["basic","generalized"]}},contractId:{serializedName:"contract_id",type:{name:"String"}},authFun:{serializedName:"auth_fun",type:{name:"String"}}}}},bo={type:{name:"Composite",className:"ErrorModel",modelProperties:{reason:{serializedName:"reason",required:!0,type:{name:"String"}},errorCode:{serializedName:"error_code",type:{name:"String"}}}}},xo={type:{name:"Composite",className:"NextNonceResponse",modelProperties:{nextNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"next_nonce",required:!0,type:{name:"Number"}}}}},_o={type:{name:"Composite",className:"SignedTxs",modelProperties:{transactions:{serializedName:"transactions",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedTx"}}}}}}},To={type:{name:"Composite",className:"SignedTx",modelProperties:{tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}},blockHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:-1},serializedName:"block_height",required:!0,type:{name:"Number"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},hash:{serializedName:"hash",required:!0,type:{name:"String"}},encodedTx:{serializedName:"encoded_tx",type:{name:"String"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Co={type:{name:"Composite",className:"Tx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",type:{name:"String"}},initiatorId:{serializedName:"initiator_id",type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",type:{name:"BigInt"}},responderId:{serializedName:"responder_id",type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",type:{name:"Number"}},stateHash:{serializedName:"state_hash",type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}},channelId:{serializedName:"channel_id",type:{name:"String"}},fromId:{serializedName:"from_id",type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",type:{name:"Number"}},toId:{serializedName:"to_id",type:{name:"String"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",type:{name:"BigInt"}},poi:{serializedName:"poi",type:{name:"String"}},initiatorDelegateIds:{serializedName:"initiator_delegate_ids",type:{name:"Sequence",element:{type:{name:"String"}}}},responderDelegateIds:{serializedName:"responder_delegate_ids",type:{name:"Sequence",element:{type:{name:"String"}}}},queryFormat:{serializedName:"query_format",type:{name:"String"}},responseFormat:{serializedName:"response_format",type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},accountId:{serializedName:"account_id",type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",type:{name:"String"}},query:{serializedName:"query",type:{name:"String"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},queryId:{serializedName:"query_id",type:{name:"String"}},response:{serializedName:"response",type:{name:"String"}},commitmentId:{serializedName:"commitment_id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},nameId:{serializedName:"name_id",type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",type:{name:"Number"}},pointers:{serializedName:"pointers",type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",type:{name:"Number"}},ownerId:{serializedName:"owner_id",type:{name:"String"}},code:{serializedName:"code",type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",type:{name:"BigInt"}},callData:{serializedName:"call_data",type:{name:"String"}},callerId:{serializedName:"caller_id",type:{name:"String"}},contractId:{serializedName:"contract_id",type:{name:"String"}},authFun:{constraints:{Pattern:new RegExp("^(0x|0X)?[a-fA-F0-9]+$")},serializedName:"auth_fun",type:{name:"String"}},gaId:{serializedName:"ga_id",type:{name:"String"}},authData:{serializedName:"auth_data",type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}},payerId:{serializedName:"payer_id",type:{name:"String"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["SpendTx","ChannelCreateTx","ChannelDepositTx","ChannelWithdrawTx","ChannelForceProgressTx","ChannelCloseMutualTx","ChannelCloseSoloTx","ChannelSlashTx","ChannelSettleTx","ChannelSnapshotSoloTx","ChannelSetDelegatesTx","OracleRegisterTx","OracleExtendTx","OracleQueryTx","OracleRespondTx","NamePreclaimTx","NameClaimTx","NameUpdateTx","NameTransferTx","NameRevokeTx","ContractCreateTx","ContractCallTx","GAAttachTx","GAMetaTx","PayingForTx"]}}}}},So={type:{name:"Composite",className:"Delegates",modelProperties:{initiator:{serializedName:"initiator",type:{name:"Sequence",element:{type:{name:"String"}}}},responder:{serializedName:"responder",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Ao={type:{name:"Composite",className:"OffChainUpdate",uberParent:"OffChainUpdate",polymorphicDiscriminator:{serializedName:"op",clientName:"op"},modelProperties:{op:{serializedName:"op",required:!0,type:{name:"String"}}}}},Po={type:{name:"Composite",className:"RelativeTTL",modelProperties:{type:{defaultValue:"delta",isConstant:!0,serializedName:"type",type:{name:"String"}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},Eo={type:{name:"Composite",className:"Ttl",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["delta","block"]}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},zo={type:{name:"Composite",className:"NamePointer",modelProperties:{key:{serializedName:"key",required:!0,type:{name:"String"}},encodedKey:{serializedName:"encoded_key",type:{name:"String"}},id:{serializedName:"id",required:!0,type:{name:"String"}}}}},Io={type:{name:"Composite",className:"AuctionEntry",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},startedAt:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"started_at",type:{name:"Number"}},endsAt:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ends_at",required:!0,type:{name:"Number"}},highestBidder:{serializedName:"highest_bidder",required:!0,type:{name:"String"}},highestBid:{constraints:{InclusiveMinimum:0},serializedName:"highest_bid",required:!0,type:{name:"Number"}}}}},Mo={type:{name:"Composite",className:"Channel",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},channelAmount:{constraints:{InclusiveMinimum:0},serializedName:"channel_amount",required:!0,type:{name:"BigInt"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},soloRound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"solo_round",required:!0,type:{name:"Number"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",required:!0,type:{name:"Number"}},lockedUntil:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"locked_until",required:!0,type:{name:"Number"}}}}},qo={type:{name:"Composite",className:"ContractObject",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},active:{serializedName:"active",required:!0,type:{name:"Boolean"}},referrerIds:{serializedName:"referrer_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},deposit:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}}}}},Ro={type:{name:"Composite",className:"ByteCode",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},Oo={type:{name:"Composite",className:"PoI",modelProperties:{poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},ko={type:{name:"Composite",className:"Currency",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},symbol:{serializedName:"symbol",required:!0,type:{name:"String"}},subunit:{serializedName:"subunit",required:!0,type:{name:"String"}},subunitsPerUnit:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"subunits_per_unit",required:!0,type:{name:"BigInt"}},fiatConverstionUrl:{serializedName:"fiat_converstion_url",type:{name:"String"}},fiatConversionUrl:{serializedName:"fiat_conversion_url",type:{name:"String"}},logo:{serializedName:"logo",type:{name:"Composite",className:"Image"}},primaryColour:{serializedName:"primary_colour",required:!0,type:{name:"String"}},secondaryColour:{serializedName:"secondary_colour",required:!0,type:{name:"String"}},networkName:{serializedName:"network_name",required:!0,type:{name:"String"}}}}},Bo={type:{name:"Composite",className:"Image",modelProperties:{type:{serializedName:"type",type:{name:"String"}},data:{serializedName:"data",type:{name:"String"}}}}},$o={type:{name:"Composite",className:"DryRunInput",modelProperties:{top:{serializedName:"top",type:{name:"String"}},accounts:{serializedName:"accounts",type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunAccount"}}}},txs:{serializedName:"txs",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunInputItem"}}}},txEvents:{defaultValue:!1,serializedName:"tx_events",type:{name:"Boolean"}}}}},Uo={type:{name:"Composite",className:"DryRunAccount",modelProperties:{pubKey:{serializedName:"pub_key",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},Lo={type:{name:"Composite",className:"DryRunInputItem",modelProperties:{tx:{serializedName:"tx",type:{name:"String"}},txHash:{serializedName:"tx_hash",type:{name:"String"}},callReq:{serializedName:"call_req",type:{name:"Composite",className:"DryRunCallReq"}}}}},Go={type:{name:"Composite",className:"DryRunCallReq",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},contract:{serializedName:"contract",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",type:{name:"BigInt"}},gas:{constraints:{InclusiveMinimum:0},serializedName:"gas",type:{name:"Number"}},caller:{serializedName:"caller",type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}},context:{serializedName:"context",type:{name:"Composite",className:"DryRunCallContext"}}}}},Fo={type:{name:"Composite",className:"DryRunCallContext",modelProperties:{tx:{serializedName:"tx",type:{name:"String"}},txHash:{serializedName:"tx_hash",type:{name:"String"}},stateful:{serializedName:"stateful",type:{name:"Boolean"}}}}},Do={type:{name:"Composite",className:"DryRunResults",modelProperties:{results:{serializedName:"results",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunResult"}}}},txEvents:{serializedName:"tx_events",type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}}}},Vo={type:{name:"Composite",className:"DryRunResult",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},result:{serializedName:"result",required:!0,type:{name:"String"}},reason:{serializedName:"reason",type:{name:"String"}},callObj:{serializedName:"call_obj",type:{name:"Composite",className:"ContractCallObject"}}}}},jo={type:{name:"Composite",className:"ContractCallObject",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},callerNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"caller_nonce",required:!0,type:{name:"Number"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},gasUsed:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas_used",required:!0,type:{name:"Number"}},log:{serializedName:"log",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Event"}}}},returnValue:{serializedName:"return_value",required:!0,type:{name:"String"}},returnType:{serializedName:"return_type",required:!0,type:{name:"Enum",allowedValues:["ok","error","revert"]}}}}},Ho={type:{name:"Composite",className:"Event",modelProperties:{address:{serializedName:"address",required:!0,type:{name:"String"}},topics:{serializedName:"topics",required:!0,type:{name:"Sequence",element:{constraints:{InclusiveMinimum:0},type:{name:"BigInt"}}}},data:{serializedName:"data",required:!0,type:{name:"String"}}}}},Jo={type:{name:"Composite",className:"Generation",modelProperties:{keyBlock:{serializedName:"key_block",type:{name:"Composite",className:"KeyBlock"}},microBlocks:{serializedName:"micro_blocks",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Wo={type:{name:"Composite",className:"KeyBlock",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},miner:{serializedName:"miner",required:!0,type:{name:"String"}},beneficiary:{serializedName:"beneficiary",required:!0,type:{name:"String"}},target:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"target",required:!0,type:{name:"Number"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},type:{name:"Number"}}}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},info:{serializedName:"info",required:!0,type:{name:"String"}}}}},Yo={type:{name:"Composite",className:"Header",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},miner:{serializedName:"miner",type:{name:"String"}},beneficiary:{serializedName:"beneficiary",type:{name:"String"}},target:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"target",type:{name:"Number"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},type:{name:"Number"}}}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},info:{serializedName:"info",type:{name:"String"}},pofHash:{serializedName:"pof_hash",type:{name:"String"}},txsHash:{serializedName:"txs_hash",type:{name:"String"}},signature:{serializedName:"signature",type:{name:"String"}}}}},Ko={type:{name:"Composite",className:"HashResponse",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}}}}},Qo={type:{name:"Composite",className:"HeightResponse",modelProperties:{height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}}}}},Xo={type:{name:"Composite",className:"MicroBlockHeader",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},pofHash:{serializedName:"pof_hash",required:!0,type:{name:"String"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},txsHash:{serializedName:"txs_hash",required:!0,type:{name:"String"}},signature:{serializedName:"signature",required:!0,type:{name:"String"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}}}}},Zo={type:{name:"Composite",className:"CountResponse",modelProperties:{count:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"count",required:!0,type:{name:"Number"}}}}},ec={type:{name:"Composite",className:"NameEntry",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},owner:{serializedName:"owner",type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}}}}},tc={type:{name:"Composite",className:"RegisteredOracle",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},queryFormat:{serializedName:"query_format",required:!0,type:{name:"String"}},responseFormat:{serializedName:"response_format",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}}}}},nc={type:{name:"Composite",className:"OracleQueries",modelProperties:{oracleQueries:{serializedName:"oracle_queries",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleQuery"}}}}}}},rc={type:{name:"Composite",className:"OracleQuery",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},senderNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"sender_nonce",required:!0,type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"Ttl"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}}}}},ic={type:{name:"Composite",className:"PeerPubKey",modelProperties:{pubkey:{serializedName:"pubkey",required:!0,type:{name:"String"}}}}},ac={type:{name:"Composite",className:"GasPricesItem",modelProperties:{minGasPrice:{constraints:{InclusiveMinimum:0},serializedName:"min_gas_price",required:!0,type:{name:"BigInt"}},utilization:{constraints:{InclusiveMaximum:100,InclusiveMinimum:0},serializedName:"utilization",required:!0,type:{name:"Number"}},minutes:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"minutes",required:!0,type:{name:"Number"}}}}},sc={type:{name:"Composite",className:"Status",modelProperties:{genesisKeyBlockHash:{serializedName:"genesis_key_block_hash",required:!0,type:{name:"String"}},solutions:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"solutions",required:!0,type:{name:"Number"}},difficulty:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"difficulty",required:!0,type:{name:"Number"}},hashrate:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"hashrate",required:!0,type:{name:"Number"}},syncing:{serializedName:"syncing",required:!0,type:{name:"Boolean"}},syncProgress:{constraints:{InclusiveMaximum:100,InclusiveMinimum:0},serializedName:"sync_progress",type:{name:"Number"}},uptime:{serializedName:"uptime",required:!0,type:{name:"String"}},listening:{serializedName:"listening",required:!0,type:{name:"Boolean"}},protocols:{serializedName:"protocols",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Protocol"}}}},nodeVersion:{serializedName:"node_version",required:!0,type:{name:"String"}},nodeRevision:{serializedName:"node_revision",required:!0,type:{name:"String"}},peerCount:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"peer_count",required:!0,type:{name:"Number"}},peerConnections:{serializedName:"peer_connections",type:{name:"Composite",className:"PeerConnections"}},pendingTransactionsCount:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"pending_transactions_count",required:!0,type:{name:"Number"}},networkId:{serializedName:"network_id",required:!0,type:{name:"String"}},peerPubkey:{serializedName:"peer_pubkey",required:!0,type:{name:"String"}},topKeyBlockHash:{serializedName:"top_key_block_hash",required:!0,type:{name:"String"}},topBlockHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"top_block_height",required:!0,type:{name:"Number"}}}}},oc={type:{name:"Composite",className:"Protocol",modelProperties:{version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},effectiveAtHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"effective_at_height",required:!0,type:{name:"Number"}}}}},cc={type:{name:"Composite",className:"PeerConnections",modelProperties:{inbound:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"inbound",required:!0,type:{name:"Number"}},outbound:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"outbound",required:!0,type:{name:"Number"}}}}},uc={type:{name:"Composite",className:"SyncStatus",modelProperties:{progress:{serializedName:"progress",required:!0,type:{name:"Number"}},target:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"target",required:!0,type:{name:"Number"}},speed:{serializedName:"speed",required:!0,type:{name:"Number"}},estimate:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"estimate",required:!0,type:{name:"Number"}}}}},lc={type:{name:"Composite",className:"EncodedTx",modelProperties:{tx:{serializedName:"tx",required:!0,type:{name:"String"}}}}},pc={type:{name:"Composite",className:"PostTxResponse",modelProperties:{txHash:{serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},dc={type:{name:"Composite",className:"TxInfoObject",modelProperties:{callInfo:{serializedName:"call_info",type:{name:"Composite",className:"ContractCallObject"}},gaInfo:{serializedName:"ga_info",type:{name:"Composite",className:"GAObject"}},txInfo:{serializedName:"tx_info",type:{name:"String"}}}}},mc={type:{name:"Composite",className:"GAObject",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},gasUsed:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas_used",required:!0,type:{name:"Number"}},returnValue:{serializedName:"return_value",required:!0,type:{name:"String"}},returnType:{serializedName:"return_type",required:!0,type:{name:"Enum",allowedValues:["ok","error"]}},innerObject:{serializedName:"inner_object",type:{name:"Composite",className:"TxInfoObject"}}}}},hc={type:{name:"Composite",className:"ChannelCloseMutualTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},fc={type:{name:"Composite",className:"ChannelCloseSoloTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},yc={type:{name:"Composite",className:"ChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}}}}},gc={type:{name:"Composite",className:"ChannelDepositTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},wc={type:{name:"Composite",className:"ChannelForceProgressTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}}}}},Nc={type:{name:"Composite",className:"ChannelSetDelegatesTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorDelegateIds:{serializedName:"initiator_delegate_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},responderDelegateIds:{serializedName:"responder_delegate_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},vc={type:{name:"Composite",className:"ChannelSettleTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},bc={type:{name:"Composite",className:"ChannelSlashTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},xc={type:{name:"Composite",className:"ChannelSnapshotSoloTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},_c={type:{name:"Composite",className:"ChannelWithdrawTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},toId:{serializedName:"to_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},Tc={type:{name:"Composite",className:"CheckTxInPoolResponse",modelProperties:{status:{serializedName:"status",required:!0,type:{name:"String"}}}}},Cc={type:{name:"Composite",className:"CommitmentId",modelProperties:{commitmentId:{serializedName:"commitment_id",required:!0,type:{name:"String"}}}}},Sc={type:{name:"Composite",className:"ContractCallTx",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},Ac={type:{name:"Composite",className:"ContractCreateTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},Pc={type:{name:"Composite",className:"UnsignedTx",modelProperties:{tx:{serializedName:"tx",required:!0,type:{name:"String"}}}}},Ec={type:{name:"Composite",className:"GAAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}},authFun:{constraints:{Pattern:new RegExp("^(0x|0X)?[a-fA-F0-9]+$")},serializedName:"auth_fun",required:!0,type:{name:"String"}}}}},zc={type:{name:"Composite",className:"GAMetaTx",modelProperties:{gaId:{serializedName:"ga_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},authData:{serializedName:"auth_data",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},Ic={type:{name:"Composite",className:"NameClaimTx",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",required:!0,type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Mc={type:{name:"Composite",className:"NameHash",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}}}}},qc={type:{name:"Composite",className:"NamePreclaimTx",modelProperties:{commitmentId:{serializedName:"commitment_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Rc={type:{name:"Composite",className:"NameRevokeTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Oc={type:{name:"Composite",className:"NameTransferTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},kc={type:{name:"Composite",className:"NameUpdateTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Bc={type:{name:"Composite",className:"PeerDetails",modelProperties:{host:{serializedName:"host",required:!0,type:{name:"String"}},port:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"port",required:!0,type:{name:"Number"}},firstSeen:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"first_seen",required:!0,type:{name:"Number"}},lastSeen:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"last_seen",required:!0,type:{name:"Number"}},genesisHash:{serializedName:"genesis_hash",required:!0,type:{name:"String"}},topHash:{serializedName:"top_hash",required:!0,type:{name:"String"}},topDifficulty:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"top_difficulty",required:!0,type:{name:"Number"}},networkId:{serializedName:"network_id",type:{name:"String"}},nodeVersion:{serializedName:"node_version",type:{name:"String"}},nodeRevision:{serializedName:"node_revision",type:{name:"String"}},nodeVendor:{serializedName:"node_vendor",type:{name:"String"}},nodeOs:{serializedName:"node_os",type:{name:"String"}}}}},$c={type:{name:"Composite",className:"OracleExtendTx",modelProperties:{fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}}}}},Uc={type:{name:"Composite",className:"OracleQueryTx",modelProperties:{oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Lc={type:{name:"Composite",className:"OracleRegisterTx",modelProperties:{queryFormat:{serializedName:"query_format",required:!0,type:{name:"String"}},responseFormat:{serializedName:"response_format",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"Ttl"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}}}}},Gc={type:{name:"Composite",className:"OracleRespondTx",modelProperties:{queryId:{serializedName:"query_id",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Fc={type:{name:"Composite",className:"PayingForTx",modelProperties:{payerId:{serializedName:"payer_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},Dc={type:{name:"Composite",className:"PeerCount",modelProperties:{connected:{serializedName:"connected",type:{name:"Composite",className:"PeerCountConnected"}},available:{serializedName:"available",type:{name:"Composite",className:"PeerCountAvailable"}},blocked:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"blocked",required:!0,type:{name:"Number"}}}}},Vc={type:{name:"Composite",className:"PeerCountConnected",modelProperties:{inbound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"inbound",type:{name:"Number"}},outbound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"outbound",type:{name:"Number"}}}}},jc={type:{name:"Composite",className:"PeerCountAvailable",modelProperties:{verified:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"verified",type:{name:"Number"}},unverified:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"unverified",type:{name:"Number"}}}}},Hc={type:{name:"Composite",className:"Peers",modelProperties:{peers:{serializedName:"peers",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},blocked:{serializedName:"blocked",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Jc={type:{name:"Composite",className:"PubKey",modelProperties:{pubKey:{serializedName:"pub_key",required:!0,type:{name:"String"}}}}},Wc={type:{name:"Composite",className:"SpendTx",modelProperties:{recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}}}}},Yc={type:{name:"Composite",className:"TokenSupply",modelProperties:{accounts:{constraints:{InclusiveMinimum:0},serializedName:"accounts",type:{name:"Number"}},contracts:{constraints:{InclusiveMinimum:0},serializedName:"contracts",type:{name:"Number"}},contractOracles:{constraints:{InclusiveMinimum:0},serializedName:"contract_oracles",type:{name:"Number"}},locked:{constraints:{InclusiveMinimum:0},serializedName:"locked",type:{name:"Number"}},oracles:{constraints:{InclusiveMinimum:0},serializedName:"oracles",type:{name:"Number"}},oracleQueries:{constraints:{InclusiveMinimum:0},serializedName:"oracle_queries",type:{name:"Number"}},pendingRewards:{constraints:{InclusiveMinimum:0},serializedName:"pending_rewards",type:{name:"Number"}},total:{constraints:{InclusiveMinimum:0},serializedName:"total",type:{name:"Number"}}}}},Kc={serializedName:"OffChainCallContract",type:{name:"Composite",className:"OffChainCallContract",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ao.type.polymorphicDiscriminator,modelProperties:{...Ao.type.modelProperties,caller:{serializedName:"caller",required:!0,type:{name:"String"}},contract:{serializedName:"contract",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},Qc={serializedName:"OffChainDeposit",type:{name:"Composite",className:"OffChainDeposit",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ao.type.polymorphicDiscriminator,modelProperties:{...Ao.type.modelProperties,from:{serializedName:"from",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},Xc={serializedName:"OffChainNewContract",type:{name:"Composite",className:"OffChainNewContract",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ao.type.polymorphicDiscriminator,modelProperties:{...Ao.type.modelProperties,owner:{serializedName:"owner",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},code:{serializedName:"code",type:{name:"Composite",className:"ByteCode"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},Zc={serializedName:"OffChainTransfer",type:{name:"Composite",className:"OffChainTransfer",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ao.type.polymorphicDiscriminator,modelProperties:{...Ao.type.modelProperties,from:{serializedName:"from",required:!0,type:{name:"String"}},to:{serializedName:"to",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},eu={serializedName:"OffChainWithdrawal",type:{name:"Composite",className:"OffChainWithdrawal",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ao.type.polymorphicDiscriminator,modelProperties:{...Ao.type.modelProperties,to:{serializedName:"to",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},tu={type:{name:"Composite",className:"CreateContractUnsignedTx",modelProperties:{...Pc.type.modelProperties,contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}}}}};let nu={OffChainUpdate:Ao,"OffChainUpdate.OffChainCallContract":Kc,"OffChainUpdate.OffChainDeposit":Qc,"OffChainUpdate.OffChainNewContract":Xc,"OffChainUpdate.OffChainTransfer":Zc,"OffChainUpdate.OffChainWithdrawal":eu};const ru={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},iu={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},au={parameterPath:"pubkey",mapper:{serializedName:"pubkey",required:!0,type:{name:"String"}}},su={parameterPath:"hash",mapper:{serializedName:"hash",required:!0,type:{name:"String"}}},ou={parameterPath:"height",mapper:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}}},cu={parameterPath:"name",mapper:{serializedName:"name",required:!0,type:{name:"String"}}},uu={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},lu={parameterPath:"body",mapper:$o},pu={parameterPath:"body",mapper:lc};class du extends io{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const i="azsdk-js-node/1.0.0-beta.1",a=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:a},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}getAccountByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},hu)}getAccountByPubkeyAndHash(e,t,n){return this.sendOperationRequest({pubkey:e,hash:t,options:n},fu)}getAccountByPubkeyAndHeight(e,t,n){return this.sendOperationRequest({pubkey:e,height:t,options:n},yu)}getAccountNextNonce(e,t){return this.sendOperationRequest({pubkey:e,options:t},gu)}getPendingAccountTransactionsByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},wu)}getAuctionEntryByName(e,t){return this.sendOperationRequest({name:e,options:t},Nu)}getChannelByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},vu)}getContract(e,t){return this.sendOperationRequest({pubkey:e,options:t},bu)}getContractCode(e,t){return this.sendOperationRequest({pubkey:e,options:t},xu)}getContractPoI(e,t){return this.sendOperationRequest({pubkey:e,options:t},_u)}getCurrency(e){return this.sendOperationRequest({options:e},Tu)}protectedDryRunTxs(e,t){return this.sendOperationRequest({body:e,options:t},Cu)}getCurrentGeneration(e){return this.sendOperationRequest({options:e},Su)}getGenerationByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Au)}getGenerationByHeight(e,t){return this.sendOperationRequest({height:e,options:t},Pu)}getTopHeader(e){return this.sendOperationRequest({options:e},Eu)}getCurrentKeyBlock(e){return this.sendOperationRequest({options:e},zu)}getCurrentKeyBlockHash(e){return this.sendOperationRequest({options:e},Iu)}getCurrentKeyBlockHeight(e){return this.sendOperationRequest({options:e},Mu)}getKeyBlockByHash(e,t){return this.sendOperationRequest({hash:e,options:t},qu)}getKeyBlockByHeight(e,t){return this.sendOperationRequest({height:e,options:t},Ru)}getPendingKeyBlock(e){return this.sendOperationRequest({options:e},Ou)}getMicroBlockHeaderByHash(e,t){return this.sendOperationRequest({hash:e,options:t},ku)}getMicroBlockTransactionsByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Bu)}getMicroBlockTransactionsCountByHash(e,t){return this.sendOperationRequest({hash:e,options:t},$u)}getMicroBlockTransactionByHashAndIndex(e,t,n){return this.sendOperationRequest({hash:e,index:t,options:n},Uu)}getNameEntryByName(e,t){return this.sendOperationRequest({name:e,options:t},Lu)}getNameEntryByNameHash(e,t){return this.sendOperationRequest({nameHash:e,options:t},Gu)}getOracleByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Fu)}getOracleQueriesByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Du)}getOracleQueryByPubkeyAndQueryId(e,t,n){return this.sendOperationRequest({pubkey:e,queryId:t,options:n},Vu)}getPeerPubkey(e){return this.sendOperationRequest({options:e},ju)}getRecentGasPrices(e){return this.sendOperationRequest({options:e},Hu)}getStatus(e){return this.sendOperationRequest({options:e},Ju)}getChainEnds(e){return this.sendOperationRequest({options:e},Wu)}getSyncStatus(e){return this.sendOperationRequest({options:e},Yu)}postTransaction(e,t){return this.sendOperationRequest({body:e,options:t},Ku)}getTransactionByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Qu)}getTransactionInfoByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Xu)}}const mu=co(i,!1),hu={path:"/v3/accounts/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:vo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,au],headerParameters:[ru],serializer:mu},fu={path:"/v3/accounts/{pubkey}/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:vo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,au,su],headerParameters:[ru],serializer:mu},yu={path:"/v3/accounts/{pubkey}/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:vo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0},410:{bodyMapper:bo,isError:!0}},urlParameters:[iu,au,ou],headerParameters:[ru],serializer:mu},gu={path:"/v3/accounts/{pubkey}/next-nonce",httpMethod:"GET",responses:{200:{bodyMapper:xo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},queryParameters:[{parameterPath:["options","strategy"],mapper:{defaultValue:"max",serializedName:"strategy",type:{name:"Enum",allowedValues:["max","continuity"]}}}],urlParameters:[iu,au],headerParameters:[ru],serializer:mu},wu={path:"/v3/accounts/{pubkey}/transactions/pending",httpMethod:"GET",responses:{200:{bodyMapper:_o},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,au],headerParameters:[ru],serializer:mu},Nu={path:"/v3/auctions/{name}",httpMethod:"GET",responses:{200:{bodyMapper:Io},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,cu],headerParameters:[ru],serializer:mu},vu={path:"/v3/channels/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:Mo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,au],headerParameters:[ru],serializer:mu},bu={path:"/v3/contracts/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:qo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,au],headerParameters:[ru],serializer:mu},xu={path:"/v3/contracts/{pubkey}/code",httpMethod:"GET",responses:{200:{bodyMapper:Ro},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,au],headerParameters:[ru],serializer:mu},_u={path:"/v3/contracts/{pubkey}/poi",httpMethod:"GET",responses:{200:{bodyMapper:Oo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,au],headerParameters:[ru],serializer:mu},Tu={path:"/v3/currency",httpMethod:"GET",responses:{200:{bodyMapper:ko}},urlParameters:[iu],headerParameters:[ru],serializer:mu},Cu={path:"/v3/dry-run",httpMethod:"POST",responses:{200:{bodyMapper:Do},400:{bodyMapper:bo,isError:!0},403:{bodyMapper:bo,isError:!0}},requestBody:lu,urlParameters:[iu],headerParameters:[ru,uu],mediaType:"json",serializer:mu},Su={path:"/v3/generations/current",httpMethod:"GET",responses:{200:{bodyMapper:Jo},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu],headerParameters:[ru],serializer:mu},Au={path:"/v3/generations/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Jo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,su],headerParameters:[ru],serializer:mu},Pu={path:"/v3/generations/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:Jo},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,ou],headerParameters:[ru],serializer:mu},Eu={path:"/v3/headers/top",httpMethod:"GET",responses:{200:{bodyMapper:Yo},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu],headerParameters:[ru],serializer:mu},zu={path:"/v3/key-blocks/current",httpMethod:"GET",responses:{200:{bodyMapper:Wo},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu],headerParameters:[ru],serializer:mu},Iu={path:"/v3/key-blocks/current/hash",httpMethod:"GET",responses:{200:{bodyMapper:Ko},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu],headerParameters:[ru],serializer:mu},Mu={path:"/v3/key-blocks/current/height",httpMethod:"GET",responses:{200:{bodyMapper:Qo},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu],headerParameters:[ru],serializer:mu},qu={path:"/v3/key-blocks/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Wo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,su],headerParameters:[ru],serializer:mu},Ru={path:"/v3/key-blocks/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:Wo},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,ou],headerParameters:[ru],serializer:mu},Ou={path:"/v3/key-blocks/pending",httpMethod:"GET",responses:{200:{bodyMapper:Wo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu],headerParameters:[ru],serializer:mu},ku={path:"/v3/micro-blocks/hash/{hash}/header",httpMethod:"GET",responses:{200:{bodyMapper:Xo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,su],headerParameters:[ru],serializer:mu},Bu={path:"/v3/micro-blocks/hash/{hash}/transactions",httpMethod:"GET",responses:{200:{bodyMapper:_o},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,su],headerParameters:[ru],serializer:mu},$u={path:"/v3/micro-blocks/hash/{hash}/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:Zo},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,su],headerParameters:[ru],serializer:mu},Uu={path:"/v3/micro-blocks/hash/{hash}/transactions/index/{index}",httpMethod:"GET",responses:{200:{bodyMapper:To},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,su,{parameterPath:"index",mapper:{constraints:{InclusiveMinimum:1},serializedName:"index",required:!0,type:{name:"Number"}}}],headerParameters:[ru],serializer:mu},Lu={path:"/v3/names/{name}",httpMethod:"GET",responses:{200:{bodyMapper:ec},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,cu],headerParameters:[ru],serializer:mu},Gu={path:"/v3/names/hash/{name_hash}",httpMethod:"GET",responses:{200:{bodyMapper:ec},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,{parameterPath:"nameHash",mapper:{serializedName:"name_hash",required:!0,type:{name:"String"}}}],headerParameters:[ru],serializer:mu},Fu={path:"/v3/oracles/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:tc},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,au],headerParameters:[ru],serializer:mu},Du={path:"/v3/oracles/{pubkey}/queries",httpMethod:"GET",responses:{200:{bodyMapper:nc},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},queryParameters:[{parameterPath:["options","from"],mapper:{serializedName:"from",type:{name:"String"}}},{parameterPath:["options","limit"],mapper:{defaultValue:20,constraints:{InclusiveMaximum:1e3,InclusiveMinimum:1},serializedName:"limit",type:{name:"Number"}}},{parameterPath:["options","type"],mapper:{defaultValue:"all",serializedName:"type",type:{name:"Enum",allowedValues:["open","closed","all"]}}}],urlParameters:[iu,au],headerParameters:[ru],serializer:mu},Vu={path:"/v3/oracles/{pubkey}/queries/{query-id}",httpMethod:"GET",responses:{200:{bodyMapper:rc},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,au,{parameterPath:"queryId",mapper:{serializedName:"query-id",required:!0,type:{name:"String"}}}],headerParameters:[ru],serializer:mu},ju={path:"/v3/peers/pubkey",httpMethod:"GET",responses:{200:{bodyMapper:ic}},urlParameters:[iu],headerParameters:[ru],serializer:mu},Hu={path:"/v3/recent-gas-prices",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"GasPricesItem"}}}}},400:{bodyMapper:bo,isError:!0}},urlParameters:[iu],headerParameters:[ru],serializer:mu},Ju={path:"/v3/status",httpMethod:"GET",responses:{200:{bodyMapper:sc}},urlParameters:[iu],headerParameters:[ru],serializer:mu},Wu={path:"/v3/status/chain-ends",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"String"}}}}}},urlParameters:[iu],headerParameters:[ru],serializer:mu},Yu={path:"/v3/sync-status",httpMethod:"GET",responses:{200:{bodyMapper:uc},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu],headerParameters:[ru],serializer:mu},Ku={path:"/v3/transactions",httpMethod:"POST",responses:{200:{bodyMapper:pc},400:{bodyMapper:bo,isError:!0}},requestBody:pu,urlParameters:[iu],headerParameters:[ru,uu],mediaType:"json",serializer:mu},Qu={path:"/v3/transactions/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:To},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0}},urlParameters:[iu,su],headerParameters:[ru],serializer:mu},Xu={path:"/v3/transactions/{hash}/info",httpMethod:"GET",responses:{200:{bodyMapper:dc},400:{bodyMapper:bo,isError:!0},404:{bodyMapper:bo,isError:!0},410:{bodyMapper:bo,isError:!0}},urlParameters:[iu,su],headerParameters:[ru],serializer:mu};function Zu(e,t){return e.get(el(e,t))}function el(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var tl=new WeakMap;class nl extends du{constructor(e,{ignoreVersion:t=!1,retryCount:n=3,retryOverallDelay:r=800,...i}={}){var a,s,o;super(e,{allowInsecureConnection:!0,additionalPolicies:[...t?[]:[wo("node",(async e=>(await this._getCachedStatus(e)).nodeVersion),"7.1.0","8.0.0")],ho(),fo(),No(n,r),go((e=>[" ",e.reason,null==e.errorCode?"":` (${e.errorCode})`].join("")))],...i}),o=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(a=this,s=tl),s.set(a,o),this.pipeline.addPolicy(mo,{phase:"Deserialize"}),this.pipeline.removePolicy({name:an}),this.pipeline.removePolicy({name:An}),this.pipeline.removePolicy({name:"defaultRetryPolicy"})}async _getCachedStatus(e){return null!=Zu(tl,this)?Zu(tl,this):this.getStatus(e)}async getStatus(...e){const t=super.getStatus(...e);return t.then((()=>{var e,n;n=t,(e=tl).set(el(e,this),n)}),(()=>{})),t}async getNetworkId(){return(await this._getCachedStatus()).networkId}async getNodeInfo(){const{nodeVersion:e,networkId:t,protocols:n,topBlockHeight:r}=await this.getStatus(),i=n.filter((({effectiveAtHeight:e})=>r>=e)).reduce(((e,t)=>t.effectiveAtHeight>e.effectiveAtHeight?t:e),{effectiveAtHeight:-1,version:0}).version;if(null==Dr[i]){const e=i.toString(),t=Object.values(Dr).filter((e=>"number"==typeof e)).map((e=>+e)),n=Math.min(...t).toString(),r=(Math.max(...t)+1).toString();throw new Z("consensus protocol",e,n,r)}return{url:this.$host,nodeNetworkId:t,version:e,consensusProtocolVersion:i}}}function rl(e){const t=xs(e);switch(t.tag){case Hr.SignedTx:return rl(vs(t.encodedTx));case Hr.GaMetaTx:return t.gaId}const n=Ns(t.tag,t.version).find((([e])=>"nonce"===e))?.[1];if(null==n)throw new U(`Transaction doesn't have nonce: ${Hr[t.tag]}`);if(!("senderKey"in n))throw new ne;return t[n.senderKey].replace(/^ok_/,"ak_")}class il{}var al=n(6176),sl=n(2341),ol=n.n(sl);function cl(e){var t;return Sr(null!==(t=ol()(e))&&void 0!==t?t:"")}function ul(e){const t=(new al.TypeResolver).resolveType({record:[{name:"name",type:{option:["string"]}},{name:"version",type:{option:["int"]}},{name:"networkId",type:{option:["string"]}},{name:"contractAddress",type:{option:["contract_pubkey"]}}]},{});return Sr(vr((new al.ContractByteArrayEncoder).encodeWithType(e,t)))}function ll(e,t,n){return Sr(jn([zr,new Uint8Array([0]),ul(n),cl(t),Sr(vr(e))]))}var pl=n(8287).Buffer;function dl(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function ml(e,t,n){const r=[t];n&&r.push("inner_tx");const i=vr(e);return jn([pl.from(r.join("-")),Sr(i)])}var hl=new WeakMap;class fl extends il{constructor(e){super(),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,hl,void 0),this.secretKey=e;const t=Xn().sign.keyPair.fromSeed(vr(e));var n,r;n=hl,r=t.secretKey,n.set(dl(n,this),r),this.address=br(t.publicKey,ir.AccountAddress)}static generate(){const e=br(Xn().randomBytes(32),ir.AccountSecretKey);return new fl(e)}async sign(e,t){return Xn().sign.detached(pl.from(e),(n=hl).get(dl(n,this)));var n}async signTransaction(e,{innerTx:t,networkId:n,...r}={}){if(null==n)throw new G("networkId","provided",n);const i=vr(e),a=ml(e,n,!0===t),s=[await this.sign(a,r)];return vs({tag:Hr.SignedTx,encodedTx:i,signatures:s})}async signMessage(e,t){return this.sign(Ir(e),t)}async signTypedData(e,t,{name:n,version:r,networkId:i,contractAddress:a,...s}={}){const o=ll(e,t,{name:n,version:r,networkId:i,contractAddress:a});return br(await this.sign(o,s),ir.Signature)}async signDelegation(e,{networkId:t}={}){if(null==t)throw new G("networkId","provided",t);const n=jn([zr,new Uint8Array([1]),pl.from(t),vr(e)]);return br(await this.sign(n),ir.Signature)}}function yl(e,{innerTx:t,gasUsed:n,queryFee:r,isInitiator:i}={}){const a=xs(e);if(a.tag===Hr.SignedTx)throw new F("Transaction shouldn't be a SignedTx, use `getExecutionCostBySignedTx` instead");let s=0n;return"fee"in a&&"freeloader"!==t&&(s+=BigInt(a.fee)),a.tag===Hr.NameClaimTx&&(s+=BigInt(a.nameFee)),a.tag===Hr.OracleQueryTx&&(s+=BigInt(a.queryFee)),a.tag===Hr.OracleResponseTx&&(s-=BigInt(null!=r?r:0)),a.tag===Hr.ChannelSettleTx&&(!0===i&&(s-=BigInt(a.initiatorAmountFinal)),!1===i&&(s-=BigInt(a.responderAmountFinal))),a.tag!==Hr.SpendTx&&a.tag!==Hr.ContractCreateTx&&a.tag!==Hr.ContractCallTx&&a.tag!==Hr.ChannelDepositTx||"fee-payer"===t||(s+=BigInt(a.amount)),a.tag===Hr.ContractCreateTx&&(s+=BigInt(a.deposit)),a.tag!==Hr.ContractCreateTx&&a.tag!==Hr.ContractCallTx&&a.tag!==Hr.GaAttachTx&&a.tag!==Hr.GaMetaTx||"freeloader"===t||(s+=BigInt(a.gasPrice)*BigInt(null!=n?n:a.gasLimit)),a.tag!==Hr.GaMetaTx&&a.tag!==Hr.PayingForTx||(s+=yl(vs(a.tx.encodedTx),a.tag===Hr.PayingForTx?{innerTx:"fee-payer"}:{})),s}function gl(e,t,n){const r=xs(e,Hr.SignedTx);if(r.encodedTx.tag===Hr.GaMetaTx)return yl(vs(r.encodedTx),n);const i=vs(r.encodedTx),a=rl(i),[s,o]=[!0,!1].map((e=>Pr(ml(i,t,e),r.signatures[0],a)));if(!s&&!o)throw new U("Can't verify signature");return yl(vs(r.encodedTx),{...s&&{innerTx:"freeloader"},...n})}async function wl(e,t,{isMined:n,...r}={}){let i=xs(e);const a=i.tag===Hr.SignedTx,s=a&&!0===n&&_s(e);if(i.tag===Hr.SignedTx&&(i=i.encodedTx),null==r.gasUsed&&!1!==s&&[Hr.ContractCreateTx,Hr.ContractCallTx,Hr.GaAttachTx,Hr.GaMetaTx].includes(i.tag)){const{callInfo:e,gaInfo:n}=await t.getTransactionInfoByHash(s),i=null!=e?e:n;if(null==i)throw new te(`callInfo and gaInfo is not available for transaction ${s}`);r.gasUsed=i.gasUsed}if(null==r.queryFee&&Hr.OracleResponseTx===i.tag&&(r.queryFee=(await t.getOracleByPubkey(i.oracleId)).queryFee.toString()),null==r.isInitiator&&Hr.ChannelSettleTx===i.tag&&!0!==n){const{initiatorId:e}=await t.getChannelByPubkey(i.channelId);r.isInitiator=i.fromId===e}return a?gl(e,await t.getNetworkId(),r):yl(e,r)}var Nl=n(8287).Buffer;const vl=[];async function bl(e,t,n){const r=rl(vs(e)),[i,{height:a},{consensusProtocolVersion:s,nodeNetworkId:o}]=await Promise.all([t.getAccountByPubkey(r).catch((e=>{if(!Wn(e))throw e;return{id:r,balance:0n,nonce:0}})).then((e=>({...e,id:e.id}))),t.getCurrentKeyBlockHeight(),t.getNodeInfo()]);return(await Promise.all(vl.map((async r=>r(e,{node:t,account:i,height:a,consensusProtocolVersion:s,nodeNetworkId:o,parentTxTypes:n}))))).flat()}async function xl(e,t){const n=t.pipeline.clone();n.removePolicy({name:"parse-big-int"});const r=new nl(t.$host,{ignoreVersion:!0,pipeline:n,additionalPolicies:[yo()]});return bl(xs(e),r,[])}vl.push(((e,{account:t,nodeNetworkId:n,parentTxTypes:r})=>{if(e.tag!==Hr.SignedTx)return[];const{encodedTx:i,signatures:a}=e;if(null==(null!=i?i:a))return[];if(1!==a.length)return[];const s=Nl.from([n,...r.includes(Hr.PayingForTx)?["inner_tx"]:[]].join("-")),o=vr(vs(i)),c=jn([s,o]),u=jn([s,Sr(o)]);return Pr(c,a[0],t.id)||Pr(u,a[0],t.id)?[]:[{message:"Signature cannot be verified, please ensure that you transaction have the correct prefix and the correct private key for the sender address",key:"InvalidSignature",checkedKeys:["encodedTx","signatures"]}]}),(async(e,{node:t,parentTxTypes:n})=>{let r;return"encodedTx"in e&&(r=e.encodedTx),"tx"in e&&(r=e.tx),null==r?[]:bl(r,t,[...n,e.tag])}),((e,{height:t})=>"ttl"in e?0===e.ttl||e.ttl>t?[]:[{message:`TTL ${e.ttl} is already expired, current height is ${t}`,key:"ExpiredTTL",checkedKeys:["ttl"]}]:[]),(async(e,{account:t,parentTxTypes:n,node:r})=>{if(0!==n.length)return[];const i=await wl(vs(e),r).catch((()=>0n));return i<=t.balance?[]:[{message:`Account balance ${t.balance} is not enough to execute the transaction that costs ${i}`,key:"InsufficientBalance",checkedKeys:["amount","fee","nameFee","gasLimit","gasPrice"]}]}),(async(e,{node:t})=>{if(e.tag!==Hr.SpendTx||_r(e.recipientId,ir.Name))return[];const n=await t.getAccountByPubkey(e.recipientId).catch((e=>{if(!Wn(e))throw e;return null}));return null==n||!0===n.payable?[]:[{message:"Recipient account is not payable",key:"RecipientAccountNotPayable",checkedKeys:["recipientId"]}]}),((e,{account:t})=>{let n;return e.tag===Hr.SignedTx&&"generalized"===t.kind&&0!==e.signatures.length&&(n="Generalized account can't be used to generate SignedTx with signatures"),e.tag===Hr.GaMetaTx&&"basic"===t.kind&&(n="Basic account can't be used to generate GaMetaTx"),null==n?[]:[{message:n,key:"InvalidAccountType",checkedKeys:["tag"]}]}),((e,{consensusProtocolVersion:t})=>{var n,r;const i=Hr.OracleRegisterTx===e.tag,a=Hr.ContractCreateTx===e.tag||Hr.GaAttachTx===e.tag,s=Hr.ContractCallTx===e.tag||Hr.GaMetaTx===e.tag,o=null!==(n=null!==(r=i?"oracle-call":null)&&void 0!==r?r:a?"contract-create":null)&&void 0!==n?n:s?"contract-call":null;if(null==o)return[];const c=zi[t][o];let u;if("abiVersion"in e&&(u={abiVersion:e.abiVersion}),"ctVersion"in e&&(u=e.ctVersion),null==u)throw new ne;return!c.abiVersion.includes(u.abiVersion)||a&&!c.vmVersion.includes(u.vmVersion)?[{message:`ABI/VM version ${JSON.stringify(u)} is wrong, supported is: ${JSON.stringify(c)}`,key:"VmAndAbiVersionMismatch",checkedKeys:["ctVersion","abiVersion"]}]:[]}),(async(e,{node:t})=>{if(Hr.ContractCallTx!==e.tag)return[];if(e.contractId.startsWith("nm_"))return[];try{const{active:n}=await t.getContract(e.contractId);return n?[]:[{message:`Contract ${e.contractId} is not active`,key:"ContractNotActive",checkedKeys:["contractId"]}]}catch(e){if(!(e instanceof On)||null==e.response?.bodyAsText)throw e;return[{message:JSON.parse(e.response.bodyAsText).reason,key:"ContractNotFound",checkedKeys:["contractId"]}]}}));class _l extends U{constructor(e,t,n){super(e),this.name="InvalidTxError",this.validation=t,this.transaction=n}}async function Tl(e,{onNode:t,onAccount:n,verify:r=!0,waitMined:i=!0,confirm:a,innerTx:s,...o}){const c=await n.signTransaction(e,{...o,onNode:t,innerTx:s,networkId:await t.getNetworkId()});if(!0===s)return{hash:_s(c),rawTx:c};if(r){const e=await xl(c,t);if(e.length>0){const t=`Transaction verification errors: ${e.map((e=>e.message)).join(", ")}`;throw new _l(t,e,c)}}try{let e;try{e=null!=n?`tx-${n.address}`:null}catch(t){e=null}const{txHash:r}=await t.postTransaction({tx:c},{requestOptions:{customHeaders:{"__retry-code":"400",...null!=e?{__queue:e}:{}}}});if(i){const e=await di(r,{onNode:t,...o}),n={...e,hash:e.hash,rawTx:c};if(null!=a&&+a>0){const e="boolean"==typeof a?void 0:a;return{...n,confirmationHeight:await hi(r,{onNode:t,confirm:e,...o})}}return n}return{hash:r,rawTx:c}}catch(e){throw Yn(e),Object.assign(e,{rawTx:c,verifyTx:async()=>xl(c,t)})}}var Cl=n(8287).Buffer;const Sl=e=>Cl.from(e).toString("base64").replaceAll("/","_").replaceAll("+","-").replace(/=+$/,""),Al=e=>Cl.from(e.replaceAll("_","/").replaceAll("-","+"),"base64"),Pl=e=>{var t;return Sl(null!==(t=ol()(e))&&void 0!==t?t:"")},El="eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9";async function zl(e,t){const n={...e};"sub_jwk"in n||(n.sub_jwk={kty:"OKP",crv:"Ed25519",x:Sl(vr(t.address))}),void 0===n.sub_jwk&&delete n.sub_jwk;const r=`${El}.${Pl(n)}`,i=await t.sign(r);return`${r}.${Sl(i)}`}function Il(e,t){var n;const r=e.split(".");if(3!==r.length)throw new G("JWT components count",3,r.length);const[i,a,s]=r;if(i!==El)throw new G("JWT header",El,i);const o=JSON.parse(Al(a).toString()),c=null!==(n=o.sub_jwk)&&void 0!==n?n:{},u=null==c.x||"OKP"!==c.kty||"Ed25519"!==c.crv?t:br(Al(c.x),ir.AccountAddress);if(null!=t&&u!==t)throw new G("address",`${u} ("sub_jwk")`,t);if(null!=u&&!Pr(Cl.from(`${i}.${a}`),Al(s),u))throw new Fe(`JWT is not signed by ${u}`);return{payload:o,signer:u}}function Ml(e){try{return Il(e),!0}catch(e){return!1}}function ql(e){Il(e)}function Rl(e,t){try{const{signer:n}=Il(e,t);return null!=n}catch(e){return!1}}let Ol=function(e){return e[e.AensWildcard=1]="AensWildcard",e[e.AensName=2]="AensName",e[e.AensPreclaim=3]="AensPreclaim",e[e.Oracle=4]="Oracle",e[e.OracleResponse=5]="OracleResponse",e}({});const kl=Bi(ir.OracleAddress),Bl={serialize(e){return kl.serialize(br(vr(e),ir.OracleAddress))},deserialize(e){return br(vr(kl.deserialize(e)),ir.OracleQueryId)}},$l=Bi(ir.ContractAddress),Ul=[{tag:ga(Ol.AensWildcard),version:ga(1,!0),accountAddress:Bi(ir.AccountAddress),contractAddress:$l},{tag:ga(Ol.AensName),version:ga(1,!0),accountAddress:Bi(ir.AccountAddress),nameId:oa,contractAddress:$l},{tag:ga(Ol.AensPreclaim),version:ga(1,!0),accountAddress:Bi(ir.AccountAddress),contractAddress:$l},{tag:ga(Ol.Oracle),version:ga(1,!0),accountAddress:Bi(ir.AccountAddress),contractAddress:$l},{tag:ga(Ol.OracleResponse),version:ga(1,!0),queryId:Bl,contractAddress:$l}];function Ll(e){return Oa(Ul,Ol,e,{},ir.Bytearray)}function Gl(e,t){return ka(Ul,Ol,e,t,{})}function Fl(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Dl=new WeakMap;class Vl{constructor(e,t){var n,r,i;i=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=Dl),r.set(n,i),this.value=e,this.options=t,this.options=t}async revoke(e={}){const t={...this.options,...e};return Tl(await bs({_isInternalBuild:!0,...t,tag:Hr.NameRevokeTx,nameId:this.value,accountId:t.onAccount.address}),t)}async update(e,t={}){const{extendPointers:n,...r}={...this.options,...t},i={...!0===n&&Object.fromEntries((await Ai(this.value,r)).pointers.map((({key:e,id:t})=>[e,t]))),...e},a=Object.values(i).some((e=>_r(e,ir.Bytearray))),s=await bs({_isInternalBuild:!0,...r,tag:Hr.NameUpdateTx,version:a?2:1,nameId:this.value,accountId:r.onAccount.address,pointers:Object.entries(i).map((([e,t])=>({key:e,id:t})))});return Tl(s,r)}async transfer(e,t={}){const n={...this.options,...t};return Tl(await bs({_isInternalBuild:!0,...n,tag:Hr.NameTransferTx,nameId:this.value,accountId:n.onAccount.address,recipientId:e}),n)}async getState(e={}){var t;const n=null!==(t=this.options.onNode)&&void 0!==t?t:e.onNode,r=await n.getNameEntryByName(this.value);return{...r,id:r.id,owner:r.owner}}async extendTtl(e,t={}){return this.update({},{...t,nameTtl:e,extendPointers:!0})}async claim(e={}){const t={...this.options,...e};var n;return Tl(await bs({_isInternalBuild:!0,...t,tag:Hr.NameClaimTx,accountId:t.onAccount.address,nameSalt:(n=Dl,n.get(Fl(n,this))),name:this.value}),t)}async preclaim(e={}){const t={...this.options,...e},n=Tr(),r=await bs({_isInternalBuild:!0,...t,tag:Hr.NamePreclaimTx,accountId:t.onAccount.address,commitmentId:Zr(this.value,n)}),i=await Tl(r,t);var a,s;return s=n,(a=Dl).set(Fl(a,this),s),i}async bid(e,t={}){if(!ci(this.value))throw new ee("This is not auction name, so cant make a bid!");const n={...this.options,...t};return Tl(await bs({_isInternalBuild:!0,...n,tag:Hr.NameClaimTx,accountId:n.onAccount.address,nameSalt:0,name:this.value,nameFee:e}),n)}}function jl(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Hl(e,t){return e.get(Jl(e,t))}function Jl(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Wl=new WeakSet,Yl=new WeakMap;function Kl({returnType:e,returnValue:t,log:n},r,i,a){let s;switch(e){case"ok":{const e=Jl(Wl,this,Xl).call(this,r);return{decodedResult:this._calldata.decode(this._name,e.name,t),decodedEvents:this.$decodeEvents(n,a)}}case"revert":s=this._calldata.decodeFateString(t);break;case"error":if(s=vr(t).toString(),/Expected \d+ arguments, got \d+/.test(s))throw new k(`ACI doesn't match called contract. Error provided by node: ${s}`);break;default:throw new te(`Unknown return type: ${e}`)}throw new Se(s,i)}async function Ql(e,t,n){const r=await Tl(e,{...this.$options,...n});return{hash:r.hash,tx:xs(r.rawTx),txData:r,rawTx:r.rawTx,...null!=r.blockHeight&&await this.$getCallResultByTxHash(r.hash,t,n)}}function Xl(e){const t=Hl(Yl,this).functions.find((t=>t.name===e));if(null!=t)return t;if("init"===e)return{arguments:[],name:"init",payable:!1,returns:"unit",stateful:!0};throw new Ae(e)}function Zl(e,t,{contractAddressToName:n}){const r={...this.$options.contractAddressToName,...n};if(null!=r[e])return r[e];const i=this._aci.map((({contract:e})=>e)).filter((e=>e?.event)),a=i.map((e=>[e.name,e.event.variant])).map((([e,t])=>t.map((t=>[e,Object.keys(t)[0],Object.values(t)[0]])))).flat().filter((([,e])=>BigInt(`0x${Sr(e).toString("hex")}`)===t)).filter((([,,e],t,n)=>!n.slice(0,t).some((t=>{return n=t[2],r=e,JSON.stringify(n)===JSON.stringify(r);var n,r}))));switch(a.length){case 0:throw new Ee(t.toString(),e);case 1:return a[0][0];default:throw new ze(e,a)}}const ep=class{async $compile(){if(null!=this.$options.bytecode)return this.$options.bytecode;if(null==this.$options.onCompiler)throw new F("Can't compile without compiler");if(null!=this.$options.sourceCode){const{bytecode:e}=await this.$options.onCompiler.compileBySourceCode(this.$options.sourceCode,this.$options.fileSystem);this.$options.bytecode=e}if(null!=this.$options.sourceCodePath){const{bytecode:e}=await this.$options.onCompiler.compile(this.$options.sourceCodePath);this.$options.bytecode=e}if(null==this.$options.bytecode)throw new F("Can't compile without sourceCode and sourceCodePath");return this.$options.bytecode}async $getCallResultByTxHash(e,t,n){const{callInfo:r}=await this.$options.onNode.getTransactionInfoByHash(e);if(null==r)throw new k(`callInfo is not available for transaction ${e}`);const i=r;return{...Jl(Wl,this,Kl).call(this,i,t,void 0,n),result:i}}async _estimateGas(e,t,n={}){const{result:r}=await this.$call(e,t,{...n,callStatic:!0});if(null==r)throw new ne;const{gasUsed:i}=r;return Math.floor(1.25*i)}async $deploy(e,t){var n;const{callStatic:r,...i}={...this.$options,...t};if(null==this.$options.bytecode&&await this.$compile(),!0===r)return this.$call("init",e,{...i,callStatic:r});if(null!=this.$options.address)throw new ve;if(null==i.onAccount)throw new F("Can't deploy without account");const a=i.onAccount.address;if(null==this.$options.bytecode)throw new F("Can't deploy without bytecode");const s=await bs({_isInternalBuild:!0,...i,tag:Hr.ContractCreateTx,gasLimit:null!==(n=i.gasLimit)&&void 0!==n?n:await this._estimateGas("init",e,i),callData:this._calldata.encode(this._name,"init",e),code:this.$options.bytecode,ownerId:a}),{hash:o,...c}=await Jl(Wl,this,Ql).call(this,s,"init",{...i,onAccount:i.onAccount});return this.$options.address=Ts(c.rawTx),{...c,...null!=c.result?.log&&{decodedEvents:this.$decodeEvents(c.result.log,i)},owner:a,transaction:o,address:this.$options.address}}async $call(e,t,n={}){var r;const{callStatic:i,top:a,...s}={...this.$options,...n},o=Jl(Wl,this,Xl).call(this,e),{address:c,name:u}=this.$options,l=null!=u?Xr(u):c,{onNode:p}=s;if(null==e)throw new Ce;if("init"===e&&!0!==i)throw new xe('"init" can be called only via dryRun');if("init"!==e&&null!=s.amount&&Number(s.amount)>0&&!o.payable)throw new Pe(s.amount,e);let d;try{if(null==s.onAccount)throw new te("Use fallback account");d=s.onAccount.address}catch(e){if(!0!==i||!(e instanceof Y&&"Account should be an address (ak-prefixed string), or instance of AccountBase, got undefined instead"===e.message||e instanceof We||e instanceof te&&"Use fallback account"===e.message))throw e;d=Or.pub}const m=this._calldata.encode(this._name,e,t);if(!0===i){if(null==s.nonce){const e=null!=a&&{["number"==typeof a?"height":"hash"]:a},t=await fi(d,{...e,onNode:p}).catch((e=>{if(!Wn(e))throw e;return{kind:"basic",nonce:0}}));s.nonce="generalized"===t.kind?0:t.nonce+1}const t={...s,onNode:p,callData:m};let n;if("init"===e){if(null==this.$options.bytecode)throw new F('Can\'t dry-run "init" without bytecode');n=await bs({...t,tag:Hr.ContractCreateTx,code:this.$options.bytecode,ownerId:d})}else{if(null==l)throw new _e("Can't dry-run contract without address");n=await bs({...t,tag:Hr.ContractCallTx,callerId:d,contractId:l})}const{callObj:r,...i}=await Ti(n,d,{...s,top:a});if(null==r)throw new te(`callObj is not available for transaction ${n}`);const o=r;return{...i,...Jl(Wl,this,Kl).call(this,o,e,n,s),tx:xs(n),result:o,rawTx:n,hash:_s(n),txData:void 0}}if(null!=a)throw new F("Can't handle `top` option in on-chain contract call");if(null==l)throw new _e("Can't call contract without address");const h=await bs({_isInternalBuild:!0,...s,tag:Hr.ContractCallTx,gasLimit:null!==(r=s.gasLimit)&&void 0!==r?r:await this._estimateGas(e,t,s),callerId:d,contractId:l,callData:m});if(null==s.onAccount)throw new F("Can't call contract on chain without account");return Jl(Wl,this,Ql).call(this,h,e,{...s,onAccount:s.onAccount})}$decodeEvents(e,{omitUnknown:t,...n}={}){return e.map((e=>{let r;try{r=Jl(Wl,this,Zl).call(this,e.address,e.topics[0],n)}catch(e){if(null!=t&&t&&e instanceof Ee)return null;throw e}const i=this._calldata.decodeEvent(r,e.data,e.topics),[a,s]=Object.entries(i)[0];return{name:a,args:s,contract:{name:r,address:e.address}}})).filter((e=>null!=e))}static async initialize({onCompiler:e,onNode:t,bytecode:n,aci:r,address:i,sourceCodePath:a,sourceCode:s,fileSystem:o,validateBytecode:c,...u}){if(null==r&&null!=e){let t;var l;null!=a&&(t=await e.compile(a)),null!=s&&(t=await e.compileBySourceCode(s,o)),null!=t&&(r=t.aci,null!==(l=n)&&void 0!==l||(n=t.bytecode))}if(null==r)throw new Te;let p;if(null!=i&&ni(i=await Pi(i,"contract_pubkey",{resolveByNode:!0,onNode:t}))&&(p=i),null==i&&null==s&&null==a&&null==n)throw new _e("Can't create instance by ACI without address");if(null!=i&&null==(await Si(i,{onNode:t})).active)throw new be(i);if(!0===c){if(null==i)throw new _e("Can't validate bytecode without contract address");const r=(await Ci(i,{onNode:t})).bytecode;let c=!1;if(null!=n)c=n===r;else if(null!=s){if(null==e)throw new F("Can't validate bytecode without compiler");c=await e.validateBySourceCode(r,s,o)}else if(null!=a){if(null==e)throw new F("Can't validate bytecode without compiler");c=await e.validate(r,a)}if(!c)throw new Ne(null!=(null!=s?s:a)?"source code":"bytecode")}return new ep({onCompiler:e,onNode:t,sourceCode:s,sourceCodePath:a,bytecode:n,aci:r,address:i,name:p,fileSystem:o,...u})}constructor({aci:e,...t}){var n;jl(this,n=Wl),n.add(this),function(e,t){jl(e,t),t.set(e,void 0)}(this,Yl),this._aci=e;const r=e[e.length-1];if(null==r.contract)throw new F(`The last 'aci' item should have 'contract' key, got ${Object.keys(r)} keys instead`);!function(e,t,n){e.set(Jl(e,t),n)}(Yl,this,r.contract),this._name=Hl(Yl,this).name,this._calldata=new al.Encoder(e),this.$options=t,Object.assign(this,Object.fromEntries(Hl(Yl,this).functions.map((({name:e,arguments:t,stateful:n})=>{const r="init"!==e&&!n;return[e,async(...n)=>{const i=n.length===t.length+1?n.pop():{};if("object"!=typeof i)throw new Y(`Options should be an object: ${i}`);return"init"===e?this.$deploy(n,{callStatic:r,...i}):this.$call(e,n,{callStatic:r,...i})}]}))))}};var tp=ep;function np(e){return{...e,id:e.id,decodedQuery:vr(e.query).toString(),decodedResponse:vr(e.response).toString()}}class rp{constructor(e,t){this.address=e,this.options=t}async getState(e={}){return{...this.options,...e}.onNode.getOracleByPubkey(this.address)}async getQuery(e,t={}){const{onNode:n}={...this.options,...t};return np(await n.getOracleQueryByPubkeyAndQueryId(this.address,e))}}function ip(e,t,n){return e.set(sp(e,t),n),n}function ap(e,t){return e.get(sp(e,t))}function sp(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var op=new WeakMap;class cp extends rp{constructor(e,t){var n,r,i;super(br(vr(e.address),ir.OracleAddress),t),i=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=op),r.set(n,i),this.account=e,this.options=t}async register(e,t,n={}){const r={...this.options,...n};return Tl(await bs({_isInternalBuild:!0,...r,tag:Hr.OracleRegisterTx,accountId:this.account.address,queryFormat:e,responseFormat:t}),{...r,onAccount:this.account})}async extendTtl(e={}){const t={...this.options,...e};return Tl(await bs({_isInternalBuild:!0,...t,tag:Hr.OracleExtendTx,oracleId:this.address}),{...t,onAccount:this.account})}pollQueries(e,t={}){const n={...this.options,...t},r=new Set;let i=!1;const a=async()=>{var a;if(i)return;i=!0;const s=(null!==(a=(await n.onNode.getOracleQueriesByPubkey(this.address)).oracleQueries)&&void 0!==a?a:[]).filter((({id:e})=>!r.has(e))).map((e=>np(e))).filter((e=>!0===t.includeResponded||""===e.decodedResponse));s.forEach((e=>r.add(e.id))),i=!1,await Promise.all(s.map((t=>e(t))))};a();const s=(async e=>{const t=null!==(e=n.interval)&&void 0!==e?e:await ui("micro-block",n);return setInterval((async()=>a()),t)})();return async()=>{const e=await s;clearInterval(e)}}async respondToQuery(e,t,n={}){const r={...this.options,...n};return Tl(await bs({_isInternalBuild:!0,...r,tag:Hr.OracleResponseTx,oracleId:this.address,queryId:e,response:t}),{...r,onAccount:this.account})}handleQueries(e,t={}){if(null!=ap(op,this))throw new ee("Another query handler already running, it needs to be stopped to run a new one");const n={...this.options,...t};let r=Promise.resolve();const i=async t=>{const i=await e(t),a=r.then((async()=>this.respondToQuery(t.id,i,n)));r=a.then((()=>{}),(()=>{})),await a};ip(op,this,Promise.resolve());const a=this.pollQueries((async e=>{const t=i(e);if(null==ap(op,this))throw new ne;return ip(op,this,ap(op,this).then((async()=>t)).then((()=>{}),(()=>{}))),t}),n);return async()=>{a(),await ap(op,this),ip(op,this,void 0)}}}class up extends rp{constructor(e,t){super(e,t),this.options=t}async postQuery(e,t={}){const n={...this.options,...t},r=n.onAccount.address,i=await bs({_isInternalBuild:!0,...n,tag:Hr.OracleQueryTx,oracleId:this.address,senderId:r,query:e}),{nonce:a}=xs(i,Hr.OracleQueryTx);return{...await Tl(i,n),queryId:Yr(r,a,this.address)}}async pollForResponse(e,t={}){var n;const r={...this.options,...t},i=null!==(n=r.interval)&&void 0!==n?n:await ui("micro-block",r);let a,s,o;do{({response:o,ttl:s}=await r.onNode.getOracleQueryByPubkeyAndQueryId(this.address,e));const t=vr(o);if(t.length>0)return t.toString();await Dn(i),a=await pi({...r,cached:!0})}while(s>=a);throw new J(a)}async query(e,t={}){const{queryId:n}=await this.postQuery(e,t);return this.pollForResponse(n,t)}}async function lp(e,t,n){return Tl(await bs({_isInternalBuild:!0,...n,tag:Hr.SpendTx,senderId:n.onAccount.address,recipientId:await Pi(t,"account_pubkey",n),amount:e}),n)}async function pp(e,t,n){if(+e<0||+e>1)throw new G("fraction","a number between 0 and 1",e);const r=await Pi(t,"account_pubkey",n),i=n.onAccount.address,a=new P(await yi.bind(n.onAccount)(i,n)),s=a.times(e).integerValue(P.ROUND_HALF_UP),{fee:o}=xs(await bs({_isInternalBuild:!0,...n,tag:Hr.SpendTx,senderId:i,recipientId:r,amount:s}),Hr.SpendTx),c=s.plus(o).gt(a)?a.minus(o):s;return Tl(await bs({_isInternalBuild:!0,...n,tag:Hr.SpendTx,senderId:i,recipientId:r,amount:c}),n)}async function dp(e,t){return Tl(await bs({_isInternalBuild:!0,...t,tag:Hr.PayingForTx,payerId:t.onAccount.address,tx:e}),t)}var mp=n(8287).Buffer;async function hp(e,t,{onAccount:n,onCompiler:r,onNode:i,bytecode:a,aci:s,sourceCodePath:o,sourceCode:c,fileSystem:u,...l}){var p;const d=n.address;if("generalized"===(await fi(d,{onNode:i})).kind)throw new F(`Account ${d} is already GA`);const m=await tp.initialize({onAccount:n,onCompiler:r,onNode:i,bytecode:a,aci:s,sourceCodePath:o,sourceCode:c,fileSystem:u}),h=await bs({_isInternalBuild:!0,...l,tag:Hr.GaAttachTx,onNode:i,code:await m.$compile(),gasLimit:null!==(p=l.gasLimit)&&void 0!==p?p:await m._estimateGas("init",t,l),ownerId:d,callData:m._calldata.encode(m._name,"init",t),authFun:Sr(e)}),{hash:f,rawTx:y}=await Tl(h,{onNode:i,onAccount:n,onCompiler:r,...l}),g=Ts(y);return Object.freeze({owner:d,transaction:f,rawTx:y,gaContractId:g})}async function fp(e,{fee:t,gasPrice:n,onNode:r}){const{nodeNetworkId:i,consensusProtocolVersion:a}=await r.getNodeInfo();let s=Sr(jn([mp.from(i),vr(e)]));if(a===Dr.Ceres){if(null==t)throw new G("fee","provided (in Ceres)",t);if(null==n)throw new G("gasPrice","provided (in Ceres)",n);s=Sr(vr(gs({tag:Ca.GaMetaTxAuthData,fee:t,gasPrice:n,txHash:br(s,ir.TxHash)})))}return s}async function yp(e,{onNode:t}){const n=xs(e,Hr.SignedTx);if(n.encodedTx.tag!==Hr.GaMetaTx)throw new G("transaction","to include GaMetaTx",Hr[n.encodedTx.tag]);return fp(vs(n.encodedTx.tx.encodedTx),{fee:n.encodedTx.fee,gasPrice:n.encodedTx.gasPrice,onNode:t})}var gp=n(4997),wp=n(2321),Np=n(2231);function vp(e){return vp="function"==typeof wp&&"symbol"==typeof Np?function(e){return typeof e}:function(e){return e&&"function"==typeof wp&&e.constructor===wp&&e!==wp.prototype?"symbol":typeof e},vp(e)}var bp=n(9280);function xp(e,t,n){return(t=function(e){var t=function(e){if("object"!=vp(e)||!e)return e;var t=e[bp];if(void 0!==t){var n=t.call(e,"string");if("object"!=vp(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vp(t)?t:t+""}(t))in e?gp(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _p(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Tp={...t,sendTransaction:Tl,...a,...s};var Cp=new WeakMap;class Sp{constructor(e={}){var t,n;xp(this,"_options",{}),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,Cp,void 0),Object.assign(this._options,e),t=Cp,n={onAccount:Kn((()=>this._options.onAccount)),onNode:Kn((()=>this._options.onNode)),onCompiler:Kn((()=>this._options.onCompiler))},t.set(_p(t,this),n)}getContext(e={}){return{...this._options,...(t=Cp,t.get(_p(t,this))),...e};var t}async buildTx(e){return bs({...this.getContext(),...e})}}Object.assign(Sp.prototype,Vn(Tp,(([e,t])=>[e,function(...e){e.length=t.length;const n=e[e.length-1];return e[e.length-1]=this.getContext(n),t(...e)}])));var Ap=Sp;function Pp(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ep=new WeakMap;class zp extends Ap{constructor({nodes:e=[],...t}={}){var n,r;super(t),xp(this,"pool",new Map),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,Ep,void 0),e.forEach((({name:e,instance:t},n)=>this.addNode(e,t,0===n))),n=Ep,r={onNode:Kn((()=>this.api)),onCompiler:Kn((()=>this.compilerApi)),onAccount:Kn((()=>this._resolveAccount()))},n.set(Pp(n,this),r)}get compilerApi(){if(null==this._options.onCompiler)throw new O("You can't use Compiler API. Compiler is not ready!");return this._options.onCompiler}get api(){return this.ensureNodeConnected(),this.pool.get(this.selectedNodeName)}addNode(e,t,n=!1){if(this.pool.has(e))throw new ke(e);this.pool.set(e,t),(n||null==this.selectedNodeName)&&this.selectNode(e)}selectNode(e){if(!this.pool.has(e))throw new Be(`Node with name ${e} not in pool`);this.selectedNodeName=e}isNodeConnected(){return null!=this.selectedNodeName}ensureNodeConnected(){if(!this.isNodeConnected())throw new Be("You can't use Node API. Node is not connected or not defined!")}async getNodeInfo(){return this.ensureNodeConnected(),{name:this.selectedNodeName,...await this.api.getNodeInfo()}}async getNodesInPool(){return Promise.all(Array.from(this.pool.entries()).map((async([e,t])=>({name:e,...await t.getNodeInfo()}))))}addresses(){return[]}_resolveAccount(e=this._options.onAccount){if("string"==typeof e)throw new X("Address in AccountResolver");if("object"==typeof e)return e;throw new Y(`Account should be an address (ak-prefixed string), or instance of AccountBase, got ${String(e)} instead`)}get address(){return this._resolveAccount().address}async sign(e,{onAccount:t,...n}={}){return this._resolveAccount(t).sign(e,n)}async signTransaction(e,{onAccount:t,...n}={}){const r=null!==this.selectedNodeName?await this.api.getNetworkId():void 0;return this._resolveAccount(t).signTransaction(e,{networkId:r,...n})}async signMessage(e,{onAccount:t,...n}={}){return this._resolveAccount(t).signMessage(e,n)}async signTypedData(e,t,{onAccount:n,...r}={}){return this._resolveAccount(n).signTypedData(e,t,r)}async signDelegation(e,{onAccount:t,...n}={}){var r;return null!==(r=n.networkId)&&void 0!==r||(n.networkId=null!==this.selectedNodeName?await this.api.getNetworkId():void 0),this._resolveAccount(t).signDelegation(e,n)}getContext(e={}){return{...this._options,...(t=Ep,t.get(Pp(t,this))),...e,...null!=e.onAccount&&{onAccount:this._resolveAccount(e.onAccount)}};var t}}class Ip extends zp{constructor({accounts:e,...t}={}){super(t),xp(this,"accounts",{}),e?.forEach(((e,t)=>this.addAccount(e,{select:0===t})))}_resolveAccount(e=this.selectedAddress){if("string"==typeof e){const t=e;if(vr(t),null==this.accounts[t])throw new re(e);e=this.accounts[t]}return super._resolveAccount(e)}addresses(){return Object.keys(this.accounts)}addAccount(e,{select:t}={}){const{address:n}=e;this.accounts[n]=e,!0===t&&this.selectAccount(n)}removeAccount(e){if(null==this.accounts[e])throw new re(e);delete this.accounts[e],this.selectedAddress===e&&delete this.selectedAddress}selectAccount(e){if(vr(e),null==this.accounts[e])throw new re(e);this.selectedAddress=e}}let Mp=function(e){return e.to_waellet="to_waellet",e.to_aepp="to_aepp",e}({}),qp=function(e){return e.window="window",e.extension="extension",e}({}),Rp=function(e){return e.subscribe="subscribe",e.unsubscribe="unsubscribe",e}({}),Op=function(e){return e.readyToConnect="connection.announcePresence",e.updateAddress="address.update",e.address="address.get",e.connect="connection.open",e.unsafeSign="data.unsafeSign",e.sign="transaction.sign",e.signMessage="message.sign",e.signTypedData="typedData.sign",e.signDelegation="delegation.sign",e.subscribeAddress="address.subscribe",e.updateNetwork="networkId.update",e.closeConnection="connection.close",e}({}),kp=function(e){return e.CONNECTED="CONNECTED",e.DISCONNECTED="DISCONNECTED",e.WAITING_FOR_CONNECTION_REQUEST="WAITING_FOR_CONNECTION_REQUEST",e}({});const Bp=[];class $p extends z{toJSON(){return{code:this.code,message:this.message,data:this.data}}static deserialize(e){const t=Bp.find((t=>t.code===e.code));if(null==t)throw new te(`Can't find RpcError with code: ${e.code}`);return new t(e.data)}}class Up extends $p{constructor(e){super("Invalid transaction"),xp(this,"code",2),this.data=e,this.name="RpcInvalidTransactionError"}}xp(Up,"code",2),Bp.push(Up);class Lp extends $p{constructor(e){super("Operation rejected by user"),xp(this,"code",4),this.data=e,this.name="RpcRejectedByUserError"}}xp(Lp,"code",4),Bp.push(Lp);class Gp extends $p{constructor(){super("Unsupported Protocol Version"),xp(this,"code",5),this.name="RpcUnsupportedProtocolError"}}xp(Gp,"code",5),Bp.push(Gp);class Fp extends $p{constructor(e){super("Wallet deny your connection request"),xp(this,"code",9),this.data=e,this.name="RpcConnectionDenyError"}}xp(Fp,"code",9),Bp.push(Fp);class Dp extends $p{constructor(){super("You are not connected to the wallet"),xp(this,"code",10),this.name="RpcNotAuthorizeError"}}xp(Dp,"code",10),Bp.push(Dp);class Vp extends $p{constructor(e){super(`You are not subscribed for account ${e}`),xp(this,"code",11),this.data=e,this.name="RpcPermissionDenyError"}}xp(Vp,"code",11),Bp.push(Vp);class jp extends $p{constructor(){super("The peer failed to execute your request due to unknown error"),xp(this,"code",12),this.name="RpcInternalError"}}xp(jp,"code",12),Bp.push(jp);class Hp extends $p{constructor(e){super(`Wallet can't find a network by id "${e}"`),xp(this,"code",13),this.data=e,this.name="RpcNoNetworkById"}}xp(Hp,"code",13),Bp.push(Hp);class Jp extends $p{constructor(){super("Method not found"),xp(this,"code",-32601),this.name="RpcMethodNotFoundError"}}xp(Jp,"code",-32601),Bp.push(Jp);var Wp=n(8287).Buffer;class Yp extends il{constructor(e,t){super(),this._rpcClient=e,this.address=t}async sign(e){const t=br(Wp.from(e),ir.Bytearray),{signature:n}=await this._rpcClient.request(Op.unsafeSign,{onAccount:this.address,data:t});return vr(n)}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null==n)throw new G("networkId","provided",n);const r=await this._rpcClient.request(Op.sign,{onAccount:this.address,tx:e,returnSigned:!0,networkId:n,innerTx:t});if(null==r.signedTransaction)throw new Q("signedTransaction is missed in wallet response");return r.signedTransaction}async signMessage(e){const{signature:t}=await this._rpcClient.request(Op.signMessage,{onAccount:this.address,message:e});return Wp.from(t,"hex")}async signTypedData(e,t,{name:n,version:r,contractAddress:i,networkId:a}={}){const{signature:s}=await this._rpcClient.request(Op.signTypedData,{onAccount:this.address,domain:{name:n,version:r,networkId:a,contractAddress:i},aci:t,data:e});return s}async signDelegation(e){const{signature:t}=await this._rpcClient.request(Op.signDelegation,{delegation:e,onAccount:this.address});return t}}function Kp(e,t,n){Qp(e,t),t.set(e,n)}function Qp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xp(e,t){return e.get(ed(e,t))}function Zp(e,t,n){return e.set(ed(e,t),n),n}function ed(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var td=new WeakMap,nd=new WeakMap,rd=new WeakMap,id=new WeakSet;class ad{constructor(e,t,n){var r;Qp(this,r=id),r.add(this),Kp(this,td,new Map),Kp(this,nd,0),Kp(this,rd,void 0),this.connection=e,Zp(rd,this,n),e.connect(ed(id,this,sd).bind(this),t)}async request(e,t){return ed(id,this,od).call(this,Zp(nd,this,Xp(nd,this)+1),e,t),new Promise(((e,t)=>{Xp(td,this).set(Xp(nd,this),{resolve:e,reject:t})}))}notify(e,t){ed(id,this,od).call(this,void 0,e,t)}}async function sd(e,t){if("2.0"!==e?.jsonrpc)throw new oe(JSON.stringify(e));if("result"in e||"error"in e)return void ed(id,this,ud).call(this,e);const n=e;let r,i;try{if(!(n.method in Xp(rd,this)))throw new Jp;const e=n.method;r=await Xp(rd,this)[e](n.params,t)}catch(e){Yn(e),i=e}if(null!=n.id&&ed(id,this,cd).call(this,n.id,n.method,r,null==i||i instanceof $p?i:new jp),null!=i&&!(i instanceof $p))throw i}function od(e,t,n){this.connection.sendMessage({jsonrpc:"2.0",...null!=e?{id:e}:{},method:t,...null!=n?{params:n}:{}})}function cd(e,t,n,r){this.connection.sendMessage({jsonrpc:"2.0",id:e,method:t,...null!=r?{error:r.toJSON()}:{result:n}})}function ud({id:e,error:t,result:n}){const r=Xp(td,this).get(e);if(null==r)throw new ce(e);null!=t?r.reject($p.deserialize(t)):r.resolve(n),Xp(td,this).delete(e)}class ld extends zp{constructor({name:e,onAddressChange:t=()=>{},onDisconnect:n=()=>{},onNetworkChange:r=()=>{},...i}){super(i),this.onAddressChange=t,this.onDisconnect=n,this.onNetworkChange=r,this.name=e}_resolveAccount(e=this.addresses()[0]){if("string"==typeof e){const t=e;if(vr(t),!this.addresses().includes(t))throw new ue(t);this._ensureConnected(),e=new Yp(this.rpcClient,t)}return null==e&&this._ensureAccountAccess(),super._resolveAccount(e)}addresses(){if(null==this._accounts)return[];const e=Object.keys(this._accounts.current)[0];return[...null!=e?[e]:[],...Object.keys(this._accounts.connected)]}async connectToWallet(e,{connectNode:t=!1,name:n="wallet-node"}={}){if(null!=this.rpcClient)throw new Je("You are already connected to wallet");let r;const i=e=>{if(t){if(null==e.node?.url)throw new Ye("Missing URLs of the Node");this.pool.delete(n),this.addNode(n,new nl(e.node.url),!0)}this.onNetworkChange(e)},a=new ad(e,(()=>{delete this.rpcClient,delete this._accounts,this.onDisconnect(r)}),{[Op.updateAddress]:e=>{this._accounts=e,this.onAddressChange(e)},[Op.updateNetwork]:i,[Op.closeConnection]:e=>{r=e,a.connection.disconnect()},[Op.readyToConnect]:()=>{}}),s=await a.request(Op.connect,{name:this.name,version:1,connectNode:t});return i(s),this.rpcClient=a,s}disconnectWallet(){this._ensureConnected(),this.rpcClient.notify(Op.closeConnection,{reason:"bye"}),this.rpcClient.connection.disconnect()}async askAddresses(){return this._ensureConnected(),this.rpcClient.request(Op.address,void 0)}async subscribeAddress(e,t){this._ensureConnected();const n=await this.rpcClient.request(Op.subscribeAddress,{type:e,value:t});return this._accounts=n.address,n}async askToSelectNetwork(e){this._ensureConnected(),await this.rpcClient.request(Op.updateNetwork,e)}_ensureConnected(){if(null==this.rpcClient)throw new We("You are not connected to Wallet")}_ensureAccountAccess(){if(this._ensureConnected(),0===this.addresses().length)throw new pe}}var pd=n(228);function dd(e,t,n){md(e,t),t.set(e,n)}function md(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function hd(e,t,n){return e.set(yd(e,t),n),n}function fd(e,t){return e.get(yd(e,t))}function yd(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var gd=new WeakMap,wd=new WeakSet,Nd=new WeakMap;class vd extends pd{get isConnected(){return null!=fd(gd,this)}get accounts(){return fd(Nd,this)}constructor(){var e;super(),md(this,e=wd),e.add(this),dd(this,gd,void 0),dd(this,Nd,[])}static async _connect(e,t,n,r){let i;const a=new ad(t,(()=>{hd(gd,n,void 0),hd(Nd,n,[]),n.emit("disconnect",i)}),{[Op.updateAddress]:yd(wd,n,xd).bind(n),[Op.updateNetwork]:n._updateNetwork.bind(n),[Op.closeConnection]:e=>{i=e,a.connection.disconnect()},[Op.readyToConnect]:()=>{}});hd(gd,n,a);const s=await fd(gd,n).request(Op.connect,{name:e,version:1,connectNode:r});n._updateNetwork(s)}disconnect(){const e=yd(wd,this,bd).call(this);e.notify(Op.closeConnection,{reason:"bye"}),e.connection.disconnect()}async getAccounts(){const e=yd(wd,this,bd).call(this);return(await e.request(Op.address,void 0)).map((t=>new Yp(e,t)))}async subscribeAccounts(e,t){const n=await yd(wd,this,bd).call(this).request(Op.subscribeAddress,{type:e,value:t});return yd(wd,this,xd).call(this,n.address),fd(Nd,this)}async askToSelectNetwork(e){await yd(wd,this,bd).call(this).request(Op.updateNetwork,e)}}function bd(){if(null==fd(gd,this))throw new We("You are not connected to Wallet");return fd(gd,this)}function xd(e){const t=[...new Set([...Object.keys(e.current),...Object.keys(e.connected)])];hd(Nd,this,t.map((e=>new Yp(yd(wd,this,bd).call(this),e)))),this.emit("accountsChange",fd(Nd,this))}function _d(e,t){return e.get(Td(e,t))}function Td(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Cd=new WeakMap;class Sd extends vd{constructor(...e){var t,n,r;super(...e),r="",function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=Cd),n.set(t,r)}get networkId(){return _d(Cd,this)}_updateNetwork(e){var t,n;t=Cd,n=e.networkId,t.set(Td(t,this),n),this.emit("networkIdChange",_d(Cd,this))}static async connect(e,t){const n=new Sd;return await Sd._connect(e,t,n,!1),n}}function Ad(e,t){return e.get(Pd(e,t))}function Pd(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ed=new WeakMap;class zd extends vd{constructor(...e){var t,n,r;super(...e),r=null,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=Ed),n.set(t,r)}get node(){return Ad(Ed,this)}_updateNetwork(e){if(null==e.node?.url)throw new Ye("Missing URLs of the Node");var t,n;t=Ed,n=new nl(e.node.url),t.set(Pd(t,this),n),this.emit("nodeChange",Ad(Ed,this))}static async connect(e,t){const n=new zd;return await super._connect(e,t,n,!0),n}}var Id=n(1013);const Md=n.n(Id)()({storeAsString:!0}),qd=e=>{if("object"==typeof e&&null!==e&&e.constructor===Object)return Vn(e,(([e,t])=>[e,qd(t)]));if(Array.isArray(e))return e.map((e=>qd(e)));if("string"==typeof e&&new P(e).toString(10)===e){const t=new P(e);return t.toJSON=()=>t.toString(10),t}return e};var Rd={stringify:(...e)=>Md.stringify(qd(e[0]),...e.slice(1)),parse:Md.parse},Od=n(8287).Buffer;class kd extends Ip{constructor({name:e,id:t,type:n,onConnection:r,onSubscription:i,onDisconnect:a,onAskAccounts:s,onAskToSelectNetwork:o,...c}){super(c),xp(this,"_clients",new Map),this.onConnection=r,this.onSubscription=i,this.onDisconnect=a,this.onAskAccounts=s,this.onAskToSelectNetwork=o,this.name=e,this.id=t,this._type=n}_getAccountsForClient({addressSubscription:e}){const{current:t,connected:n}=this.getAccounts();return{current:e.has("current")||e.has("connected")?t:{},connected:e.has("connected")?n:{}}}_pushAccountsToApps(){null!=this._clients&&Array.from(this._clients.keys()).filter((e=>this._isRpcClientConnected(e))).map((e=>this._getClient(e))).filter((e=>0!==e.addressSubscription.size)).forEach((e=>e.rpc.notify(Op.updateAddress,this._getAccountsForClient(e))))}selectAccount(e){super.selectAccount(e),this._pushAccountsToApps()}addAccount(e,t){super.addAccount(e,t),this._pushAccountsToApps()}_getNode(){return this.ensureNodeConnected(),{node:{url:this.api.$host,name:this.selectedNodeName}}}async selectNode(e){super.selectNode(e);const t=await this.api.getNetworkId();Array.from(this._clients.keys()).filter((e=>this._isRpcClientConnected(e))).map((e=>this._getClient(e))).forEach((e=>{e.rpc.notify(Op.updateNetwork,{networkId:t,...e.connectNode&&this._getNode()})}))}_getClient(e){const t=this._clients.get(e);if(null==t)throw new le(e);return t}_isRpcClientConnected(e){return kp.CONNECTED===this._getClient(e).status&&this._getClient(e).rpc.connection.isConnected()}_disconnectRpcClient(e){const t=this._getClient(e);t.rpc.connection.disconnect(),t.status=kp.DISCONNECTED,t.addressSubscription=new Set}removeRpcClient(e){this._disconnectRpcClient(e),this._clients.delete(e)}addRpcClient(e){const t=Od.from(Xn().randomBytes(8)).toString("base64");let n;const r={id:t,status:kp.WAITING_FOR_CONNECTION_REQUEST,addressSubscription:new Set,connectNode:!1,rpc:new ad(e,(()=>{this._clients.delete(t),this.onDisconnect(t,n)}),{[Op.closeConnection]:e=>{n=e,this._disconnectRpcClient(t)},[Op.connect]:async({name:e,version:n,icons:i,connectNode:a},s)=>{if(1!==n)throw new Gp;return await this.onConnection(t,{name:e,icons:i,connectNode:a},s),r.status=kp.CONNECTED,r.connectNode=a,{...await this.getWalletInfo(),...a&&this._getNode()}},[Op.subscribeAddress]:async({type:e,value:n},i)=>{if(!this._isRpcClientConnected(t))throw new Dp;switch(e){case Rp.subscribe:await this.onSubscription(t,{type:e,value:n},i),r.addressSubscription.add(n);break;case Rp.unsubscribe:r.addressSubscription.delete(n);break;default:throw new te(`Unknown subscription type: ${e}`)}return{subscription:Array.from(r.addressSubscription),address:this._getAccountsForClient(r)}},[Op.address]:async(e,n)=>{if(!this._isRpcClientConnected(t))throw new Dp;return await this.onAskAccounts(t,e,n),this.addresses()},[Op.sign]:async({tx:e,onAccount:n=this.address,returnSigned:r,innerTx:i},a)=>{if(!this._isRpcClientConnected(t))throw new Dp;if(!this.addresses().includes(n))throw new Vp(n);const s={onAccount:n,aeppOrigin:a,aeppRpcClientId:t,innerTx:i};if(r||!0===i)return{signedTransaction:await this.signTransaction(e,s)};try{return Rd.parse(Rd.stringify({transactionHash:await this.sendTransaction(e,{...s,verify:!1})}))}catch(t){const n=await xl(e,this.api);if(n.length>0)throw new Up(n);throw t}},[Op.signMessage]:async({message:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Dp;if(!this.addresses().includes(n))throw new Vp(n);const i={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:Od.from(await this.signMessage(e,i)).toString("hex")}},[Op.signTypedData]:async({domain:e,aci:n,data:r,onAccount:i=this.address},a)=>{if(!this._isRpcClientConnected(t))throw new Dp;if(!this.addresses().includes(i))throw new Vp(i);const s={...e,onAccount:i,aeppOrigin:a,aeppRpcClientId:t};return{signature:await this.signTypedData(r,n,s)}},[Op.unsafeSign]:async({data:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Dp;if(!this.addresses().includes(n))throw new Vp(n);const i={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:br(await this.sign(vr(e),i),ir.Signature)}},[Op.signDelegation]:async({delegation:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Dp;if(!this.addresses().includes(n))throw new Vp(n);const i={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:await this.signDelegation(e,i)}},[Op.updateNetwork]:async(e,n)=>{if(!this._isRpcClientConnected(t))throw new Dp;return await this.onAskToSelectNetwork(t,e,n),null}})};return this._clients.set(t,r),t}async shareWalletInfo(e){this._getClient(e).rpc.notify(Op.readyToConnect,await this.getWalletInfo())}async getWalletInfo(){const{origin:e}=window.location;return{id:this.id,name:this.name,networkId:await this.api.getNetworkId(),origin:"file://"===e?"*":e,type:this._type}}getAccounts(){return{current:null!=this.selectedAddress?{[this.selectedAddress]:{}}:{},connected:this.addresses().filter((e=>e!==this.selectedAddress)).reduce(((e,t)=>({...e,[t]:{}})),{})}}}function Bd(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function $d(e,...t){if(!((n=e)instanceof Uint8Array||null!=n&&"object"==typeof n&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function Ud(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");Bd(e.outputLen),Bd(e.blockLen)}function Ld(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")}const Gd=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);new Uint8Array(new Uint32Array([287454020]).buffer)[0];const Fd=async()=>{};async function Dd(e,t,n){let r=Date.now();for(let i=0;i<e;i++){n(i);const e=Date.now()-r;e>=0&&e<t||(await Fd(),r+=e)}}function Vd(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)),$d(e),e}class jd{clone(){return this._cloneInto()}}const Hd={}.toString;function Jd(e){const t=t=>e().update(Vd(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}class Wd extends jd{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,Ud(e);const n=Vd(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 r=this.blockLen,i=new Uint8Array(r);i.set(n.length>r?e.create().update(n).digest():n);for(let e=0;e<i.length;e++)i[e]^=54;this.iHash.update(i),this.oHash=e.create();for(let e=0;e<i.length;e++)i[e]^=106;this.oHash.update(i),i.fill(0)}update(e){return Ld(this),this.iHash.update(e),this}digestInto(e){Ld(this),$d(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:n,finished:r,destroyed:i,blockLen:a,outputLen:s}=this;return e.finished=r,e.destroyed=i,e.blockLen=a,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const Yd=(e,t,n)=>new Wd(e,t).update(n).digest();Yd.create=(e,t)=>new Wd(e,t);class Kd extends jd{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Gd(this.buffer)}update(e){Ld(this);const{view:t,buffer:n,blockLen:r}=this,i=(e=Vd(e)).length;for(let a=0;a<i;){const s=Math.min(r-this.pos,i-a);if(s!==r)n.set(e.subarray(a,a+s),this.pos),this.pos+=s,a+=s,this.pos===r&&(this.process(t,0),this.pos=0);else{const t=Gd(e);for(;r<=i-a;a+=r)this.process(t,a)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){Ld(this),function(e,t){$d(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:i}=this;let{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>r-a&&(this.process(n,0),a=0);for(let e=a;e<r;e++)t[e]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const i=BigInt(32),a=BigInt(4294967295),s=Number(n>>i&a),o=Number(n&a),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,o,r)}(n,r-8,BigInt(8*this.length),i),this.process(n,0);const s=Gd(e),o=this.outputLen;if(o%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=o/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)s.setUint32(4*e,u[e],i)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:s}=this;return e.length=r,e.pos=s,e.finished=i,e.destroyed=a,r%t&&e.buffer.set(n),e}}const Qd=BigInt(2**32-1),Xd=BigInt(32);function Zd(e,t=!1){return t?{h:Number(e&Qd),l:Number(e>>Xd&Qd)}:{h:0|Number(e>>Xd&Qd),l:0|Number(e&Qd)}}var em=function(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:a,l:s}=Zd(e[i],t);[n[i],r[i]]=[a,s]}return[n,r]},tm=(e,t,n)=>e>>>n,nm=(e,t,n)=>e<<32-n|t>>>n,rm=(e,t,n)=>e>>>n|t<<32-n,im=(e,t,n)=>e<<32-n|t>>>n,am=(e,t,n)=>e<<64-n|t>>>n-32,sm=(e,t,n)=>e>>>n-32|t<<64-n,om=function(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:0|i}},cm=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),um=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,lm=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),pm=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,dm=(e,t,n,r,i,a)=>t+n+r+i+a+(e/2**32|0)|0,mm=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0);const[hm,fm]=(()=>em(["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)))))(),ym=new Uint32Array(80),gm=new Uint32Array(80);class wm extends Kd{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:n,Bl:r,Ch:i,Cl:a,Dh:s,Dl:o,Eh:c,El:u,Fh:l,Fl:p,Gh:d,Gl:m,Hh:h,Hl:f}=this;return[e,t,n,r,i,a,s,o,c,u,l,p,d,m,h,f]}set(e,t,n,r,i,a,s,o,c,u,l,p,d,m,h,f){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|a,this.Dh=0|s,this.Dl=0|o,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|p,this.Gh=0|d,this.Gl=0|m,this.Hh=0|h,this.Hl=0|f}process(e,t){for(let n=0;n<16;n++,t+=4)ym[n]=e.getUint32(t),gm[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|ym[e-15],n=0|gm[e-15],r=rm(t,n,1)^rm(t,n,8)^tm(t,n,7),i=im(t,n,1)^im(t,n,8)^nm(t,n,7),a=0|ym[e-2],s=0|gm[e-2],o=rm(a,s,19)^am(a,s,61)^tm(a,s,6),c=im(a,s,19)^sm(a,s,61)^nm(a,s,6),u=lm(i,c,gm[e-7],gm[e-16]),l=pm(u,r,o,ym[e-7],ym[e-16]);ym[e]=0|l,gm[e]=0|u}let{Ah:n,Al:r,Bh:i,Bl:a,Ch:s,Cl:o,Dh:c,Dl:u,Eh:l,El:p,Fh:d,Fl:m,Gh:h,Gl:f,Hh:y,Hl:g}=this;for(let e=0;e<80;e++){const t=rm(l,p,14)^rm(l,p,18)^am(l,p,41),w=im(l,p,14)^im(l,p,18)^sm(l,p,41),N=l&d^~l&h,v=mm(g,w,p&m^~p&f,fm[e],gm[e]),b=dm(v,y,t,N,hm[e],ym[e]),x=0|v,_=rm(n,r,28)^am(n,r,34)^am(n,r,39),T=im(n,r,28)^sm(n,r,34)^sm(n,r,39),C=n&i^n&s^i&s,S=r&a^r&o^a&o;y=0|h,g=0|f,h=0|d,f=0|m,d=0|l,m=0|p,({h:l,l:p}=om(0|c,0|u,0|b,0|x)),c=0|s,u=0|o,s=0|i,o=0|a,i=0|n,a=0|r;const A=cm(x,T,S);n=um(A,b,_,C),r=0|A}({h:n,l:r}=om(0|this.Ah,0|this.Al,0|n,0|r)),({h:i,l:a}=om(0|this.Bh,0|this.Bl,0|i,0|a)),({h:s,l:o}=om(0|this.Ch,0|this.Cl,0|s,0|o)),({h:c,l:u}=om(0|this.Dh,0|this.Dl,0|c,0|u)),({h:l,l:p}=om(0|this.Eh,0|this.El,0|l,0|p)),({h:d,l:m}=om(0|this.Fh,0|this.Fl,0|d,0|m)),({h:h,l:f}=om(0|this.Gh,0|this.Gl,0|h,0|f)),({h:y,l:g}=om(0|this.Hh,0|this.Hl,0|y,0|g)),this.set(n,r,i,a,s,o,c,u,l,p,d,m,h,f,y,g)}roundClean(){ym.fill(0),gm.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 Nm=Jd((()=>new wm));function vm(e){if("string"!=typeof e)throw new TypeError("Invalid mnemonic type: "+typeof e);return e.normalize("NFKD")}function bm(e,t=""){return async function(e,t,n){const{c:r,dkLen:i,asyncTick:a,DK:s,PRF:o,PRFSalt:c}=function(e,t,n,r){Ud(e);const i=function(e,t){if(void 0!==t&&"[object Object]"!==Hd.call(t))throw new Error("Options should be object or undefined");return Object.assign({dkLen:32,asyncTick:10},t)}(0,r),{c:a,dkLen:s,asyncTick:o}=i;if(Bd(a),Bd(s),Bd(o),a<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const c=Vd(t),u=Vd(n),l=new Uint8Array(s),p=Yd.create(e,c),d=p._cloneInto().update(u);return{c:a,dkLen:s,asyncTick:o,DK:l,PRF:p,PRFSalt:d}}(e,t,n,{c:2048,dkLen:64});let u;const l=new Uint8Array(4),p=Gd(l),d=new Uint8Array(o.outputLen);for(let e=1,t=0;t<i;e++,t+=o.outputLen){const n=s.subarray(t,t+o.outputLen);p.setInt32(0,e,!1),(u=c._cloneInto(u)).update(l).digestInto(d),n.set(d.subarray(0,n.length)),await Dd(r-1,a,(()=>{o._cloneInto(u).update(d).digestInto(d);for(let e=0;e<n.length;e++)n[e]^=d[e]}))}return function(e,t,n,r,i){return e.destroy(),t.destroy(),r&&r.destroy(),i.fill(0),n}(o,c,s,u,d)}(Nm,function(e){const t=vm(e),n=t.split(" ");if(![12,15,18,21,24].includes(n.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:n}}(e).nfkd,(e=>vm(`mnemonic${e}`))(t))}var xm=n(9234),_m=n.n(xm);class Tm{async discover(e){let t=0;const n=[];let r;do{null!=r&&n.push(r),r=await this.initialize(t),t+=1}while(await e.getAccountByPubkey(r.address).then((()=>!0),(()=>!1)));return n}}var Cm=n(8287).Buffer;function Sm(e,t,n){Am(e,t),t.set(e,n)}function Am(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Pm(e,t){return e.get(zm(e,t))}function Em(e,t,n){return e.set(zm(e,t),n),n}function zm(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Im=Cm.from("ed25519 seed");function Mm(e,t){const n=_m().full(e,t);return{secretKey:n.slice(0,32),chainCode:n.slice(32)}}function qm(e,t){return t.reduce((({secretKey:e,chainCode:t},n)=>{const r=Cm.allocUnsafe(4);return r.writeUInt32BE(n+2147483648,0),Mm(jn([Cm.alloc(1,0),e,r]),t)}),e)}var Rm=new WeakMap,Om=new WeakMap,km=new WeakSet;class Bm extends Tm{constructor(e){var t;super(),Am(this,t=km),t.add(this),Sm(this,Rm,void 0),Sm(this,Om,void 0),Em("string"==typeof e?Rm:Om,this,e)}async getWallet(){if(null!=Pm(Om,this))return Pm(Om,this);if(null==Pm(Rm,this))throw new te("AccountMnemonicFactory should be initialized with mnemonic or wallet");const e=qm(Mm(await bm(Pm(Rm,this)),Im),[44,457]);return Em(Om,this,{secretKey:br(e.secretKey,ir.Bytearray),chainCode:br(e.chainCode,ir.Bytearray)}),Pm(Om,this)}async initialize(e){return new fl(await zm(km,this,$m).call(this,e))}}async function $m(e){const t=await this.getWallet();return br(qm({secretKey:vr(t.secretKey),chainCode:vr(t.chainCode)},[e,0,0]).secretKey,ir.AccountSecretKey)}function Um(e,t){return e.get(Lm(e,t))}function Lm(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Gm=new WeakMap;class Fm extends il{constructor(e){var t,n,r;super(),r=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=Gm),n.set(t,r),vr(e),this.address=e}async sign(){throw new X("Can't sign using generalized account")}async signMessage(){throw new X("Can't sign using generalized account")}async signTypedData(){throw new X("Can't sign using generalized account")}async signDelegation(){throw new X("signing delegation using generalized account")}async signTransaction(e,{authData:t,onCompiler:n,onNode:r}){if(null==t||null==n||null==r)throw new G("authData, onCompiler, onNode","provided",null);const{callData:i,sourceCode:a,args:s,fee:o,gasLimit:c,gasPrice:u}="function"==typeof t?await t(e):t,l=null!=i?i:await(async()=>{if(null==Um(Gm,this)){const n=await fi(this.address,{onNode:r});if("generalized"!==n.kind)throw new G("account kind","generalized",n.kind);e=Gm,t=n.authFun,e.set(Lm(e,this),t)}var e,t;if(null==Um(Gm,this))throw new te("Account in generalised, but authFun not provided");if(null==a||null==s)throw new we("Auth data must contain sourceCode and args or callData.");const i=await tp.initialize({onCompiler:n,onNode:r,sourceCode:a});return i._calldata.encode(i._name,Um(Gm,this),s)})(),p=await bs({tag:Hr.GaMetaTx,tx:{tag:Hr.SignedTx,encodedTx:vr(e),signatures:[]},gaId:this.address,authData:l,fee:o,gasLimit:c,gasPrice:u,onNode:r});return vs({tag:Hr.SignedTx,encodedTx:vr(p),signatures:[]})}}var Dm=n(8287).Buffer;const Vm=224;class jm extends il{constructor(e,t,n){super(),this.transport=e,this.index=t,this.address=n,e.decorateAppAPIMethods(this,["signTransaction","signMessage"],"w0w")}async sign(){throw new X("RAW signing using Ledger HW")}async signTypedData(){throw new X("Typed data signing using Ledger HW")}async signDelegation(){throw new X("signing delegation using Ledger HW")}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null!=t)throw new X("innerTx option in AccountLedger");if(null==n)throw new G("networkId","provided",n);const r=vr(e);let i=0;const a=Dm.from(n),s=[];for(;i!==r.length;){const e=0===i?141-a.length:150,t=i+e>r.length?r.length-i:e,n=Dm.alloc(0===i?9+a.length+t:t);if(0===i){let e=n.writeUInt32BE(this.index,0);e=n.writeUInt32BE(r.length,e),e=n.writeUInt8(a.length,e),e+=a.copy(n,e,0,a.length),r.copy(n,e,0,150-e)}else r.copy(n,0,i,i+t);s.push(n),i+=t}const o=[(await s.reduce((async(e,t,n)=>(await e,this.transport.send(Vm,4,0===n?0:128,0,t))),Promise.resolve(Dm.alloc(0)))).subarray(0,64)];return vs({tag:Hr.SignedTx,encodedTx:r,signatures:o})}async signMessage(e){let t=0;const n=Dm.from(e),r=[];for(;t!==n.length;){const e=0===t?142:150,i=t+e>n.length?n.length-t:e,a=Dm.alloc(0===t?8+i:i);0===t?(a.writeUInt32BE(this.index,0),a.writeUInt32BE(n.length,4),n.copy(a,8,t,t+i)):n.copy(a,0,t,t+i),r.push(a),t+=i}return(await r.reduce((async(e,t,n)=>(await e,this.transport.send(Vm,8,0===n?0:128,0,t))),Promise.resolve(Dm.alloc(0)))).subarray(0,64)}}var Hm=n(8287).Buffer;function Jm(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Wm(e,t){return e.get(Km(e,t))}function Ym(e,t,n){return e.set(Km(e,t),n),n}function Km(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Qm=new WeakMap,Xm=new WeakSet;class Zm extends Tm{constructor(e){var t;super(),Jm(this,t=Xm),t.add(this),function(e,t){Jm(e,t),t.set(e,void 0)}(this,Qm),this.transport=e,e.decorateAppAPIMethods(this,["getAddress","getAppConfiguration"],"w0w")}async ensureReady(){const{version:e}=await Km(Xm,this,th).call(this),t=[e,"0.4.4","0.5.0"];if(!so(...t))throw new Z("Aeternity app on Ledger",...t);Ym(Qm,this,Promise.resolve())}async getAppConfiguration(){return Km(Xm,this,th).call(this)}async getAddress(e,t=!1){await Km(Xm,this,eh).call(this);const n=Hm.alloc(4);n.writeUInt32BE(e,0);const r=await this.transport.send(Vm,2,t?1:0,0,n),i=r[0];return r.subarray(1,1+i).toString("ascii")}async initialize(e){return new jm(this.transport,e,await this.getAddress(e))}}async function eh(){var e;return null!==(e=Wm(Qm,this))&&void 0!==e||Ym(Qm,this,this.ensureReady()),Wm(Qm,this)}async function th(){const e=await this.transport.send(Vm,6,0,0);return{version:[e[1],e[2],e[3]].join(".")}}var nh=n(8287).Buffer;const rh="npm:@aeternity-snap/plugin";async function ih(e,t,n,r){const i=await e.request({method:"wallet_invokeSnap",params:{snapId:rh,request:{method:t,params:n}}});if(null==i)throw new te("Empty MetaMask response");if(!(r in i))throw new te(`Key ${r} missed in response ${JSON.stringify(i)}`);return i[r]}class ah extends il{constructor(e,t,n){super(),this.provider=e,this.index=t,this.address=n}async sign(){throw new X("RAW signing using MetaMask")}async signTypedData(){throw new X("Typed data signing using MetaMask")}async signDelegation(){throw new X("signing delegation using MetaMask")}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null!=t)throw new X("innerTx option in AccountMetamask");if(null==n)throw new G("networkId","provided",n);return ih(this.provider,"signTransaction",{derivationPath:[`${this.index}'`,"0'","0'"],tx:e,networkId:n},"signedTx")}async signMessage(e){const t=await ih(this.provider,"signMessage",{derivationPath:[`${this.index}'`,"0'","0'"],message:nh.from(e).toString("base64")},"signature");return nh.from(t,"base64")}}function sh(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function oh(e,t){return e.get(uh(e,t))}function ch(e,t,n){return e.set(uh(e,t),n),n}function uh(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const lh="0.0.9";var ph=new WeakSet,dh=new WeakMap;class mh extends Tm{constructor(e){var t;if(super(),sh(this,t=ph),t.add(this),function(e,t){sh(e,t),t.set(e,void 0)}(this,dh),null==e){if(null==window)throw new K("Window object not found, you can run AccountMetamaskFactory only in browser or setup a provider");if(!("ethereum"in window)||null==window.ethereum)throw new K("`ethereum` object not found, you can run AccountMetamaskFactory only with Metamask enabled or setup a provider");this.provider=window.ethereum}else this.provider=e}async installSnap(){await uh(ph,this,hh).call(this);const e=await this.provider.request({method:"wallet_requestSnaps",params:{[rh]:{version:lh}}});return ch(dh,this,Promise.resolve()),e[rh]}async ensureReady(){const e=[await this.getSnapVersion(),lh,"0.1.0"];if(!so(...e))throw new Z("Aeternity snap in MetaMask",...e);ch(dh,this,Promise.resolve())}async getSnapVersion(){await uh(ph,this,hh).call(this);const e=await this.provider.request({method:"wallet_getSnaps"}),t=e[rh]?.version;if(null==t)throw new K("Aeternity snap is not installed to MetaMask");return t}async initialize(e){await uh(ph,this,fh).call(this);const t=await ih(this.provider,"getPublicKey",{derivationPath:[`${e}'`,"0'","0'"]},"publicKey");return new ah(this.provider,e,t)}}async function hh(){const e=await this.provider.request({method:"web3_clientVersion"});if(null==e)throw new te("Can't get Ethereum Provider version");if(!e.startsWith("MetaMask/v"))throw new K(`Expected Metamask, got ${e} instead`);const t=[e.slice(10),"12.2.4"];if(!so(...t))throw new Z("Metamask",...t)}async function fh(){var e;return null!==(e=oh(dh,this))&&void 0!==e||ch(dh,this,this.ensureReady()),oh(dh,this)}class yh{}const gh={type:{name:"Composite",className:"Contract",modelProperties:{code:{serializedName:"code",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}}}}},wh={type:{name:"Composite",className:"CompileOpts",modelProperties:{fileSystem:{serializedName:"file_system",type:{name:"Dictionary",value:{type:{name:"any"}}}},srcFile:{serializedName:"src_file",type:{name:"String"}}}}},Nh={type:{name:"Composite",className:"CompilerError",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},pos:{serializedName:"pos",type:{name:"Composite",className:"ErrorPos"}},message:{serializedName:"message",required:!0,type:{name:"String"}},context:{serializedName:"context",type:{name:"String"}}}}},vh={type:{name:"Composite",className:"ErrorPos",modelProperties:{file:{serializedName:"file",type:{name:"String"}},line:{serializedName:"line",required:!0,type:{name:"Number"}},col:{serializedName:"col",required:!0,type:{name:"Number"}}}}},bh={type:{name:"Composite",className:"CompileResult",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},aci:{serializedName:"aci",required:!0,type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}},warnings:{serializedName:"warnings",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}}}}},xh={type:{name:"Composite",className:"SophiaCallResultInput",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},function:{serializedName:"function",required:!0,type:{name:"String"}},callResult:{serializedName:"call-result",required:!0,type:{name:"String"}},callValue:{serializedName:"call-value",required:!0,type:{name:"String"}}}}},_h={type:{name:"Composite",className:"BytecodeCallResultInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},callResult:{serializedName:"call-result",required:!0,type:{name:"String"}},callValue:{serializedName:"call-value",required:!0,type:{name:"String"}}}}},Th={type:{name:"Composite",className:"DecodedCallresult",modelProperties:{function:{serializedName:"function",required:!0,type:{name:"String"}},result:{serializedName:"result",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Ch={type:{name:"Composite",className:"FunctionCallInput",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},function:{serializedName:"function",required:!0,type:{name:"String"}},arguments:{serializedName:"arguments",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Sh={type:{name:"Composite",className:"Calldata",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}}}}},Ah={type:{name:"Composite",className:"DecodeCalldataBytecode",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},Ph={type:{name:"Composite",className:"DecodedCalldata",modelProperties:{function:{serializedName:"function",required:!0,type:{name:"String"}},arguments:{serializedName:"arguments",required:!0,type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}}}},Eh={type:{name:"Composite",className:"ErrorModel",modelProperties:{reason:{serializedName:"reason",required:!0,type:{name:"String"}}}}},zh={type:{name:"Composite",className:"DecodeCalldataSource",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}}}}},Ih={type:{name:"Composite",className:"ByteCodeInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},Mh={type:{name:"Composite",className:"FateAssembler",modelProperties:{fateAssembler:{serializedName:"fate-assembler",required:!0,type:{name:"String"}}}}},qh={type:{name:"Composite",className:"ValidateByteCodeInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}}}}},Rh={type:{name:"Composite",className:"CompilerVersion",modelProperties:{version:{serializedName:"version",required:!0,type:{name:"String"}}}}},Oh={type:{name:"Composite",className:"ApiVersion",modelProperties:{apiVersion:{serializedName:"api-version",required:!0,type:{name:"String"}}}}},kh={type:{name:"Composite",className:"SophiaBinaryData",modelProperties:{sophiaType:{serializedName:"sophia-type",required:!0,type:{name:"String"}},data:{serializedName:"data",required:!0,type:{name:"String"}}}}},Bh={type:{name:"Composite",className:"SophiaJsonData",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},$h={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},Uh={parameterPath:"body",mapper:gh},Lh={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},Gh={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},Fh={parameterPath:"body",mapper:xh},Dh={parameterPath:"body",mapper:_h},Vh={parameterPath:"body",mapper:Ch},jh={parameterPath:"body",mapper:Ah},Hh={parameterPath:"body",mapper:zh},Jh={parameterPath:"body",mapper:Ih},Wh={parameterPath:"body",mapper:qh};class Yh extends io{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const i="azsdk-js-compiler/1.0.0-beta.1",a=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:a},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}generateACI(e,t){return this.sendOperationRequest({body:e,options:t},Qh)}compileContract(e,t){return this.sendOperationRequest({body:e,options:t},Xh)}decodeCallResult(e,t){return this.sendOperationRequest({body:e,options:t},Zh)}decodeCallResultBytecode(e,t){return this.sendOperationRequest({body:e,options:t},ef)}encodeCalldata(e,t){return this.sendOperationRequest({body:e,options:t},tf)}decodeCalldataBytecode(e,t){return this.sendOperationRequest({body:e,options:t},nf)}decodeCalldataSource(e,t){return this.sendOperationRequest({body:e,options:t},rf)}getFateAssemblerCode(e,t){return this.sendOperationRequest({body:e,options:t},af)}validateByteCode(e,t){return this.sendOperationRequest({body:e,options:t},sf)}getCompilerVersion(e,t){return this.sendOperationRequest({body:e,options:t},of)}version(e){return this.sendOperationRequest({options:e},cf)}apiVersion(e){return this.sendOperationRequest({options:e},uf)}api(e){return this.sendOperationRequest({options:e},lf)}}const Kh=qs(o,!1),Qh={path:"/aci",httpMethod:"POST",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Uh,urlParameters:[Gh],headerParameters:[$h,Lh],mediaType:"json",serializer:Kh},Xh={path:"/compile",httpMethod:"POST",responses:{200:{bodyMapper:bh},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Uh,urlParameters:[Gh],headerParameters:[$h,Lh],mediaType:"json",serializer:Kh},Zh={path:"/decode-call-result",httpMethod:"POST",responses:{200:{bodyMapper:{type:{name:"any"}}},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Fh,urlParameters:[Gh],headerParameters:[$h,Lh],mediaType:"json",serializer:Kh},ef={path:"/decode-call-result/bytecode",httpMethod:"POST",responses:{200:{bodyMapper:Th},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Dh,urlParameters:[Gh],headerParameters:[$h,Lh],mediaType:"json",serializer:Kh},tf={path:"/encode-calldata",httpMethod:"POST",responses:{200:{bodyMapper:Sh},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Vh,urlParameters:[Gh],headerParameters:[$h,Lh],mediaType:"json",serializer:Kh},nf={path:"/decode-calldata/bytecode",httpMethod:"POST",responses:{200:{bodyMapper:Ph},400:{bodyMapper:Eh,isError:!0}},requestBody:jh,urlParameters:[Gh],headerParameters:[$h,Lh],mediaType:"json",serializer:Kh},rf={path:"/decode-calldata/source",httpMethod:"POST",responses:{200:{bodyMapper:Ph},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Hh,urlParameters:[Gh],headerParameters:[$h,Lh],mediaType:"json",serializer:Kh},af={path:"/fate-assembler",httpMethod:"POST",responses:{200:{bodyMapper:Mh},400:{bodyMapper:Eh,isError:!0}},requestBody:Jh,urlParameters:[Gh],headerParameters:[$h,Lh],mediaType:"json",serializer:Kh},sf={path:"/validate-byte-code",httpMethod:"POST",responses:{200:{},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Wh,urlParameters:[Gh],headerParameters:[$h,Lh],mediaType:"json",serializer:Kh},of={path:"/compiler-version",httpMethod:"POST",responses:{200:{bodyMapper:Rh},400:{bodyMapper:Eh,isError:!0}},requestBody:Jh,urlParameters:[Gh],headerParameters:[$h,Lh],mediaType:"json",serializer:Kh},cf={path:"/version",httpMethod:"GET",responses:{200:{bodyMapper:Rh},500:{bodyMapper:Eh,isError:!0}},urlParameters:[Gh],headerParameters:[Lh],serializer:Kh},uf={path:"/api-version",httpMethod:"GET",responses:{200:{bodyMapper:Oh},500:{bodyMapper:Eh,isError:!0}},urlParameters:[Gh],headerParameters:[Lh],serializer:Kh},lf={path:"/api",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Dictionary",value:{type:{name:"any"}}}}},400:{bodyMapper:Eh,isError:!0}},urlParameters:[Gh],headerParameters:[Lh],serializer:Kh};class pf extends yh{constructor(e,{ignoreVersion:t=!1}={}){let n;super(),this.api=new Yh(e,{allowInsecureConnection:!0,additionalPolicies:[...t?[]:[wo("compiler",(async e=>(null!=n||(n=(await this.api.apiVersion(e)).apiVersion),n)),"8.0.0","9.0.0")],go((e=>{let t="";return"reason"in e&&(t+=` ${e.reason}${null!=e.parameter?` in ${e.parameter}`:""}${null!=e.info?` (${JSON.stringify(e.info)})`:""}`),Array.isArray(e)&&(t+=`\n${e.map((e=>`${e.type}:${e.pos.line}:${e.pos.col}: ${e.message}${null!=e.context?` (${e.context})`:""}`)).join("\n")}`),t}))]}),this.api.pipeline.removePolicy({name:an}),this.api.pipeline.removePolicy({name:An})}async compileBySourceCode(e,t){try{const n=await this.api.compileContract({code:e,options:{fileSystem:t}}),r=n.warnings.map((({type:e,...t})=>t));return{...n,warnings:r}}catch(e){if(e instanceof On&&400===e.statusCode)throw new O(e.message);throw e}}async compile(e){throw new X("File system access, use CompilerHttpNode instead")}async generateAciBySourceCode(e,t){try{return await this.api.generateACI({code:e,options:{fileSystem:t}})}catch(e){if(e instanceof On&&400===e.statusCode)throw new O(e.message);throw e}}async generateAci(e){throw new X("File system access, use CompilerHttpNode instead")}async validateBySourceCode(e,t,n){try{return await this.api.validateByteCode({bytecode:e,source:t,options:{fileSystem:n}}),!0}catch{return!1}}async validate(e,t){throw new X("File system access, use CompilerHttpNode instead")}async version(){return(await this.api.version()).version}}function df(e){return e.replace(/_./g,(e=>e[1].toUpperCase()))}var mf=n(952),hf=n.n(mf);const{w3cwebsocket:ff}=hf();function yf(e,...t){const[n,...r]=t;e._eventEmitter.emit(n,...r)}function gf(e,t){if(null==t)throw new ge;e._debug("enter state",t.handler.name),e._fsm=t,null!=t?.handler?.enter&&t.handler.enter(e),xf(e)}function wf(e,t,n){e._debug(t,`(prev. ${e._status})`,null!=n?n:""),t!==e._status&&(e._status=t,yf(e,"statusChanged",t))}function Nf(e,t){e._state=t,yf(e,"stateChanged",t)}function vf(e,t){e._debug("send message",t.method,t.params),e._websocket.send(Rd.stringify({jsonrpc:"2.0",...t}))}function bf(e,t,n={}){vf(e,{method:t,params:n})}async function xf(e){if(e._isActionQueueLocked)return;const t=e._actionQueue;if(0===t.length)return;const n=t.findIndex((t=>t.guard(e,e._fsm)));if(-1===n)return;e._actionQueue=t.filter(((e,t)=>n!==t)),e._isActionQueueLocked=!0;const r=await t[n].action(e,e._fsm);e._isActionQueueLocked=!1,gf(e,r)}async function _f(e,t){const{handler:n,state:r}=e._fsm,i=await Promise.resolve(n(e,t,r));if(gf(e,i),"OffChainNewContract"===t?.params?.data?.updates?.[0]?.op&&"channelOpen"===i?.handler.name){const n=e.round();if(null==n)throw new ne("Round is null");const r=t?.params?.data?.updates?.[0]?.owner;yf(e,"newContract",Ar(r,n+1))}}function Tf(e){e._websocket.close(),clearTimeout(e._pingTimeoutId)}function Cf(e){clearTimeout(e._pingTimeoutId),e._pingTimeoutId=setTimeout((()=>{bf(e,"channels.system",{action:"ping"}),e._pingTimeoutId=setTimeout((()=>{Tf(e),yf(e,"error",new he)}),15e3)}),1e4)}async function Sf(e,t,n){return new Promise(((r,i)=>{const a=e._nextRpcMessageId;e._nextRpcMessageId+=1,e._rpcCallbacks.set(a,(e=>{if(null!=e.error){var t;const n=null!==(t=e.error.data[0].message)&&void 0!==t?t:"";i(new de(e.error.message+n))}else r(e.result)})),vf(e,{method:t,id:a,params:n})}))}async function Af(e,t){const{signatures:n,encodedTx:r}=xs(e,Hr.SignedTx),i=vs(r),a=await t(i);if("string"==typeof a){const{signatures:e}=xs(a,Hr.SignedTx);return vs({tag:Hr.SignedTx,signatures:n.concat(e),encodedTx:vr(i)})}return a}async function Pf(e,t,n,r){var i;let a;if(null!=n.tx)a=await r(n.tx);else{if(null==n.signed_tx)throw new R("Can't find transaction in message");a=await Af(n.signed_tx,r)}const s="string"!=typeof a,o=null!=n.tx?"tx":"signed_tx";return bf(e,t,s?{error:null!==(i=a)&&void 0!==i?i:1}:{[o]:a}),s}function Ef(e,t,n){return n?.reject?.(Object.assign(new fe(`Unexpected message received:\n\n${JSON.stringify(t)}`),{wsMessage:t})),{handler:Bf}}function zf(e,t,n,r){if(null!=r&&"channels.update"===t.method)return r(e,t,n);if("channels.conflict"===t.method)return n.resolve({accepted:!1,errorCode:t.params.data.error_code,errorMessage:t.params.data.error_msg}),{handler:Bf};if("channels.info"===t.method&&"aborted_update"===t.params.data.event)return n.resolve({accepted:!1}),{handler:Bf};if(null!=t.error){const e=t.error.data.map((e=>e.code));return e.includes(1001)?n.reject(new V("Insufficient balance")):e.includes(1002)?n.reject(new F("Amount cannot be negative")):n.reject(new me(t.error.message)),{handler:Bf}}return Ef(0,t,n)}function If(e,t){if("channels.info"===t.method){const n=t.params.data.event;let r=null;return"channel_accept"===n&&(r="accepted"),"funding_created"===n&&(r="halfSigned"),null!=r?(wf(e,r),{handler:Rf}):"channel_reestablished"===t.params.data.event?{handler:kf}:"fsm_up"===t.params.data.event?(e._fsmId=t.params.data.fsm_id,{handler:If}):{handler:If}}if("channels.error"===t.method)return yf(e,"error",new me(t?.payload?.message)),{handler:Gf}}async function Mf(e,t,n){return"channels.info"===t.method&&"fsm_up"===t.params.data.event?(e._fsmId=t.params.data.fsm_id,{handler:function(e,t,n){return"channels.info"===t.method&&"channel_reestablished"===t.params.data.event?{handler:kf}:Ef(0,t,n)}}):Ef(0,t,n)}async function qf(e,t,n){if("channels.info"===t.method&&"fsm_up"===t.params.data.event){e._fsmId=t.params.data.fsm_id;const{signedTx:n}=await e.state();return Nf(e,null==n?"":vs(n)),{handler:Bf}}return Ef(0,t,n)}async function Rf(e,t){const n="initiator"===e._options.role?"initiator_sign":"responder_sign";if(t.method===`channels.sign.${n}`)return await Pf(e,`channels.${n}`,t.params.data,(async t=>e._options.sign(n,t))),{handler:Of}}function Of(e,t){if("channels.on_chain_tx"===t.method){const{info:n}=t.params.data,{role:r}=e._options;if("funding_signed"===n&&"initiator"===r||"funding_created"===n&&"responder"===r)return{handler:function t(n,r){if("channels.info"===r.method)switch(r.params.data.event){case"funding_created":case"own_funding_locked":return{handler:t};case"funding_locked":return{handler:kf}}if("channels.on_chain_tx"===r.method)return yf(e,"onChainTx",r.params.data.tx,{info:r.params.data.info,type:r.params.data.type}),{handler:t}}}}if("channels.info"===t.method&&"funding_signed"===t.params.data.event&&"initiator"===e._options.role)return e._channelId=t.params.channel_id,wf(e,"signed"),{handler:Of}}function kf(e,t,n){return"channels.info"===t.method&&"open"===t.params.data.event?(e._channelId=t.params.channel_id,{handler:function(t,n,r){return"channels.update"===n.method?(Nf(e,n.params.data.state),{handler:Bf}):Ef(0,n,r)}}):Ef(0,t,n)}async function Bf(e,t,n){switch(t.method){case"channels.info":switch(t.params.data.event){case"update":case"withdraw_created":case"deposit_created":return{handler:$f};case"own_withdraw_locked":case"withdraw_locked":case"own_deposit_locked":case"deposit_locked":case"peer_disconnected":case"channel_reestablished":case"open":return yf(e,df(t.params.data.event)),{handler:Bf};case"fsm_up":return e._fsmId=t.params.data.fsm_id,{handler:Bf};case"timeout":case"close_mutual":case"shutdown":return{handler:Bf};case"closing":return wf(e,"closing"),{handler:Bf};case"closed_confirmed":return wf(e,"closed"),{handler:Gf};case"died":return wf(e,"died"),{handler:Gf}}break;case"channels.on_chain_tx":return yf(e,"onChainTx",t.params.data.tx,{info:t.params.data.info,type:t.params.data.type}),{handler:Bf};case"channels.leave":return{handler:Bf};case"channels.update":return Nf(e,t.params.data.state),{handler:Bf};case"channels.sign.shutdown_sign_ack":return $f(e,t,n)}}async function $f(e,t,n){var r;const[,i]=null!==(r=t.method.match(/^channels\.sign\.([^.]+)$/))&&void 0!==r?r:[];return null==i?Ef(0,t,n):await Pf(e,`channels.${i}`,t.params.data,(async n=>e._options.sign(i,n,{updates:t.params.data.updates})))?{handler:function e(t,r){return null!=r.error?{handler:e,state:n}:"channels.conflict"===r.method?{handler:Bf}:Ef(0,r,n)},state:n}:{handler:Bf}}async function Uf(e,t,n){return"channels.sign.shutdown_sign"!==t.method?Ef(0,t,n):(await Pf(e,"channels.shutdown_sign",t.params.data,(async e=>n.sign(e))),{handler(e,t){return"channels.on_chain_tx"!==t.method?Ef(0,t,n):{handler:Gf,state:n}},state:n})}function Lf(e,t,n){return"channels.leave"===t.method?(n.resolve({channelId:t.params.channel_id,signedTx:t.params.data.state}),Tf(e),{handler:Gf}):"channels.error"===t.method?(n.reject(new me(t.data.message)),{handler:Bf}):Ef(0,t,n)}function Gf(e,t,n){return null==n?{handler:Gf}:"closing"===t.params.data.event?{handler:Gf,state:n}:"channel_closed"===t.params.data.info?(n.closeTx=t.params.data.tx,{handler:Gf,state:n}):"closed_confirmed"===t.params.data.event?(n.resolve(n.closeTx),{handler:Gf}):{handler:Gf,state:n}}Bf.enter=e=>{wf(e,"open")};var Ff=n(7007),Df=n.n(Ff);function Vf(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}let jf=0;var Hf=new WeakMap;class Jf{constructor(){var e,t;xp(this,"_eventEmitter",new(Df())),xp(this,"_nextRpcMessageId",0),xp(this,"_rpcCallbacks",new Map),xp(this,"_messageQueue",[]),xp(this,"_isMessageQueueLocked",!1),xp(this,"_actionQueue",[]),xp(this,"_isActionQueueLocked",!1),xp(this,"_status","disconnected"),xp(this,"_state",""),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,Hf,void 0),jf+=1,t=jf,(e=Hf).set(Vf(e,this),t)}_debug(...e){var t;!0===this._options.debug&&console.debug(`Channel #${t=Hf,t.get(Vf(t,this))}`,...e)}static async initialize(e){return Jf._initialize(new Jf,e)}static async _initialize(e,t){var n;const r=null!=(null!==(n=t.existingFsmId)&&void 0!==n?n:t.existingChannelId);if(r&&(null==t.existingFsmId||null==t.existingChannelId))throw new F("`existingChannelId`, `existingFsmId` should be both provided or missed");const i=c[!0===t.reestablish?"awaitingReestablish":"awaitingReconnection"];return await async function(e,t,n,{url:r,...i}){e._options={url:r,...i};const a=new URL(r);Object.entries(i).filter((([e])=>!["sign","debug"].includes(e))).forEach((([e,t])=>a.searchParams.set(e.replace(/[A-Z]/g,(e=>`_${e.toLowerCase()}`)),t.toString()))),a.searchParams.set("protocol","json-rpc"),wf(e,"connecting"),e._websocket=new ff(a.toString()),await new Promise(((n,r)=>{Object.assign(e._websocket,{onerror:r,onopen:async r=>{n(),wf(e,"connected",r),gf(e,{handler:t}),Cf(e)},onclose:t=>{wf(e,"disconnected",t),clearTimeout(e._pingTimeoutId)},onmessage:({data:t})=>function(e,t){const n=Rd.parse(t);if(e._debug("received message",n.method,n.params),null==n.id)"channels.message"!==n.method?"channels.system.pong"!==n.method?(e._messageQueue.push(n),async function(e){if(!e._isMessageQueueLocked){for(e._isMessageQueueLocked=!0;e._messageQueue.length>0;){const t=e._messageQueue.shift();if(null==t)throw new ne;try{await _f(e,t)}catch(n){Yn(n),yf(e,"error",new ye(n,t))}}e._isMessageQueueLocked=!1}}(e)):n.params.channel_id!==e._channelId&&null!=e._channelId||Cf(e):yf(e,"message",n.params.data.message);else{const t=e._rpcCallbacks.get(n.id);if(null==t)return void yf(e,"error",new R(`Can't find callback by id: ${n.id}`));try{t(n)}finally{e._rpcCallbacks.delete(n.id)}}}(e,t)})}))}(e,r?i:If,0,t),e}on(e,t){this._eventEmitter.on(e,t)}off(e,t){this._eventEmitter.removeListener(e,t)}disconnect(){return Tf(this)}status(){return this._status}async state(){const e=(t=await Sf(this,"channels.get.offchain_state",{}),Object.entries(t).reduce(((e,[t,n])=>({...e,[df(t)]:n})),{}));var t;return{calls:ws(e.calls),...""!==e.halfSignedTx&&{halfSignedTx:xs(e.halfSignedTx,Hr.SignedTx)},...""!==e.signedTx&&{signedTx:xs(e.signedTx,Hr.SignedTx)},trees:ws(e.trees)}}round(){if(""===this._state)return null;const e=xs(this._state,Hr.SignedTx).encodedTx;switch(e.tag){case Hr.ChannelCreateTx:return 1;case Hr.ChannelOffChainTx:case Hr.ChannelWithdrawTx:case Hr.ChannelDepositTx:return e.round;default:return null}}id(){if(null==this._channelId)throw new R("Channel is not initialized");return this._channelId}fsmId(){if(null==this._fsmId)throw new R("Channel is not initialized");return this._fsmId}async enqueueAction(e){return async function(e,t,n){const r=new Promise(((r,i)=>{e._actionQueue.push({guard:t,action(){const e=n();return{...e,state:{...e.state,resolve:r,reject:i}}}})}));return xf(e),r}(this,((e,t)=>t?.handler===Bf),e)}async leave(){return this.enqueueAction((()=>(bf(this,"channels.leave"),{handler:Lf})))}async shutdown(e){return this.enqueueAction((()=>(bf(this,"channels.shutdown"),{handler:Uf,state:{sign:e}})))}}class Wf extends Jf{async update(e,t,n,r,i=[]){return this.enqueueAction((()=>{bf(this,"channels.update.new",{from:e,to:t,amount:n,meta:i});const a=async(e,t,n)=>"channels.sign.update"===t.method?await Pf(this,"channels.update",t.params.data,(async e=>r(e,{updates:t.params.data.updates})))?{handler:a,state:n}:{handler:(e,t)=>zf(this,t,n,(()=>(Nf(this,t.params.data.state),n.resolve({accepted:!0,signedTx:t.params.data.state}),{handler:Bf}))),state:n}:"channels.error"===t.method?(n.reject(new me(t.data.message)),{handler:Bf}):zf(this,t,n);return{handler:a}}))}async poi({accounts:e,contracts:t}){const{poi:n}=await Sf(this,"channels.get.poi",{accounts:e,contracts:t});return ws(n)}async balances(e){return Object.fromEntries((await Sf(this,"channels.get.balances",{accounts:e})).map((e=>[e.account,e.balance])))}async awaitingActionTx(e,t,n){if(t.method!==`channels.sign.${e}_tx`)return Ef(0,t,n);const r=(t,i)=>{if("channels.on_chain_tx"===i.method)return n.onOnChainTx?.(i.params.data.tx),{handler:r,state:n};if("channels.info"===i.method&&[`own_${e}_locked`,`${e}_locked`].includes(i.params.data.event)){const t="deposit"===e?"Deposit":"Withdraw",a=i.params.data.event.startsWith("own_");return n[`on${a?"Own":""}${t}Locked`]?.(),{handler:r,state:n}}return zf(this,i,n,(()=>(Nf(this,i.params.data.state),n.resolve({accepted:!0,signedTx:i.params.data.state}),{handler:Bf})))},{sign:i}=n;return await Pf(this,`channels.${e}_tx`,t.params.data,(async e=>i(e,{updates:t.params.data.updates}))),{handler:r,state:n}}async withdraw(e,t,{onOnChainTx:n,onOwnWithdrawLocked:r,onWithdrawLocked:i}={}){return this.enqueueAction((()=>(bf(this,"channels.withdraw",{amount:e}),{handler:async(e,t,n)=>this.awaitingActionTx("withdraw",t,n),state:{sign:t,onOnChainTx:n,onOwnWithdrawLocked:r,onWithdrawLocked:i}})))}async deposit(e,t,{onOnChainTx:n,onOwnDepositLocked:r,onDepositLocked:i}={}){return this.enqueueAction((()=>(bf(this,"channels.deposit",{amount:e}),{handler:async(e,t,n)=>this.awaitingActionTx("deposit",t,n),state:{sign:t,onOnChainTx:n,onOwnDepositLocked:r,onDepositLocked:i}})))}async sendMessage(e,t){const n="object"==typeof e?JSON.stringify(e):e;"connecting"===this.status()&&(await new Promise((e=>{const t=n=>{"connecting"!==n&&(e(),this.off("statusChanged",t))};this.on("statusChanged",t)})),await Dn(500)),bf(this,"channels.message",{info:n,to:t})}}function Yf(e){return Object.entries(e).reduce(((e,[t,n])=>({...e,[df(t)]:n})),{})}class Kf extends Wf{static async initialize(e){return Jf._initialize(new Kf,e)}async createContract({code:e,callData:t,deposit:n,vmVersion:r,abiVersion:i},a){return this.enqueueAction((()=>(bf(this,"channels.update.new_contract",{code:e,call_data:t,deposit:n,vm_version:r,abi_version:i}),{handler:async(e,t,n)=>"channels.sign.update"!==t.method?Ef(0,t,n):(await Pf(this,"channels.update",t.params.data,(async e=>n.sign(e))),{handler:(e,t,n)=>zf(this,t,n,(()=>{const e=xs(t.params.data.state,Hr.SignedTx).encodedTx;if(e.tag!==Hr.ChannelOffChainTx)throw new R(`Tag should be ${Hr[Hr.ChannelOffChainTx]}, got ${Hr[e.tag]} instead`);const r="initiator"===this._options.role?"initiatorId":"responderId",i=this._options[r];Nf(this,t.params.data.state);const a=Ar(i,e.round);return yf(this,"newContract",a),n.resolve({accepted:!0,address:a,signedTx:t.params.data.state}),{handler:Bf}})),state:n}),state:{sign:a}})))}async callContract({amount:e,callData:t,contract:n,abiVersion:r},i){return this.enqueueAction((()=>(bf(this,"channels.update.call_contract",{amount:e,call_data:t,contract_id:n,abi_version:r}),{handler:async(e,t,n)=>"channels.sign.update"!==t.method?Ef(0,t,n):(await Pf(this,"channels.update",t.params.data,(async e=>n.sign(e,{updates:t.params.data.updates}))),{handler:(e,t,n)=>zf(this,t,n,(()=>(Nf(this,t.params.data.state),n.resolve({accepted:!0,signedTx:t.params.data.state}),{handler:Bf}))),state:n}),state:{sign:i}})))}async forceProgress({amount:e,callData:t,contract:n,abiVersion:r,gasLimit:i=1e6,gasPrice:a=Br},s,{onOnChainTx:o}={}){return this.enqueueAction((()=>(bf(this,"channels.force_progress",{amount:e,call_data:t,contract_id:n,abi_version:r,gas_price:a,gas:i}),{handler:async(e,t,n)=>"channels.sign.force_progress_tx"!==t.method?Ef(0,t,n):(await Pf(this,"channels.force_progress_sign",t.params.data,(async e=>n.sign(e,{updates:t.params.data.updates}))),{handler:(e,t,n)=>("channels.on_chain_tx"===t.method&&(n.onOnChainTx?.(t.params.data.tx),yf(this,"onChainTx",t.params.data.tx,{info:t.params.data.info,type:t.params.data.type}),n.resolve({accepted:!0,tx:t.params.data.tx})),Ef(0,t,n)),state:n}),state:{sign:s,onOnChainTx:o}})))}async callContractStatic({amount:e,callData:t,contract:n,abiVersion:r}){return Yf(await Sf(this,"channels.dry_run.call_contract",{amount:e,call_data:t,contract_id:n,abi_version:r}))}async getContractCall({caller:e,contract:t,round:n}){return Yf(await Sf(this,"channels.get.contract_call",{caller_id:e,contract_id:t,round:n}))}async getContractState(e){const t=await Sf(this,"channels.get.contract",{pubkey:e});return Yf({...t,contract:Yf(t.contract)})}async cleanContractCalls(){return this.enqueueAction((()=>(bf(this,"channels.clean_contract_calls"),{handler(e,t,n){return"channels.calls_pruned.reply"===t.method?(n.resolve(),{handler:Bf}):(n.reject(new fe("Unexpected message received")),{handler:Gf})}})))}}var Qf=null;"undefined"!=typeof WebSocket?Qf=WebSocket:"undefined"!=typeof MozWebSocket?Qf=MozWebSocket:void 0!==n.g?Qf=n.g.WebSocket||n.g.MozWebSocket:"undefined"!=typeof window?Qf=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(Qf=self.WebSocket||self.MozWebSocket);var Xf=Qf;function Zf(e,t,n){ey(e,t),t.set(e,n)}function ey(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ty(e,t,n){return n(iy(e,t))}function ny(e,t,n){return e.set(iy(e,t),n),n}function ry(e,t){return e.get(iy(e,t))}function iy(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var ay=function(e){return e.Middleware="mdw",e.Node="node",e.All="all",e}(ay||{});class sy extends z{constructor(e){super(e),this.name="MiddlewareSubscriberError"}}class oy extends sy{constructor(e){super("Connection closed"),this.closeEvent=e,this.name="MiddlewareSubscriberDisconnected"}}var cy=new WeakMap,uy=new WeakMap,ly=new WeakMap,py=new WeakSet;class dy{get webSocket(){return ry(ly,this)}constructor(e){var t;ey(this,t=py),t.add(this),Zf(this,cy,[]),Zf(this,uy,[]),Zf(this,ly,void 0),this.url=e}async reconnect(){iy(py,this,gy).call(this),ny(ly,this,await new Promise((e=>{const t=new Xf(this.url);Object.assign(t,{onopen:()=>e(t),onerror:e=>{iy(py,this,yy).call(this,(()=>!0),void 0,e.error)},onmessage:e=>{if("string"!=typeof e.data)throw new te("Unknown incoming message type: "+typeof e.data);iy(py,this,wy).call(this,JSON.parse(e.data))},onclose:e=>{iy(py,this,yy).call(this,(()=>!0),void 0,new oy(e)),iy(py,this,gy).call(this,!0)}})}))),await Promise.all([...ty(py,this,my)].map((e=>iy(py,this,fy).call(this,!0,e))))}subscribeKeyBlocks(e){return iy(py,this,Ny).call(this,"KeyBlocks",ay.Middleware,e)}subscribeKeyBlocksNode(e){return iy(py,this,Ny).call(this,"KeyBlocks",ay.Node,e)}subscribeKeyBlocksAll(e){return iy(py,this,Ny).call(this,"KeyBlocks",ay.All,e)}subscribeMicroBlocks(e){return iy(py,this,Ny).call(this,"MicroBlocks",ay.Middleware,e)}subscribeMicroBlocksNode(e){return iy(py,this,Ny).call(this,"MicroBlocks",ay.Node,e)}subscribeMicroBlocksAll(e){return iy(py,this,Ny).call(this,"MicroBlocks",ay.All,e)}subscribeTransactions(e){return iy(py,this,Ny).call(this,"Transactions",ay.Middleware,e)}subscribeTransactionsNode(e){return iy(py,this,Ny).call(this,"Transactions",ay.Node,e)}subscribeTransactionsAll(e){return iy(py,this,Ny).call(this,"Transactions",ay.All,e)}subscribeObject(e,t){return iy(py,this,Ny).call(this,e,ay.Middleware,t)}subscribeObjectNode(e,t){return iy(py,this,Ny).call(this,e,ay.Node,t)}subscribeObjectAll(e,t){return iy(py,this,Ny).call(this,e,ay.All,t)}}function my(e){return new Set(ry(cy,e).map((([e])=>e)))}function hy(e){if(null==ry(ly,this))throw new ne;ry(ly,this).send(JSON.stringify(e))}function fy(e,t){if(null==ry(ly,this))return;const n=["KeyBlocks","MicroBlocks","Transactions"].includes(t)?t:"Object";iy(py,this,hy).call(this,{op:e?"Subscribe":"Unsubscribe",payload:n,..."Object"===n&&{target:t}}),ry(uy,this).push([e,t])}function yy(e,t,n){ry(cy,this).filter((([t,n])=>e(t,n))).forEach((([,,e])=>e(t,n)))}function gy(e=!1){null!=ry(ly,this)&&(e||ry(ly,this).close(),Object.assign(ry(ly,this),{onopen:void 0,onerror:void 0,onmessage:void 0}),ny(ly,this,void 0))}function wy(e){if("string"==typeof e||Array.isArray(e)){const t=ry(uy,this).shift();if(null==t)throw new te("Request queue is empty");const[n,r]=t;let i;return"string"==typeof e&&(i=new sy(e)),e.includes(r)!==n&&(i=new te(`Expected ${r} to be${n?"":" not"} included into ${e}`)),void(null!=i&&iy(py,this,yy).call(this,(e=>r===e),void 0,i))}iy(py,this,yy).call(this,((t,n)=>!(t!==e.subscription&&t!==e.target||n!==e.source&&n!==ay.All)),e.payload)}function Ny(e,t,n){const r=[e,t,n];return 0===ty(py,this,my).size&&this.reconnect(),ty(py,this,my).has(e)||iy(py,this,fy).call(this,!0,e),ry(cy,this).push(r),()=>{ny(cy,this,ry(cy,this).filter((e=>e!==r))),ty(py,this,my).has(e)||iy(py,this,fy).call(this,!1,e),0===ty(py,this,my).size&&iy(py,this,gy).call(this)}}const vy={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},by={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},xy={parameterPath:["options","limit"],mapper:{defaultValue:10,constraints:{InclusiveMaximum:100,InclusiveMinimum:1},serializedName:"limit",type:{name:"Number"}}},_y={parameterPath:"accountId",mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"accountId",required:!0,type:{name:"String"}}},Ty={parameterPath:["options","contract"],mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",type:{name:"String"}}},Cy={parameterPath:"accountId",mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account_id",required:!0,type:{name:"String"}}},Sy={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},Ay={parameterPath:["options","scope"],mapper:{constraints:{Pattern:new RegExp("(txi|gen):\\d+(-\\d+)?")},serializedName:"scope",type:{name:"String"}}},Py={parameterPath:["options","prefix"],mapper:{serializedName:"prefix",type:{name:"String"}}},Ey={parameterPath:["options","exact"],mapper:{serializedName:"exact",type:{name:"String"}}},zy={parameterPath:"contractId",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contractId",required:!0,type:{name:"String"}}},Iy={parameterPath:["options","from"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"from",type:{name:"String"}}},My={parameterPath:["options","to"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"to",type:{name:"String"}}},qy={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},Ry={parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"String"}}},Oy={parameterPath:["options","blockHash"],mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",type:{name:"String"}}},ky={parameterPath:["options","hash"],mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"hash",type:{name:"String"}}},By={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},$y={parameterPath:["options","contractId"],mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",type:{name:"String"}}},Uy={parameterPath:"contractId",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}}},Ly={parameterPath:"hashOrKbi",mapper:{serializedName:"hash_or_kbi",required:!0,type:{name:"String"}}},Gy={parameterPath:"hash",mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}}},Fy={parameterPath:["options","ownedBy"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owned_by",type:{name:"String"}}},Dy={parameterPath:["options","state"],mapper:{serializedName:"state",type:{name:"String"}}},Vy={parameterPath:"id",mapper:{serializedName:"id",required:!0,type:{name:"String"}}},jy={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},Hy={parameterPath:["options","minStartDate"],mapper:{serializedName:"min_start_date",type:{name:"String"}}},Jy={parameterPath:["options","maxStartDate"],mapper:{serializedName:"max_start_date",type:{name:"String"}}},Wy={parameterPath:["options","txType"],mapper:{serializedName:"tx_type",type:{name:"String"}}},Yy={parameterPath:["options","account"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",type:{name:"String"}}},Ky={parameterPath:["options","channel"],mapper:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"channel",type:{name:"String"}}},Qy={parameterPath:["options","oracle"],mapper:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle",type:{name:"String"}}},Xy={parameterPath:["options","senderId"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",type:{name:"String"}}},Zy={parameterPath:["options","recipientId"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",type:{name:"String"}}},eg={parameterPath:["options","id"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"id",type:{name:"String"}}},tg={parameterPath:"hash",mapper:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}}},ng={type:{name:"Composite",className:"Paths1Q9E32FV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TokenResponse"}}}}}}},rg={type:{name:"Composite",className:"Aex141TokenResponse",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},ownerId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owner_id",type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}}}}},ig={type:{name:"Composite",className:"PaginatedResponse",modelProperties:{next:{serializedName:"next",required:!0,nullable:!0,type:{name:"String"}},prev:{serializedName:"prev",required:!0,nullable:!0,type:{name:"String"}}}}},ag={type:{name:"Composite",className:"ErrorResponse",modelProperties:{error:{serializedName:"error",required:!0,type:{name:"String"}}}}},sg={type:{name:"Composite",className:"PathsZ92TkfV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchemaAllof1",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9BalanceResponse"}}}}}}},og={type:{name:"Composite",className:"Aex9BalanceResponse",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},decimals:{serializedName:"decimals",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},tokenName:{serializedName:"token_name",required:!0,type:{name:"String"}},tokenSymbol:{serializedName:"token_symbol",required:!0,type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}},txIndex:{serializedName:"tx_index",required:!0,type:{name:"Number"}},txType:{serializedName:"tx_type",required:!0,type:{name:"String"}}}}},cg={type:{name:"Composite",className:"Paths1Ymnu9GV3AccountsAccountIdDexSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},ug={type:{name:"Composite",className:"DexSwap",modelProperties:{action:{serializedName:"action",required:!0,type:{name:"String"}},amounts:{serializedName:"amounts",type:{name:"Composite",className:"DexSwapAmounts"}},caller:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"caller",required:!0,type:{name:"String"}},fromAmount:{serializedName:"from_amount",required:!0,type:{name:"BigInt"}},fromContract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"from_contract",required:!0,type:{name:"String"}},fromDecimals:{serializedName:"from_decimals",required:!0,type:{name:"Number"}},fromToken:{serializedName:"from_token",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},toAccount:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"to_account",required:!0,type:{name:"String"}},toAmount:{serializedName:"to_amount",required:!0,type:{name:"BigInt"}},toContract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"to_contract",required:!0,type:{name:"String"}},toDecimals:{serializedName:"to_decimals",required:!0,type:{name:"Number"}},toToken:{serializedName:"to_token",required:!0,type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},lg={type:{name:"Composite",className:"DexSwapAmounts",modelProperties:{amount0In:{serializedName:"amount0_in",required:!0,type:{name:"BigInt"}},amount0Out:{serializedName:"amount0_out",required:!0,type:{name:"BigInt"}},amount1In:{serializedName:"amount1_in",required:!0,type:{name:"BigInt"}},amount1Out:{serializedName:"amount1_out",required:!0,type:{name:"BigInt"}}}}},pg={type:{name:"Composite",className:"Paths1Ent1R1V3AccountsIdActivitiesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Activity"}}}}}}},dg={type:{name:"Composite",className:"Activity",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},payload:{serializedName:"payload",type:{name:"Composite",className:"ActivityPayload"}},type:{serializedName:"type",required:!0,type:{name:"String"}}}}},mg={type:{name:"Composite",className:"ActivityPayload",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",type:{name:"String"}},blockHeight:{serializedName:"block_height",type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",type:{name:"String"}},microIndex:{serializedName:"micro_index",type:{name:"Number"}},microTime:{serializedName:"micro_time",type:{name:"UnixTime"}},signatures:{serializedName:"signatures",type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},amount:{serializedName:"amount",type:{name:"BigInt"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",type:{name:"String"}},logIdx:{serializedName:"log_idx",type:{name:"Number"}},recipientId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",type:{name:"String"}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",type:{name:"String"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",type:{name:"String"}},tokenId:{serializedName:"token_id",type:{name:"Number"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",type:{name:"String"}},function:{serializedName:"function",type:{name:"String"}},height:{serializedName:"height",type:{name:"Number"}},internalTx:{serializedName:"internal_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},kind:{serializedName:"kind",type:{name:"String"}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",type:{name:"String"}}}}},hg={type:{name:"Composite",className:"PathsC0UvfgV3AccountsIdNamesPointeesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Pointee"}}}}}}},fg={type:{name:"Composite",className:"Pointee",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},key:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"key",required:!0,type:{name:"String"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},yg={type:{name:"Composite",className:"NotFoundResponse",modelProperties:{error:{serializedName:"error",required:!0,type:{name:"String"}}}}},gg={type:{name:"Composite",className:"PathsLv15NfV3TransactionsCountIdGetResponses200ContentApplicationJsonSchema",modelProperties:{channelCloseMutualTx:{serializedName:"channel_close_mutual_tx",type:{name:"Composite",className:"Get200ApplicationJsonProperties"}},channelCloseSoloTx:{serializedName:"channel_close_solo_tx",type:{name:"Composite",className:"PathsKcpsuzV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx"}},channelCreateTx:{serializedName:"channel_create_tx",type:{name:"Composite",className:"Paths1W3C1Z4V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx"}},channelDepositTx:{serializedName:"channel_deposit_tx",type:{name:"Composite",className:"PathsTvtzmvV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx"}},channelForceProgressTx:{serializedName:"channel_force_progress_tx",type:{name:"Composite",className:"PathsMxcme6V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx"}},channelOffchainTx:{serializedName:"channel_offchain_tx",type:{name:"Composite",className:"Paths1Cnk4LbV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx"}},channelSetDelegatesTx:{serializedName:"channel_set_delegates_tx",type:{name:"Composite",className:"Paths13Ss1Q2V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx"}},channelSettleTx:{serializedName:"channel_settle_tx",type:{name:"Composite",className:"Paths1Gime4MV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx"}},channelSlashTx:{serializedName:"channel_slash_tx",type:{name:"Composite",className:"PathsVn5L1LV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx"}},channelSnapshotSoloTx:{serializedName:"channel_snapshot_solo_tx",type:{name:"Composite",className:"Paths10T1AqyV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx"}},channelWithdrawTx:{serializedName:"channel_withdraw_tx",type:{name:"Composite",className:"PathsTr523PV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx"}},contractCallTx:{serializedName:"contract_call_tx",type:{name:"Composite",className:"PathsChduayV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx"}},contractCreateTx:{serializedName:"contract_create_tx",type:{name:"Composite",className:"Paths5Shu25V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesContractCreateTx"}},gaAttachTx:{serializedName:"ga_attach_tx",type:{name:"Composite",className:"Paths1RkuxepV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx"}},gaMetaTx:{serializedName:"ga_meta_tx",type:{name:"Composite",className:"PathsQklaaxV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx"}},nameClaimTx:{serializedName:"name_claim_tx",type:{name:"Composite",className:"Paths1Hacjy0V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx"}},namePreclaimTx:{serializedName:"name_preclaim_tx",type:{name:"Composite",className:"Paths139X1XaV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx"}},nameRevokeTx:{serializedName:"name_revoke_tx",type:{name:"Composite",className:"Paths1R3Fb8MV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx"}},nameTransferTx:{serializedName:"name_transfer_tx",type:{name:"Composite",className:"PathsZdcclfV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx"}},nameUpdateTx:{serializedName:"name_update_tx",type:{name:"Composite",className:"Paths1VkyqhtV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx"}},oracleExtendTx:{serializedName:"oracle_extend_tx",type:{name:"Composite",className:"Paths107D9HzV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx"}},oracleQueryTx:{serializedName:"oracle_query_tx",type:{name:"Composite",className:"PathsS6Nx2KV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx"}},oracleRegisterTx:{serializedName:"oracle_register_tx",type:{name:"Composite",className:"Paths184Oz8CV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx"}},oracleResponseTx:{serializedName:"oracle_response_tx",type:{name:"Composite",className:"PathsLm5DjtV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx"}},payingForTx:{serializedName:"paying_for_tx",type:{name:"Composite",className:"Paths16B89KuV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx"}},spendTx:{serializedName:"spend_tx",type:{name:"Composite",className:"Paths1Ljyzq7V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx"}},total:{serializedName:"total",required:!0,type:{name:"Number"}}}}},wg={type:{name:"Composite",className:"Get200ApplicationJsonProperties",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Ng={type:{name:"Composite",className:"PathsKcpsuzV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},vg={type:{name:"Composite",className:"Paths1W3C1Z4V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",type:{name:"Number"}},responderId:{serializedName:"responder_id",type:{name:"Number"}}}}},bg={type:{name:"Composite",className:"PathsTvtzmvV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},xg={type:{name:"Composite",className:"PathsMxcme6V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},_g={type:{name:"Composite",className:"Paths1Cnk4LbV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}}}}},Tg={type:{name:"Composite",className:"Paths13Ss1Q2V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Cg={type:{name:"Composite",className:"Paths1Gime4MV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Sg={type:{name:"Composite",className:"PathsVn5L1LV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Ag={type:{name:"Composite",className:"Paths10T1AqyV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Pg={type:{name:"Composite",className:"PathsTr523PV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},toId:{serializedName:"to_id",type:{name:"Number"}}}}},Eg={type:{name:"Composite",className:"PathsChduayV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx",modelProperties:{callerId:{serializedName:"caller_id",type:{name:"Number"}},contractId:{serializedName:"contract_id",type:{name:"Number"}}}}},zg={type:{name:"Composite",className:"Paths5Shu25V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesContractCreateTx",modelProperties:{ownerId:{serializedName:"owner_id",type:{name:"Number"}}}}},Ig={type:{name:"Composite",className:"Paths1RkuxepV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",type:{name:"Number"}}}}},Mg={type:{name:"Composite",className:"PathsQklaaxV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx",modelProperties:{gaId:{serializedName:"ga_id",type:{name:"Number"}}}}},qg={type:{name:"Composite",className:"Paths1Hacjy0V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}}}}},Rg={type:{name:"Composite",className:"Paths139X1XaV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},commitmentId:{serializedName:"commitment_id",type:{name:"Number"}}}}},Og={type:{name:"Composite",className:"Paths1R3Fb8MV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}}}}},kg={type:{name:"Composite",className:"PathsZdcclfV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}},recipientId:{serializedName:"recipient_id",type:{name:"Number"}}}}},Bg={type:{name:"Composite",className:"Paths1VkyqhtV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}}}}},$g={type:{name:"Composite",className:"Paths107D9HzV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx",modelProperties:{oracleId:{serializedName:"oracle_id",type:{name:"Number"}}}}},Ug={type:{name:"Composite",className:"PathsS6Nx2KV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx",modelProperties:{oracleId:{serializedName:"oracle_id",type:{name:"Number"}},senderId:{serializedName:"sender_id",type:{name:"Number"}}}}},Lg={type:{name:"Composite",className:"Paths184Oz8CV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}}}}},Gg={type:{name:"Composite",className:"PathsLm5DjtV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx",modelProperties:{oracleId:{serializedName:"oracle_id",type:{name:"Number"}}}}},Fg={type:{name:"Composite",className:"Paths16B89KuV3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx",modelProperties:{payerId:{serializedName:"payer_id",type:{name:"Number"}}}}},Dg={type:{name:"Composite",className:"Paths1Ljyzq7V3TransactionsCountIdGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"Number"}},senderId:{serializedName:"sender_id",type:{name:"Number"}}}}},Vg={type:{name:"Composite",className:"Paths8I0YgwV3Aex141GetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141Response"}}}}}}},jg={type:{name:"Composite",className:"Aex141Response",modelProperties:{baseUrl:{serializedName:"base_url",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},creationTime:{serializedName:"creation_time",required:!0,type:{name:"UnixTime"}},extensions:{serializedName:"extensions",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},invalid:{serializedName:"invalid",required:!0,type:{name:"Boolean"}},limits:{serializedName:"limits",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Hg={type:{name:"Composite",className:"PathsWkpcwaV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TemplatesResponse"}}}}}}},Jg={type:{name:"Composite",className:"Aex141TemplatesResponse",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},edition:{serializedName:"edition",type:{name:"Dictionary",value:{type:{name:"any"}}}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},templateId:{serializedName:"template_id",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},Wg={type:{name:"Composite",className:"PathsRay4X0V3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TemplateTokensResponse"}}}}}}},Yg={type:{name:"Composite",className:"Aex141TemplateTokensResponse",modelProperties:{logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},ownerId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owner_id",required:!0,type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},Kg={type:{name:"Composite",className:"Paths1TkisghV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TokenResponse"}}}}}}},Qg={type:{name:"Composite",className:"Paths1Fbvaw8V3Aex141ContractidTokensTokenidGetResponses200ContentApplicationJsonSchema",modelProperties:{data:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"data",required:!0,type:{name:"String"}}}}},Xg={type:{name:"Composite",className:"Paths1A8Ah39V3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TransferEvent"}}}}}}},Zg={type:{name:"Composite",className:"Aex141TransferEvent",modelProperties:{blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",required:!0,type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",required:!0,type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},ew={type:{name:"Composite",className:"Paths1Uqqby0V3Aex9GetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9Response"}}}}}}},tw={type:{name:"Composite",className:"Aex9Response",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},decimals:{serializedName:"decimals",required:!0,type:{name:"Number"}},eventSupply:{serializedName:"event_supply",required:!0,type:{name:"BigInt"}},extensions:{serializedName:"extensions",type:{name:"Sequence",element:{type:{name:"String"}}}},holders:{serializedName:"holders",required:!0,type:{name:"Number"}},initialSupply:{serializedName:"initial_supply",required:!0,type:{name:"BigInt"}},invalid:{serializedName:"invalid",required:!0,type:{name:"Boolean"}},name:{serializedName:"name",required:!0,type:{name:"String"}},symbol:{serializedName:"symbol",required:!0,type:{name:"String"}}}}},nw={type:{name:"Composite",className:"Paths19IxhsmV3Aex9CountGetResponses200ContentApplicationJsonSchema",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Number"}}}}},rw={type:{name:"Composite",className:"PathsEeiffwV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9ContractBalanceResponse"}}}}}}},iw={type:{name:"Composite",className:"Aex9ContractBalanceResponse",modelProperties:{accountId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},lastLogIdx:{serializedName:"last_log_idx",required:!0,type:{name:"Number"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}}}}},aw={type:{name:"Composite",className:"PathsKr825V3Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema",modelProperties:{account:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}}}}},sw={type:{name:"Composite",className:"Paths108B3VtV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchemaAllof1",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Get200ApplicationJsonAllOfPropertiesItemsItem"}}}}}}},ow={type:{name:"Composite",className:"Get200ApplicationJsonAllOfPropertiesItemsItem",modelProperties:{account:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}}}}},cw={type:{name:"Composite",className:"PathsQmewnaV3ChannelsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Channel"}}}}}}},uw={type:{name:"Composite",className:"Channel",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},channel:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"channel",required:!0,type:{name:"String"}},channelReserve:{serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},delegateIds:{serializedName:"delegate_ids",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},initiator:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"initiator",required:!0,type:{name:"String"}},initiatorAmount:{serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},lastUpdatedHeight:{serializedName:"last_updated_height",required:!0,type:{name:"Number"}},lastUpdatedTime:{serializedName:"last_updated_time",required:!0,type:{name:"UnixTime"}},lastUpdatedTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_updated_tx_hash",required:!0,type:{name:"String"}},lastUpdatedTxType:{serializedName:"last_updated_tx_type",required:!0,type:{name:"String"}},lockPeriod:{serializedName:"lock_period",required:!0,type:{name:"Number"}},lockedUntil:{serializedName:"locked_until",required:!0,type:{name:"Number"}},responder:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"responder",required:!0,type:{name:"String"}},responderAmount:{serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},round:{serializedName:"round",required:!0,type:{name:"Number"}},soloRound:{serializedName:"solo_round",required:!0,type:{name:"Number"}},stateHash:{constraints:{Pattern:new RegExp("^st_\\w+$")},serializedName:"state_hash",required:!0,type:{name:"String"}},updatesCount:{serializedName:"updates_count",required:!0,type:{name:"Number"}}}}},lw={type:{name:"Composite",className:"Paths18L84JcV3ContractsCallsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractCall"}}}}}}},pw={type:{name:"Composite",className:"ContractCall",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},internalTx:{serializedName:"internal_tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},localIdx:{serializedName:"local_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}}}}},dw={type:{name:"Composite",className:"Paths10Kk1UxV3ContractsLogsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractLog"}}}}}}},mw={type:{name:"Composite",className:"ContractLog",modelProperties:{args:{serializedName:"args",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},data:{serializedName:"data",required:!0,type:{name:"String"}},eventHash:{serializedName:"event_hash",required:!0,type:{name:"String"}},eventName:{serializedName:"event_name",required:!0,nullable:!0,type:{name:"String"}},extCallerContractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"ext_caller_contract_id",required:!0,nullable:!0,type:{name:"String"}},extCallerContractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ext_caller_contract_tx_hash",required:!0,nullable:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},parentContractId:{serializedName:"parent_contract_id",required:!0,nullable:!0,type:{name:"Number"}}}}},hw={type:{name:"Composite",className:"Contract",modelProperties:{aexnType:{serializedName:"aexn_type",required:!0,nullable:!0,type:{name:"String"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}},createTx:{serializedName:"create_tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}}}}},fw={type:{name:"Composite",className:"Paths9Yfxl2V3DexSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},yw={type:{name:"Composite",className:"Paths6Vze8ZV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},gw={type:{name:"Composite",className:"PathsEue6HzV3KeyBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"KeyBlock"}}}}}}},ww={type:{name:"Composite",className:"KeyBlock",modelProperties:{beneficiary:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"beneficiary",required:!0,type:{name:"String"}},beneficiaryReward:{serializedName:"beneficiary_reward",type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^kh_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},info:{constraints:{Pattern:new RegExp("^cb_\\w+$")},serializedName:"info",required:!0,type:{name:"String"}},microBlocksCount:{serializedName:"micro_blocks_count",required:!0,type:{name:"Number"}},miner:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"miner",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",type:{name:"Number"}},pow:{serializedName:"pow",type:{name:"Sequence",element:{type:{name:"Number"}}}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{constraints:{Pattern:new RegExp("^kh_\\w{38,50}$")},serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{constraints:{Pattern:new RegExp("^bs_\\w{38,50}$")},serializedName:"state_hash",required:!0,type:{name:"String"}},target:{serializedName:"target",required:!0,type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},transactionsCount:{serializedName:"transactions_count",required:!0,type:{name:"Number"}},version:{serializedName:"version",required:!0,type:{name:"Number"}}}}},Nw={type:{name:"Composite",className:"PathsNn60D7V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"MicroBlock"}}}}}}},vw={type:{name:"Composite",className:"MicroBlock",modelProperties:{hash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},microBlockIndex:{serializedName:"micro_block_index",required:!0,type:{name:"Number"}},pofHash:{constraints:{Pattern:new RegExp("^no_fraud|bf_\\w{38,50}$")},serializedName:"pof_hash",required:!0,type:{name:"String"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{constraints:{Pattern:new RegExp("^kh_\\w{38,50}$")},serializedName:"prev_key_hash",required:!0,type:{name:"String"}},signature:{constraints:{Pattern:new RegExp("^sg_\\w+$")},serializedName:"signature",required:!0,type:{name:"String"}},stateHash:{constraints:{Pattern:new RegExp("^bs_\\w{38,50}$")},serializedName:"state_hash",required:!0,type:{name:"String"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},transactionsCount:{serializedName:"transactions_count",required:!0,type:{name:"Number"}},txsHash:{constraints:{Pattern:new RegExp("^bx_\\w{38,50}$")},serializedName:"txs_hash",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}}}}},bw={type:{name:"Composite",className:"PathsXhlqwrV3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transaction"}}}}}}},xw={type:{name:"Composite",className:"Transaction",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},_w={type:{name:"Composite",className:"Paths181Cs9V3NamesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Name"}}}}}}},Tw={type:{name:"Composite",className:"Name",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},approximateActivationTime:{serializedName:"approximate_activation_time",required:!0,type:{name:"UnixTime"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},auction:{serializedName:"auction",type:{name:"Composite",className:"Auction"}},auctionTimeout:{serializedName:"auction_timeout",required:!0,type:{name:"Number"}},expireHeight:{serializedName:"expire_height",required:!0,type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^nm_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},nameFee:{serializedName:"name_fee",required:!0,type:{name:"BigInt"}},ownership:{serializedName:"ownership",type:{name:"Composite",className:"NameOwnership"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},revoke:{serializedName:"revoke",type:{name:"Composite",className:"NameTx"}}}}},Cw={type:{name:"Composite",className:"Auction",modelProperties:{activationTime:{serializedName:"activation_time",required:!0,type:{name:"UnixTime"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},auctionEnd:{serializedName:"auction_end",required:!0,type:{name:"Number"}},lastBid:{serializedName:"last_bid",type:{name:"Composite",className:"AuctionLastBid"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},nameFee:{serializedName:"name_fee",required:!0,type:{name:"BigInt"}}}}},Sw={type:{name:"Composite",className:"AuctionLastBid",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Aw={type:{name:"Composite",className:"NameOwnership",modelProperties:{current:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"current",type:{name:"String"}},original:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"original",type:{name:"String"}}}}},Pw={type:{name:"Composite",className:"NameTx",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameTxTx"}}}}},Ew={type:{name:"Composite",className:"NameTxTx",modelProperties:{accountId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account_id",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"BigInt"}},nameId:{constraints:{Pattern:new RegExp("^nm_\\w{38,50}$")},serializedName:"name_id",required:!0,type:{name:"String"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},ttl:{serializedName:"ttl",type:{name:"Number"}},type:{serializedName:"type",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}}}}},zw={type:{name:"Composite",className:"Paths1R08F8HV3NamesAuctionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Auction"}}}}}}},Iw={type:{name:"Composite",className:"PathsCrb9BgV3NamesAuctionsIdClaimsGetResponses200ContentApplicationJsonSchema",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameClaim"}}}}}}},Mw={type:{name:"Composite",className:"NameClaim",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},qw={type:{name:"Composite",className:"PathsMyl4W2V3NamesIdClaimsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameClaim"}}}}}}},Rw={type:{name:"Composite",className:"Paths1Ukwk06V3NamesIdTransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameTransfer"}}}}}}},Ow={type:{name:"Composite",className:"NameTransfer",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},kw={type:{name:"Composite",className:"PathsRcnvllV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameUpdate"}}}}}}},Bw={type:{name:"Composite",className:"NameUpdate",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},$w={type:{name:"Composite",className:"PathsGcr9MrV3OraclesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Oracle"}}}}}}},Uw={type:{name:"Composite",className:"Oracle",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},expireHeight:{serializedName:"expire_height",required:!0,type:{name:"Number"}},format:{serializedName:"format",type:{name:"Composite",className:"OracleFormat"}},oracle:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"BigInt"}},register:{serializedName:"register",type:{name:"Composite",className:"OracleTx"}},registerTime:{serializedName:"register_time",required:!0,type:{name:"UnixTime"}},registerTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"register_tx_hash",required:!0,type:{name:"String"}}}}},Lw={type:{name:"Composite",className:"OracleFormat",modelProperties:{query:{serializedName:"query",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}}}}},Gw={type:{name:"Composite",className:"OracleTx",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"OracleTxTx"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},Fw={type:{name:"Composite",className:"OracleTxTx",modelProperties:{abiVersion:{serializedName:"abi_version",required:!0,type:{name:"Number"}},accountId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account_id",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"OracleTxOracleTtl"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryFormat:{serializedName:"query_format",required:!0,type:{name:"String"}},responseFormat:{serializedName:"response_format",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",type:{name:"Number"}},type:{serializedName:"type",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}}}}},Dw={type:{name:"Composite",className:"OracleTxOracleTtl",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},value:{serializedName:"value",required:!0,type:{name:"Number"}}}}},Vw={type:{name:"Composite",className:"PathsZ4L2QlV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleExtend"}}}}}}},jw={type:{name:"Composite",className:"OracleExtend",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"OracleExtendTx"}}}}},Hw={type:{name:"Composite",className:"OracleExtendTx",modelProperties:{fee:{serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"OracleExtendTxOracleTtl"}},ttl:{serializedName:"ttl",type:{name:"Number"}}}}},Jw={type:{name:"Composite",className:"OracleExtendTxOracleTtl",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},value:{serializedName:"value",required:!0,type:{name:"Number"}}}}},Ww={type:{name:"Composite",className:"Paths1Uni7AtV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleQuery"}}}}}}},Yw={type:{name:"Composite",className:"OracleQuery",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},fee:{serializedName:"fee",required:!0,type:{name:"BigInt"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryId:{constraints:{Pattern:new RegExp("^oq_\\w{38,50}$")},serializedName:"query_id",required:!0,type:{name:"String"}},queryTtl:{serializedName:"query_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},response:{serializedName:"response",type:{name:"Composite",className:"OracleResponse"}},responseTtl:{serializedName:"response_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",required:!0,type:{name:"String"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",required:!0,type:{name:"Number"}}}}},Kw={type:{name:"Composite",className:"OracleResponse",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},fee:{serializedName:"fee",required:!0,type:{name:"BigInt"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",type:{name:"Composite",className:"OracleResponse"}},queryId:{constraints:{Pattern:new RegExp("^oq_\\w{38,50}$")},serializedName:"query_id",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},responseTtl:{serializedName:"response_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",required:!0,type:{name:"Number"}}}}},Qw={type:{name:"Composite",className:"Paths1Tcj5A9V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleResponse"}}}}}}},Xw={type:{name:"Composite",className:"Stats",modelProperties:{feesTrend:{serializedName:"fees_trend",type:{name:"Number"}},last24HsAverageTransactionFees:{serializedName:"last_24hs_average_transaction_fees",type:{name:"Number"}},last24HsTransactions:{serializedName:"last_24hs_transactions",type:{name:"Number"}},maxTransactionsPerSecond:{serializedName:"max_transactions_per_second",type:{name:"Number"}},maxTransactionsPerSecondBlockHash:{constraints:{Pattern:new RegExp("^kh_\\w{38,50}$")},serializedName:"max_transactions_per_second_block_hash",type:{name:"String"}},minersCount:{serializedName:"miners_count",type:{name:"Number"}},transactionsTrend:{serializedName:"transactions_trend",type:{name:"Number"}}}}},Zw={type:{name:"Composite",className:"PathsV2Gh3TV3StatisticsBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},eN={type:{name:"Composite",className:"Stat",modelProperties:{count:{serializedName:"count",required:!0,type:{name:"Number"}},endDate:{serializedName:"end_date",required:!0,type:{name:"String"}},startDate:{serializedName:"start_date",required:!0,type:{name:"String"}}}}},tN={type:{name:"Composite",className:"PathsYpljbvV3DeltastatsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DeltaStat"}}}}}}},nN={type:{name:"Composite",className:"DeltaStat",modelProperties:{auctionsStarted:{serializedName:"auctions_started",required:!0,type:{name:"Number"}},blockReward:{serializedName:"block_reward",required:!0,type:{name:"BigInt"}},burnedInAuctions:{serializedName:"burned_in_auctions",required:!0,type:{name:"BigInt"}},channelsClosed:{serializedName:"channels_closed",required:!0,type:{name:"Number"}},channelsOpened:{serializedName:"channels_opened",required:!0,type:{name:"Number"}},contractsCreated:{serializedName:"contracts_created",required:!0,type:{name:"Number"}},devReward:{serializedName:"dev_reward",required:!0,type:{name:"BigInt"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}},lockedInAuctions:{serializedName:"locked_in_auctions",required:!0,type:{name:"BigInt"}},lockedInChannels:{serializedName:"locked_in_channels",required:!0,type:{name:"BigInt"}},namesActivated:{serializedName:"names_activated",required:!0,type:{name:"Number"}},namesExpired:{serializedName:"names_expired",required:!0,type:{name:"Number"}},namesRevoked:{serializedName:"names_revoked",required:!0,type:{name:"Number"}},oraclesExpired:{serializedName:"oracles_expired",required:!0,type:{name:"Number"}},oraclesRegistered:{serializedName:"oracles_registered",required:!0,type:{name:"Number"}}}}},rN={type:{name:"Composite",className:"Paths10OmbqhV3MinerstatsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Miner"}}}}}}},iN={type:{name:"Composite",className:"Miner",modelProperties:{miner:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"miner",required:!0,type:{name:"String"}},totalReward:{serializedName:"total_reward",required:!0,type:{name:"BigInt"}}}}},aN={type:{name:"Composite",className:"PathsAc89GqV3StatisticsNamesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},sN={type:{name:"Composite",className:"Paths1Vms155V3TotalstatsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"TotalStat"}}}}}}},oN={type:{name:"Composite",className:"TotalStat",modelProperties:{activeAuctions:{serializedName:"active_auctions",required:!0,type:{name:"Number"}},activeNames:{serializedName:"active_names",required:!0,type:{name:"Number"}},activeOracles:{serializedName:"active_oracles",required:!0,type:{name:"Number"}},burnedInAuctions:{serializedName:"burned_in_auctions",required:!0,type:{name:"BigInt"}},contracts:{serializedName:"contracts",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},inactiveNames:{serializedName:"inactive_names",required:!0,type:{name:"Number"}},inactiveOracles:{serializedName:"inactive_oracles",required:!0,type:{name:"Number"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}},lockedInAuctions:{serializedName:"locked_in_auctions",required:!0,type:{name:"BigInt"}},lockedInChannels:{serializedName:"locked_in_channels",required:!0,type:{name:"BigInt"}},openChannels:{serializedName:"open_channels",required:!0,type:{name:"Number"}},sumBlockReward:{serializedName:"sum_block_reward",required:!0,type:{name:"BigInt"}},sumDevReward:{serializedName:"sum_dev_reward",required:!0,type:{name:"BigInt"}},totalTokenSupply:{serializedName:"total_token_supply",required:!0,type:{name:"BigInt"}}}}},cN={type:{name:"Composite",className:"Paths1Syc8AnV3StatisticsTransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},uN={type:{name:"Composite",className:"Status",modelProperties:{mdwAsyncTasks:{serializedName:"mdw_async_tasks",type:{name:"Composite",className:"StatusMdwAsyncTasks"}},mdwGensPerMinute:{serializedName:"mdw_gens_per_minute",required:!0,type:{name:"Number"}},mdwHeight:{serializedName:"mdw_height",required:!0,type:{name:"Number"}},mdwLastMigration:{serializedName:"mdw_last_migration",required:!0,type:{name:"Number"}},mdwRevision:{serializedName:"mdw_revision",required:!0,type:{name:"String"}},mdwSynced:{serializedName:"mdw_synced",required:!0,type:{name:"Boolean"}},mdwSyncing:{serializedName:"mdw_syncing",required:!0,type:{name:"Boolean"}},mdwTxIndex:{serializedName:"mdw_tx_index",required:!0,type:{name:"Number"}},mdwVersion:{serializedName:"mdw_version",required:!0,type:{name:"String"}},nodeHeight:{serializedName:"node_height",required:!0,type:{name:"Number"}},nodeProgress:{serializedName:"node_progress",required:!0,type:{name:"Number"}},nodeRevision:{serializedName:"node_revision",required:!0,type:{name:"String"}},nodeSyncing:{serializedName:"node_syncing",required:!0,type:{name:"Boolean"}},nodeVersion:{serializedName:"node_version",required:!0,type:{name:"String"}}}}},lN={type:{name:"Composite",className:"StatusMdwAsyncTasks",modelProperties:{longTasks:{serializedName:"long_tasks",required:!0,type:{name:"Number"}},producerBuffer:{serializedName:"producer_buffer",required:!0,type:{name:"Number"}},totalPending:{serializedName:"total_pending",required:!0,type:{name:"Number"}}}}},pN={type:{name:"Composite",className:"PathsHa9C78V3TransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transaction"}}}}}}},dN={type:{name:"Composite",className:"PathsVdg67V3TransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transfer"}}}}}}},mN={type:{name:"Composite",className:"Transfer",modelProperties:{accountId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},kind:{serializedName:"kind",required:!0,type:{name:"String"}},refBlockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"ref_block_hash",required:!0,nullable:!0,type:{name:"String"}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",required:!0,nullable:!0,type:{name:"String"}},refTxType:{serializedName:"ref_tx_type",required:!0,nullable:!0,type:{name:"String"}}}}},hN={type:{name:"Composite",className:"Aex9TransferEvent",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},recipientId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",required:!0,type:{name:"String"}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",required:!0,type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},fN={type:{name:"Composite",className:"Aex9TransferResponse",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},callTxi:{serializedName:"call_txi",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",required:!0,type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",required:!0,type:{name:"String"}}}}},yN={type:{name:"Composite",className:"InternalContractCallEvent",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},internalTx:{serializedName:"internal_tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}}}}},gN={type:{name:"Composite",className:"InternalTransferEvent",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},kind:{serializedName:"kind",required:!0,type:{name:"String"}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",required:!0,type:{name:"String"}}}}},wN={type:{name:"Composite",className:"NameClaimEvent",modelProperties:{tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},NN={type:{name:"Composite",className:"Paths3Hsv3GV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...ng.type.modelProperties,...ig.type.modelProperties}}},vN={type:{name:"Composite",className:"PathsKm52GqV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchema",modelProperties:{...ig.type.modelProperties,...sg.type.modelProperties}}},bN={type:{name:"Composite",className:"Paths1Ceolv9V3AccountsAccountIdDexSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...cg.type.modelProperties,...ig.type.modelProperties}}},xN={type:{name:"Composite",className:"Paths1Opead5V3AccountsIdActivitiesGetResponses200ContentApplicationJsonSchema",modelProperties:{...pg.type.modelProperties,...ig.type.modelProperties}}},_N={type:{name:"Composite",className:"Paths1Gc4HwtV3AccountsIdNamesPointeesGetResponses200ContentApplicationJsonSchema",modelProperties:{...hg.type.modelProperties,...ig.type.modelProperties}}},TN={type:{name:"Composite",className:"Paths1XwlyjtV3Aex141GetResponses200ContentApplicationJsonSchema",modelProperties:{...Vg.type.modelProperties,...ig.type.modelProperties}}},CN={type:{name:"Composite",className:"Paths181AjwxV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Hg.type.modelProperties,...ig.type.modelProperties}}},SN={type:{name:"Composite",className:"Paths15Mi2TaV3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...Wg.type.modelProperties,...ig.type.modelProperties}}},AN={type:{name:"Composite",className:"PathsWl652MV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...Kg.type.modelProperties,...ig.type.modelProperties}}},PN={type:{name:"Composite",className:"Paths1O7Q6IhV3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...Xg.type.modelProperties,...ig.type.modelProperties}}},EN={type:{name:"Composite",className:"Paths1Vr3Y2EV3Aex9GetResponses200ContentApplicationJsonSchema",modelProperties:{...ew.type.modelProperties,...ig.type.modelProperties}}},zN={type:{name:"Composite",className:"Paths1N61UurV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchema",modelProperties:{...rw.type.modelProperties,...ig.type.modelProperties}}},IN={type:{name:"Composite",className:"Paths1Uybd4PV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchema",modelProperties:{...ig.type.modelProperties,...sw.type.modelProperties}}},MN={type:{name:"Composite",className:"Paths3EzhapV3ChannelsGetResponses200ContentApplicationJsonSchema",modelProperties:{...cw.type.modelProperties,...ig.type.modelProperties}}},qN={type:{name:"Composite",className:"Paths1Txblx8V3ContractsCallsGetResponses200ContentApplicationJsonSchema",modelProperties:{...lw.type.modelProperties,...ig.type.modelProperties}}},RN={type:{name:"Composite",className:"Paths7A1M6RV3ContractsLogsGetResponses200ContentApplicationJsonSchema",modelProperties:{...dw.type.modelProperties,...ig.type.modelProperties}}},ON={type:{name:"Composite",className:"Paths1Di8FnjV3DexSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...fw.type.modelProperties,...ig.type.modelProperties}}},kN={type:{name:"Composite",className:"PathsKwxlzlV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...yw.type.modelProperties,...ig.type.modelProperties}}},BN={type:{name:"Composite",className:"Paths277OngV3KeyBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...gw.type.modelProperties,...ig.type.modelProperties}}},$N={type:{name:"Composite",className:"Paths1159W94V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...Nw.type.modelProperties,...ig.type.modelProperties}}},UN={type:{name:"Composite",className:"Paths15Bkk50V3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...bw.type.modelProperties,...ig.type.modelProperties}}},LN={type:{name:"Composite",className:"Paths12S1Nd4V3NamesGetResponses200ContentApplicationJsonSchema",modelProperties:{..._w.type.modelProperties,...ig.type.modelProperties}}},GN={type:{name:"Composite",className:"PathsKjq4D4V3NamesAuctionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...zw.type.modelProperties,...ig.type.modelProperties}}},FN={type:{name:"Composite",className:"Paths1F98AqgV3NamesIdClaimsGetResponses200ContentApplicationJsonSchema",modelProperties:{...qw.type.modelProperties,...ig.type.modelProperties}}},DN={type:{name:"Composite",className:"Paths1Raw8PV3NamesIdTransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...Rw.type.modelProperties,...ig.type.modelProperties}}},VN={type:{name:"Composite",className:"Paths1Ec8CltV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...kw.type.modelProperties,...ig.type.modelProperties}}},jN={type:{name:"Composite",className:"Paths1E14NekV3OraclesGetResponses200ContentApplicationJsonSchema",modelProperties:{...$w.type.modelProperties,...ig.type.modelProperties}}},HN={type:{name:"Composite",className:"Paths1L5C64RV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Vw.type.modelProperties,...ig.type.modelProperties}}},JN={type:{name:"Composite",className:"Paths8722JhV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Ww.type.modelProperties,...ig.type.modelProperties}}},WN={type:{name:"Composite",className:"PathsVron83V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Qw.type.modelProperties,...ig.type.modelProperties}}},YN={type:{name:"Composite",className:"PathsJd68YV3StatisticsBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...Zw.type.modelProperties,...ig.type.modelProperties}}},KN={type:{name:"Composite",className:"PathsQtodvgV3DeltastatsGetResponses200ContentApplicationJsonSchema",modelProperties:{...tN.type.modelProperties,...ig.type.modelProperties}}},QN={type:{name:"Composite",className:"PathsZ2B507V3MinerstatsGetResponses200ContentApplicationJsonSchema",modelProperties:{...rN.type.modelProperties,...ig.type.modelProperties}}},XN={type:{name:"Composite",className:"PathsD2HmjxV3StatisticsNamesGetResponses200ContentApplicationJsonSchema",modelProperties:{...aN.type.modelProperties,...ig.type.modelProperties}}},ZN={type:{name:"Composite",className:"PathsFrvc1LV3TotalstatsGetResponses200ContentApplicationJsonSchema",modelProperties:{...sN.type.modelProperties,...ig.type.modelProperties}}},ev={type:{name:"Composite",className:"Paths150Ou6YV3StatisticsTransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...cN.type.modelProperties,...ig.type.modelProperties}}},tv={type:{name:"Composite",className:"Paths1Pymq07V3TransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...pN.type.modelProperties,...ig.type.modelProperties}}},nv={type:{name:"Composite",className:"PathsA7P0KiV3TransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...dN.type.modelProperties,...ig.type.modelProperties}}};class rv extends io{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const i="azsdk-js-middleware/1.0.0-beta.1",a=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:a},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}getAex141OwnedTokens(e,t){return this.sendOperationRequest({accountId:e,options:t},av)}getAex9AccountBalances(e,t){return this.sendOperationRequest({accountId:e,options:t},sv)}getAccountDexSwaps(e,t){return this.sendOperationRequest({accountId:e,options:t},ov)}getAccountActivities(e,t){return this.sendOperationRequest({id:e,options:t},cv)}getAccountPointees(e,t){return this.sendOperationRequest({id:e,options:t},uv)}getAccountTransactionsCount(e,t){return this.sendOperationRequest({id:e,options:t},lv)}getSortedAex141Contracts(e){return this.sendOperationRequest({options:e},pv)}getAex141ContractTemplates(e,t){return this.sendOperationRequest({contractId:e,options:t},dv)}getAex141TemplateTokens(e,t,n){return this.sendOperationRequest({contractId:e,templateId:t,options:n},mv)}getAex141ContractTokens(e,t){return this.sendOperationRequest({contractId:e,options:t},hv)}getAex141TokenOwner(e,t,n){return this.sendOperationRequest({contractId:e,tokenId:t,options:n},fv)}getAex141ContractTransfers(e,t){return this.sendOperationRequest({contractId:e,options:t},yv)}getAex141ByContract(e,t){return this.sendOperationRequest({id:e,options:t},gv)}getSortedAex9Tokens(e){return this.sendOperationRequest({options:e},wv)}getAex9TokensCount(e){return this.sendOperationRequest({options:e},Nv)}getAex9ContractBalances(e,t){return this.sendOperationRequest({contractId:e,options:t},vv)}getAex9ContractAccountBalance(e,t,n){return this.sendOperationRequest({contractId:e,accountId:t,options:n},bv)}getAex9ContractAccountBalanceHistory(e,t,n){return this.sendOperationRequest({contractId:e,accountId:t,options:n},xv)}getAex9ByContract(e,t){return this.sendOperationRequest({id:e,options:t},_v)}getChannels(e){return this.sendOperationRequest({options:e},Tv)}getChannel(e,t){return this.sendOperationRequest({id:e,options:t},Cv)}getContractCalls(e){return this.sendOperationRequest({options:e},Sv)}getContractLogs(e){return this.sendOperationRequest({options:e},Av)}getContract(e,t){return this.sendOperationRequest({id:e,options:t},Pv)}getDexSwaps(e){return this.sendOperationRequest({options:e},Ev)}getDexSwapsByContractId(e,t){return this.sendOperationRequest({contractId:e,options:t},zv)}getKeyBlocks(e){return this.sendOperationRequest({options:e},Iv)}getKeyBlock(e,t){return this.sendOperationRequest({hashOrKbi:e,options:t},Mv)}getKeyBlockMicroBlocks(e,t){return this.sendOperationRequest({hashOrKbi:e,options:t},qv)}getMicroBlock(e,t){return this.sendOperationRequest({hash:e,options:t},Rv)}getMicroBlockTransactions(e,t){return this.sendOperationRequest({hash:e,options:t},Ov)}getNames(e){return this.sendOperationRequest({options:e},kv)}getNamesAuctions(e){return this.sendOperationRequest({options:e},Bv)}getNameAuction(e,t){return this.sendOperationRequest({id:e,options:t},$v)}getNameAuctionClaims(e,t){return this.sendOperationRequest({id:e,options:t},Uv)}getNamesCount(e){return this.sendOperationRequest({options:e},Lv)}getName(e,t){return this.sendOperationRequest({id:e,options:t},Gv)}getNameClaims(e,t){return this.sendOperationRequest({id:e,options:t},Fv)}getNameTransfers(e,t){return this.sendOperationRequest({id:e,options:t},Dv)}getNameUpdates(e,t){return this.sendOperationRequest({id:e,options:t},Vv)}getOracles(e){return this.sendOperationRequest({options:e},jv)}getOracle(e,t){return this.sendOperationRequest({id:e,options:t},Hv)}getOracleExtends(e,t){return this.sendOperationRequest({id:e,options:t},Jv)}getOracleQueries(e,t){return this.sendOperationRequest({id:e,options:t},Wv)}getOracleResponses(e,t){return this.sendOperationRequest({id:e,options:t},Yv)}getStats(e){return this.sendOperationRequest({options:e},Kv)}getBlocksStats(e){return this.sendOperationRequest({options:e},Qv)}getDeltaStats(e){return this.sendOperationRequest({options:e},Xv)}getMinerStats(e){return this.sendOperationRequest({options:e},Zv)}getNamesStats(e){return this.sendOperationRequest({options:e},eb)}getTotalStats(e){return this.sendOperationRequest({options:e},tb)}getTransactionsStats(e){return this.sendOperationRequest({options:e},nb)}getStatus(e){return this.sendOperationRequest({options:e},rb)}getTransactions(e){return this.sendOperationRequest({options:e},ib)}getTransactionsCount(e){return this.sendOperationRequest({options:e},ab)}getTransaction(e,t){return this.sendOperationRequest({hash:e,options:t},sb)}getTransfers(e){return this.sendOperationRequest({options:e},ob)}}const iv=co(u,!1),av={path:"/v3/accounts/{accountId}/aex141/tokens",httpMethod:"GET",responses:{200:{bodyMapper:NN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}},Ty],urlParameters:[by,_y],headerParameters:[vy],serializer:iv},sv={path:"/v3/accounts/{accountId}/aex9/balances",httpMethod:"GET",responses:{200:{bodyMapper:vN},400:{bodyMapper:ag,isError:!0}},urlParameters:[by,_y],headerParameters:[vy],serializer:iv},ov={path:"/v3/accounts/{account_id}/dex/swaps",httpMethod:"GET",responses:{200:{bodyMapper:bN},400:{bodyMapper:ag,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,Cy],headerParameters:[vy],serializer:iv},cv={path:"/v3/accounts/{id}/activities",httpMethod:"GET",responses:{200:{bodyMapper:xN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,{parameterPath:["options","ownedOnly"],mapper:{serializedName:"owned_only",type:{name:"Boolean"}}},{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"String"}}},Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,Sy],headerParameters:[vy],serializer:iv},uv={path:"/v3/accounts/{id}/names/pointees",httpMethod:"GET",responses:{200:{bodyMapper:_N},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,Sy],headerParameters:[vy],serializer:iv},lv={path:"/v3/transactions/count/{id}",httpMethod:"GET",responses:{200:{bodyMapper:gg},400:{bodyMapper:ag,isError:!0}},urlParameters:[by,Sy],headerParameters:[vy],serializer:iv},pv={path:"/v3/aex141",httpMethod:"GET",responses:{200:{bodyMapper:TN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}},{parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"String"}}},Py,Ey],urlParameters:[by],headerParameters:[vy],serializer:iv},dv={path:"/v3/aex141/{contractId}/templates",httpMethod:"GET",responses:{200:{bodyMapper:CN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,zy],headerParameters:[vy],serializer:iv},mv={path:"/v3/aex141/{contractId}/templates/{templateId}/tokens",httpMethod:"GET",responses:{200:{bodyMapper:SN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,zy,{parameterPath:"templateId",mapper:{serializedName:"templateId",required:!0,type:{name:"Number"}}}],headerParameters:[vy],serializer:iv},hv={path:"/v3/aex141/{contractId}/tokens",httpMethod:"GET",responses:{200:{bodyMapper:AN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,zy],headerParameters:[vy],serializer:iv},fv={path:"/v3/aex141/{contractId}/tokens/{tokenId}",httpMethod:"GET",responses:{200:{bodyMapper:Qg},400:{bodyMapper:ag,isError:!0}},urlParameters:[by,zy,{parameterPath:"tokenId",mapper:{serializedName:"tokenId",required:!0,type:{name:"Number"}}}],headerParameters:[vy],serializer:iv},yv={path:"/v3/aex141/{contractId}/transfers",httpMethod:"GET",responses:{200:{bodyMapper:PN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}},Iy,My],urlParameters:[by,zy],headerParameters:[vy],serializer:iv},gv={path:"/v3/aex141/{id}",httpMethod:"GET",responses:{200:{bodyMapper:jg},400:{bodyMapper:ag,isError:!0}},urlParameters:[by,qy],headerParameters:[vy],serializer:iv},wv={path:"/v3/aex9",httpMethod:"GET",responses:{200:{bodyMapper:EN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Py,Ey,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}},{parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},Nv={path:"/v3/aex9/count",httpMethod:"GET",responses:{200:{bodyMapper:nw}},urlParameters:[by],headerParameters:[vy],serializer:iv},vv={path:"/v3/aex9/{contractId}/balances",httpMethod:"GET",responses:{200:{bodyMapper:zN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}},Ry,Oy],urlParameters:[by,zy],headerParameters:[vy],serializer:iv},bv={path:"/v3/aex9/{contractId}/balances/{accountId}",httpMethod:"GET",responses:{200:{bodyMapper:aw},400:{bodyMapper:ag,isError:!0}},queryParameters:[ky],urlParameters:[by,_y,zy],headerParameters:[vy],serializer:iv},xv={path:"/v3/aex9/{contractId}/balances/{accountId}/history",httpMethod:"GET",responses:{200:{bodyMapper:IN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,_y,zy],headerParameters:[vy],serializer:iv},_v={path:"/v3/aex9/{id}",httpMethod:"GET",responses:{200:{bodyMapper:tw},400:{bodyMapper:ag,isError:!0}},urlParameters:[by,qy],headerParameters:[vy],serializer:iv},Tv={path:"/v3/channels",httpMethod:"GET",responses:{200:{bodyMapper:MN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}},{parameterPath:["options","state"],mapper:{serializedName:"state",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},Cv={path:"/v3/channels/{id}",httpMethod:"GET",responses:{200:{bodyMapper:uw},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,By],headerParameters:[vy],serializer:iv},Sv={path:"/v3/contracts/calls",httpMethod:"GET",responses:{200:{bodyMapper:qN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},Av={path:"/v3/contracts/logs",httpMethod:"GET",responses:{200:{bodyMapper:RN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,$y,{parameterPath:["options","event"],mapper:{serializedName:"event",type:{name:"String"}}},{parameterPath:["options","function"],mapper:{serializedName:"function",type:{name:"String"}}},{parameterPath:["options","functionPrefix"],mapper:{serializedName:"function_prefix",type:{name:"String"}}},{parameterPath:["options","data"],mapper:{serializedName:"data",type:{name:"String"}}},{parameterPath:["options","aexnArgs"],mapper:{serializedName:"aexn-args",type:{name:"Boolean"}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},Pv={path:"/v3/contracts/{id}",httpMethod:"GET",responses:{200:{bodyMapper:hw},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,qy],headerParameters:[vy],serializer:iv},Ev={path:"/v3/dex/swaps",httpMethod:"GET",responses:{200:{bodyMapper:ON},400:{bodyMapper:ag,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},zv={path:"/v3/dex/{contract_id}/swaps",httpMethod:"GET",responses:{200:{bodyMapper:kN},400:{bodyMapper:ag,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,Uy],headerParameters:[vy],serializer:iv},Iv={path:"/v3/key-blocks",httpMethod:"GET",responses:{200:{bodyMapper:BN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},Mv={path:"/v3/key-blocks/{hash_or_kbi}",httpMethod:"GET",responses:{200:{bodyMapper:ww},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,Ly],headerParameters:[vy],serializer:iv},qv={path:"/v3/key-blocks/{hash_or_kbi}/micro-blocks",httpMethod:"GET",responses:{200:{bodyMapper:$N},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,Ly],headerParameters:[vy],serializer:iv},Rv={path:"/v3/micro-blocks/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:vw},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,Gy],headerParameters:[vy],serializer:iv},Ov={path:"/v3/micro-blocks/{hash}/transactions",httpMethod:"GET",responses:{200:{bodyMapper:UN},400:{bodyMapper:ag,isError:!0}},urlParameters:[by,Gy],headerParameters:[vy],serializer:iv},kv={path:"/v3/names",httpMethod:"GET",responses:{200:{bodyMapper:LN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Py,Ry,Fy,Dy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},Bv={path:"/v3/names/auctions",httpMethod:"GET",responses:{200:{bodyMapper:GN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},$v={path:"/v3/names/auctions/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Cw},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,Vy],headerParameters:[vy],serializer:iv},Uv={path:"/v3/names/auctions/{id}/claims",httpMethod:"GET",responses:{200:{bodyMapper:Iw},404:{bodyMapper:yg,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,Vy],headerParameters:[vy],serializer:iv},Lv={path:"/v3/names/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}},400:{bodyMapper:ag,isError:!0}},queryParameters:[Fy],urlParameters:[by],headerParameters:[vy],serializer:iv},Gv={path:"/v3/names/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Tw},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,Vy],headerParameters:[vy],serializer:iv},Fv={path:"/v3/names/{id}/claims",httpMethod:"GET",responses:{200:{bodyMapper:FN},404:{bodyMapper:yg,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,Vy],headerParameters:[vy],serializer:iv},Dv={path:"/v3/names/{id}/transfers",httpMethod:"GET",responses:{200:{bodyMapper:DN},404:{bodyMapper:yg,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,Vy],headerParameters:[vy],serializer:iv},Vv={path:"/v3/names/{id}/updates",httpMethod:"GET",responses:{200:{bodyMapper:VN},404:{bodyMapper:yg,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by,Vy],headerParameters:[vy],serializer:iv},jv={path:"/v3/oracles",httpMethod:"GET",responses:{200:{bodyMapper:jN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,Dy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},Hv={path:"/v3/oracles/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Uw},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,jy],headerParameters:[vy],serializer:iv},Jv={path:"/v3/oracles/{id}/extends",httpMethod:"GET",responses:{200:{bodyMapper:HN},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,jy],headerParameters:[vy],serializer:iv},Wv={path:"/v3/oracles/{id}/queries",httpMethod:"GET",responses:{200:{bodyMapper:JN},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,jy],headerParameters:[vy],serializer:iv},Yv={path:"/v3/oracles/{id}/responses",httpMethod:"GET",responses:{200:{bodyMapper:WN},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,jy],headerParameters:[vy],serializer:iv},Kv={path:"/v3/stats",httpMethod:"GET",responses:{200:{bodyMapper:Xw},400:{bodyMapper:ag,isError:!0}},urlParameters:[by],headerParameters:[vy],serializer:iv},Qv={path:"/v3/statistics/blocks",httpMethod:"GET",responses:{200:{bodyMapper:YN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"String"}}},Hy,Jy,{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"String"}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},Xv={path:"/v3/deltastats",httpMethod:"GET",responses:{200:{bodyMapper:KN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},Zv={path:"/v3/minerstats",httpMethod:"GET",responses:{200:{bodyMapper:QN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},eb={path:"/v3/statistics/names",httpMethod:"GET",responses:{200:{bodyMapper:XN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Hy,Jy,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"String"}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},tb={path:"/v3/totalstats",httpMethod:"GET",responses:{200:{bodyMapper:ZN},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},nb={path:"/v3/statistics/transactions",httpMethod:"GET",responses:{200:{bodyMapper:ev},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Hy,Jy,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"String"}}},Wy,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},rb={path:"/v3/status",httpMethod:"GET",responses:{200:{bodyMapper:uN}},urlParameters:[by],headerParameters:[vy],serializer:iv},ib={path:"/v3/transactions",httpMethod:"GET",responses:{200:{bodyMapper:tv},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ty,Ay,{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"Sequence",element:{type:{name:"String"}}}},collectionFormat:"Multi"},{parameterPath:["options","typeGroup"],mapper:{serializedName:"type_group",type:{name:"Sequence",element:{type:{name:"String"}}}},collectionFormat:"Multi"},Yy,Ky,Qy,Xy,Zy,{parameterPath:["options","entrypoint"],mapper:{serializedName:"entrypoint",type:{name:"String"}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},ab={path:"/v3/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}}},queryParameters:[Ay,Wy,eg],urlParameters:[by],headerParameters:[vy],serializer:iv},sb={path:"/v3/transactions/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:xw},400:{bodyMapper:ag,isError:!0},404:{bodyMapper:yg,isError:!0}},urlParameters:[by,tg],headerParameters:[vy],serializer:iv},ob={path:"/v3/transfers",httpMethod:"GET",responses:{200:{bodyMapper:nv},400:{bodyMapper:ag,isError:!0}},queryParameters:[xy,Ay,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"String"}}}],urlParameters:[by],headerParameters:[vy],serializer:iv},cb=[av,sv,ov,cv,uv,lv,pv,dv,mv,hv,fv,yv,gv,wv,Nv,vv,bv,_v,Tv,Cv,Sv,Av,Pv,Ev,zv,Iv,Mv,qv,Rv,Ov,kv,Bv,$v,Uv,Lv,Gv,Fv,Dv,Vv,jv,Hv,Jv,Wv,Yv,Kv,Qv,Xv,Zv,eb,tb,nb,rb,ib,ab,sb,ob];function ub(e,t){return e.get(lb(e,t))}function lb(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}class pb extends z{constructor(e){super(`There is no ${e?"next":"previous"} page`),this.name="MiddlewarePageMissed"}}var db=new WeakMap;class mb{constructor(e,t){var n,r;(function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)})(this,db,void 0),this.data=e.data,this.nextPath=e.next,this.prevPath=e.prev,r=t,(n=db).set(lb(n,this),r)}async next(){if(null==this.nextPath)throw new pb(!0);return ub(db,this).requestByPath(this.nextPath)}async prev(){if(null==this.prevPath)throw new pb(!1);return ub(db,this).requestByPath(this.prevPath)}}class hb extends rv{constructor(e,{ignoreVersion:t=!1,retryCount:n=3,retryOverallDelay:r=800,...i}={}){let a;super(e,{allowInsecureConnection:!0,additionalPolicies:[...t?[]:[wo("middleware",(async e=>(null!=a||(a=(await this.getStatus(e)).mdwVersion),a)),"1.81.0","2.0.0")],ho(),fo(),No(n,r),go((e=>` ${e.error}`))],...i}),this.pipeline.addPolicy(mo,{phase:"Deserialize"}),this.pipeline.removePolicy({name:an}),this.pipeline.removePolicy({name:An}),this.pipeline.removePolicy({name:"defaultRetryPolicy"})}async requestByPath(e){const t=e.indexOf("?"),n=e.slice(0,-1===t?e.length:t),r=e.slice(-1===t?e.length:t+1),i=cb.find((e=>{let t=n;if(null==e.path)return!1;const r=e.path.replace(/{\w+}/g,"{param}").split("{param}");for(;r.length>0;){const n=r.shift();if(null==n)throw new te(`Unexpected operation spec path: ${e.path}`);if(!t.startsWith(n))return!1;t=t.replace(n,""),r.length>0&&(t=t.replace(/^[\w.]+/,""))}return""===t}));if(null==i)throw new F(`Can't find operation spec corresponding to ${n}`);return this.sendOperationRequest({},{...i,path:n,urlParameters:i.urlParameters?.filter((({parameterPath:e})=>"$host"===e)),queryParameters:Array.from(new URLSearchParams(r)).map((([e,t])=>({parameterPath:["options",e],mapper:{defaultValue:t.toString(),serializedName:e,type:{name:"String"}}})))})}async sendOperationRequest(e,t){const n=await super.sendOperationRequest(e,t);return function(e){const t=e;return null!=t?.data&&Array.isArray(t.data)&&"next"in t&&"prev"in t}(n)?new mb(n,this):n}}var fb=(e,t)=>(e.connect((e=>t.sendMessage(e)),(()=>t.disconnect())),t.connect((t=>e.sendMessage(t)),(()=>e.disconnect())),()=>{e.disconnect(),t.disconnect()});class yb{constructor({debug:e=!1}){this.debug=e}connect(e,t){if(this.isConnected())throw new Je("You already connected")}disconnect(){if(!this.isConnected())throw new We("You dont have connection. Please connect before")}receiveMessage(e){this.debug&&console.log("Receive message:",e)}sendMessage(e){this.debug&&console.log("Send message:",e)}}function gb(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function wb(e,t){return e.get(vb(e,t))}function Nb(e,t,n){return e.set(vb(e,t),n),n}function vb(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var bb=new WeakMap,xb=new WeakMap,_b=new WeakMap;class Tb extends yb{constructor({target:e,self:t=window,origin:n,sendDirection:r,receiveDirection:i=Mp.to_aepp,...a}={}){super(a),gb(this,bb,void 0),gb(this,xb,void 0),gb(this,_b,void 0),Nb(xb,this,e),Nb(_b,this,t),this.origin=n,this.sendDirection=r,this.receiveDirection=i}isConnected(){return null!=this.listener}connect(e,t){super.connect(e,t),this.listener=t=>{var n;if("object"!=typeof t.data||"2.0"!==(null!==(n=t.data.jsonrpc)&&void 0!==n?n:t.data.data?.jsonrpc))return;if(null!=this.origin&&this.origin!==t.origin)return;if(null!=wb(xb,this)&&wb(xb,this)!==t.source)return;this.receiveMessage(t);let{data:r}=t;if(null!=r.type){if(t.data.type!==this.receiveDirection)return;r=r.data}e(r,t.origin,t.source)},wb(_b,this).addEventListener("message",this.listener),Nb(bb,this,t)}disconnect(){if(super.disconnect(),null==this.listener||null==wb(bb,this))throw new te("Expected to not happen, required for TS");wb(_b,this).removeEventListener("message",this.listener),delete this.listener,wb(bb,this).call(this),Nb(bb,this,void 0)}sendMessage(e){var t;if(null==wb(xb,this))throw new Ye("Can't send messages without target");const n=null!=this.sendDirection?{type:this.sendDirection,data:e}:e;super.sendMessage(n),wb(xb,this).postMessage(n,null!==(t=this.origin)&&void 0!==t?t:"*")}}var Cb=(e,t)=>{if(null==window)throw new K("Window object not found, you can run wallet detector only in browser");const n={};return e.connect((({method:e,params:r},i,a)=>{if(e!==Op.readyToConnect||null!=n[r.id])return;const s={info:r,getConnection(){return new Tb({target:a,..."extension"===r.type?{sendDirection:Mp.to_waellet,receiveDirection:Mp.to_aepp,..."null"!==window.origin&&{origin:window.origin}}:{origin:r.origin}})}};n[s.info.id]=s,t({wallets:n,newWallet:s})}),(()=>{})),()=>e.disconnect()};function Sb(e,t,n){return e.set(Pb(e,t),n),n}function Ab(e,t){return e.get(Pb(e,t))}function Pb(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Eb=new WeakMap;class zb extends yb{constructor({port:e,...t}){var n,r,i;super(t),i=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=Eb),r.set(n,i),this.port=e}disconnect(){if(super.disconnect(),this.port.disconnect(),null==Ab(Eb,this))throw new ne;this.port.onMessage.removeListener(Ab(Eb,this)[0]),this.port.onDisconnect.removeListener(Ab(Eb,this)[1]),Sb(Eb,this,void 0)}connect(e,t){super.connect(e,t),Sb(Eb,this,[(t,n)=>{var r;this.receiveMessage(t),e(t,null!==(r=n.sender?.url)&&void 0!==r?r:"",n)},t]),this.port.onMessage.addListener(Ab(Eb,this)[0]),this.port.onDisconnect.addListener(Ab(Eb,this)[1])}sendMessage(e){super.sendMessage(e),this.port.postMessage(e)}isConnected(){return null!=Ab(Eb,this)}}}(),r}()}));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Aeternity=t():e.Aeternity=t()}(self,(function(){return function(){var e={36:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:n(9197)})},43:function(e,t,n){"use strict";var r=n(4018),a=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i("Can't set "+a(e)+" as a prototype")}},70:function(e,t,n){"use strict";var r=n(1661);e.exports=r},160:function(e,t,n){"use strict";var r=n(3948),a=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return a(e)}},183:function(e,t,n){"use strict";var r=n(1091),a=n(3930),i=n(7376),s=n(6833),o=n(2250),c=n(7181),u=n(5972),l=n(9192),m=n(4840),d=n(1626),p=n(8055),h=n(6264),f=n(3742),y=n(5116),g=s.PROPER,N=s.CONFIGURABLE,w=y.IteratorPrototype,v=y.BUGGY_SAFARI_ITERATORS,b=h("iterator"),x="keys",_="values",C="entries",S=function(){return this};e.exports=function(e,t,n,s,h,y,T){c(n,t,s);var P,A,z,I=function(e){if(e===h&&O)return O;if(!v&&e&&e in q)return q[e];switch(e){case x:case _:case C:return function(){return new n(this,e)}}return function(){return new n(this)}},E=t+" Iterator",M=!1,q=e.prototype,R=q[b]||q["@@iterator"]||h&&q[h],O=!v&&R||I(h),k="Array"===t&&q.entries||R;if(k&&(P=u(k.call(new e)))!==Object.prototype&&P.next&&(i||u(P)===w||(l?l(P,w):o(P[b])||p(P,b,S)),m(P,E,!0,!0),i&&(f[E]=S)),g&&h===_&&R&&R.name!==_&&(!i&&N?d(q,"name",_):(M=!0,O=function(){return a(R,this)})),h)if(A={values:I(_),keys:y?O:I(x),entries:I(C)},T)for(z in A)(v||M||!(z in q))&&p(q,z,A[z]);else r({target:t,proto:!0,forced:v||M},A);return i&&!T||q[b]===O||p(q,b,O,{name:h}),f[t]=O,A}},228:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new a(r,i||e,s),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],o]:e._events[c].push(o):(e._events[c]=o,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),o.prototype.eventNames=function(){var e,r,a=[];if(0===this._eventsCount)return a;for(r in e=this._events)t.call(e,r)&&a.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a},o.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var a=0,i=r.length,s=new Array(i);a<i;a++)s[a]=r[a].fn;return s},o.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},o.prototype.emit=function(e,t,r,a,i,s){var o=n?n+e:e;if(!this._events[o])return!1;var c,u,l=this._events[o],m=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),m){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,r),!0;case 4:return l.fn.call(l.context,t,r,a),!0;case 5:return l.fn.call(l.context,t,r,a,i),!0;case 6:return l.fn.call(l.context,t,r,a,i,s),!0}for(u=1,c=new Array(m-1);u<m;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var d,p=l.length;for(u=0;u<p;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),m){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,r);break;case 4:l[u].fn.call(l[u].context,t,r,a);break;default:if(!c)for(d=1,c=new Array(m-1);d<m;d++)c[d-1]=arguments[d];l[u].fn.apply(l[u].context,c)}}return!0},o.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},o.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},o.prototype.removeListener=function(e,t,r,a){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return s(this,i),this;var o=this._events[i];if(o.fn)o.fn!==t||a&&!o.once||r&&o.context!==r||s(this,i);else{for(var c=0,u=[],l=o.length;c<l;c++)(o[c].fn!==t||a&&!o[c].once||r&&o[c].context!==r)&&u.push(o[c]);u.length?this._events[i]=1===u.length?u[0]:u:s(this,i)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o},251:function(e,t){t.read=function(e,t,n,r,a){var i,s,o=8*a-r-1,c=(1<<o)-1,u=c>>1,l=-7,m=n?a-1:0,d=n?-1:1,p=e[t+m];for(m+=d,i=p&(1<<-l)-1,p>>=-l,l+=o;l>0;i=256*i+e[t+m],m+=d,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+e[t+m],m+=d,l-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),i-=u}return(p?-1:1)*s*Math.pow(2,i-r)},t.write=function(e,t,n,r,a,i){var s,o,c,u=8*i-a-1,l=(1<<u)-1,m=l>>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+m>=1?d/c:d*Math.pow(2,1-m))*c>=2&&(s++,c/=2),s+m>=l?(o=0,s=l):s+m>=1?(o=(t*c-1)*Math.pow(2,a),s+=m):(o=t*Math.pow(2,m-1)*Math.pow(2,a),s=0));a>=8;e[n+p]=255&o,p+=h,o/=256,a-=8);for(s=s<<a|o,u+=a;u>0;e[n+p]=255&s,p+=h,s/=256,u-=8);e[n+p-h]|=128*f}},359:function(e,t,n){"use strict";n(366)("replaceAll")},366:function(e,t,n){"use strict";var r=n(2046),a=n(9724),i=n(560),s=n(4284).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});a(t,e)||s(t,e,{value:i.f(e)})}},376:function(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},392:function(e,t,n){var r=n(2861).Buffer;function a(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}a.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var n=this._block,a=this._blockSize,i=e.length,s=this._len,o=0;o<i;){for(var c=s%a,u=Math.min(i-o,a-c),l=0;l<u;l++)n[c+l]=e[o+l];o+=u,(s+=u)%a==0&&this._update(n)}return this._len+=i,this},a.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,a=(n-r)/4294967296;this._block.writeUInt32BE(a,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},a.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=a},470:function(e,t,n){"use strict";var r=n(6028),a=n(5594);e.exports=function(e){var t=r(e,"string");return a(t)?t:t+""}},551:function(e,t,n){"use strict";var r=n(5951),a=n(2250),i=r.WeakMap;e.exports=a(i)&&/native code/.test(String(i))},560:function(e,t,n){"use strict";var r=n(6264);t.f=r},575:function(e,t,n){"use strict";var r=n(3121);e.exports=function(e){return r(e.length)}},581:function(e,t,n){"use strict";var r=n(3930),a=n(2250),i=n(6285),s=TypeError;e.exports=function(e,t){var n,o;if("string"===t&&a(n=e.toString)&&!i(o=r(n,e)))return o;if(a(n=e.valueOf)&&!i(o=r(n,e)))return o;if("string"!==t&&a(n=e.toString)&&!i(o=r(n,e)))return o;throw new s("Can't convert object to primitive value")}},726:function(e,t,n){"use strict";var r=n(8311),a=n(1907),i=n(6946),s=n(9298),o=n(575),c=n(6968),u=a([].push),l=function(e){var t=1===e,n=2===e,a=3===e,l=4===e,m=6===e,d=7===e,p=5===e||m;return function(h,f,y,g){for(var N,w,v=s(h),b=i(v),x=o(b),_=r(f,y),C=0,S=g||c,T=t?S(h,x):n||d?S(h,0):void 0;x>C;C++)if((p||C in b)&&(w=_(N=b[C],C,v),e))if(t)T[C]=w;else if(w)switch(e){case 3:return!0;case 5:return N;case 6:return C;case 2:u(T,N)}else switch(e){case 4:return!1;case 7:u(T,N)}return m?-1:a||l?l:T}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},751:function(e,t,n){"use strict";var r=n(1091),a=n(9724),i=n(5594),s=n(4640),o=n(5816),c=n(4411),u=o("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{keyFor:function(e){if(!i(e))throw new TypeError(s(e)+" is not a symbol");if(a(u,e))return u[e]}})},768:function(e,t,n){"use strict";var r=n(6264),a=n(4284).f,i=r("metadata"),s=Function.prototype;void 0===s[i]&&a(s,i,{value:null})},798:function(e,t,n){"use strict";var r,a,i=n(5951),s=n(6794),o=i.process,c=i.Deno,u=o&&o.versions||c&&c.version,l=u&&u.v8;l&&(a=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!a&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(a=+r[1]),e.exports=a},829:function(e){function t(e){return(4294967296+e).toString(16).substring(1)}e.exports={normalizeInput:function(e){let t;if(e instanceof Uint8Array)t=e;else{if("string"!=typeof e)throw new Error("Input must be an string, Buffer or Uint8Array");t=(new TextEncoder).encode(e)}return t},toHex:function(e){return Array.prototype.map.call(e,(function(e){return(e<16?"0":"")+e.toString(16)})).join("")},debugPrint:function(e,n,r){let a="\n"+e+" = ";for(let i=0;i<n.length;i+=2){if(32===r)a+=t(n[i]).toUpperCase(),a+=" ",a+=t(n[i+1]).toUpperCase();else{if(64!==r)throw new Error("Invalid size "+r);a+=t(n[i+1]).toUpperCase(),a+=t(n[i]).toUpperCase()}i%6==4?a+="\n"+new Array(e.length+4).join(" "):i<n.length-2&&(a+=" ")}console.log(a)},testSpeed:function(e,t,n){let r=(new Date).getTime();const a=new Uint8Array(t);for(let e=0;e<t;e++)a[e]=e%256;const i=(new Date).getTime();console.log("Generated random input in "+(i-r)+"ms"),r=i;for(let i=0;i<n;i++){const n=e(a),i=(new Date).getTime(),s=i-r;r=i,console.log("Hashed in "+s+"ms: "+n.substring(0,20)+"..."),console.log(Math.round(t/(1<<20)/(s/1e3)*100)/100+" MB PER SECOND")}}}},858:function(e,t){"use strict";function n(e){if(Array.isArray(e)){const t=[];for(let r=0;r<e.length;r++)t.push(n(e[r]));const r=d(...t);return d(i(r.length,192),r)}const t=y(e);return 1===t.length&&t[0]<128?t:d(i(t.length,128),t)}function r(e,t,n){if(n>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,n)}function a(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return l(u(e))}function i(e,t){if(e<56)return Uint8Array.from([e+t]);const n=h(e),r=h(t+55+n.length/2);return Uint8Array.from(m(r+n))}function s(e,t=!1){if(!e||0===e.length)return Uint8Array.from([]);const n=o(y(e));if(t)return n;if(0!==n.remainder.length)throw new Error("invalid RLP: remainder must be zero");return n.data}function o(e){let t,n,i,s,c;const u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(l<=183){if(t=l-127,i=128===l?Uint8Array.from([]):r(e,1,t),2===t&&i[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:i,remainder:e.slice(t)}}if(l<=191){if(n=l-182,e.length-1<n)throw new Error("invalid RLP: not enough bytes for string length");if(t=a(r(e,1,n)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return i=r(e,n,t+n),{data:i,remainder:e.slice(t+n)}}if(l<=247){for(t=l-191,s=r(e,1,t);s.length;)c=o(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(t)}}{if(n=l-246,t=a(r(e,1,n)),t<56)throw new Error("invalid RLP: encoded list too short");const i=n+t;if(i>e.length)throw new Error("invalid RLP: total length is larger than the data");for(s=r(e,n,i);s.length;)c=o(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(i)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.utils=t.decode=t.encode=void 0,t.encode=n,t.decode=s;const c=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function u(e){let t="";for(let n=0;n<e.length;n++)t+=c[e[n]];return t}function l(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function m(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let n=0;n<t.length;n++){const r=2*n;t[n]=l(e.slice(r,r+2))}return t}function d(...e){if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const a=e[t];n.set(a,r),r+=a.length}return n}function p(e){return(new TextEncoder).encode(e)}function h(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function f(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function y(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return f(e)?m((t="string"!=typeof(n=e)?n:f(n)?n.slice(2):n).length%2?`0${t}`:t):p(e);var t,n;if("number"==typeof e||"bigint"==typeof e)return e?m(h(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}t.utils={bytesToHex:u,concatBytes:d,hexToBytes:m,utf8ToBytes:p};const g={encode:n,decode:s};t.default=g},952:function(e,t,n){var r;if("object"==typeof globalThis)r=globalThis;else try{r=n(4903)}catch(e){}finally{if(r||"undefined"==typeof window||(r=window),!r)throw new Error("Could not determine global this")}var a=r.WebSocket||r.MozWebSocket,i=n(9840);function s(e,t){return t?new a(e,t):new a(e)}a&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(e){Object.defineProperty(s,e,{get:function(){return a[e]}})})),e.exports={w3cwebsocket:a?s:null,version:i}},1013:function(e,t,n){var r=n(7372).stringify,a=n(8146);e.exports=function(e){return{parse:a(e),stringify:r}},e.exports.parse=a(),e.exports.stringify=r},1091:function(e,t,n){"use strict";var r=n(5951),a=n(6024),i=n(2361),s=n(2250),o=n(3846).f,c=n(7463),u=n(2046),l=n(8311),m=n(1626),d=n(9724);n(6128);var p=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return a(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,a,h,f,y,g,N,w,v,b=e.target,x=e.global,_=e.stat,C=e.proto,S=x?r:_?r[b]:r[b]&&r[b].prototype,T=x?u:u[b]||m(u,b,{})[b],P=T.prototype;for(f in t)a=!(n=c(x?f:b+(_?".":"#")+f,e.forced))&&S&&d(S,f),g=T[f],a&&(N=e.dontCallGetSet?(v=o(S,f))&&v.value:S[f]),y=a&&N?N:t[f],(n||C||typeof g!=typeof y)&&(w=e.bind&&a?l(y,r):e.wrap&&a?p(y):C&&s(y)?i(y):y,(e.sham||y&&y.sham||g&&g.sham)&&m(w,"sham",!0),m(T,f,w),C&&(d(u,h=b+"Prototype")||m(u,h,{}),m(u[h],f,y),e.real&&P&&(n||!P[f])&&m(P,f,y)))}},1175:function(e,t,n){"use strict";var r=n(9846);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},1176:function(e){"use strict";var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},1281:function(){},1372:function(e,t,n){"use strict";n(366)("metadata")},1470:function(e,t,n){"use strict";var r=n(1907),a=n(5482),i=n(160),s=n(4239),o=r("".charAt),c=r("".charCodeAt),u=r("".slice),l=function(e){return function(t,n){var r,l,m=i(s(t)),d=a(n),p=m.length;return d<0||d>=p?e?"":void 0:(r=c(m,d))<55296||r>56319||d+1===p||(l=c(m,d+1))<56320||l>57343?e?o(m,d):r:e?u(m,d,d+2):l-56320+(r-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},1505:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},1594:function(e,t,n){var r;!function(){"use strict";var a,i=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,o=Math.floor,c="[BigNumber Error] ",u=c+"Number primitive has more than 15 significant digits: ",l=1e14,m=14,d=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],h=1e7,f=1e9;function y(e){var t=0|e;return e>0||e===t?t:t-1}function g(e){for(var t,n,r=1,a=e.length,i=e[0]+"";r<a;){for(t=e[r++]+"",n=m-t.length;n--;t="0"+t);i+=t}for(a=i.length;48===i.charCodeAt(--a););return i.slice(0,a+1||1)}function N(e,t){var n,r,a=e.c,i=t.c,s=e.s,o=t.s,c=e.e,u=t.e;if(!s||!o)return null;if(n=a&&!a[0],r=i&&!i[0],n||r)return n?r?0:-o:s;if(s!=o)return s;if(n=s<0,r=c==u,!a||!i)return r?0:!a^n?1:-1;if(!r)return c>u^n?1:-1;for(o=(c=a.length)<(u=i.length)?c:u,s=0;s<o;s++)if(a[s]!=i[s])return a[s]>i[s]^n?1:-1;return c==u?0:c>u^n?1:-1}function w(e,t,n,r){if(e<t||e>n||e!==o(e))throw Error(c+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function v(e){var t=e.c.length-1;return y(e.e/m)==t&&e.c[t]%2!=0}function b(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function x(e,t,n){var r,a;if(t<0){for(a=n+".";++t;a+=n);e=a+e}else if(++t>(r=e.length)){for(a=n,t-=r;--t;a+=n);e+=a}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}a=function e(t){var n,r,a,_,C,S,T,P,A,z,I=j.prototype={constructor:j,toString:null,valueOf:null},E=new j(1),M=20,q=4,R=-7,O=21,k=-1e7,B=1e7,U=!1,$=1,G=0,V={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},D="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;function j(e,t){var n,s,c,l,p,h,f,y,g=this;if(!(g instanceof j))return new j(e,t);if(null==t){if(e&&!0===e._isBigNumber)return g.s=e.s,void(!e.c||e.e>B?g.c=g.e=null:e.e<k?g.c=[g.e=0]:(g.e=e.e,g.c=e.c.slice()));if((h="number"==typeof e)&&0*e==0){if(g.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,p=e;p>=10;p/=10,l++);return void(l>B?g.c=g.e=null:(g.e=l,g.c=[e]))}y=String(e)}else{if(!i.test(y=String(e)))return a(g,y,h);g.s=45==y.charCodeAt(0)?(y=y.slice(1),-1):1}(l=y.indexOf("."))>-1&&(y=y.replace(".","")),(p=y.search(/e/i))>0?(l<0&&(l=p),l+=+y.slice(p+1),y=y.substring(0,p)):l<0&&(l=y.length)}else{if(w(t,2,D.length,"Base"),10==t&&L)return W(g=new j(e),M+g.e+1,q);if(y=String(e),h="number"==typeof e){if(0*e!=0)return a(g,y,h,t);if(g.s=1/e<0?(y=y.slice(1),-1):1,j.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(u+e)}else g.s=45===y.charCodeAt(0)?(y=y.slice(1),-1):1;for(n=D.slice(0,t),l=p=0,f=y.length;p<f;p++)if(n.indexOf(s=y.charAt(p))<0){if("."==s){if(p>l){l=f;continue}}else if(!c&&(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase()))){c=!0,p=-1,l=0;continue}return a(g,String(e),h,t)}h=!1,(l=(y=r(y,t,10,g.s)).indexOf("."))>-1?y=y.replace(".",""):l=y.length}for(p=0;48===y.charCodeAt(p);p++);for(f=y.length;48===y.charCodeAt(--f););if(y=y.slice(p,++f)){if(f-=p,h&&j.DEBUG&&f>15&&(e>d||e!==o(e)))throw Error(u+g.s*e);if((l=l-p-1)>B)g.c=g.e=null;else if(l<k)g.c=[g.e=0];else{if(g.e=l,g.c=[],p=(l+1)%m,l<0&&(p+=m),p<f){for(p&&g.c.push(+y.slice(0,p)),f-=m;p<f;)g.c.push(+y.slice(p,p+=m));p=m-(y=y.slice(p)).length}else p-=f;for(;p--;y+="0");g.c.push(+y)}}else g.c=[g.e=0]}function F(e,t,n,r){var a,i,s,o,c;if(null==n?n=q:w(n,0,8),!e.c)return e.toString();if(a=e.c[0],s=e.e,null==t)c=g(e.c),c=1==r||2==r&&(s<=R||s>=O)?b(c,s):x(c,s,"0");else if(i=(e=W(new j(e),t,n)).e,o=(c=g(e.c)).length,1==r||2==r&&(t<=i||i<=R)){for(;o<t;c+="0",o++);c=b(c,i)}else if(t-=s,c=x(c,i,"0"),i+1>o){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-o)>0)for(i+1==o&&(c+=".");t--;c+="0");return e.s<0&&a?"-"+c:c}function H(e,t){for(var n,r,a=1,i=new j(e[0]);a<e.length;a++)(!(r=new j(e[a])).s||(n=N(i,r))===t||0===n&&i.s===t)&&(i=r);return i}function J(e,t,n){for(var r=1,a=t.length;!t[--a];t.pop());for(a=t[0];a>=10;a/=10,r++);return(n=r+n*m-1)>B?e.c=e.e=null:n<k?e.c=[e.e=0]:(e.e=n,e.c=t),e}function W(e,t,n,r){var a,i,c,u,d,h,f,y=e.c,g=p;if(y){e:{for(a=1,u=y[0];u>=10;u/=10,a++);if((i=t-a)<0)i+=m,c=t,d=y[h=0],f=o(d/g[a-c-1]%10);else if((h=s((i+1)/m))>=y.length){if(!r)break e;for(;y.length<=h;y.push(0));d=f=0,a=1,c=(i%=m)-m+1}else{for(d=u=y[h],a=1;u>=10;u/=10,a++);f=(c=(i%=m)-m+a)<0?0:o(d/g[a-c-1]%10)}if(r=r||t<0||null!=y[h+1]||(c<0?d:d%g[a-c-1]),r=n<4?(f||r)&&(0==n||n==(e.s<0?3:2)):f>5||5==f&&(4==n||r||6==n&&(i>0?c>0?d/g[a-c]:0:y[h-1])%10&1||n==(e.s<0?8:7)),t<1||!y[0])return y.length=0,r?(t-=e.e+1,y[0]=g[(m-t%m)%m],e.e=-t||0):y[0]=e.e=0,e;if(0==i?(y.length=h,u=1,h--):(y.length=h+1,u=g[m-i],y[h]=c>0?o(d/g[a-c]%g[c])*u:0),r)for(;;){if(0==h){for(i=1,c=y[0];c>=10;c/=10,i++);for(c=y[0]+=u,u=1;c>=10;c/=10,u++);i!=u&&(e.e++,y[0]==l&&(y[0]=1));break}if(y[h]+=u,y[h]!=l)break;y[h--]=0,u=1}for(i=y.length;0===y[--i];y.pop());}e.e>B?e.c=e.e=null:e.e<k&&(e.c=[e.e=0])}return e}function K(e){var t,n=e.e;return null===n?e.toString():(t=g(e.c),t=n<=R||n>=O?b(t,n):x(t,n,"0"),e.s<0?"-"+t:t)}return j.clone=e,j.ROUND_UP=0,j.ROUND_DOWN=1,j.ROUND_CEIL=2,j.ROUND_FLOOR=3,j.ROUND_HALF_UP=4,j.ROUND_HALF_DOWN=5,j.ROUND_HALF_EVEN=6,j.ROUND_HALF_CEIL=7,j.ROUND_HALF_FLOOR=8,j.EUCLID=9,j.config=j.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(w(n=e[t],0,f,t),M=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(w(n=e[t],0,8,t),q=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(w(n[0],-f,0,t),w(n[1],0,f,t),R=n[0],O=n[1]):(w(n,-f,f,t),R=-(O=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)w(n[0],-f,-1,t),w(n[1],1,f,t),k=n[0],B=n[1];else{if(w(n,-f,f,t),!n)throw Error(c+t+" cannot be zero: "+n);k=-(B=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(c+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw U=!n,Error(c+"crypto unavailable");U=n}else U=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(w(n=e[t],0,9,t),$=n),e.hasOwnProperty(t="POW_PRECISION")&&(w(n=e[t],0,f,t),G=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(c+t+" not an object: "+n);V=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(c+t+" invalid: "+n);L="0123456789"==n.slice(0,10),D=n}}return{DECIMAL_PLACES:M,ROUNDING_MODE:q,EXPONENTIAL_AT:[R,O],RANGE:[k,B],CRYPTO:U,MODULO_MODE:$,POW_PRECISION:G,FORMAT:V,ALPHABET:D}},j.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!j.DEBUG)return!0;var t,n,r=e.c,a=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===i||-1===i)&&a>=-f&&a<=f&&a===o(a)){if(0===r[0]){if(0===a&&1===r.length)return!0;break e}if((t=(a+1)%m)<1&&(t+=m),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=l||n!==o(n))break e;if(0!==n)return!0}}}else if(null===r&&null===a&&(null===i||1===i||-1===i))return!0;throw Error(c+"Invalid BigNumber: "+e)},j.maximum=j.max=function(){return H(arguments,-1)},j.minimum=j.min=function(){return H(arguments,1)},j.random=(_=9007199254740992,C=Math.random()*_&2097151?function(){return o(Math.random()*_)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,a,i,u=0,l=[],d=new j(E);if(null==e?e=M:w(e,0,f),a=s(e/m),U)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));u<a;)(i=131072*t[u]+(t[u+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[u]=n[0],t[u+1]=n[1]):(l.push(i%1e14),u+=2);u=a/2}else{if(!crypto.randomBytes)throw U=!1,Error(c+"crypto unavailable");for(t=crypto.randomBytes(a*=7);u<a;)(i=281474976710656*(31&t[u])+1099511627776*t[u+1]+4294967296*t[u+2]+16777216*t[u+3]+(t[u+4]<<16)+(t[u+5]<<8)+t[u+6])>=9e15?crypto.randomBytes(7).copy(t,u):(l.push(i%1e14),u+=7);u=a/7}if(!U)for(;u<a;)(i=C())<9e15&&(l[u++]=i%1e14);for(a=l[--u],e%=m,a&&e&&(i=p[m-e],l[u]=o(a/i)*i);0===l[u];l.pop(),u--);if(u<0)l=[r=0];else{for(r=-1;0===l[0];l.splice(0,1),r-=m);for(u=1,i=l[0];i>=10;i/=10,u++);u<m&&(r-=m-u)}return d.e=r,d.c=l,d}),j.sum=function(){for(var e=1,t=arguments,n=new j(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){var e="0123456789";function t(e,t,n,r){for(var a,i,s=[0],o=0,c=e.length;o<c;){for(i=s.length;i--;s[i]*=t);for(s[0]+=r.indexOf(e.charAt(o++)),a=0;a<s.length;a++)s[a]>n-1&&(null==s[a+1]&&(s[a+1]=0),s[a+1]+=s[a]/n|0,s[a]%=n)}return s.reverse()}return function(r,a,i,s,o){var c,u,l,m,d,p,h,f,y=r.indexOf("."),N=M,w=q;for(y>=0&&(m=G,G=0,r=r.replace(".",""),p=(f=new j(a)).pow(r.length-y),G=m,f.c=t(x(g(p.c),p.e,"0"),10,i,e),f.e=f.c.length),l=m=(h=t(r,a,i,o?(c=D,e):(c=e,D))).length;0==h[--m];h.pop());if(!h[0])return c.charAt(0);if(y<0?--l:(p.c=h,p.e=l,p.s=s,h=(p=n(p,f,N,w,i)).c,d=p.r,l=p.e),y=h[u=l+N+1],m=i/2,d=d||u<0||null!=h[u+1],d=w<4?(null!=y||d)&&(0==w||w==(p.s<0?3:2)):y>m||y==m&&(4==w||d||6==w&&1&h[u-1]||w==(p.s<0?8:7)),u<1||!h[0])r=d?x(c.charAt(1),-N,c.charAt(0)):c.charAt(0);else{if(h.length=u,d)for(--i;++h[--u]>i;)h[u]=0,u||(++l,h=[1].concat(h));for(m=h.length;!h[--m];);for(y=0,r="";y<=m;r+=c.charAt(h[y++]));r=x(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,a,i,s,o=0,c=e.length,u=t%h,l=t/h|0;for(e=e.slice();c--;)o=((a=u*(i=e[c]%h)+(r=l*i+(s=e[c]/h|0)*u)%h*h+o)/n|0)+(r/h|0)+l*s,e[c]=a%n;return o&&(e=[o].concat(e)),e}function t(e,t,n,r){var a,i;if(n!=r)i=n>r?1:-1;else for(a=i=0;a<n;a++)if(e[a]!=t[a]){i=e[a]>t[a]?1:-1;break}return i}function n(e,t,n,r){for(var a=0;n--;)e[n]-=a,a=e[n]<t[n]?1:0,e[n]=a*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,a,i,s,c){var u,d,p,h,f,g,N,w,v,b,x,_,C,S,T,P,A,z=r.s==a.s?1:-1,I=r.c,E=a.c;if(!(I&&I[0]&&E&&E[0]))return new j(r.s&&a.s&&(I?!E||I[0]!=E[0]:E)?I&&0==I[0]||!E?0*z:z/0:NaN);for(v=(w=new j(z)).c=[],z=i+(d=r.e-a.e)+1,c||(c=l,d=y(r.e/m)-y(a.e/m),z=z/m|0),p=0;E[p]==(I[p]||0);p++);if(E[p]>(I[p]||0)&&d--,z<0)v.push(1),h=!0;else{for(S=I.length,P=E.length,p=0,z+=2,(f=o(c/(E[0]+1)))>1&&(E=e(E,f,c),I=e(I,f,c),P=E.length,S=I.length),C=P,x=(b=I.slice(0,P)).length;x<P;b[x++]=0);A=E.slice(),A=[0].concat(A),T=E[0],E[1]>=c/2&&T++;do{if(f=0,(u=t(E,b,P,x))<0){if(_=b[0],P!=x&&(_=_*c+(b[1]||0)),(f=o(_/T))>1)for(f>=c&&(f=c-1),N=(g=e(E,f,c)).length,x=b.length;1==t(g,b,N,x);)f--,n(g,P<N?A:E,N,c),N=g.length,u=1;else 0==f&&(u=f=1),N=(g=E.slice()).length;if(N<x&&(g=[0].concat(g)),n(b,g,x,c),x=b.length,-1==u)for(;t(E,b,P,x)<1;)f++,n(b,P<x?A:E,x,c),x=b.length}else 0===u&&(f++,b=[0]);v[p++]=f,b[0]?b[x++]=I[C]||0:(b=[I[C]],x=1)}while((C++<S||null!=b[0])&&z--);h=null!=b[0],v[0]||v.splice(0,1)}if(c==l){for(p=1,z=v[0];z>=10;z/=10,p++);W(w,i+(w.e=p+d*m-1)+1,s,h)}else w.e=d,w.r=+h;return w}}(),S=/^(-?)0([xbo])(?=\w[\w.]*$)/i,T=/^([^.]+)\.$/,P=/^\.([^.]+)$/,A=/^-?(Infinity|NaN)$/,z=/^\s*\+(?=[\w.])|^\s+|\s+$/g,a=function(e,t,n,r){var a,i=n?t:t.replace(z,"");if(A.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!n&&(i=i.replace(S,(function(e,t,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=a?e:t})),r&&(a=r,i=i.replace(T,"$1").replace(P,"0.$1")),t!=i))return new j(i,a);if(j.DEBUG)throw Error(c+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},I.absoluteValue=I.abs=function(){var e=new j(this);return e.s<0&&(e.s=1),e},I.comparedTo=function(e,t){return N(this,new j(e,t))},I.decimalPlaces=I.dp=function(e,t){var n,r,a,i=this;if(null!=e)return w(e,0,f),null==t?t=q:w(t,0,8),W(new j(i),e+i.e+1,t);if(!(n=i.c))return null;if(r=((a=n.length-1)-y(this.e/m))*m,a=n[a])for(;a%10==0;a/=10,r--);return r<0&&(r=0),r},I.dividedBy=I.div=function(e,t){return n(this,new j(e,t),M,q)},I.dividedToIntegerBy=I.idiv=function(e,t){return n(this,new j(e,t),0,1)},I.exponentiatedBy=I.pow=function(e,t){var n,r,a,i,u,l,d,p,h=this;if((e=new j(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+K(e));if(null!=t&&(t=new j(t)),u=e.e>14,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return p=new j(Math.pow(+K(h),u?e.s*(2-v(e)):+K(e))),t?p.mod(t):p;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new j(NaN);(r=!l&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(e.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||u&&h.c[1]>=24e7:h.c[0]<8e13||u&&h.c[0]<=9999975e7)))return i=h.s<0&&v(e)?-0:0,h.e>-1&&(i=1/i),new j(l?1/i:i);G&&(i=s(G/m+2))}for(u?(n=new j(.5),l&&(e.s=1),d=v(e)):d=(a=Math.abs(+K(e)))%2,p=new j(E);;){if(d){if(!(p=p.times(h)).c)break;i?p.c.length>i&&(p.c.length=i):r&&(p=p.mod(t))}if(a){if(0===(a=o(a/2)))break;d=a%2}else if(W(e=e.times(n),e.e+1,1),e.e>14)d=v(e);else{if(0==(a=+K(e)))break;d=a%2}h=h.times(h),i?h.c&&h.c.length>i&&(h.c.length=i):r&&(h=h.mod(t))}return r?p:(l&&(p=E.div(p)),t?p.mod(t):i?W(p,G,q,void 0):p)},I.integerValue=function(e){var t=new j(this);return null==e?e=q:w(e,0,8),W(t,t.e+1,e)},I.isEqualTo=I.eq=function(e,t){return 0===N(this,new j(e,t))},I.isFinite=function(){return!!this.c},I.isGreaterThan=I.gt=function(e,t){return N(this,new j(e,t))>0},I.isGreaterThanOrEqualTo=I.gte=function(e,t){return 1===(t=N(this,new j(e,t)))||0===t},I.isInteger=function(){return!!this.c&&y(this.e/m)>this.c.length-2},I.isLessThan=I.lt=function(e,t){return N(this,new j(e,t))<0},I.isLessThanOrEqualTo=I.lte=function(e,t){return-1===(t=N(this,new j(e,t)))||0===t},I.isNaN=function(){return!this.s},I.isNegative=function(){return this.s<0},I.isPositive=function(){return this.s>0},I.isZero=function(){return!!this.c&&0==this.c[0]},I.minus=function(e,t){var n,r,a,i,s=this,o=s.s;if(t=(e=new j(e,t)).s,!o||!t)return new j(NaN);if(o!=t)return e.s=-t,s.plus(e);var c=s.e/m,u=e.e/m,d=s.c,p=e.c;if(!c||!u){if(!d||!p)return d?(e.s=-t,e):new j(p?s:NaN);if(!d[0]||!p[0])return p[0]?(e.s=-t,e):new j(d[0]?s:3==q?-0:0)}if(c=y(c),u=y(u),d=d.slice(),o=c-u){for((i=o<0)?(o=-o,a=d):(u=c,a=p),a.reverse(),t=o;t--;a.push(0));a.reverse()}else for(r=(i=(o=d.length)<(t=p.length))?o:t,o=t=0;t<r;t++)if(d[t]!=p[t]){i=d[t]<p[t];break}if(i&&(a=d,d=p,p=a,e.s=-e.s),(t=(r=p.length)-(n=d.length))>0)for(;t--;d[n++]=0);for(t=l-1;r>o;){if(d[--r]<p[r]){for(n=r;n&&!d[--n];d[n]=t);--d[n],d[r]+=l}d[r]-=p[r]}for(;0==d[0];d.splice(0,1),--u);return d[0]?J(e,d,u):(e.s=3==q?-1:1,e.c=[e.e=0],e)},I.modulo=I.mod=function(e,t){var r,a,i=this;return e=new j(e,t),!i.c||!e.s||e.c&&!e.c[0]?new j(NaN):!e.c||i.c&&!i.c[0]?new j(i):(9==$?(a=e.s,e.s=1,r=n(i,e,0,3),e.s=a,r.s*=a):r=n(i,e,0,$),(e=i.minus(r.times(e))).c[0]||1!=$||(e.s=i.s),e)},I.multipliedBy=I.times=function(e,t){var n,r,a,i,s,o,c,u,d,p,f,g,N,w,v,b=this,x=b.c,_=(e=new j(e,t)).c;if(!(x&&_&&x[0]&&_[0]))return!b.s||!e.s||x&&!x[0]&&!_||_&&!_[0]&&!x?e.c=e.e=e.s=null:(e.s*=b.s,x&&_?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=y(b.e/m)+y(e.e/m),e.s*=b.s,(c=x.length)<(p=_.length)&&(N=x,x=_,_=N,a=c,c=p,p=a),a=c+p,N=[];a--;N.push(0));for(w=l,v=h,a=p;--a>=0;){for(n=0,f=_[a]%v,g=_[a]/v|0,i=a+(s=c);i>a;)n=((u=f*(u=x[--s]%v)+(o=g*u+(d=x[s]/v|0)*f)%v*v+N[i]+n)/w|0)+(o/v|0)+g*d,N[i--]=u%w;N[i]=n}return n?++r:N.splice(0,1),J(e,N,r)},I.negated=function(){var e=new j(this);return e.s=-e.s||null,e},I.plus=function(e,t){var n,r=this,a=r.s;if(t=(e=new j(e,t)).s,!a||!t)return new j(NaN);if(a!=t)return e.s=-t,r.minus(e);var i=r.e/m,s=e.e/m,o=r.c,c=e.c;if(!i||!s){if(!o||!c)return new j(a/0);if(!o[0]||!c[0])return c[0]?e:new j(o[0]?r:0*a)}if(i=y(i),s=y(s),o=o.slice(),a=i-s){for(a>0?(s=i,n=c):(a=-a,n=o),n.reverse();a--;n.push(0));n.reverse()}for((a=o.length)-(t=c.length)<0&&(n=c,c=o,o=n,t=a),a=0;t;)a=(o[--t]=o[t]+c[t]+a)/l|0,o[t]=l===o[t]?0:o[t]%l;return a&&(o=[a].concat(o),++s),J(e,o,s)},I.precision=I.sd=function(e,t){var n,r,a,i=this;if(null!=e&&e!==!!e)return w(e,1,f),null==t?t=q:w(t,0,8),W(new j(i),e,t);if(!(n=i.c))return null;if(r=(a=n.length-1)*m+1,a=n[a]){for(;a%10==0;a/=10,r--);for(a=n[0];a>=10;a/=10,r++);}return e&&i.e+1>r&&(r=i.e+1),r},I.shiftedBy=function(e){return w(e,-9007199254740991,d),this.times("1e"+e)},I.squareRoot=I.sqrt=function(){var e,t,r,a,i,s=this,o=s.c,c=s.s,u=s.e,l=M+4,m=new j("0.5");if(1!==c||!o||!o[0])return new j(!c||c<0&&(!o||o[0])?NaN:o?s:1/0);if(0==(c=Math.sqrt(+K(s)))||c==1/0?(((t=g(o)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=y((u+1)/2)-(u<0||u%2),r=new j(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new j(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(i=r,r=m.times(i.plus(n(s,i,l,1))),g(i.c).slice(0,c)===(t=g(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(a||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(W(r,r.e+M+2,1),e=!r.times(r).eq(s));break}if(!a&&(W(i,i.e+M+2,0),i.times(i).eq(s))){r=i;break}l+=4,c+=4,a=1}return W(r,r.e+M+1,q,e)},I.toExponential=function(e,t){return null!=e&&(w(e,0,f),e++),F(this,e,t,1)},I.toFixed=function(e,t){return null!=e&&(w(e,0,f),e=e+this.e+1),F(this,e,t)},I.toFormat=function(e,t,n){var r,a=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=V;else if("object"!=typeof n)throw Error(c+"Argument not an object: "+n);if(r=a.toFixed(e,t),a.c){var i,s=r.split("."),o=+n.groupSize,u=+n.secondaryGroupSize,l=n.groupSeparator||"",m=s[0],d=s[1],p=a.s<0,h=p?m.slice(1):m,f=h.length;if(u&&(i=o,o=u,u=i,f-=i),o>0&&f>0){for(i=f%o||o,m=h.substr(0,i);i<f;i+=o)m+=l+h.substr(i,o);u>0&&(m+=l+h.slice(i)),p&&(m="-"+m)}r=d?m+(n.decimalSeparator||"")+((u=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):m}return(n.prefix||"")+r+(n.suffix||"")},I.toFraction=function(e){var t,r,a,i,s,o,u,l,d,h,f,y,N=this,w=N.c;if(null!=e&&(!(u=new j(e)).isInteger()&&(u.c||1!==u.s)||u.lt(E)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+K(u));if(!w)return new j(N);for(t=new j(E),d=r=new j(E),a=l=new j(E),y=g(w),s=t.e=y.length-N.e-1,t.c[0]=p[(o=s%m)<0?m+o:o],e=!e||u.comparedTo(t)>0?s>0?t:d:u,o=B,B=1/0,u=new j(y),l.c[0]=0;h=n(u,t,0,1),1!=(i=r.plus(h.times(a))).comparedTo(e);)r=a,a=i,d=l.plus(h.times(i=d)),l=i,t=u.minus(h.times(i=t)),u=i;return i=n(e.minus(r),a,0,1),l=l.plus(i.times(d)),r=r.plus(i.times(a)),l.s=d.s=N.s,f=n(d,a,s*=2,q).minus(N).abs().comparedTo(n(l,r,s,q).minus(N).abs())<1?[d,a]:[l,r],B=o,f},I.toNumber=function(){return+K(this)},I.toPrecision=function(e,t){return null!=e&&w(e,1,f),F(this,e,t,2)},I.toString=function(e){var t,n=this,a=n.s,i=n.e;return null===i?a?(t="Infinity",a<0&&(t="-"+t)):t="NaN":(null==e?t=i<=R||i>=O?b(g(n.c),i):x(g(n.c),i,"0"):10===e&&L?t=x(g((n=W(new j(n),M+i+1,q)).c),n.e,"0"):(w(e,2,D.length,"Base"),t=r(x(g(n.c),i,"0"),10,e,a,!0)),a<0&&n.c[0]&&(t="-"+t)),t},I.valueOf=I.toJSON=function(){return K(this)},I._isBigNumber=!0,null!=t&&j.set(t),j}(),a.default=a.BigNumber=a,void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},1626:function(e,t,n){"use strict";var r=n(9447),a=n(4284),i=n(5817);e.exports=r?function(e,t,n){return a.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},1660:function(e,t,n){"use strict";n(366)("species")},1661:function(e,t,n){"use strict";n(8537),n(3669);var r=n(560);e.exports=r.f("toPrimitive")},1697:function(e,t,n){"use strict";n(366)("customMatcher")},1730:function(e,t,n){"use strict";n(9363),n(3643),n(7057),n(4954);var r=n(560);e.exports=r.f("iterator")},1785:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:n(9197)})},1793:function(e,t,n){"use strict";var r=n(5807);e.exports=Array.isArray||function(e){return"Array"===r(e)}},1871:function(e,t,n){"use strict";var r=n(1907),a=n(2159);e.exports=function(e,t,n){try{return r(a(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},1907:function(e,t,n){"use strict";var r=n(1505),a=Function.prototype,i=a.call,s=r&&a.bind.bind(i,i);e.exports=r?s:function(e){return function(){return i.apply(e,arguments)}}},1926:function(e,t,n){"use strict";n(6750);var r=n(2046).Object,a=e.exports=function(e,t,n){return r.defineProperty(e,t,n)};r.defineProperty.sham&&(a.sham=!0)},2046:function(e){"use strict";e.exports={}},2156:function(e){"use strict";e.exports=function(){}},2159:function(e,t,n){"use strict";var r=n(2250),a=n(4640),i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(a(e)+" is not a function")}},2220:function(e,t,n){"use strict";var r=n(9447),a=n(8661),i=n(4284),s=n(6624),o=n(7374),c=n(2875);t.f=r&&!a?Object.defineProperties:function(e,t){s(e);for(var n,r=o(t),a=c(t),u=a.length,l=0;u>l;)i.f(e,n=a[l++],r[n]);return e}},2230:function(e,t,n){"use strict";n(366)("replace")},2231:function(e,t,n){"use strict";var r=n(9692);e.exports=r},2250:function(e){"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},2321:function(e,t,n){"use strict";var r=n(7264);n(3939),n(1785),n(1697),n(4664),n(3422),n(36),n(8703),n(6878),n(9671),n(359),e.exports=r},2341:function(e){"use strict";e.exports=function e(t){if("number"==typeof t&&isNaN(t))throw new Error("NaN is not allowed");if("number"==typeof t&&!isFinite(t))throw new Error("Infinity is not allowed");return null===t||"object"!=typeof t?JSON.stringify(t):t.toJSON instanceof Function?e(t.toJSON()):Array.isArray(t)?`[${t.reduce(((t,n,r)=>`${t}${0===r?"":","}${e(void 0===n||"symbol"==typeof n?null:n)}`),"")}]`:`{${Object.keys(t).sort().reduce(((n,r)=>void 0===t[r]||"symbol"==typeof t[r]?n:`${n}${0===n.length?"":","}${e(r)}:${e(t[r])}`),"")}}`}},2361:function(e,t,n){"use strict";var r=n(5807),a=n(1907);e.exports=function(e){if("Function"===r(e))return a(e)}},2416:function(e,t,n){"use strict";var r=n(5582);e.exports=r("document","documentElement")},2522:function(e,t,n){"use strict";var r=n(5816),a=n(6499),i=r("keys");e.exports=function(e){return i[e]||(i[e]=a(e))}},2532:function(e,t,n){"use strict";var r=n(5951),a=Object.defineProperty;e.exports=function(e,t){try{a(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},2560:function(e,t,n){"use strict";n(9363);var r=n(9287),a=n(5951),i=n(4840),s=n(3742);for(var o in r)i(a[o],o),s[o]=s.Array},2574:function(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,a=r&&!n.call({1:2},1);t.f=a?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},2595:function(e,t,n){"use strict";var r=n(5582),a=n(1907),i=r("Symbol"),s=i.keyFor,o=a(i.prototype.valueOf);e.exports=i.isRegisteredSymbol||function(e){try{return void 0!==s(o(e))}catch(e){return!1}}},2596:function(e,t,n){"use strict";n(366)("hasInstance")},2623:function(e,t,n){"use strict";var r={};r[n(6264)("toStringTag")]="z",e.exports="[object z]"===String(r)},2647:function(e,t,n){"use strict";var r=n(1907),a=n(2250),i=n(6128),s=r(Function.toString);a(i.inspectSource)||(i.inspectSource=function(e){return s(e)}),e.exports=i.inspectSource},2861:function(e,t,n){var r=n(8287),a=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return a(e,t,n)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=s),s.prototype=Object.create(a.prototype),i(a,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return a(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=a(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},2875:function(e,t,n){"use strict";var r=n(3045),a=n(376);e.exports=Object.keys||function(e){return r(e,a)}},3045:function(e,t,n){"use strict";var r=n(1907),a=n(9724),i=n(7374),s=n(4436).indexOf,o=n(8530),c=r([].push);e.exports=function(e,t){var n,r=i(e),u=0,l=[];for(n in r)!a(o,n)&&a(r,n)&&c(l,n);for(;t.length>u;)a(r,n=t[u++])&&(~s(l,n)||c(l,n));return l}},3121:function(e,t,n){"use strict";var r=n(5482),a=Math.min;e.exports=function(e){var t=r(e);return t>0?a(t,9007199254740991):0}},3313:function(e,t,n){"use strict";var r=n(1091),a=n(5582),i=n(9724),s=n(160),o=n(5816),c=n(4411),u=o("string-to-symbol-registry"),l=o("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{for:function(e){var t=s(e);if(i(u,t))return u[t];var n=a("Symbol")(t);return u[t]=n,l[n]=t,n}})},3325:function(e,t,n){"use strict";n(366)("unscopables")},3377:function(e,t,n){"use strict";n(366)("matchAll")},3422:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:n(2595)})},3427:function(e,t,n){"use strict";var r=n(1907);e.exports=r([].slice)},3467:function(e,t,n){"use strict";var r=n(3930),a=n(5582),i=n(6264),s=n(8055);e.exports=function(){var e=a("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,o=i("toPrimitive");t&&!t[o]&&s(t,o,(function(e){return r(n,this)}),{arity:1})}},3643:function(){},3648:function(e,t,n){"use strict";var r=n(9447),a=n(8828),i=n(9552);e.exports=!r&&!a((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},3669:function(e,t,n){"use strict";var r=n(366),a=n(3467);r("toPrimitive"),a()},3674:function(e,t,n){"use strict";var r=n(1091),a=n(5951),i=n(3930),s=n(1907),o=n(7376),c=n(9447),u=n(9846),l=n(8828),m=n(9724),d=n(8280),p=n(6624),h=n(7374),f=n(470),y=n(160),g=n(5817),N=n(8075),w=n(2875),v=n(4443),b=n(5407),x=n(7170),_=n(3846),C=n(4284),S=n(2220),T=n(2574),P=n(8055),A=n(9251),z=n(5816),I=n(2522),E=n(8530),M=n(6499),q=n(6264),R=n(560),O=n(366),k=n(3467),B=n(4840),U=n(4932),$=n(726).forEach,G=I("hidden"),V="Symbol",D="prototype",L=U.set,j=U.getterFor(V),F=Object[D],H=a.Symbol,J=H&&H[D],W=a.RangeError,K=a.TypeError,Y=a.QObject,Q=_.f,X=C.f,Z=b.f,ee=T.f,te=s([].push),ne=z("symbols"),re=z("op-symbols"),ae=z("wks"),ie=!Y||!Y[D]||!Y[D].findChild,se=function(e,t,n){var r=Q(F,t);r&&delete F[t],X(e,t,n),r&&e!==F&&X(F,t,r)},oe=c&&l((function(){return 7!==N(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?se:X,ce=function(e,t){var n=ne[e]=N(J);return L(n,{type:V,tag:e,description:t}),c||(n.description=t),n},ue=function(e,t,n){e===F&&ue(re,t,n),p(e);var r=f(t);return p(n),m(ne,r)?(n.enumerable?(m(e,G)&&e[G][r]&&(e[G][r]=!1),n=N(n,{enumerable:g(0,!1)})):(m(e,G)||X(e,G,g(1,N(null))),e[G][r]=!0),oe(e,r,n)):X(e,r,n)},le=function(e,t){p(e);var n=h(t),r=w(n).concat(he(n));return $(r,(function(t){c&&!i(me,n,t)||ue(e,t,n[t])})),e},me=function(e){var t=f(e),n=i(ee,this,t);return!(this===F&&m(ne,t)&&!m(re,t))&&(!(n||!m(this,t)||!m(ne,t)||m(this,G)&&this[G][t])||n)},de=function(e,t){var n=h(e),r=f(t);if(n!==F||!m(ne,r)||m(re,r)){var a=Q(n,r);return!a||!m(ne,r)||m(n,G)&&n[G][r]||(a.enumerable=!0),a}},pe=function(e){var t=Z(h(e)),n=[];return $(t,(function(e){m(ne,e)||m(E,e)||te(n,e)})),n},he=function(e){var t=e===F,n=Z(t?re:h(e)),r=[];return $(n,(function(e){!m(ne,e)||t&&!m(F,e)||te(r,ne[e])})),r};u||(H=function(){if(d(J,this))throw new K("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,t=M(e),n=function(e){var r=void 0===this?a:this;r===F&&i(n,re,e),m(r,G)&&m(r[G],t)&&(r[G][t]=!1);var s=g(1,e);try{oe(r,t,s)}catch(e){if(!(e instanceof W))throw e;se(r,t,s)}};return c&&ie&&oe(F,t,{configurable:!0,set:n}),ce(t,e)},P(J=H[D],"toString",(function(){return j(this).tag})),P(H,"withoutSetter",(function(e){return ce(M(e),e)})),T.f=me,C.f=ue,S.f=le,_.f=de,v.f=b.f=pe,x.f=he,R.f=function(e){return ce(q(e),e)},c&&(A(J,"description",{configurable:!0,get:function(){return j(this).description}}),o||P(F,"propertyIsEnumerable",me,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:H}),$(w(ae),(function(e){O(e)})),r({target:V,stat:!0,forced:!u},{useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!c},{create:function(e,t){return void 0===t?N(e):le(N(e),t)},defineProperty:ue,defineProperties:le,getOwnPropertyDescriptor:de}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:pe}),k(),B(H,V),E[G]=!0},3742:function(e){"use strict";e.exports={}},3842:function(e,t,n){"use strict";n(8545),n(3643),n(4452),n(3997),n(5084),n(2596),n(5721),n(4954),n(4123),n(3377),n(2230),n(5344),n(1660),n(4610),n(3669),n(4810),n(3325),n(7024),n(8172),n(5205);var r=n(2046);e.exports=r.Symbol},3846:function(e,t,n){"use strict";var r=n(9447),a=n(3930),i=n(2574),s=n(5817),o=n(7374),c=n(470),u=n(9724),l=n(3648),m=Object.getOwnPropertyDescriptor;t.f=r?m:function(e,t){if(e=o(e),t=c(t),l)try{return m(e,t)}catch(e){}if(u(e,t))return s(!a(i.f,e,t),e[t])}},3930:function(e,t,n){"use strict";var r=n(1505),a=Function.prototype.call;e.exports=r?a.bind(a):function(){return a.apply(a,arguments)}},3939:function(e,t,n){"use strict";n(1091)({target:"Symbol",stat:!0},{isRegisteredSymbol:n(2595)})},3948:function(e,t,n){"use strict";var r=n(2623),a=n(2250),i=n(5807),s=n(6264)("toStringTag"),o=Object,c="Arguments"===i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=o(e),s))?n:c?i(t):"Object"===(r=i(t))&&a(t.callee)?"Arguments":r}},3997:function(e,t,n){"use strict";n(366)("asyncIterator")},4010:function(e,t,n){"use strict";var r=n(1793),a=n(5468),i=n(6285),s=n(6264)("species"),o=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(a(t)&&(t===o||r(t.prototype))||i(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?o:t}},4018:function(e,t,n){"use strict";var r=n(6285);e.exports=function(e){return r(e)||null===e}},4107:function(e,t,n){var r=n(6698),a=n(392),i=n(2861).Buffer,s=[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],o=new Array(64);function c(){this.init(),this._w=o,a.call(this,64,56)}function u(e,t,n){return n^e&(t^n)}function l(e,t,n){return e&t|n&(e|t)}function m(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function d(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function p(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(c,a),c.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},c.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,a=0|this._b,i=0|this._c,o=0|this._d,c=0|this._e,h=0|this._f,f=0|this._g,y=0|this._h,g=0;g<16;++g)n[g]=e.readInt32BE(4*g);for(;g<64;++g)n[g]=0|(((t=n[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[g-7]+p(n[g-15])+n[g-16];for(var N=0;N<64;++N){var w=y+d(c)+u(c,h,f)+s[N]+n[N]|0,v=m(r)+l(r,a,i)|0;y=f,f=h,h=c,c=o+w|0,o=i,i=a,a=r,r=w+v|0}this._a=r+this._a|0,this._b=a+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=c+this._e|0,this._f=h+this._f|0,this._g=f+this._g|0,this._h=y+this._h|0},c.prototype._hash=function(){var e=i.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=c},4123:function(e,t,n){"use strict";n(366)("match")},4139:function(e,t,n){"use strict";var r=n(3842);n(2560),e.exports=r},4156:function(e,t,n){const r=n(829);function a(e,t,n){const r=e[t]+e[n];let a=e[t+1]+e[n+1];r>=4294967296&&a++,e[t]=r,e[t+1]=a}function i(e,t,n,r){let a=e[t]+n;n<0&&(a+=4294967296);let i=e[t+1]+r;a>=4294967296&&i++,e[t]=a,e[t+1]=i}function s(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function o(e,t,n,r,s,o){const c=m[s],u=m[s+1],d=m[o],p=m[o+1];a(l,e,t),i(l,e,c,u);let h=l[r]^l[e],f=l[r+1]^l[e+1];l[r]=f,l[r+1]=h,a(l,n,r),h=l[t]^l[n],f=l[t+1]^l[n+1],l[t]=h>>>24^f<<8,l[t+1]=f>>>24^h<<8,a(l,e,t),i(l,e,d,p),h=l[r]^l[e],f=l[r+1]^l[e+1],l[r]=h>>>16^f<<16,l[r+1]=f>>>16^h<<16,a(l,n,r),h=l[t]^l[n],f=l[t+1]^l[n+1],l[t]=f>>>31^h<<1,l[t+1]=h>>>31^f<<1}const c=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),u=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map((function(e){return 2*e}))),l=new Uint32Array(32),m=new Uint32Array(32);function d(e,t){let n=0;for(n=0;n<16;n++)l[n]=e.h[n],l[n+16]=c[n];for(l[24]=l[24]^e.t,l[25]=l[25]^e.t/4294967296,t&&(l[28]=~l[28],l[29]=~l[29]),n=0;n<32;n++)m[n]=s(e.b,4*n);for(n=0;n<12;n++)o(0,8,16,24,u[16*n+0],u[16*n+1]),o(2,10,18,26,u[16*n+2],u[16*n+3]),o(4,12,20,28,u[16*n+4],u[16*n+5]),o(6,14,22,30,u[16*n+6],u[16*n+7]),o(0,10,20,30,u[16*n+8],u[16*n+9]),o(2,12,22,24,u[16*n+10],u[16*n+11]),o(4,14,16,26,u[16*n+12],u[16*n+13]),o(6,8,18,28,u[16*n+14],u[16*n+15]);for(n=0;n<16;n++)e.h[n]=e.h[n]^l[n]^l[n+16]}const p=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function h(e,t,n,r){if(0===e||e>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(t&&t.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(n&&16!==n.length)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(r&&16!==r.length)throw new Error("Illegal personal, expected Uint8Array with length is 16");const a={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};p.fill(0),p[0]=e,t&&(p[1]=t.length),p[2]=1,p[3]=1,n&&p.set(n,32),r&&p.set(r,48);for(let e=0;e<16;e++)a.h[e]=c[e]^s(p,4*e);return t&&(f(a,t),a.c=128),a}function f(e,t){for(let n=0;n<t.length;n++)128===e.c&&(e.t+=e.c,d(e,!1),e.c=0),e.b[e.c++]=t[n]}function y(e){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0;d(e,!0);const t=new Uint8Array(e.outlen);for(let n=0;n<e.outlen;n++)t[n]=e.h[n>>2]>>8*(3&n);return t}function g(e,t,n,a,i){n=n||64,e=r.normalizeInput(e),a&&(a=r.normalizeInput(a)),i&&(i=r.normalizeInput(i));const s=h(n,t,a,i);return f(s,e),y(s)}e.exports={blake2b:g,blake2bHex:function(e,t,n,a,i){const s=g(e,t,n,a,i);return r.toHex(s)},blake2bInit:h,blake2bUpdate:f,blake2bFinal:y}},4239:function(e,t,n){"use strict";var r=n(7136),a=TypeError;e.exports=function(e){if(r(e))throw new a("Can't call method on "+e);return e}},4284:function(e,t,n){"use strict";var r=n(9447),a=n(3648),i=n(8661),s=n(6624),o=n(470),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,m="enumerable",d="configurable",p="writable";t.f=r?i?function(e,t,n){if(s(e),t=o(t),s(n),"function"==typeof e&&"prototype"===t&&"value"in n&&p in n&&!n[p]){var r=l(e,t);r&&r[p]&&(e[t]=n.value,n={configurable:d in n?n[d]:r[d],enumerable:m in n?n[m]:r[m],writable:!1})}return u(e,t,n)}:u:function(e,t,n){if(s(e),t=o(t),s(n),a)try{return u(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},4411:function(e,t,n){"use strict";var r=n(9846);e.exports=r&&!!Symbol.for&&!!Symbol.keyFor},4436:function(e,t,n){"use strict";var r=n(7374),a=n(4849),i=n(575),s=function(e){return function(t,n,s){var o=r(t),c=i(o);if(0===c)return!e&&-1;var u,l=a(s,c);if(e&&n!=n){for(;c>l;)if((u=o[l++])!=u)return!0}else for(;c>l;l++)if((e||l in o)&&o[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},4443:function(e,t,n){"use strict";var r=n(3045),a=n(376).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,a)}},4452:function(e,t,n){"use strict";n(3674),n(3313),n(751),n(9721),n(5264)},4610:function(e,t,n){"use strict";n(366)("split")},4640:function(e){"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},4664:function(e,t,n){"use strict";n(366)("observable")},4810:function(e,t,n){"use strict";var r=n(5582),a=n(366),i=n(4840);a("toStringTag"),i(r("Symbol"),"Symbol")},4840:function(e,t,n){"use strict";var r=n(2623),a=n(4284).f,i=n(1626),s=n(9724),o=n(4878),c=n(6264)("toStringTag");e.exports=function(e,t,n,u){var l=n?e:e&&e.prototype;l&&(s(l,c)||a(l,c,{configurable:!0,value:t}),u&&!r&&i(l,"toString",o))}},4849:function(e,t,n){"use strict";var r=n(5482),a=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?a(n+t,0):i(n,t)}},4878:function(e,t,n){"use strict";var r=n(2623),a=n(3948);e.exports=r?{}.toString:function(){return"[object "+a(this)+"]"}},4903:function(e){var t=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;if("object"==typeof globalThis&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return t()}try{return __global__||t()}finally{delete Object.prototype.__global__}}()},4932:function(e,t,n){"use strict";var r,a,i,s=n(551),o=n(5951),c=n(6285),u=n(1626),l=n(9724),m=n(6128),d=n(2522),p=n(8530),h="Object already initialized",f=o.TypeError,y=o.WeakMap;if(s||m.state){var g=m.state||(m.state=new y);g.get=g.get,g.has=g.has,g.set=g.set,r=function(e,t){if(g.has(e))throw new f(h);return t.facade=e,g.set(e,t),t},a=function(e){return g.get(e)||{}},i=function(e){return g.has(e)}}else{var N=d("state");p[N]=!0,r=function(e,t){if(l(e,N))throw new f(h);return t.facade=e,u(e,N,t),t},a=function(e){return l(e,N)?e[N]:{}},i=function(e){return l(e,N)}}e.exports={set:r,get:a,has:i,enforce:function(e){return i(e)?a(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=a(t)).type!==e)throw new f("Incompatible receiver, "+e+" required");return n}}}},4954:function(e,t,n){"use strict";n(366)("iterator")},4997:function(e,t,n){"use strict";var r=n(6040);e.exports=r},5084:function(){},5116:function(e,t,n){"use strict";var r,a,i,s=n(8828),o=n(2250),c=n(6285),u=n(8075),l=n(5972),m=n(8055),d=n(6264),p=n(7376),h=d("iterator"),f=!1;[].keys&&("next"in(i=[].keys())?(a=l(l(i)))!==Object.prototype&&(r=a):f=!0),!c(r)||s((function(){var e={};return r[h].call(e)!==e}))?r={}:p&&(r=u(r)),o(r[h])||m(r,h,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:f}},5205:function(){},5264:function(e,t,n){"use strict";var r=n(1091),a=n(9846),i=n(8828),s=n(7170),o=n(9298);r({target:"Object",stat:!0,forced:!a||i((function(){s.f(1)}))},{getOwnPropertySymbols:function(e){var t=s.f;return t?t(o(e)):[]}})},5344:function(e,t,n){"use strict";n(366)("search")},5407:function(e,t,n){"use strict";var r=n(5807),a=n(7374),i=n(4443).f,s=n(3427),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"Window"===r(e)?function(e){try{return i(e)}catch(e){return s(o)}}(e):i(a(e))}},5468:function(e,t,n){"use strict";var r=n(1907),a=n(8828),i=n(2250),s=n(3948),o=n(5582),c=n(2647),u=function(){},l=o("Reflect","construct"),m=/^\s*(?:class|function)\b/,d=r(m.exec),p=!m.test(u),h=function(e){if(!i(e))return!1;try{return l(u,[],e),!0}catch(e){return!1}},f=function(e){if(!i(e))return!1;switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!d(m,c(e))}catch(e){return!0}};f.sham=!0,e.exports=!l||a((function(){var e;return h(h.call)||!h(Object)||!h((function(){e=!0}))||e}))?f:h},5482:function(e,t,n){"use strict";var r=n(1176);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},5543:function(e,t,n){"use strict";var r=n(9447),a=n(4284),i=n(5817);e.exports=function(e,t,n){r?a.f(e,t,i(0,n)):e[t]=n}},5582:function(e,t,n){"use strict";var r=n(2046),a=n(5951),i=n(2250),s=function(e){return i(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?s(r[e])||s(a[e]):r[e]&&r[e][t]||a[e]&&a[e][t]}},5594:function(e,t,n){"use strict";var r=n(5582),a=n(2250),i=n(8280),s=n(1175),o=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return a(t)&&i(t.prototype,o(e))}},5606:function(e){var t,n,r=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var o,c=[],u=!1,l=-1;function m(){u&&o&&(u=!1,o.length?c=o.concat(c):l=-1,c.length&&d())}function d(){if(!u){var e=s(m);u=!0;for(var t=c.length;t;){for(o=c,c=[];++l<t;)o&&o[l].run();l=-1,t=c.length}o=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||u||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},5663:function(e,t,n){"use strict";var r=n(70);e.exports=r},5721:function(e,t,n){"use strict";n(366)("isConcatSpreadable")},5807:function(e,t,n){"use strict";var r=n(1907),a=r({}.toString),i=r("".slice);e.exports=function(e){return i(a(e),8,-1)}},5816:function(e,t,n){"use strict";var r=n(6128);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},5817:function(e){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},5951:function(e,t,n){"use strict";var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},5972:function(e,t,n){"use strict";var r=n(9724),a=n(2250),i=n(9298),s=n(2522),o=n(7382),c=s("IE_PROTO"),u=Object,l=u.prototype;e.exports=o?u.getPrototypeOf:function(e){var t=i(e);if(r(t,c))return t[c];var n=t.constructor;return a(n)&&t instanceof n?n.prototype:t instanceof u?l:null}},6024:function(e,t,n){"use strict";var r=n(1505),a=Function.prototype,i=a.apply,s=a.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?s.bind(i):function(){return s.apply(i,arguments)})},6028:function(e,t,n){"use strict";var r=n(3930),a=n(6285),i=n(5594),s=n(9367),o=n(581),c=n(6264),u=TypeError,l=c("toPrimitive");e.exports=function(e,t){if(!a(e)||i(e))return e;var n,c=s(e,l);if(c){if(void 0===t&&(t="default"),n=r(c,e,t),!a(n)||i(n))return n;throw new u("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},6040:function(e,t,n){"use strict";var r=n(8251);e.exports=r},6128:function(e,t,n){"use strict";var r=n(7376),a=n(5951),i=n(2532),s="__core-js_shared__",o=e.exports=a[s]||i(s,{});(o.versions||(o.versions=[])).push({version:"3.41.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"})},6264:function(e,t,n){"use strict";var r=n(5951),a=n(5816),i=n(9724),s=n(6499),o=n(9846),c=n(1175),u=r.Symbol,l=a("wks"),m=c?u.for||u:u&&u.withoutSetter||s;e.exports=function(e){return i(l,e)||(l[e]=o&&i(u,e)?u[e]:m("Symbol."+e)),l[e]}},6285:function(e,t,n){"use strict";var r=n(2250);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},6499:function(e,t,n){"use strict";var r=n(1907),a=0,i=Math.random(),s=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++a+i,36)}},6624:function(e,t,n){"use strict";var r=n(6285),a=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(a(e)+" is not an object")}},6656:function(e,t,n){"use strict";var r=n(1907),a=n(1793),i=n(2250),s=n(5807),o=n(160),c=r([].push);e.exports=function(e){if(i(e))return e;if(a(e)){for(var t=e.length,n=[],r=0;r<t;r++){var u=e[r];"string"==typeof u?c(n,u):"number"!=typeof u&&"Number"!==s(u)&&"String"!==s(u)||c(n,o(u))}var l=n.length,m=!0;return function(e,t){if(m)return m=!1,t;if(a(this))return t;for(var r=0;r<l;r++)if(n[r]===e)return t}}}},6698:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},6750:function(e,t,n){"use strict";var r=n(1091),a=n(9447),i=n(4284).f;r({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!a},{defineProperty:i})},6794:function(e,t,n){"use strict";var r=n(5951).navigator,a=r&&r.userAgent;e.exports=a?String(a):""},6833:function(e,t,n){"use strict";var r=n(9447),a=n(9724),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,o=a(i,"name"),c=o&&"something"===function(){}.name,u=o&&(!r||r&&s(i,"name").configurable);e.exports={EXISTS:o,PROPER:c,CONFIGURABLE:u}},6878:function(e,t,n){"use strict";n(366)("metadataKey")},6946:function(e,t,n){"use strict";var r=n(1907),a=n(8828),i=n(5807),s=Object,o=r("".split);e.exports=a((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"===i(e)?o(e,""):s(e)}:s},6968:function(e,t,n){"use strict";var r=n(4010);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},7007:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(n,r){function a(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",a),n([].slice.call(arguments))}f(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&f(e,"error",t,{once:!0})}(e,a)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function o(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var a,i,s,u;if(o(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),s=i[t]),void 0===s)s=i[t]=n,++e._eventsCount;else if("function"==typeof s?s=i[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(a=c(e))>0&&s.length>a&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=l.bind(r);return a.listener=n,r.wrapFn=a,a}function d(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(a):h(a,a.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function f(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function a(i){r.once&&e.removeEventListener(t,a),n(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var a="error"===e,i=this._events;if(void 0!==i)a=a&&void 0===i.error;else if(!a)return!1;if(a){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var u=c.length,l=h(c,u);for(n=0;n<u;++n)r(l[n],this,t)}return!0},i.prototype.addListener=function(e,t){return u(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return u(this,e,t,!0)},i.prototype.once=function(e,t){return o(t),this.on(e,m(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,m(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,a,i,s;if(o(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(a=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){s=n[i].listener,a=i;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,a),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var a,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(a=i[r])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return d(this,e,!0)},i.prototype.rawListeners=function(e){return d(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},i.prototype.listenerCount=p,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},7024:function(e,t,n){"use strict";var r=n(5951);n(4840)(r.JSON,"JSON",!0)},7045:function(e,t,n){"use strict";var r=n(1730);n(2560),e.exports=r},7057:function(e,t,n){"use strict";var r=n(1470).charAt,a=n(160),i=n(4932),s=n(183),o=n(9550),c="String Iterator",u=i.set,l=i.getterFor(c);s(String,"String",(function(e){u(this,{type:c,string:a(e),index:0})}),(function(){var e,t=l(this),n=t.string,a=t.index;return a>=n.length?o(void 0,!0):(e=r(n,a),t.index+=e.length,o(e,!1))}))},7136:function(e){"use strict";e.exports=function(e){return null==e}},7152:function(e,t,n){"use strict";n(366)("dispose")},7170:function(e,t){"use strict";t.f=Object.getOwnPropertySymbols},7171:function(e,t,n){"use strict";var r=n(8828),a=n(6264),i=n(798),s=a("species");e.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[s]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},7181:function(e,t,n){"use strict";var r=n(5116).IteratorPrototype,a=n(8075),i=n(5817),s=n(4840),o=n(3742),c=function(){return this};e.exports=function(e,t,n,u){var l=t+" Iterator";return e.prototype=a(r,{next:i(+!u,n)}),s(e,l,!1,!0),o[l]=c,e}},7264:function(e,t,n){"use strict";var r=n(4139);n(768),n(8549),n(7152),n(1372),e.exports=r},7372:function(e,t,n){var r=n(1594),a=e.exports;!function(){"use strict";var e,t,n,i=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function o(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,(function(e){var t=s[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function c(a,i){var s,u,l,m,d,p=e,h=i[a],f=null!=h&&(h instanceof r||r.isBigNumber(h));switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(a)),"function"==typeof n&&(h=n.call(i,a,h)),typeof h){case"string":return f?h:o(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":case"bigint":return String(h);case"object":if(!h)return"null";if(e+=t,d=[],"[object Array]"===Object.prototype.toString.apply(h)){for(m=h.length,s=0;s<m;s+=1)d[s]=c(s,h)||"null";return l=0===d.length?"[]":e?"[\n"+e+d.join(",\n"+e)+"\n"+p+"]":"["+d.join(",")+"]",e=p,l}if(n&&"object"==typeof n)for(m=n.length,s=0;s<m;s+=1)"string"==typeof n[s]&&(l=c(u=n[s],h))&&d.push(o(u)+(e?": ":":")+l);else Object.keys(h).forEach((function(t){var n=c(t,h);n&&d.push(o(t)+(e?": ":":")+n)}));return l=0===d.length?"{}":e?"{\n"+e+d.join(",\n"+e)+"\n"+p+"}":"{"+d.join(",")+"}",e=p,l}}"function"!=typeof a.stringify&&(a.stringify=function(r,a,i){var s;if(e="",t="","number"==typeof i)for(s=0;s<i;s+=1)t+=" ";else"string"==typeof i&&(t=i);if(n=a,a&&"function"!=typeof a&&("object"!=typeof a||"number"!=typeof a.length))throw new Error("JSON.stringify");return c("",{"":r})})}()},7374:function(e,t,n){"use strict";var r=n(6946),a=n(4239);e.exports=function(e){return r(a(e))}},7376:function(e){"use strict";e.exports=!0},7382:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},7463:function(e,t,n){"use strict";var r=n(8828),a=n(2250),i=/#|\.prototype\./,s=function(e,t){var n=c[o(e)];return n===l||n!==u&&(a(t)?r(t):!!t)},o=s.normalize=function(e){return String(e).replace(i,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";e.exports=s},7526:function(e,t){"use strict";t.byteLength=function(e){var t=o(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=o(e),s=i[0],c=i[1],u=new a(function(e,t,n){return 3*(t+n)/4-n}(0,s,c)),l=0,m=c>0?s-4:s;for(n=0;n<m;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===c&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[l++]=255&t),1===c&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,a=r%3,i=[],s=16383,o=0,u=r-a;o<u;o+=s)i.push(c(e,o,o+s>u?u:o+s));return 1===a?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===a&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),i.join("")};for(var n=[],r=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=i[s],r[i.charCodeAt(s)]=s;function o(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,r){for(var a,i,s=[],o=t;o<r;o+=3)a=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),s.push(n[(i=a)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},8024:function(e){"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},8055:function(e,t,n){"use strict";var r=n(1626);e.exports=function(e,t,n,a){return a&&a.enumerable?e[t]=n:r(e,t,n),e}},8075:function(e,t,n){"use strict";var r,a=n(6624),i=n(2220),s=n(376),o=n(8530),c=n(2416),u=n(9552),l=n(2522),m="prototype",d="script",p=l("IE_PROTO"),h=function(){},f=function(e){return"<"+d+">"+e+"</"+d+">"},y=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;g="undefined"!=typeof document?document.domain&&r?y(r):(t=u("iframe"),n="java"+d+":",t.style.display="none",c.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F):y(r);for(var a=s.length;a--;)delete g[m][s[a]];return g()};o[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h[m]=a(e),n=new h,h[m]=null,n[p]=e):n=g(),void 0===t?n:i.f(n,t)}},8146:function(e,t,n){var r=null;const a=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,i=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;e.exports=function(e){"use strict";var t={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(null!=e){if(!0===e.strict&&(t.strict=!0),!0===e.storeAsString&&(t.storeAsString=!0),t.alwaysParseAsBig=!0===e.alwaysParseAsBig&&e.alwaysParseAsBig,t.useNativeBigInt=!0===e.useNativeBigInt&&e.useNativeBigInt,void 0!==e.constructorAction){if("error"!==e.constructorAction&&"ignore"!==e.constructorAction&&"preserve"!==e.constructorAction)throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${e.constructorAction}`);t.constructorAction=e.constructorAction}if(void 0!==e.protoAction){if("error"!==e.protoAction&&"ignore"!==e.protoAction&&"preserve"!==e.protoAction)throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${e.protoAction}`);t.protoAction=e.protoAction}}var s,o,c,u,l={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},m=function(e){throw{name:"SyntaxError",message:e,at:s,text:c}},d=function(e){return e&&e!==o&&m("Expected '"+e+"' instead of '"+o+"'"),o=c.charAt(s),s+=1,o},p=function(){var e,a="";for("-"===o&&(a="-",d("-"));o>="0"&&o<="9";)a+=o,d();if("."===o)for(a+=".";d()&&o>="0"&&o<="9";)a+=o;if("e"===o||"E"===o)for(a+=o,d(),"-"!==o&&"+"!==o||(a+=o,d());o>="0"&&o<="9";)a+=o,d();if(e=+a,isFinite(e))return null==r&&(r=n(1594)),a.length>15?t.storeAsString?a:t.useNativeBigInt?BigInt(a):new r(a):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(e):new r(e):e;m("Bad number")},h=function(){var e,t,n,r="";if('"'===o)for(var a=s;d();){if('"'===o)return s-1>a&&(r+=c.substring(a,s-1)),d(),r;if("\\"===o){if(s-1>a&&(r+=c.substring(a,s-1)),d(),"u"===o){for(n=0,t=0;t<4&&(e=parseInt(d(),16),isFinite(e));t+=1)n=16*n+e;r+=String.fromCharCode(n)}else{if("string"!=typeof l[o])break;r+=l[o]}a=s}}m("Bad string")},f=function(){for(;o&&o<=" ";)d()};return u=function(){switch(f(),o){case"{":return function(){var e,n=Object.create(null);if("{"===o){if(d("{"),f(),"}"===o)return d("}"),n;for(;o;){if(e=h(),f(),d(":"),!0===t.strict&&Object.hasOwnProperty.call(n,e)&&m('Duplicate key "'+e+'"'),!0===a.test(e)?"error"===t.protoAction?m("Object contains forbidden prototype property"):"ignore"===t.protoAction?u():n[e]=u():!0===i.test(e)?"error"===t.constructorAction?m("Object contains forbidden constructor property"):"ignore"===t.constructorAction?u():n[e]=u():n[e]=u(),f(),"}"===o)return d("}"),n;d(","),f()}}m("Bad object")}();case"[":return function(){var e=[];if("["===o){if(d("["),f(),"]"===o)return d("]"),e;for(;o;){if(e.push(u()),f(),"]"===o)return d("]"),e;d(","),f()}}m("Bad array")}();case'"':return h();case"-":return p();default:return o>="0"&&o<="9"?p():function(){switch(o){case"t":return d("t"),d("r"),d("u"),d("e"),!0;case"f":return d("f"),d("a"),d("l"),d("s"),d("e"),!1;case"n":return d("n"),d("u"),d("l"),d("l"),null}m("Unexpected '"+o+"'")}()}},function(e,t){var n;return c=e+"",s=0,o=" ",n=u(),f(),o&&m("Syntax error"),"function"==typeof t?function e(n,r){var a,i=n[r];return i&&"object"==typeof i&&Object.keys(i).forEach((function(t){void 0!==(a=e(i,t))?i[t]=a:delete i[t]})),t.call(n,r,i)}({"":n},""):n}}},8172:function(){},8251:function(e,t,n){"use strict";var r=n(1926);e.exports=r},8280:function(e,t,n){"use strict";var r=n(1907);e.exports=r({}.isPrototypeOf)},8287:function(e,t,n){"use strict";const r=n(7526),a=n(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function o(e){if(e>s)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,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return m(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|f(e,t);let r=o(n);const a=r.write(e,t);return a!==n&&(r=r.slice(0,a)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(K(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return d(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(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer))return p(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return c.from(r,t,n);const a=function(e){if(c.isBuffer(e)){const t=0|h(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?o(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(a)return a;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,n);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 m(e){return l(e),o(e<0?0:0|h(e))}function d(e){const t=e.length<0?0:0|h(e.length),n=o(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function p(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,c.prototype),r}function h(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function f(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(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 n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let a=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(a)return r?-1:H(e).length;t=(""+t).toLowerCase(),a=!0}}function y(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return A(this,t,n);case"latin1":case"binary":return z(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function N(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Y(n=+n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,a);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,a){let i,s=1,o=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,o/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(a){let r=-1;for(i=n;i<o;i++)if(u(e,i)===u(t,-1===r?0:i-r)){if(-1===r&&(r=i),i-r+1===c)return r*s}else-1!==r&&(i-=i-r),r=-1}else for(n+c>o&&(n=o-c),i=n;i>=0;i--){let n=!0;for(let r=0;r<c;r++)if(u(e,i+r)!==u(t,r)){n=!1;break}if(n)return i}return-1}function v(e,t,n,r){n=Number(n)||0;const a=e.length-n;r?(r=Number(r))>a&&(r=a):r=a;const i=t.length;let s;for(r>i/2&&(r=i/2),s=0;s<r;++s){const r=parseInt(t.substr(2*s,2),16);if(Y(r))return s;e[n+s]=r}return s}function b(e,t,n,r){return W(H(t,e.length-n),e,n,r)}function x(e,t,n,r){return W(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function _(e,t,n,r){return W(J(t),e,n,r)}function C(e,t,n,r){return W(function(e,t){let n,r,a;const i=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,a=n%256,i.push(a),i.push(r);return i}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function T(e,t,n){n=Math.min(e.length,n);const r=[];let a=t;for(;a<n;){const t=e[a];let i=null,s=t>239?4:t>223?3:t>191?2:1;if(a+s<=n){let n,r,o,c;switch(s){case 1:t<128&&(i=t);break;case 2:n=e[a+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[a+1],r=e[a+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[a+1],r=e[a+2],o=e[a+3],128==(192&n)&&128==(192&r)&&128==(192&o)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&o,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,s=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),a+=s}return function(e){const t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=P));return n}(r)}t.kMaxLength=s,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,n){return u(e,t,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,n){return function(e,t,n){return l(e),e<=0?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},c.allocUnsafe=function(e){return m(e)},c.allocUnsafeSlow=function(e){return m(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(K(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),K(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 n=e.length,r=t.length;for(let a=0,i=Math.min(n,r);a<i;++a)if(e[a]!==t[a]){n=e[a],r=t[a];break}return n<r?-1:r<n?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 n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=c.allocUnsafe(t);let a=0;for(n=0;n<e.length;++n){let t=e[n];if(K(t,Uint8Array))a+t.length>r.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,a)):Uint8Array.prototype.set.call(r,t,a);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,a)}a+=t.length}return r},c.byteLength=f,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)g(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)g(this,t,t+3),g(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)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?T(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 n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,a){if(K(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===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(a>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0);const o=Math.min(i,s),u=this.slice(r,a),l=e.slice(t,n);for(let e=0;e<o;++e)if(u[e]!==l[e]){i=u[e],s=l[e];break}return i<s?-1:s<i?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return N(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return N(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":case"latin1":case"binary":return x(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const P=4096;function A(e,t,n){let r="";n=Math.min(e.length,n);for(let a=t;a<n;++a)r+=String.fromCharCode(127&e[a]);return r}function z(e,t,n){let r="";n=Math.min(e.length,n);for(let a=t;a<n;++a)r+=String.fromCharCode(e[a]);return r}function I(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let a="";for(let r=t;r<n;++r)a+=Q[e[r]];return a}function E(e,t,n){const r=e.slice(t,n);let a="";for(let e=0;e<r.length-1;e+=2)a+=String.fromCharCode(r[e]+256*r[e+1]);return a}function M(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function q(e,t,n,r,a,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function R(e,t,n,r,a){D(t,r,a,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,n}function O(e,t,n,r,a){D(t,r,a,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=s,s>>=8,e[n+2]=s,s>>=8,e[n+1]=s,s>>=8,e[n]=s,n+8}function k(e,t,n,r,a,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return t=+t,n>>>=0,i||k(e,0,n,4),a.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return t=+t,n>>>=0,i||k(e,0,n,8),a.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,c.prototype),r},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e],a=1,i=0;for(;++i<t&&(a*=256);)r+=this[e+i]*a;return r},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e+--t],a=1;for(;t>0&&(a*=256);)r+=this[e+--t]*a;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(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||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=X((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||j(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,a=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(a)<<BigInt(32))})),c.prototype.readBigUInt64BE=X((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||j(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],a=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(a)})),c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e],a=1,i=0;for(;++i<t&&(a*=256);)r+=this[e+i]*a;return a*=128,r>=a&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=t,a=1,i=this[e+--r];for(;r>0&&(a*=256);)i+=this[e+--r]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(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||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=X((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||j(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),c.prototype.readBigInt64BE=X((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||j(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||M(e,4,this.length),a.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),a.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),a.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),a.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||q(this,e,t,n,Math.pow(2,8*n)-1,0);let a=1,i=0;for(this[t]=255&e;++i<n&&(a*=256);)this[t+i]=e/a&255;return t+n},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||q(this,e,t,n,Math.pow(2,8*n)-1,0);let a=n-1,i=1;for(this[t+a]=255&e;--a>=0&&(i*=256);)this[t+a]=e/i&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||q(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,n){return e=+e,t>>>=0,n||q(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,n){return e=+e,t>>>=0,n||q(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,n){return e=+e,t>>>=0,n||q(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 R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=X((function(e,t=0){return O(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);q(this,e,t,n,r-1,-r)}let a=0,i=1,s=0;for(this[t]=255&e;++a<n&&(i*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/i|0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);q(this,e,t,n,r-1,-r)}let a=n-1,i=1,s=0;for(this[t+a]=255&e;--a>=0&&(i*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/i|0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||q(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||q(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,n){return e=+e,t>>>=0,n||q(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 R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=X((function(e,t=0){return O(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const a=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),a},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{const i=c.isBuffer(e)?e:c.from(e,r),s=i.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<n-t;++a)this[a+t]=i[a%s]}return this};const $={};function G(e,t,n){$[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function V(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function D(e,t,n,r,a,i){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let a;throw a=i>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new $.ERR_OUT_OF_RANGE("value",a,e)}!function(e,t,n){L(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||j(t,e.length-(n+1))}(r,a,i)}function L(e,t){if("number"!=typeof e)throw new $.ERR_INVALID_ARG_TYPE(t,"number",e)}function j(e,t,n){if(Math.floor(e)!==e)throw L(e,n),new $.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new $.ERR_BUFFER_OUT_OF_BOUNDS;throw new $.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}G("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),G("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),G("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,a=n;return Number.isInteger(n)&&Math.abs(n)>2**32?a=V(String(n)):"bigint"==typeof n&&(a=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(a=V(a)),a+="n"),r+=` It must be ${t}. Received ${a}`,r}),RangeError);const F=/[^+/0-9A-Za-z-_]/g;function H(e,t){let n;t=t||1/0;const r=e.length;let a=null;const i=[];for(let s=0;s<r;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&i.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function J(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,n,r){let a;for(a=0;a<r&&!(a+n>=t.length||a>=e.length);++a)t[a+n]=e[a];return a}function K(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const Q=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let a=0;a<16;++a)t[r+a]=e[n]+e[a]}return t}();function X(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},8311:function(e,t,n){"use strict";var r=n(2361),a=n(2159),i=n(1505),s=r(r.bind);e.exports=function(e,t){return a(e),void 0===t?e:i?s(e,t):function(){return e.apply(t,arguments)}}},8530:function(e){"use strict";e.exports={}},8537:function(){},8545:function(e,t,n){"use strict";var r=n(1091),a=n(8828),i=n(1793),s=n(6285),o=n(9298),c=n(575),u=n(8024),l=n(5543),m=n(6968),d=n(7171),p=n(6264),h=n(798),f=p("isConcatSpreadable"),y=h>=51||!a((function(){var e=[];return e[f]=!1,e.concat()[0]!==e})),g=function(e){if(!s(e))return!1;var t=e[f];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,arity:1,forced:!y||!d("concat")},{concat:function(e){var t,n,r,a,i,s=o(this),d=m(s,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(g(i=-1===t?s:arguments[t]))for(a=c(i),u(p+a),n=0;n<a;n++,p++)n in i&&l(d,p,i[n]);else u(p+1),l(d,p++,i);return d.length=p,d}})},8549:function(e,t,n){"use strict";n(366)("asyncDispose")},8661:function(e,t,n){"use strict";var r=n(9447),a=n(8828);e.exports=r&&a((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8703:function(e,t,n){"use strict";n(366)("matcher")},8828:function(e){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},8947:function(e,t,n){!function(e){"use strict";var t=function(e){var t,n=new Float64Array(16);if(e)for(t=0;t<e.length;t++)n[t]=e[t];return n},r=function(){throw new Error("no PRNG")},a=new Uint8Array(16),i=new Uint8Array(32);i[0]=9;var s=t(),o=t([1]),c=t([56129,1]),u=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),l=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),m=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),d=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function h(e,t,n,r){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n,e[t+4]=r>>24&255,e[t+5]=r>>16&255,e[t+6]=r>>8&255,e[t+7]=255&r}function f(e,t,n,r,a){var i,s=0;for(i=0;i<a;i++)s|=e[t+i]^n[r+i];return(1&s-1>>>8)-1}function y(e,t,n,r){return f(e,t,n,r,16)}function g(e,t,n,r){return f(e,t,n,r,32)}function N(e,t,n,r){!function(e,t,n,r){for(var a,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,m=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,h=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,f=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,N=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,w=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,v=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,b=i,x=s,_=o,C=c,S=u,T=l,P=m,A=d,z=p,I=h,E=f,M=y,q=g,R=N,O=w,k=v,B=0;B<20;B+=2)b^=(a=(q^=(a=(z^=(a=(S^=(a=b+q|0)<<7|a>>>25)+b|0)<<9|a>>>23)+S|0)<<13|a>>>19)+z|0)<<18|a>>>14,T^=(a=(x^=(a=(R^=(a=(I^=(a=T+x|0)<<7|a>>>25)+T|0)<<9|a>>>23)+I|0)<<13|a>>>19)+R|0)<<18|a>>>14,E^=(a=(P^=(a=(_^=(a=(O^=(a=E+P|0)<<7|a>>>25)+E|0)<<9|a>>>23)+O|0)<<13|a>>>19)+_|0)<<18|a>>>14,k^=(a=(M^=(a=(A^=(a=(C^=(a=k+M|0)<<7|a>>>25)+k|0)<<9|a>>>23)+C|0)<<13|a>>>19)+A|0)<<18|a>>>14,b^=(a=(C^=(a=(_^=(a=(x^=(a=b+C|0)<<7|a>>>25)+b|0)<<9|a>>>23)+x|0)<<13|a>>>19)+_|0)<<18|a>>>14,T^=(a=(S^=(a=(A^=(a=(P^=(a=T+S|0)<<7|a>>>25)+T|0)<<9|a>>>23)+P|0)<<13|a>>>19)+A|0)<<18|a>>>14,E^=(a=(I^=(a=(z^=(a=(M^=(a=E+I|0)<<7|a>>>25)+E|0)<<9|a>>>23)+M|0)<<13|a>>>19)+z|0)<<18|a>>>14,k^=(a=(O^=(a=(R^=(a=(q^=(a=k+O|0)<<7|a>>>25)+k|0)<<9|a>>>23)+q|0)<<13|a>>>19)+R|0)<<18|a>>>14;b=b+i|0,x=x+s|0,_=_+o|0,C=C+c|0,S=S+u|0,T=T+l|0,P=P+m|0,A=A+d|0,z=z+p|0,I=I+h|0,E=E+f|0,M=M+y|0,q=q+g|0,R=R+N|0,O=O+w|0,k=k+v|0,e[0]=b>>>0&255,e[1]=b>>>8&255,e[2]=b>>>16&255,e[3]=b>>>24&255,e[4]=x>>>0&255,e[5]=x>>>8&255,e[6]=x>>>16&255,e[7]=x>>>24&255,e[8]=_>>>0&255,e[9]=_>>>8&255,e[10]=_>>>16&255,e[11]=_>>>24&255,e[12]=C>>>0&255,e[13]=C>>>8&255,e[14]=C>>>16&255,e[15]=C>>>24&255,e[16]=S>>>0&255,e[17]=S>>>8&255,e[18]=S>>>16&255,e[19]=S>>>24&255,e[20]=T>>>0&255,e[21]=T>>>8&255,e[22]=T>>>16&255,e[23]=T>>>24&255,e[24]=P>>>0&255,e[25]=P>>>8&255,e[26]=P>>>16&255,e[27]=P>>>24&255,e[28]=A>>>0&255,e[29]=A>>>8&255,e[30]=A>>>16&255,e[31]=A>>>24&255,e[32]=z>>>0&255,e[33]=z>>>8&255,e[34]=z>>>16&255,e[35]=z>>>24&255,e[36]=I>>>0&255,e[37]=I>>>8&255,e[38]=I>>>16&255,e[39]=I>>>24&255,e[40]=E>>>0&255,e[41]=E>>>8&255,e[42]=E>>>16&255,e[43]=E>>>24&255,e[44]=M>>>0&255,e[45]=M>>>8&255,e[46]=M>>>16&255,e[47]=M>>>24&255,e[48]=q>>>0&255,e[49]=q>>>8&255,e[50]=q>>>16&255,e[51]=q>>>24&255,e[52]=R>>>0&255,e[53]=R>>>8&255,e[54]=R>>>16&255,e[55]=R>>>24&255,e[56]=O>>>0&255,e[57]=O>>>8&255,e[58]=O>>>16&255,e[59]=O>>>24&255,e[60]=k>>>0&255,e[61]=k>>>8&255,e[62]=k>>>16&255,e[63]=k>>>24&255}(e,t,n,r)}function w(e,t,n,r){!function(e,t,n,r){for(var a,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,m=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,d=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,p=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,h=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,f=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,N=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,w=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,v=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,b=0;b<20;b+=2)i^=(a=(g^=(a=(p^=(a=(u^=(a=i+g|0)<<7|a>>>25)+i|0)<<9|a>>>23)+u|0)<<13|a>>>19)+p|0)<<18|a>>>14,l^=(a=(s^=(a=(N^=(a=(h^=(a=l+s|0)<<7|a>>>25)+l|0)<<9|a>>>23)+h|0)<<13|a>>>19)+N|0)<<18|a>>>14,f^=(a=(m^=(a=(o^=(a=(w^=(a=f+m|0)<<7|a>>>25)+f|0)<<9|a>>>23)+w|0)<<13|a>>>19)+o|0)<<18|a>>>14,v^=(a=(y^=(a=(d^=(a=(c^=(a=v+y|0)<<7|a>>>25)+v|0)<<9|a>>>23)+c|0)<<13|a>>>19)+d|0)<<18|a>>>14,i^=(a=(c^=(a=(o^=(a=(s^=(a=i+c|0)<<7|a>>>25)+i|0)<<9|a>>>23)+s|0)<<13|a>>>19)+o|0)<<18|a>>>14,l^=(a=(u^=(a=(d^=(a=(m^=(a=l+u|0)<<7|a>>>25)+l|0)<<9|a>>>23)+m|0)<<13|a>>>19)+d|0)<<18|a>>>14,f^=(a=(h^=(a=(p^=(a=(y^=(a=f+h|0)<<7|a>>>25)+f|0)<<9|a>>>23)+y|0)<<13|a>>>19)+p|0)<<18|a>>>14,v^=(a=(w^=(a=(N^=(a=(g^=(a=v+w|0)<<7|a>>>25)+v|0)<<9|a>>>23)+g|0)<<13|a>>>19)+N|0)<<18|a>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=f>>>0&255,e[9]=f>>>8&255,e[10]=f>>>16&255,e[11]=f>>>24&255,e[12]=v>>>0&255,e[13]=v>>>8&255,e[14]=v>>>16&255,e[15]=v>>>24&255,e[16]=m>>>0&255,e[17]=m>>>8&255,e[18]=m>>>16&255,e[19]=m>>>24&255,e[20]=d>>>0&255,e[21]=d>>>8&255,e[22]=d>>>16&255,e[23]=d>>>24&255,e[24]=p>>>0&255,e[25]=p>>>8&255,e[26]=p>>>16&255,e[27]=p>>>24&255,e[28]=h>>>0&255,e[29]=h>>>8&255,e[30]=h>>>16&255,e[31]=h>>>24&255}(e,t,n,r)}var v=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function b(e,t,n,r,a,i,s){var o,c,u=new Uint8Array(16),l=new Uint8Array(64);for(c=0;c<16;c++)u[c]=0;for(c=0;c<8;c++)u[c]=i[c];for(;a>=64;){for(N(l,u,s,v),c=0;c<64;c++)e[t+c]=n[r+c]^l[c];for(o=1,c=8;c<16;c++)o=o+(255&u[c])|0,u[c]=255&o,o>>>=8;a-=64,t+=64,r+=64}if(a>0)for(N(l,u,s,v),c=0;c<a;c++)e[t+c]=n[r+c]^l[c];return 0}function x(e,t,n,r,a){var i,s,o=new Uint8Array(16),c=new Uint8Array(64);for(s=0;s<16;s++)o[s]=0;for(s=0;s<8;s++)o[s]=r[s];for(;n>=64;){for(N(c,o,a,v),s=0;s<64;s++)e[t+s]=c[s];for(i=1,s=8;s<16;s++)i=i+(255&o[s])|0,o[s]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(N(c,o,a,v),s=0;s<n;s++)e[t+s]=c[s];return 0}function _(e,t,n,r,a){var i=new Uint8Array(32);w(i,r,a,v);for(var s=new Uint8Array(8),o=0;o<8;o++)s[o]=r[o+16];return x(e,t,n,s,i)}function C(e,t,n,r,a,i,s){var o=new Uint8Array(32);w(o,i,s,v);for(var c=new Uint8Array(8),u=0;u<8;u++)c[u]=i[u+16];return b(e,t,n,r,a,c,o)}var S=function(e){var t,n,r,a,i,s,o,c;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,n=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|n<<3),r=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(n>>>10|r<<6),a=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(r>>>7|a<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(a>>>4|i<<12),this.r[5]=i>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|s<<2),o=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|o<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(o>>>8|c<<8),this.r[9]=c>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function T(e,t,n,r,a,i){var s=new S(i);return s.update(n,r,a),s.finish(e,t),0}function P(e,t,n,r,a,i){var s=new Uint8Array(16);return T(s,0,n,r,a,i),y(e,t,s,0)}function A(e,t,n,r,a){var i;if(n<32)return-1;for(C(e,0,t,0,n,r,a),T(e,16,e,32,n-32,e),i=0;i<16;i++)e[i]=0;return 0}function z(e,t,n,r,a){var i,s=new Uint8Array(32);if(n<32)return-1;if(_(s,0,32,r,a),0!==P(t,16,t,32,n-32,s))return-1;for(C(e,0,t,0,n,r,a),i=0;i<32;i++)e[i]=0;return 0}function I(e,t){var n;for(n=0;n<16;n++)e[n]=0|t[n]}function E(e){var t,n,r=1;for(t=0;t<16;t++)n=e[t]+r+65535,r=Math.floor(n/65536),e[t]=n-65536*r;e[0]+=r-1+37*(r-1)}function M(e,t,n){for(var r,a=~(n-1),i=0;i<16;i++)r=a&(e[i]^t[i]),e[i]^=r,t[i]^=r}function q(e,n){var r,a,i,s=t(),o=t();for(r=0;r<16;r++)o[r]=n[r];for(E(o),E(o),E(o),a=0;a<2;a++){for(s[0]=o[0]-65517,r=1;r<15;r++)s[r]=o[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=o[15]-32767-(s[14]>>16&1),i=s[15]>>16&1,s[14]&=65535,M(o,s,1-i)}for(r=0;r<16;r++)e[2*r]=255&o[r],e[2*r+1]=o[r]>>8}function R(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return q(n,e),q(r,t),g(n,0,r,0)}function O(e){var t=new Uint8Array(32);return q(t,e),1&t[0]}function k(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function B(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]+n[r]}function U(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]-n[r]}function $(e,t,n){var r,a,i=0,s=0,o=0,c=0,u=0,l=0,m=0,d=0,p=0,h=0,f=0,y=0,g=0,N=0,w=0,v=0,b=0,x=0,_=0,C=0,S=0,T=0,P=0,A=0,z=0,I=0,E=0,M=0,q=0,R=0,O=0,k=n[0],B=n[1],U=n[2],$=n[3],G=n[4],V=n[5],D=n[6],L=n[7],j=n[8],F=n[9],H=n[10],J=n[11],W=n[12],K=n[13],Y=n[14],Q=n[15];i+=(r=t[0])*k,s+=r*B,o+=r*U,c+=r*$,u+=r*G,l+=r*V,m+=r*D,d+=r*L,p+=r*j,h+=r*F,f+=r*H,y+=r*J,g+=r*W,N+=r*K,w+=r*Y,v+=r*Q,s+=(r=t[1])*k,o+=r*B,c+=r*U,u+=r*$,l+=r*G,m+=r*V,d+=r*D,p+=r*L,h+=r*j,f+=r*F,y+=r*H,g+=r*J,N+=r*W,w+=r*K,v+=r*Y,b+=r*Q,o+=(r=t[2])*k,c+=r*B,u+=r*U,l+=r*$,m+=r*G,d+=r*V,p+=r*D,h+=r*L,f+=r*j,y+=r*F,g+=r*H,N+=r*J,w+=r*W,v+=r*K,b+=r*Y,x+=r*Q,c+=(r=t[3])*k,u+=r*B,l+=r*U,m+=r*$,d+=r*G,p+=r*V,h+=r*D,f+=r*L,y+=r*j,g+=r*F,N+=r*H,w+=r*J,v+=r*W,b+=r*K,x+=r*Y,_+=r*Q,u+=(r=t[4])*k,l+=r*B,m+=r*U,d+=r*$,p+=r*G,h+=r*V,f+=r*D,y+=r*L,g+=r*j,N+=r*F,w+=r*H,v+=r*J,b+=r*W,x+=r*K,_+=r*Y,C+=r*Q,l+=(r=t[5])*k,m+=r*B,d+=r*U,p+=r*$,h+=r*G,f+=r*V,y+=r*D,g+=r*L,N+=r*j,w+=r*F,v+=r*H,b+=r*J,x+=r*W,_+=r*K,C+=r*Y,S+=r*Q,m+=(r=t[6])*k,d+=r*B,p+=r*U,h+=r*$,f+=r*G,y+=r*V,g+=r*D,N+=r*L,w+=r*j,v+=r*F,b+=r*H,x+=r*J,_+=r*W,C+=r*K,S+=r*Y,T+=r*Q,d+=(r=t[7])*k,p+=r*B,h+=r*U,f+=r*$,y+=r*G,g+=r*V,N+=r*D,w+=r*L,v+=r*j,b+=r*F,x+=r*H,_+=r*J,C+=r*W,S+=r*K,T+=r*Y,P+=r*Q,p+=(r=t[8])*k,h+=r*B,f+=r*U,y+=r*$,g+=r*G,N+=r*V,w+=r*D,v+=r*L,b+=r*j,x+=r*F,_+=r*H,C+=r*J,S+=r*W,T+=r*K,P+=r*Y,A+=r*Q,h+=(r=t[9])*k,f+=r*B,y+=r*U,g+=r*$,N+=r*G,w+=r*V,v+=r*D,b+=r*L,x+=r*j,_+=r*F,C+=r*H,S+=r*J,T+=r*W,P+=r*K,A+=r*Y,z+=r*Q,f+=(r=t[10])*k,y+=r*B,g+=r*U,N+=r*$,w+=r*G,v+=r*V,b+=r*D,x+=r*L,_+=r*j,C+=r*F,S+=r*H,T+=r*J,P+=r*W,A+=r*K,z+=r*Y,I+=r*Q,y+=(r=t[11])*k,g+=r*B,N+=r*U,w+=r*$,v+=r*G,b+=r*V,x+=r*D,_+=r*L,C+=r*j,S+=r*F,T+=r*H,P+=r*J,A+=r*W,z+=r*K,I+=r*Y,E+=r*Q,g+=(r=t[12])*k,N+=r*B,w+=r*U,v+=r*$,b+=r*G,x+=r*V,_+=r*D,C+=r*L,S+=r*j,T+=r*F,P+=r*H,A+=r*J,z+=r*W,I+=r*K,E+=r*Y,M+=r*Q,N+=(r=t[13])*k,w+=r*B,v+=r*U,b+=r*$,x+=r*G,_+=r*V,C+=r*D,S+=r*L,T+=r*j,P+=r*F,A+=r*H,z+=r*J,I+=r*W,E+=r*K,M+=r*Y,q+=r*Q,w+=(r=t[14])*k,v+=r*B,b+=r*U,x+=r*$,_+=r*G,C+=r*V,S+=r*D,T+=r*L,P+=r*j,A+=r*F,z+=r*H,I+=r*J,E+=r*W,M+=r*K,q+=r*Y,R+=r*Q,v+=(r=t[15])*k,s+=38*(x+=r*U),o+=38*(_+=r*$),c+=38*(C+=r*G),u+=38*(S+=r*V),l+=38*(T+=r*D),m+=38*(P+=r*L),d+=38*(A+=r*j),p+=38*(z+=r*F),h+=38*(I+=r*H),f+=38*(E+=r*J),y+=38*(M+=r*W),g+=38*(q+=r*K),N+=38*(R+=r*Y),w+=38*(O+=r*Q),i=(r=(i+=38*(b+=r*B))+(a=1)+65535)-65536*(a=Math.floor(r/65536)),s=(r=s+a+65535)-65536*(a=Math.floor(r/65536)),o=(r=o+a+65535)-65536*(a=Math.floor(r/65536)),c=(r=c+a+65535)-65536*(a=Math.floor(r/65536)),u=(r=u+a+65535)-65536*(a=Math.floor(r/65536)),l=(r=l+a+65535)-65536*(a=Math.floor(r/65536)),m=(r=m+a+65535)-65536*(a=Math.floor(r/65536)),d=(r=d+a+65535)-65536*(a=Math.floor(r/65536)),p=(r=p+a+65535)-65536*(a=Math.floor(r/65536)),h=(r=h+a+65535)-65536*(a=Math.floor(r/65536)),f=(r=f+a+65535)-65536*(a=Math.floor(r/65536)),y=(r=y+a+65535)-65536*(a=Math.floor(r/65536)),g=(r=g+a+65535)-65536*(a=Math.floor(r/65536)),N=(r=N+a+65535)-65536*(a=Math.floor(r/65536)),w=(r=w+a+65535)-65536*(a=Math.floor(r/65536)),v=(r=v+a+65535)-65536*(a=Math.floor(r/65536)),i=(r=(i+=a-1+37*(a-1))+(a=1)+65535)-65536*(a=Math.floor(r/65536)),s=(r=s+a+65535)-65536*(a=Math.floor(r/65536)),o=(r=o+a+65535)-65536*(a=Math.floor(r/65536)),c=(r=c+a+65535)-65536*(a=Math.floor(r/65536)),u=(r=u+a+65535)-65536*(a=Math.floor(r/65536)),l=(r=l+a+65535)-65536*(a=Math.floor(r/65536)),m=(r=m+a+65535)-65536*(a=Math.floor(r/65536)),d=(r=d+a+65535)-65536*(a=Math.floor(r/65536)),p=(r=p+a+65535)-65536*(a=Math.floor(r/65536)),h=(r=h+a+65535)-65536*(a=Math.floor(r/65536)),f=(r=f+a+65535)-65536*(a=Math.floor(r/65536)),y=(r=y+a+65535)-65536*(a=Math.floor(r/65536)),g=(r=g+a+65535)-65536*(a=Math.floor(r/65536)),N=(r=N+a+65535)-65536*(a=Math.floor(r/65536)),w=(r=w+a+65535)-65536*(a=Math.floor(r/65536)),v=(r=v+a+65535)-65536*(a=Math.floor(r/65536)),i+=a-1+37*(a-1),e[0]=i,e[1]=s,e[2]=o,e[3]=c,e[4]=u,e[5]=l,e[6]=m,e[7]=d,e[8]=p,e[9]=h,e[10]=f,e[11]=y,e[12]=g,e[13]=N,e[14]=w,e[15]=v}function G(e,t){$(e,t,t)}function V(e,n){var r,a=t();for(r=0;r<16;r++)a[r]=n[r];for(r=253;r>=0;r--)G(a,a),2!==r&&4!==r&&$(a,a,n);for(r=0;r<16;r++)e[r]=a[r]}function D(e,n){var r,a=t();for(r=0;r<16;r++)a[r]=n[r];for(r=250;r>=0;r--)G(a,a),1!==r&&$(a,a,n);for(r=0;r<16;r++)e[r]=a[r]}function L(e,n,r){var a,i,s=new Uint8Array(32),o=new Float64Array(80),u=t(),l=t(),m=t(),d=t(),p=t(),h=t();for(i=0;i<31;i++)s[i]=n[i];for(s[31]=127&n[31]|64,s[0]&=248,k(o,r),i=0;i<16;i++)l[i]=o[i],d[i]=u[i]=m[i]=0;for(u[0]=d[0]=1,i=254;i>=0;--i)M(u,l,a=s[i>>>3]>>>(7&i)&1),M(m,d,a),B(p,u,m),U(u,u,m),B(m,l,d),U(l,l,d),G(d,p),G(h,u),$(u,m,u),$(m,l,p),B(p,u,m),U(u,u,m),G(l,u),U(m,d,h),$(u,m,c),B(u,u,d),$(m,m,u),$(u,d,h),$(d,l,o),G(l,p),M(u,l,a),M(m,d,a);for(i=0;i<16;i++)o[i+16]=u[i],o[i+32]=m[i],o[i+48]=l[i],o[i+64]=d[i];var f=o.subarray(32),y=o.subarray(16);return V(f,f),$(y,y,f),q(e,y),0}function j(e,t){return L(e,t,i)}function F(e,t){return r(t,32),j(e,t)}function H(e,t,n){var r=new Uint8Array(32);return L(r,n,t),w(e,a,r,v)}S.prototype.blocks=function(e,t,n){for(var r,a,i,s,o,c,u,l,m,d,p,h,f,y,g,N,w,v,b,x=this.fin?0:2048,_=this.h[0],C=this.h[1],S=this.h[2],T=this.h[3],P=this.h[4],A=this.h[5],z=this.h[6],I=this.h[7],E=this.h[8],M=this.h[9],q=this.r[0],R=this.r[1],O=this.r[2],k=this.r[3],B=this.r[4],U=this.r[5],$=this.r[6],G=this.r[7],V=this.r[8],D=this.r[9];n>=16;)d=m=0,d+=(_+=8191&(r=255&e[t+0]|(255&e[t+1])<<8))*q,d+=(C+=8191&(r>>>13|(a=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*D),d+=(S+=8191&(a>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*V),d+=(T+=8191&(i>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*G),m=(d+=(P+=8191&(s>>>4|(o=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*$))>>>13,d&=8191,d+=(A+=o>>>1&8191)*(5*U),d+=(z+=8191&(o>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*B),d+=(I+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*k),d+=(E+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*O),p=m+=(d+=(M+=l>>>5|x)*(5*R))>>>13,p+=_*R,p+=C*q,p+=S*(5*D),p+=T*(5*V),m=(p+=P*(5*G))>>>13,p&=8191,p+=A*(5*$),p+=z*(5*U),p+=I*(5*B),p+=E*(5*k),m+=(p+=M*(5*O))>>>13,p&=8191,h=m,h+=_*O,h+=C*R,h+=S*q,h+=T*(5*D),m=(h+=P*(5*V))>>>13,h&=8191,h+=A*(5*G),h+=z*(5*$),h+=I*(5*U),h+=E*(5*B),f=m+=(h+=M*(5*k))>>>13,f+=_*k,f+=C*O,f+=S*R,f+=T*q,m=(f+=P*(5*D))>>>13,f&=8191,f+=A*(5*V),f+=z*(5*G),f+=I*(5*$),f+=E*(5*U),y=m+=(f+=M*(5*B))>>>13,y+=_*B,y+=C*k,y+=S*O,y+=T*R,m=(y+=P*q)>>>13,y&=8191,y+=A*(5*D),y+=z*(5*V),y+=I*(5*G),y+=E*(5*$),g=m+=(y+=M*(5*U))>>>13,g+=_*U,g+=C*B,g+=S*k,g+=T*O,m=(g+=P*R)>>>13,g&=8191,g+=A*q,g+=z*(5*D),g+=I*(5*V),g+=E*(5*G),N=m+=(g+=M*(5*$))>>>13,N+=_*$,N+=C*U,N+=S*B,N+=T*k,m=(N+=P*O)>>>13,N&=8191,N+=A*R,N+=z*q,N+=I*(5*D),N+=E*(5*V),w=m+=(N+=M*(5*G))>>>13,w+=_*G,w+=C*$,w+=S*U,w+=T*B,m=(w+=P*k)>>>13,w&=8191,w+=A*O,w+=z*R,w+=I*q,w+=E*(5*D),v=m+=(w+=M*(5*V))>>>13,v+=_*V,v+=C*G,v+=S*$,v+=T*U,m=(v+=P*B)>>>13,v&=8191,v+=A*k,v+=z*O,v+=I*R,v+=E*q,b=m+=(v+=M*(5*D))>>>13,b+=_*D,b+=C*V,b+=S*G,b+=T*$,m=(b+=P*U)>>>13,b&=8191,b+=A*B,b+=z*k,b+=I*O,b+=E*R,_=d=8191&(m=(m=((m+=(b+=M*q)>>>13)<<2)+m|0)+(d&=8191)|0),C=p+=m>>>=13,S=h&=8191,T=f&=8191,P=y&=8191,A=g&=8191,z=N&=8191,I=w&=8191,E=v&=8191,M=b&=8191,t+=16,n-=16;this.h[0]=_,this.h[1]=C,this.h[2]=S,this.h[3]=T,this.h[4]=P,this.h[5]=A,this.h[6]=z,this.h[7]=I,this.h[8]=E,this.h[9]=M},S.prototype.finish=function(e,t){var n,r,a,i,s=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,s[0]=this.h[0]+5,n=s[0]>>>13,s[0]&=8191,i=1;i<10;i++)s[i]=this.h[i]+n,n=s[i]>>>13,s[i]&=8191;for(s[9]-=8192,r=(1^n)-1,i=0;i<10;i++)s[i]&=r;for(r=~r,i=0;i<10;i++)this.h[i]=this.h[i]&r|s[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),a=this.h[0]+this.pad[0],this.h[0]=65535&a,i=1;i<8;i++)a=(this.h[i]+this.pad[i]|0)+(a>>>16)|0,this.h[i]=65535&a;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},S.prototype.update=function(e,t,n){var r,a;if(this.leftover){for((a=16-this.leftover)>n&&(a=n),r=0;r<a;r++)this.buffer[this.leftover+r]=e[t+r];if(n-=a,t+=a,this.leftover+=a,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(a=n-n%16,this.blocks(e,t,a),t+=a,n-=a),n){for(r=0;r<n;r++)this.buffer[this.leftover+r]=e[t+r];this.leftover+=n}};var J=A,W=z,K=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Y(e,t,n,r){for(var a,i,s,o,c,u,l,m,d,p,h,f,y,g,N,w,v,b,x,_,C,S,T,P,A,z,I=new Int32Array(16),E=new Int32Array(16),M=e[0],q=e[1],R=e[2],O=e[3],k=e[4],B=e[5],U=e[6],$=e[7],G=t[0],V=t[1],D=t[2],L=t[3],j=t[4],F=t[5],H=t[6],J=t[7],W=0;r>=128;){for(x=0;x<16;x++)_=8*x+W,I[x]=n[_+0]<<24|n[_+1]<<16|n[_+2]<<8|n[_+3],E[x]=n[_+4]<<24|n[_+5]<<16|n[_+6]<<8|n[_+7];for(x=0;x<80;x++)if(a=M,i=q,s=R,o=O,c=k,u=B,l=U,d=G,p=V,h=D,f=L,y=j,g=F,N=H,T=65535&(S=J),P=S>>>16,A=65535&(C=$),z=C>>>16,T+=65535&(S=(j>>>14|k<<18)^(j>>>18|k<<14)^(k>>>9|j<<23)),P+=S>>>16,A+=65535&(C=(k>>>14|j<<18)^(k>>>18|j<<14)^(j>>>9|k<<23)),z+=C>>>16,T+=65535&(S=j&F^~j&H),P+=S>>>16,A+=65535&(C=k&B^~k&U),z+=C>>>16,T+=65535&(S=K[2*x+1]),P+=S>>>16,A+=65535&(C=K[2*x]),z+=C>>>16,C=I[x%16],P+=(S=E[x%16])>>>16,A+=65535&C,z+=C>>>16,A+=(P+=(T+=65535&S)>>>16)>>>16,T=65535&(S=b=65535&T|P<<16),P=S>>>16,A=65535&(C=v=65535&A|(z+=A>>>16)<<16),z=C>>>16,T+=65535&(S=(G>>>28|M<<4)^(M>>>2|G<<30)^(M>>>7|G<<25)),P+=S>>>16,A+=65535&(C=(M>>>28|G<<4)^(G>>>2|M<<30)^(G>>>7|M<<25)),z+=C>>>16,P+=(S=G&V^G&D^V&D)>>>16,A+=65535&(C=M&q^M&R^q&R),z+=C>>>16,m=65535&(A+=(P+=(T+=65535&S)>>>16)>>>16)|(z+=A>>>16)<<16,w=65535&T|P<<16,T=65535&(S=f),P=S>>>16,A=65535&(C=o),z=C>>>16,P+=(S=b)>>>16,A+=65535&(C=v),z+=C>>>16,q=a,R=i,O=s,k=o=65535&(A+=(P+=(T+=65535&S)>>>16)>>>16)|(z+=A>>>16)<<16,B=c,U=u,$=l,M=m,V=d,D=p,L=h,j=f=65535&T|P<<16,F=y,H=g,J=N,G=w,x%16==15)for(_=0;_<16;_++)C=I[_],T=65535&(S=E[_]),P=S>>>16,A=65535&C,z=C>>>16,C=I[(_+9)%16],T+=65535&(S=E[(_+9)%16]),P+=S>>>16,A+=65535&C,z+=C>>>16,v=I[(_+1)%16],T+=65535&(S=((b=E[(_+1)%16])>>>1|v<<31)^(b>>>8|v<<24)^(b>>>7|v<<25)),P+=S>>>16,A+=65535&(C=(v>>>1|b<<31)^(v>>>8|b<<24)^v>>>7),z+=C>>>16,v=I[(_+14)%16],P+=(S=((b=E[(_+14)%16])>>>19|v<<13)^(v>>>29|b<<3)^(b>>>6|v<<26))>>>16,A+=65535&(C=(v>>>19|b<<13)^(b>>>29|v<<3)^v>>>6),z+=C>>>16,z+=(A+=(P+=(T+=65535&S)>>>16)>>>16)>>>16,I[_]=65535&A|z<<16,E[_]=65535&T|P<<16;T=65535&(S=G),P=S>>>16,A=65535&(C=M),z=C>>>16,C=e[0],P+=(S=t[0])>>>16,A+=65535&C,z+=C>>>16,z+=(A+=(P+=(T+=65535&S)>>>16)>>>16)>>>16,e[0]=M=65535&A|z<<16,t[0]=G=65535&T|P<<16,T=65535&(S=V),P=S>>>16,A=65535&(C=q),z=C>>>16,C=e[1],P+=(S=t[1])>>>16,A+=65535&C,z+=C>>>16,z+=(A+=(P+=(T+=65535&S)>>>16)>>>16)>>>16,e[1]=q=65535&A|z<<16,t[1]=V=65535&T|P<<16,T=65535&(S=D),P=S>>>16,A=65535&(C=R),z=C>>>16,C=e[2],P+=(S=t[2])>>>16,A+=65535&C,z+=C>>>16,z+=(A+=(P+=(T+=65535&S)>>>16)>>>16)>>>16,e[2]=R=65535&A|z<<16,t[2]=D=65535&T|P<<16,T=65535&(S=L),P=S>>>16,A=65535&(C=O),z=C>>>16,C=e[3],P+=(S=t[3])>>>16,A+=65535&C,z+=C>>>16,z+=(A+=(P+=(T+=65535&S)>>>16)>>>16)>>>16,e[3]=O=65535&A|z<<16,t[3]=L=65535&T|P<<16,T=65535&(S=j),P=S>>>16,A=65535&(C=k),z=C>>>16,C=e[4],P+=(S=t[4])>>>16,A+=65535&C,z+=C>>>16,z+=(A+=(P+=(T+=65535&S)>>>16)>>>16)>>>16,e[4]=k=65535&A|z<<16,t[4]=j=65535&T|P<<16,T=65535&(S=F),P=S>>>16,A=65535&(C=B),z=C>>>16,C=e[5],P+=(S=t[5])>>>16,A+=65535&C,z+=C>>>16,z+=(A+=(P+=(T+=65535&S)>>>16)>>>16)>>>16,e[5]=B=65535&A|z<<16,t[5]=F=65535&T|P<<16,T=65535&(S=H),P=S>>>16,A=65535&(C=U),z=C>>>16,C=e[6],P+=(S=t[6])>>>16,A+=65535&C,z+=C>>>16,z+=(A+=(P+=(T+=65535&S)>>>16)>>>16)>>>16,e[6]=U=65535&A|z<<16,t[6]=H=65535&T|P<<16,T=65535&(S=J),P=S>>>16,A=65535&(C=$),z=C>>>16,C=e[7],P+=(S=t[7])>>>16,A+=65535&C,z+=C>>>16,z+=(A+=(P+=(T+=65535&S)>>>16)>>>16)>>>16,e[7]=$=65535&A|z<<16,t[7]=J=65535&T|P<<16,W+=128,r-=128}return r}function Q(e,t,n){var r,a=new Int32Array(8),i=new Int32Array(8),s=new Uint8Array(256),o=n;for(a[0]=1779033703,a[1]=3144134277,a[2]=1013904242,a[3]=2773480762,a[4]=1359893119,a[5]=2600822924,a[6]=528734635,a[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,Y(a,i,t,n),n%=128,r=0;r<n;r++)s[r]=t[o-n+r];for(s[n]=128,s[(n=256-128*(n<112?1:0))-9]=0,h(s,n-8,o/536870912|0,o<<3),Y(a,i,s,n),r=0;r<8;r++)h(e,8*r,a[r],i[r]);return 0}function X(e,n){var r=t(),a=t(),i=t(),s=t(),o=t(),c=t(),u=t(),m=t(),d=t();U(r,e[1],e[0]),U(d,n[1],n[0]),$(r,r,d),B(a,e[0],e[1]),B(d,n[0],n[1]),$(a,a,d),$(i,e[3],n[3]),$(i,i,l),$(s,e[2],n[2]),B(s,s,s),U(o,a,r),U(c,s,i),B(u,s,i),B(m,a,r),$(e[0],o,c),$(e[1],m,u),$(e[2],u,c),$(e[3],o,m)}function Z(e,t,n){var r;for(r=0;r<4;r++)M(e[r],t[r],n)}function ee(e,n){var r=t(),a=t(),i=t();V(i,n[2]),$(r,n[0],i),$(a,n[1],i),q(e,a),e[31]^=O(r)<<7}function te(e,t,n){var r,a;for(I(e[0],s),I(e[1],o),I(e[2],o),I(e[3],s),a=255;a>=0;--a)Z(e,t,r=n[a/8|0]>>(7&a)&1),X(t,e),X(e,e),Z(e,t,r)}function ne(e,n){var r=[t(),t(),t(),t()];I(r[0],m),I(r[1],d),I(r[2],o),$(r[3],m,d),te(e,r,n)}function re(e,n,a){var i,s=new Uint8Array(64),o=[t(),t(),t(),t()];for(a||r(n,32),Q(s,n,32),s[0]&=248,s[31]&=127,s[31]|=64,ne(o,s),ee(e,o),i=0;i<32;i++)n[i+32]=e[i];return 0}var ae=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ie(e,t){var n,r,a,i;for(r=63;r>=32;--r){for(n=0,a=r-32,i=r-12;a<i;++a)t[a]+=n-16*t[r]*ae[a-(r-32)],n=Math.floor((t[a]+128)/256),t[a]-=256*n;t[a]+=n,t[r]=0}for(n=0,a=0;a<32;a++)t[a]+=n-(t[31]>>4)*ae[a],n=t[a]>>8,t[a]&=255;for(a=0;a<32;a++)t[a]-=n*ae[a];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function se(e){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=e[t];for(t=0;t<64;t++)e[t]=0;ie(e,n)}function oe(e,n,r,a){var i,s,o=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),m=[t(),t(),t(),t()];Q(o,a,32),o[0]&=248,o[31]&=127,o[31]|=64;var d=r+64;for(i=0;i<r;i++)e[64+i]=n[i];for(i=0;i<32;i++)e[32+i]=o[32+i];for(Q(u,e.subarray(32),r+32),se(u),ne(m,u),ee(e,m),i=32;i<64;i++)e[i]=a[i];for(Q(c,e,r+64),se(c),i=0;i<64;i++)l[i]=0;for(i=0;i<32;i++)l[i]=u[i];for(i=0;i<32;i++)for(s=0;s<32;s++)l[i+s]+=c[i]*o[s];return ie(e.subarray(32),l),d}function ce(e,n,r,a){var i,c=new Uint8Array(32),l=new Uint8Array(64),m=[t(),t(),t(),t()],d=[t(),t(),t(),t()];if(r<64)return-1;if(function(e,n){var r=t(),a=t(),i=t(),c=t(),l=t(),m=t(),d=t();return I(e[2],o),k(e[1],n),G(i,e[1]),$(c,i,u),U(i,i,e[2]),B(c,e[2],c),G(l,c),G(m,l),$(d,m,l),$(r,d,i),$(r,r,c),D(r,r),$(r,r,i),$(r,r,c),$(r,r,c),$(e[0],r,c),G(a,e[0]),$(a,a,c),R(a,i)&&$(e[0],e[0],p),G(a,e[0]),$(a,a,c),R(a,i)?-1:(O(e[0])===n[31]>>7&&U(e[0],s,e[0]),$(e[3],e[0],e[1]),0)}(d,a))return-1;for(i=0;i<r;i++)e[i]=n[i];for(i=0;i<32;i++)e[i+32]=a[i];if(Q(l,e,r),se(l),te(m,d,l),ne(d,n.subarray(32)),X(m,d),ee(c,m),r-=64,g(n,0,c,0)){for(i=0;i<r;i++)e[i]=0;return-1}for(i=0;i<r;i++)e[i]=n[i+64];return r}var ue=64,le=32,me=64;function de(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function pe(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function he(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:w,crypto_stream_xor:C,crypto_stream:_,crypto_stream_salsa20_xor:b,crypto_stream_salsa20:x,crypto_onetimeauth:T,crypto_onetimeauth_verify:P,crypto_verify_16:y,crypto_verify_32:g,crypto_secretbox:A,crypto_secretbox_open:z,crypto_scalarmult:L,crypto_scalarmult_base:j,crypto_box_beforenm:H,crypto_box_afternm:J,crypto_box:function(e,t,n,r,a,i){var s=new Uint8Array(32);return H(s,a,i),J(e,t,n,r,s)},crypto_box_open:function(e,t,n,r,a,i){var s=new Uint8Array(32);return H(s,a,i),W(e,t,n,r,s)},crypto_box_keypair:F,crypto_hash:Q,crypto_sign:oe,crypto_sign_keypair:re,crypto_sign_open:ce,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ue,crypto_sign_PUBLICKEYBYTES:le,crypto_sign_SECRETKEYBYTES:me,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:u,L:ae,pack25519:q,unpack25519:k,M:$,A:B,S:G,Z:U,pow2523:D,add:X,set25519:I,modL:ie,scalarmult:te,scalarbase:ne},e.randomBytes=function(e){var t=new Uint8Array(e);return r(t,e),t},e.secretbox=function(e,t,n){pe(e,t,n),de(n,t);for(var r=new Uint8Array(32+e.length),a=new Uint8Array(r.length),i=0;i<e.length;i++)r[i+32]=e[i];return A(a,r,r.length,t,n),a.subarray(16)},e.secretbox.open=function(e,t,n){pe(e,t,n),de(n,t);for(var r=new Uint8Array(16+e.length),a=new Uint8Array(r.length),i=0;i<e.length;i++)r[i+16]=e[i];return r.length<32||0!==z(a,r,r.length,t,n)?null:a.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(pe(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var n=new Uint8Array(32);return L(n,e,t),n},e.scalarMult.base=function(e){if(pe(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return j(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,n,r,a){var i=e.box.before(r,a);return e.secretbox(t,n,i)},e.box.before=function(e,t){pe(e,t),function(e,t){if(32!==e.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(e,t);var n=new Uint8Array(32);return H(n,e,t),n},e.box.after=e.secretbox,e.box.open=function(t,n,r,a){var i=e.box.before(r,a);return e.secretbox.open(t,n,i)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return F(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(pe(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return j(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=32,e.box.secretKeyLength=32,e.box.sharedKeyLength=32,e.box.nonceLength=24,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(pe(e,t),t.length!==me)throw new Error("bad secret key size");var n=new Uint8Array(ue+e.length);return oe(n,e,e.length,t),n},e.sign.open=function(e,t){if(pe(e,t),t.length!==le)throw new Error("bad public key size");var n=new Uint8Array(e.length),r=ce(n,e,e.length,t);if(r<0)return null;for(var a=new Uint8Array(r),i=0;i<a.length;i++)a[i]=n[i];return a},e.sign.detached=function(t,n){for(var r=e.sign(t,n),a=new Uint8Array(ue),i=0;i<a.length;i++)a[i]=r[i];return a},e.sign.detached.verify=function(e,t,n){if(pe(e,t,n),t.length!==ue)throw new Error("bad signature size");if(n.length!==le)throw new Error("bad public key size");var r,a=new Uint8Array(ue+e.length),i=new Uint8Array(ue+e.length);for(r=0;r<ue;r++)a[r]=t[r];for(r=0;r<e.length;r++)a[r+ue]=e[r];return ce(i,a,a.length,n)>=0},e.sign.keyPair=function(){var e=new Uint8Array(le),t=new Uint8Array(me);return re(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(pe(e),e.length!==me)throw new Error("bad secret key size");for(var t=new Uint8Array(le),n=0;n<t.length;n++)t[n]=e[32+n];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(pe(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(le),n=new Uint8Array(me),r=0;r<32;r++)n[r]=e[r];return re(t,n,!0),{publicKey:t,secretKey:n}},e.sign.publicKeyLength=le,e.sign.secretKeyLength=me,e.sign.seedLength=32,e.sign.signatureLength=ue,e.hash=function(e){pe(e);var t=new Uint8Array(64);return Q(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return pe(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===f(e,0,t,0,e.length)},e.setPRNG=function(e){r=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;t&&t.getRandomValues?e.setPRNG((function(e,n){var r,a=new Uint8Array(n);for(r=0;r<n;r+=65536)t.getRandomValues(a.subarray(r,r+Math.min(n-r,65536)));for(r=0;r<n;r++)e[r]=a[r];he(a)})):(t=n(1281))&&t.randomBytes&&e.setPRNG((function(e,n){var r,a=t.randomBytes(n);for(r=0;r<n;r++)e[r]=a[r];he(a)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},9003:function(e){"use strict";e.exports={version:"1.0.35"}},9192:function(e,t,n){"use strict";var r=n(1871),a=n(6285),i=n(4239),s=n(43);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return i(n),s(r),a(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},9197:function(e,t,n){"use strict";for(var r=n(5816),a=n(5582),i=n(1907),s=n(5594),o=n(6264),c=a("Symbol"),u=c.isWellKnownSymbol,l=a("Object","getOwnPropertyNames"),m=i(c.prototype.valueOf),d=r("wks"),p=0,h=l(c),f=h.length;p<f;p++)try{var y=h[p];s(c[y])&&o(y)}catch(e){}e.exports=function(e){if(u&&u(e))return!0;try{for(var t=m(e),n=0,r=l(d),a=r.length;n<a;n++)if(d[r[n]]==t)return!0}catch(e){}return!1}},9234:function(e,t,n){!function(t,r){"use strict";e.exports?e.exports=r(n(8947)):t.nacl.auth=r(t.nacl)}(this,(function(e){"use strict";if(!e)throw new Error("tweetnacl not loaded");var t=128;function n(n,r){var a,i,s=new Uint8Array(t+Math.max(64,n.length));for(r.length>t&&(r=e.hash(r)),a=0;a<t;a++)s[a]=54;for(a=0;a<r.length;a++)s[a]^=r[a];for(s.set(n,t),i=e.hash(s.subarray(0,t+n.length)),a=0;a<t;a++)s[a]=92;for(a=0;a<r.length;a++)s[a]^=r[a];return s.set(i,t),e.hash(s.subarray(0,t+i.length))}function r(e,t){var r=new Uint8Array(32);return r.set(n(e,t).subarray(0,32)),r}return r.full=function(e,t){return n(e,t)},r.authLength=32,r.authFullLength=64,r.keyLength=32,r}))},9251:function(e,t,n){"use strict";var r=n(4284);e.exports=function(e,t,n){return r.f(e,t,n)}},9280:function(e,t,n){"use strict";var r=n(5663);e.exports=r},9287:function(e){"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},9298:function(e,t,n){"use strict";var r=n(4239),a=Object;e.exports=function(e){return a(r(e))}},9363:function(e,t,n){"use strict";var r=n(7374),a=n(2156),i=n(3742),s=n(4932),o=n(4284).f,c=n(183),u=n(9550),l=n(7376),m=n(9447),d="Array Iterator",p=s.set,h=s.getterFor(d);e.exports=c(Array,"Array",(function(e,t){p(this,{type:d,target:r(e),index:0,kind:t})}),(function(){var e=h(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,u(void 0,!0);switch(e.kind){case"keys":return u(n,!1);case"values":return u(t[n],!1)}return u([n,t[n]],!1)}),"values");var f=i.Arguments=i.Array;if(a("keys"),a("values"),a("entries"),!l&&m&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}},9367:function(e,t,n){"use strict";var r=n(2159),a=n(7136);e.exports=function(e,t){var n=e[t];return a(n)?void 0:r(n)}},9447:function(e,t,n){"use strict";var r=n(8828);e.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},9550:function(e){"use strict";e.exports=function(e,t){return{value:e,done:t}}},9552:function(e,t,n){"use strict";var r=n(5951),a=n(6285),i=r.document,s=a(i)&&a(i.createElement);e.exports=function(e){return s?i.createElement(e):{}}},9671:function(e,t,n){"use strict";n(366)("patternMatch")},9692:function(e,t,n){"use strict";var r=n(7045);e.exports=r},9721:function(e,t,n){"use strict";var r=n(1091),a=n(5582),i=n(6024),s=n(3930),o=n(1907),c=n(8828),u=n(2250),l=n(5594),m=n(3427),d=n(6656),p=n(9846),h=String,f=a("JSON","stringify"),y=o(/./.exec),g=o("".charAt),N=o("".charCodeAt),w=o("".replace),v=o(1..toString),b=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,_=/^[\uDC00-\uDFFF]$/,C=!p||c((function(){var e=a("Symbol")("stringify detection");return"[null]"!==f([e])||"{}"!==f({a:e})||"{}"!==f(Object(e))})),S=c((function(){return'"\\udf06\\ud834"'!==f("\udf06\ud834")||'"\\udead"'!==f("\udead")})),T=function(e,t){var n=m(arguments),r=d(t);if(u(r)||void 0!==e&&!l(e))return n[1]=function(e,t){if(u(r)&&(t=s(r,this,h(e),t)),!l(t))return t},i(f,null,n)},P=function(e,t,n){var r=g(n,t-1),a=g(n,t+1);return y(x,e)&&!y(_,a)||y(_,e)&&!y(x,r)?"\\u"+v(N(e,0),16):e};f&&r({target:"JSON",stat:!0,arity:3,forced:C||S},{stringify:function(e,t,n){var r=m(arguments),a=i(C?T:f,null,r);return S&&"string"==typeof a?w(a,b,P):a}})},9724:function(e,t,n){"use strict";var r=n(1907),a=n(9298),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(a(e),t)}},9840:function(e,t,n){e.exports=n(9003).version},9846:function(e,t,n){"use strict";var r=n(798),a=n(8828),i=n(5951).String;e.exports=!!Object.getOwnPropertySymbols&&!a((function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return function(){"use strict";n.r(r),n.d(r,{AE_AMOUNT_FORMATS:function(){return Ze},AbiVersion:function(){return Qr},AccountBase:function(){return vl},AccountError:function(){return R},AccountGeneralized:function(){return Zy},AccountLedger:function(){return ng},AccountLedgerFactory:function(){return lg},AccountMemory:function(){return dp},AccountMetamask:function(){return yg},AccountMetamaskFactory:function(){return Pg},AccountMnemonicFactory:function(){return Jy},AeSdk:function(){return kh},AeSdkAepp:function(){return yf},AeSdkBase:function(){return Oh},AeSdkMethods:function(){return Mh},AeSdkWallet:function(){return Df},AensError:function(){return O},AensPointerContextError:function(){return oe},AeppError:function(){return k},AlreadyConnectedError:function(){return Ye},AmbiguousEventDefinitionError:function(){return qe},ArgumentCountMismatchError:function(){return H},ArgumentError:function(){return j},BaseError:function(){return q},BrowserRuntimeConnection:function(){return xT},BrowserWindowMessageConnection:function(){return yT},BytecodeMismatchError:function(){return xe},CallReturnType:function(){return Ii},Channel:function(){return lw},ChannelCallError:function(){return fe},ChannelConnectionError:function(){return ye},ChannelError:function(){return B},ChannelIncomingMessageError:function(){return we},ChannelPingTimedOutError:function(){return ge},CompilerBase:function(){return Eg},CompilerError:function(){return U},CompilerHttp:function(){return SN},ConsensusProtocolVersion:function(){return Kr},Contract:function(){return sh},ContractError:function(){return $},CryptographyError:function(){return G},DRY_RUN_ACCOUNT:function(){return Vr},DecodeError:function(){return Ve},DelegationTag:function(){return Mp},DryRunError:function(){return Le},DuplicateContractError:function(){return _e},DuplicateNodeError:function(){return $e},Encoded:function(){return e},Encoding:function(){return cr},EntryTag:function(){return Ei},IllegalArgumentError:function(){return F},IllegalBidFeeError:function(){return je},InactiveContractError:function(){return Ce},InsufficientBalanceError:function(){return J},InsufficientNameFeeError:function(){return ce},InternalError:function(){return ae},InvalidAensNameError:function(){return ue},InvalidAuthDataError:function(){return be},InvalidChecksumError:function(){return Re},InvalidMethodInvocationError:function(){return Se},InvalidRpcMessageError:function(){return le},InvalidSignatureError:function(){return Fe},InvalidTxError:function(){return vp},LogicError:function(){return re},MAX_AUTH_FUN_GAS:function(){return Dr},MESSAGE_DIRECTION:function(){return Bh},METHODS:function(){return Gh},MIN_GAS_PRICE:function(){return Lr},MemoryAccount:function(){return dp},MerkleTreeHashMismatchError:function(){return Oe},Middleware:function(){return sT},MiddlewarePageMissed:function(){return rT},MiddlewareSubscriber:function(){return Tw},MiddlewareSubscriberDisconnected:function(){return bw},MiddlewareSubscriberError:function(){return vw},MissingCallbackError:function(){return me},MissingContractAddressError:function(){return Te},MissingContractDefError:function(){return Pe},MissingEventDefinitionError:function(){return Me},MissingFunctionNameError:function(){return Ae},MissingNodeInTreeError:function(){return ke},MissingParamError:function(){return W},NAME_BID_RANGES:function(){return Wr},NAME_BID_TIMEOUT_BLOCKS:function(){return Hr},NAME_FEE_BID_INCREMENT:function(){return Fr},NAME_FEE_MULTIPLIER:function(){return jr},NAME_MAX_LENGTH_FEE:function(){return Jr},Name:function(){return Dp},NoSerializerFoundError:function(){return K},NoSuchContractFunctionError:function(){return Ie},NoWalletConnectedError:function(){return Qe},Node:function(){return Nl},NodeError:function(){return V},NodeInvocationError:function(){return ze},NodeNotFoundError:function(){return Ge},NotImplementedError:function(){return te},NotPayableFunctionError:function(){return Ee},ORACLE_TTL_TYPES:function(){return Mi},Oracle:function(){return ph},OracleClient:function(){return hh},PayloadLengthError:function(){return De},PrefixNotFoundError:function(){return He},RPC_STATUS:function(){return Vh},RequestTimedOutError:function(){return Y},RpcConnectionDenyError:function(){return Jh},RpcConnectionError:function(){return Xe},RpcError:function(){return Lh},RpcInternalError:function(){return Yh},RpcInvalidTransactionError:function(){return jh},RpcMethodNotFoundError:function(){return Xh},RpcNoNetworkById:function(){return Qh},RpcNotAuthorizeError:function(){return Wh},RpcPermissionDenyError:function(){return Kh},RpcRejectedByUserError:function(){return Fh},RpcUnsupportedProtocolError:function(){return Hh},SUBSCRIPTION_TYPES:function(){return $h},SchemaNotFoundError:function(){return Je},Tag:function(){return Xr},TagNotFoundError:function(){return We},TransactionError:function(){return D},TxNotInChainError:function(){return Ke},TxTimedOutError:function(){return Q},TypeError:function(){return X},UnAuthorizedAccountError:function(){return de},UnavailableAccountError:function(){return se},UnexpectedChannelMessageError:function(){return Ne},UnexpectedTsError:function(){return ie},UnknownChannelStateError:function(){return ve},UnknownNodeLengthError:function(){return Be},UnknownPathNibbleError:function(){return Ue},UnknownRpcClientError:function(){return pe},UnsubscribedAccountError:function(){return he},UnsupportedPlatformError:function(){return Z},UnsupportedProtocolError:function(){return ee},UnsupportedVersionError:function(){return ne},VmVersion:function(){return Yr},WALLET_TYPE:function(){return Uh},WalletConnectorFrame:function(){return Mf},WalletConnectorFrameWithNode:function(){return kf},WalletError:function(){return L},_getPollInterval:function(){return fa},awaitHeight:function(){return wa},buildAuthTxHash:function(){return vh},buildAuthTxHashByGaMetaTx:function(){return bh},buildContractId:function(){return ea},buildContractIdByContractTx:function(){return Es},buildTx:function(){return Ps},buildTxAsync:function(){return As},buildTxHash:function(){return Is},commitmentHash:function(){return ia},computeAuctionEndBlock:function(){return pa},computeBidFee:function(){return da},connectionProxy:function(){return oT},createGeneralizedAccount:function(){return wh},decode:function(){return Cr},encode:function(){return Sr},encodeContractAddress:function(){return ea},encodeUnsigned:function(){return Er},ensureEncoded:function(){return Ar},ensureJwt:function(){return Ip},ensureName:function(){return oa},formatAmount:function(){return tt},genSalt:function(){return Ir},getAccount:function(){return ba},getBalance:function(){return xa},getContract:function(){return Ma},getContractByteCode:function(){return Ea},getCurrentGeneration:function(){return _a},getDefaultPointerKey:function(){return la},getExecutionCost:function(){return pp},getExecutionCostBySignedTx:function(){return hp},getExecutionCostUsingNode:function(){return fp},getGeneration:function(){return Ca},getHeight:function(){return ga},getKeyBlock:function(){return Ta},getMicroBlockHeader:function(){return Pa},getMicroBlockTransactions:function(){return Sa},getMinimumNameFee:function(){return ma},getName:function(){return qa},getTransactionSignerAddress:function(){return wl},hash:function(){return Mr},hashDomain:function(){return sp},hashJson:function(){return ip},hashMessage:function(){return Br},hashTypedData:function(){return op},isAddressValid:function(){return Pr},isAuctionName:function(){return ha},isEncoded:function(){return zr},isJwt:function(){return zp},isName:function(){return ca},isNameValid:function(){return ca},messageToHash:function(){return Br},oracleQueryId:function(){return ta},packDelegation:function(){return Bp},packEntry:function(){return Cs},payForTransaction:function(){return gh},poll:function(){return Na},prefixedAmount:function(){return ot},produceNameId:function(){return aa},readInt:function(){return sa},resolveName:function(){return Ra},sendTransaction:function(){return bp},signJwt:function(){return Pp},spend:function(){return fh},toAe:function(){return nt},toAettos:function(){return rt},toBytes:function(){return Gr},transferFunds:function(){return yh},txDryRun:function(){return Ia},unpackDelegation:function(){return Up},unpackEntry:function(){return Ss},unpackJwt:function(){return Ap},unpackTx:function(){return zs},verify:function(){return qr},verifyJwt:function(){return Ep},verifyMessage:function(){return Ur},verifyMessageSignature:function(){return Ur},verifySignature:function(){return qr},verifyTransaction:function(){return wp},waitForTxConfirm:function(){return va},walletDetector:function(){return gT}});var e={};n.r(e),n.d(e,{Encoding:function(){return cr}});var t={};n.r(t),n.d(t,{_getPollInterval:function(){return fa},awaitHeight:function(){return wa},getAccount:function(){return ba},getBalance:function(){return xa},getContract:function(){return Ma},getContractByteCode:function(){return Ea},getCurrentGeneration:function(){return _a},getGeneration:function(){return Ca},getHeight:function(){return ga},getKeyBlock:function(){return Ta},getMicroBlockHeader:function(){return Pa},getMicroBlockTransactions:function(){return Sa},getName:function(){return qa},poll:function(){return Na},resolveName:function(){return Ra},txDryRun:function(){return Ia},waitForTxConfirm:function(){return va}});var a={};n.r(a),n.d(a,{Account:function(){return Po},AuctionEntry:function(){return Uo},ByteCode:function(){return Vo},Channel:function(){return $o},ChannelCloseMutualTx:function(){return Cc},ChannelCloseSoloTx:function(){return Sc},ChannelCreateTx:function(){return Tc},ChannelDepositTx:function(){return Pc},ChannelForceProgressTx:function(){return Ac},ChannelSetDelegatesTx:function(){return zc},ChannelSettleTx:function(){return Ic},ChannelSlashTx:function(){return Ec},ChannelSnapshotSoloTx:function(){return Mc},ChannelWithdrawTx:function(){return qc},CheckTxInPoolResponse:function(){return Rc},CommitmentId:function(){return Oc},ContractCallObject:function(){return Xo},ContractCallTx:function(){return kc},ContractCreateTx:function(){return Bc},ContractObject:function(){return Go},CountResponse:function(){return cc},CreateContractUnsignedTx:function(){return mu},Currency:function(){return Lo},Delegates:function(){return qo},DryRunAccount:function(){return Ho},DryRunCallContext:function(){return Ko},DryRunCallReq:function(){return Wo},DryRunInput:function(){return Fo},DryRunInputItem:function(){return Jo},DryRunResult:function(){return Qo},DryRunResults:function(){return Yo},EncodedTx:function(){return vc},ErrorModel:function(){return Ao},Event:function(){return Zo},GAAttachTx:function(){return $c},GAMetaTx:function(){return Gc},GAObject:function(){return _c},GasPricesItem:function(){return fc},Generation:function(){return ec},HCContractPubkeys:function(){return ac},HashResponse:function(){return ic},Header:function(){return nc},HeightResponse:function(){return sc},Image:function(){return jo},KeyBlock:function(){return tc},MicroBlockHeader:function(){return oc},NameClaimTx:function(){return Vc},NameEntry:function(){return uc},NameHash:function(){return Dc},NamePointer:function(){return Bo},NamePointerComplete:function(){return lc},NamePreclaimTx:function(){return Lc},NameRevokeTx:function(){return jc},NameTransferTx:function(){return Fc},NameUpdateTx:function(){return Hc},NextNonceResponse:function(){return zo},OffChainCallContract:function(){return su},OffChainDeposit:function(){return ou},OffChainNewContract:function(){return cu},OffChainTransfer:function(){return uu},OffChainUpdate:function(){return Ro},OffChainWithdrawal:function(){return lu},OracleExtendTx:function(){return Wc},OracleQueries:function(){return dc},OracleQuery:function(){return pc},OracleQueryTx:function(){return Kc},OracleRegisterTx:function(){return Yc},OracleRespondTx:function(){return Qc},PayingForTx:function(){return Xc},PeerConnections:function(){return Nc},PeerCount:function(){return Zc},PeerCountAvailable:function(){return tu},PeerCountConnected:function(){return eu},PeerDetails:function(){return Jc},PeerPubKey:function(){return hc},Peers:function(){return nu},PinningTx:function(){return rc},PoI:function(){return Do},PostTxResponse:function(){return bc},Protocol:function(){return gc},PubKey:function(){return ru},RegisteredOracle:function(){return mc},RelativeTTL:function(){return Oo},SignedTx:function(){return Eo},SignedTxs:function(){return Io},SpendTx:function(){return au},Status:function(){return yc},SyncStatus:function(){return wc},TokenSupply:function(){return iu},Ttl:function(){return ko},Tx:function(){return Mo},TxInfoObject:function(){return xc},UnsignedTx:function(){return Uc},discriminators:function(){return du}});var i={};n.r(i),n.d(i,{addChecksum:function(){return vd},decode:function(){return _d},encode:function(){return xd},getPayload:function(){return bd}});var s={};n.r(s),n.d(s,{decode:function(){return Sd},encode:function(){return Cd}});var o={};n.r(o),n.d(o,{payForTransaction:function(){return gh},spend:function(){return fh},transferFunds:function(){return yh}});var c={};n.r(c),n.d(c,{buildAuthTxHash:function(){return vh},buildAuthTxHashByGaMetaTx:function(){return bh},createGeneralizedAccount:function(){return wh}});var u={};n.r(u),n.d(u,{ApiVersion:function(){return Yg},ByteCodeInput:function(){return Hg},BytecodeCallResultInput:function(){return Ug},Calldata:function(){return Vg},CompileOpts:function(){return qg},CompileResult:function(){return kg},CompilerError:function(){return Rg},CompilerVersion:function(){return Kg},Contract:function(){return Mg},DecodeCalldataBytecode:function(){return Dg},DecodeCalldataSource:function(){return Fg},DecodedCalldata:function(){return Lg},DecodedCallresult:function(){return $g},ErrorModel:function(){return jg},ErrorPos:function(){return Og},FateAssembler:function(){return Jg},FunctionCallInput:function(){return Gg},SophiaBinaryData:function(){return Qg},SophiaCallResultInput:function(){return Bg},SophiaJsonData:function(){return Xg},ValidateByteCodeInput:function(){return Wg}});var l={};n.r(l),n.d(l,{appendSignature:function(){return VN},awaitingChannelCreateTx:function(){return WN},awaitingCompletion:function(){return jN},awaitingConnection:function(){return FN},awaitingLeave:function(){return ew},awaitingOnChainTx:function(){return KN},awaitingReconnection:function(){return JN},awaitingReestablish:function(){return HN},awaitingShutdownTx:function(){return ZN},channelClosed:function(){return tw},channelOpen:function(){return QN},handleUnexpectedMessage:function(){return LN},signAndNotify:function(){return DN}});var m={};n.r(m),n.d(m,{Activity:function(){return Nv},ActivityPayload:function(){return wv},Aex141Response:function(){return gb},Aex141TemplateTokensResponse:function(){return bb},Aex141TemplatesResponse:function(){return wb},Aex141TokenDetailResponse:function(){return _b},Aex141TokenResponse:function(){return Iv},Aex141TransferEvent:function(){return Sb},Aex9BalanceResponse:function(){return Mv},Aex9ContractBalanceResponse:function(){return Ib},Aex9Response:function(){return Pb},Aex9TransferEvent:function(){return s_},Aex9TransferResponse:function(){return o_},Auction:function(){return cx},AuctionLastBid:function(){return ux},AuctionLastBidTx:function(){return TC},Channel:function(){return Ob},ChannelCloseMutualTx:function(){return y_},ChannelCloseSoloTx:function(){return g_},ChannelCreateTx:function(){return d_},ChannelDepositTx:function(){return p_},ChannelForceProgressTx:function(){return f_},ChannelSetDelegatesTx:function(){return b_},ChannelSettleTx:function(){return w_},ChannelSlashTx:function(){return N_},ChannelSnapshotSoloTx:function(){return v_},ChannelWithdrawTx:function(){return h_},Components171VsjiSchemasNametxPropertiesTxAllof1:function(){return hx},Components17W16A5SchemasAuctionPropertiesLastBidPropertiesTxAllof1:function(){return lx},Components1Viuqa3SchemasOracletxPropertiesTxAllof1:function(){return Ax},Contract:function(){return Gb},ContractCall:function(){return Bb},ContractCallTx:function(){return S_},ContractCreateTx:function(){return Vb},ContractLog:function(){return $b},Delegate:function(){return Xb},Delegates:function(){return bv},DeltaStat:function(){return Lx},DexSwap:function(){return Rv},DexSwapAmounts:function(){return Ov},EpochInfo:function(){return Fb},EpochInfoValidatorsItem:function(){return Hb},ErrorResponse:function(){return Av},GAAttachTx:function(){return T_},GAMetaTx:function(){return P_},Get200ApplicationJsonAllOfPropertiesItemsItem:function(){return qb},Get200ApplicationJsonProperties:function(){return jv},InternalContractCallEvent:function(){return c_},InternalTransferEvent:function(){return u_},KeyBlock:function(){return tx},KeyBlockExtended:function(){return PC},MicroBlockExtended:function(){return AC},MicroBlockHeader:function(){return rx},Miner:function(){return Jx},Name:function(){return ox},NameClaim:function(){return Bv},NameClaimEvent:function(){return l_},NameClaimTx:function(){return Uv},NameOwnership:function(){return mx},NamePointer:function(){return Sv},NamePreclaimTx:function(){return C_},NameRevokeTx:function(){return px},NameTransfer:function(){return wx},NameTransferTx:function(){return vx},NameTx:function(){return dx},NameTxTx:function(){return zC},NameUpdate:function(){return xx},NameUpdateTx:function(){return Dv},NotFoundResponse:function(){return $v},OffChainUpdate:function(){return xv},Oracle:function(){return Cx},OracleExtend:function(){return Ix},OracleExtendTx:function(){return Ex},OracleFormat:function(){return Sx},OracleQuery:function(){return qx},OracleQueryTx:function(){return x_},OracleRegisterTx:function(){return Px},OracleRespondTx:function(){return __},OracleResponse:function(){return Rx},OracleTx:function(){return Tx},OracleTxTx:function(){return IC},PaginatedResponse:function(){return Pv},Paths108B3VtV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchemaAllof1:function(){return Mb},Paths10Kk1UxV3ContractsLogsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Ub},Paths10R8Q7PV3AccountsAccountidDexSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return qv},Paths10Z6Jt8V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx:function(){return Qv},Paths1159W94V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchema:function(){return eC},Paths11Bqs5V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx:function(){return hb},Paths12S1Nd4V3NamesGetResponses200ContentApplicationJsonSchema:function(){return nC},Paths15Bkk50V3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchema:function(){return tC},Paths15F3FfuV3StatsTotalAccountsGetResponses200ContentApplicationJsonSchema:function(){return bC},Paths15K0AlgV3HyperchainValidatorsValidatorDelegatesTopGetResponses200ContentApplicationJsonSchema:function(){return X_},Paths15Mi2TaV3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchema:function(){return B_},Paths16Cyh9EV3AccountsAccountidNamesClaimsGetResponses200ContentApplicationJsonSchema:function(){return q_},Paths16G4GzrV3AccountsAccountidNamesClaimsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return kv},Paths17Dchb7V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx:function(){return ub},Paths181AjwxV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchema:function(){return k_},Paths181Cs9V3NamesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return sx},Paths18L84JcV3ContractsCallsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return kb},Paths194Lg3IV3HyperchainEpochsGetResponses200ContentApplicationJsonSchema:function(){return W_},Paths19IxhsmV3Aex9CountGetResponses200ContentApplicationJsonSchema:function(){return Ab},Paths1A27TirV3StatsBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Gx},Paths1A8Ah39V3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Cb},Paths1AeqodeV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx:function(){return Kv},Paths1D7Up0DV3StatsDifficultyGetResponses200ContentApplicationJsonSchema:function(){return yC},Paths1Di8FnjV3DexSwapsGetResponses200ContentApplicationJsonSchema:function(){return H_},Paths1E14NekV3OraclesGetResponses200ContentApplicationJsonSchema:function(){return oC},Paths1Ec8CltV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchema:function(){return sC},Paths1EfdbjrV3AccountsAccountidActivitiesGetResponses200ContentApplicationJsonSchema:function(){return z_},Paths1F8GzwrV3HyperchainEpochsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return jb},Paths1F98AqgV3NamesIdClaimsGetResponses200ContentApplicationJsonSchema:function(){return aC},Paths1Fl1Lh2V3StatsAex9TransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return $x},Paths1I4U8D5V3HyperchainValidatorsValidatorDelegatesGetResponses200ContentApplicationJsonSchema:function(){return Q_},Paths1Ibn686V3HyperchainValidatorsGetResponses200ContentApplicationJsonSchema:function(){return Y_},Paths1IfhshmV3StatsTransactionsGetResponses200ContentApplicationJsonSchema:function(){return xC},Paths1IskjkV3StatsHashrateGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Fx},Paths1J83O75V3StatsDeltaGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Dx},Paths1Jkl3L3V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx:function(){return Xv},Paths1K55ZdgV3StatsTotalGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Kx},Paths1L5C64RV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchema:function(){return cC},Paths1Mat0BzV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx:function(){return Hv},Paths1Mheci5V3AccountsAccountidNamesPointeesGetResponses200ContentApplicationJsonSchema:function(){return R_},Paths1N61UurV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchema:function(){return V_},Paths1N757S0V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx:function(){return pb},Paths1Ngkd7FV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx:function(){return lb},Paths1O7Q6IhV3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchema:function(){return $_},Paths1Pymq07V3TransactionsGetResponses200ContentApplicationJsonSchema:function(){return _C},Paths1Q9E32FV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return zv},Paths1Qg7SclV3HyperchainValidatorsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Kb},Paths1Qk8BkgV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx:function(){return rb},Paths1Qw6KhfV3StatsDifficultyGetResponses200ContentApplicationJsonSchemaAllof0:function(){return jx},Paths1R08F8HV3NamesAuctionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return fx},Paths1R4Z885V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx:function(){return ib},Paths1Raw8PV3NamesIdTransfersGetResponses200ContentApplicationJsonSchema:function(){return iC},Paths1S5Zlt1V3HyperchainScheduleGetResponses200ContentApplicationJsonSchema:function(){return K_},Paths1Smy8TV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx:function(){return Jv},Paths1Sxjoy0V3StatsBlocksGetResponses200ContentApplicationJsonSchema:function(){return pC},Paths1Tcj5A9V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Ox},Paths1TkisghV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return xb},Paths1Txblx8V3ContractsCallsGetResponses200ContentApplicationJsonSchema:function(){return j_},Paths1U2Ve7RV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx:function(){return db},Paths1Ukwk06V3NamesIdTransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Nx},Paths1Uni7AtV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Mx},Paths1Uqqby0V3Aex9GetResponses200ContentApplicationJsonSchemaAllof0:function(){return Tb},Paths1UxyhelV3StatsAex9TransfersGetResponses200ContentApplicationJsonSchema:function(){return dC},Paths1Uybd4PV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchema:function(){return D_},Paths1Vr3Y2EV3Aex9GetResponses200ContentApplicationJsonSchema:function(){return G_},Paths1XwlyjtV3Aex141GetResponses200ContentApplicationJsonSchema:function(){return O_},Paths277OngV3KeyBlocksGetResponses200ContentApplicationJsonSchema:function(){return Z_},Paths3Bfys0V3StatsTotalAccountsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Qx},Paths3EzhapV3ChannelsGetResponses200ContentApplicationJsonSchema:function(){return L_},Paths3Hsv3GV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchema:function(){return I_},Paths4Pjk8DV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx:function(){return fb},Paths50Qhc7V3StatsMinersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Hx},Paths5Ehb0PV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx:function(){return nb},Paths5Xf9ScV3StatsDeltaGetResponses200ContentApplicationJsonSchema:function(){return fC},Paths6PaqluV3StatsTransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Xx},Paths6Vze8ZV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Lb},Paths72Dp44V3StatsContractsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Vx},Paths7A1M6RV3ContractsLogsGetResponses200ContentApplicationJsonSchema:function(){return F_},Paths7Ks32NV3HyperchainValidatorsValidatorDelegatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Qb},Paths7W5O80V3HyperchainScheduleGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Jb},Paths8722JhV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchema:function(){return uC},Paths8I0YgwV3Aex141GetResponses200ContentApplicationJsonSchemaAllof0:function(){return yb},Paths9Yfxl2V3DexSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Db},PathsA60QxwV3AccountsAccountidNamesPointeesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Gv},PathsA7P0KiV3TransfersGetResponses200ContentApplicationJsonSchema:function(){return SC},PathsA8Q6T7V3StatsMinersGetResponses200ContentApplicationJsonSchema:function(){return NC},PathsBx0Ya3V3AccountsAccountidActivitiesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return gv},PathsC7WhtoV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx:function(){return ab},PathsCeyhpaV3StatsNamesGetResponses200ContentApplicationJsonSchema:function(){return wC},PathsCgzmimV3StatsActiveAccountsGetResponses200ContentApplicationJsonSchema:function(){return mC},PathsCrb9BgV3NamesAuctionsIdClaimsGetResponses200ContentApplicationJsonSchema:function(){return yx},PathsCsym65V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx:function(){return eb},PathsD92Xl6V3StatsNamesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Wx},PathsDwhnfdV3HyperchainValidatorsValidatorDelegatesTopGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Zb},PathsEeiffwV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return zb},PathsEue6HzV3KeyBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return ex},PathsEvgmfsV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx:function(){return Fv},PathsEwav40V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx:function(){return tb},PathsFso5IiV3StatsActiveAccountsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Bx},PathsGcr9MrV3OraclesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return _x},PathsGp6EyrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx:function(){return Yv},PathsHa9C78V3TransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return t_},PathsI72FylV3TransactionsPendingGetResponses200ContentApplicationJsonSchemaAllof0:function(){return n_},PathsJoz7P5V3StatsTotalGetResponses200ContentApplicationJsonSchema:function(){return vC},PathsKjq4D4V3NamesAuctionsGetResponses200ContentApplicationJsonSchema:function(){return rC},PathsKm52GqV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchema:function(){return E_},PathsKr825V3Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema:function(){return Eb},PathsKrpz02V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx:function(){return sb},PathsKwxlzlV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchema:function(){return J_},PathsMvqgifV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx:function(){return mb},PathsMyl4W2V3NamesIdClaimsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return gx},PathsN9Iv8YV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx:function(){return Zv},PathsNn60D7V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return nx},PathsPs07B4V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx:function(){return ob},PathsQmewnaV3ChannelsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Rb},PathsR51VshV3StatsHashrateGetResponses200ContentApplicationJsonSchema:function(){return gC},PathsRay4X0V3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return vb},PathsRcnvllV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return bx},PathsTachlnV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseMutualTx:function(){return Wv},PathsTug6HrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx:function(){return cb},PathsUq0T7JV3TransactionsPendingGetResponses200ContentApplicationJsonSchema:function(){return CC},PathsVdg67V3TransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return a_},PathsVron83V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchema:function(){return lC},PathsWbrhqnV3StatsContractsGetResponses200ContentApplicationJsonSchema:function(){return hC},PathsWkpcwaV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Nb},PathsWl652MV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchema:function(){return U_},PathsXcg812V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchema:function(){return Lv},PathsXhlqwrV3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return ax},PathsZ4L2QlV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return zx},PathsZ92TkfV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchemaAllof1:function(){return Ev},PathsZpy8S9V3AccountsAccountidDexSwapsGetResponses200ContentApplicationJsonSchema:function(){return M_},PayingForTx:function(){return A_},PendingTransaction:function(){return r_},Pointee:function(){return Vv},RelativeTTL:function(){return _v},Schedule:function(){return Wb},SignedTx:function(){return Tv},SpendTx:function(){return m_},Stat:function(){return Ux},Stats:function(){return kx},Status:function(){return Zx},StatusMdwAsyncTasks:function(){return e_},TotalStat:function(){return Yx},Transaction:function(){return ix},Transfer:function(){return i_},Ttl:function(){return Cv},Tx:function(){return vv},Validator:function(){return Yb},discriminators:function(){return EC}});var d=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,p=Math.ceil,h=Math.floor,f="[BigNumber Error] ",y=f+"Number primitive has more than 15 significant digits: ",g=1e14,N=14,w=9007199254740991,v=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],b=1e7,x=1e9;function _(e){var t=0|e;return e>0||e===t?t:t-1}function C(e){for(var t,n,r=1,a=e.length,i=e[0]+"";r<a;){for(t=e[r++]+"",n=N-t.length;n--;t="0"+t);i+=t}for(a=i.length;48===i.charCodeAt(--a););return i.slice(0,a+1||1)}function S(e,t){var n,r,a=e.c,i=t.c,s=e.s,o=t.s,c=e.e,u=t.e;if(!s||!o)return null;if(n=a&&!a[0],r=i&&!i[0],n||r)return n?r?0:-o:s;if(s!=o)return s;if(n=s<0,r=c==u,!a||!i)return r?0:!a^n?1:-1;if(!r)return c>u^n?1:-1;for(o=(c=a.length)<(u=i.length)?c:u,s=0;s<o;s++)if(a[s]!=i[s])return a[s]>i[s]^n?1:-1;return c==u?0:c>u^n?1:-1}function T(e,t,n,r){if(e<t||e>n||e!==h(e))throw Error(f+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function P(e){var t=e.c.length-1;return _(e.e/N)==t&&e.c[t]%2!=0}function A(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function z(e,t,n){var r,a;if(t<0){for(a=n+".";++t;a+=n);e=a+e}else if(++t>(r=e.length)){for(a=n,t-=r;--t;a+=n);e+=a}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var I=function e(t){var n,r,a,i,s,o,c,u,l,m,I=j.prototype={constructor:j,toString:null,valueOf:null},E=new j(1),M=20,q=4,R=-7,O=21,k=-1e7,B=1e7,U=!1,$=1,G=0,V={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},D="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;function j(e,t){var n,i,s,o,c,u,l,m,p=this;if(!(p instanceof j))return new j(e,t);if(null==t){if(e&&!0===e._isBigNumber)return p.s=e.s,void(!e.c||e.e>B?p.c=p.e=null:e.e<k?p.c=[p.e=0]:(p.e=e.e,p.c=e.c.slice()));if((u="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(o=0,c=e;c>=10;c/=10,o++);return void(o>B?p.c=p.e=null:(p.e=o,p.c=[e]))}m=String(e)}else{if(!d.test(m=String(e)))return a(p,m,u);p.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(o=m.indexOf("."))>-1&&(m=m.replace(".","")),(c=m.search(/e/i))>0?(o<0&&(o=c),o+=+m.slice(c+1),m=m.substring(0,c)):o<0&&(o=m.length)}else{if(T(t,2,D.length,"Base"),10==t&&L)return W(p=new j(e),M+p.e+1,q);if(m=String(e),u="number"==typeof e){if(0*e!=0)return a(p,m,u,t);if(p.s=1/e<0?(m=m.slice(1),-1):1,j.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(y+e)}else p.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(n=D.slice(0,t),o=c=0,l=m.length;c<l;c++)if(n.indexOf(i=m.charAt(c))<0){if("."==i){if(c>o){o=l;continue}}else if(!s&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){s=!0,c=-1,o=0;continue}return a(p,String(e),u,t)}u=!1,(o=(m=r(m,t,10,p.s)).indexOf("."))>-1?m=m.replace(".",""):o=m.length}for(c=0;48===m.charCodeAt(c);c++);for(l=m.length;48===m.charCodeAt(--l););if(m=m.slice(c,++l)){if(l-=c,u&&j.DEBUG&&l>15&&(e>w||e!==h(e)))throw Error(y+p.s*e);if((o=o-c-1)>B)p.c=p.e=null;else if(o<k)p.c=[p.e=0];else{if(p.e=o,p.c=[],c=(o+1)%N,o<0&&(c+=N),c<l){for(c&&p.c.push(+m.slice(0,c)),l-=N;c<l;)p.c.push(+m.slice(c,c+=N));c=N-(m=m.slice(c)).length}else c-=l;for(;c--;m+="0");p.c.push(+m)}}else p.c=[p.e=0]}function F(e,t,n,r){var a,i,s,o,c;if(null==n?n=q:T(n,0,8),!e.c)return e.toString();if(a=e.c[0],s=e.e,null==t)c=C(e.c),c=1==r||2==r&&(s<=R||s>=O)?A(c,s):z(c,s,"0");else if(i=(e=W(new j(e),t,n)).e,o=(c=C(e.c)).length,1==r||2==r&&(t<=i||i<=R)){for(;o<t;c+="0",o++);c=A(c,i)}else if(t-=s,c=z(c,i,"0"),i+1>o){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-o)>0)for(i+1==o&&(c+=".");t--;c+="0");return e.s<0&&a?"-"+c:c}function H(e,t){for(var n,r,a=1,i=new j(e[0]);a<e.length;a++)(!(r=new j(e[a])).s||(n=S(i,r))===t||0===n&&i.s===t)&&(i=r);return i}function J(e,t,n){for(var r=1,a=t.length;!t[--a];t.pop());for(a=t[0];a>=10;a/=10,r++);return(n=r+n*N-1)>B?e.c=e.e=null:n<k?e.c=[e.e=0]:(e.e=n,e.c=t),e}function W(e,t,n,r){var a,i,s,o,c,u,l,m=e.c,d=v;if(m){e:{for(a=1,o=m[0];o>=10;o/=10,a++);if((i=t-a)<0)i+=N,s=t,c=m[u=0],l=h(c/d[a-s-1]%10);else if((u=p((i+1)/N))>=m.length){if(!r)break e;for(;m.length<=u;m.push(0));c=l=0,a=1,s=(i%=N)-N+1}else{for(c=o=m[u],a=1;o>=10;o/=10,a++);l=(s=(i%=N)-N+a)<0?0:h(c/d[a-s-1]%10)}if(r=r||t<0||null!=m[u+1]||(s<0?c:c%d[a-s-1]),r=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(i>0?s>0?c/d[a-s]:0:m[u-1])%10&1||n==(e.s<0?8:7)),t<1||!m[0])return m.length=0,r?(t-=e.e+1,m[0]=d[(N-t%N)%N],e.e=-t||0):m[0]=e.e=0,e;if(0==i?(m.length=u,o=1,u--):(m.length=u+1,o=d[N-i],m[u]=s>0?h(c/d[a-s]%d[s])*o:0),r)for(;;){if(0==u){for(i=1,s=m[0];s>=10;s/=10,i++);for(s=m[0]+=o,o=1;s>=10;s/=10,o++);i!=o&&(e.e++,m[0]==g&&(m[0]=1));break}if(m[u]+=o,m[u]!=g)break;m[u--]=0,o=1}for(i=m.length;0===m[--i];m.pop());}e.e>B?e.c=e.e=null:e.e<k&&(e.c=[e.e=0])}return e}function K(e){var t,n=e.e;return null===n?e.toString():(t=C(e.c),t=n<=R||n>=O?A(t,n):z(t,n,"0"),e.s<0?"-"+t:t)}return j.clone=e,j.ROUND_UP=0,j.ROUND_DOWN=1,j.ROUND_CEIL=2,j.ROUND_FLOOR=3,j.ROUND_HALF_UP=4,j.ROUND_HALF_DOWN=5,j.ROUND_HALF_EVEN=6,j.ROUND_HALF_CEIL=7,j.ROUND_HALF_FLOOR=8,j.EUCLID=9,j.config=j.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(f+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(T(n=e[t],0,x,t),M=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(T(n=e[t],0,8,t),q=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(T(n[0],-x,0,t),T(n[1],0,x,t),R=n[0],O=n[1]):(T(n,-x,x,t),R=-(O=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)T(n[0],-x,-1,t),T(n[1],1,x,t),k=n[0],B=n[1];else{if(T(n,-x,x,t),!n)throw Error(f+t+" cannot be zero: "+n);k=-(B=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(f+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw U=!n,Error(f+"crypto unavailable");U=n}else U=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(T(n=e[t],0,9,t),$=n),e.hasOwnProperty(t="POW_PRECISION")&&(T(n=e[t],0,x,t),G=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(f+t+" not an object: "+n);V=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(f+t+" invalid: "+n);L="0123456789"==n.slice(0,10),D=n}}return{DECIMAL_PLACES:M,ROUNDING_MODE:q,EXPONENTIAL_AT:[R,O],RANGE:[k,B],CRYPTO:U,MODULO_MODE:$,POW_PRECISION:G,FORMAT:V,ALPHABET:D}},j.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!j.DEBUG)return!0;var t,n,r=e.c,a=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===i||-1===i)&&a>=-x&&a<=x&&a===h(a)){if(0===r[0]){if(0===a&&1===r.length)return!0;break e}if((t=(a+1)%N)<1&&(t+=N),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=g||n!==h(n))break e;if(0!==n)return!0}}}else if(null===r&&null===a&&(null===i||1===i||-1===i))return!0;throw Error(f+"Invalid BigNumber: "+e)},j.maximum=j.max=function(){return H(arguments,-1)},j.minimum=j.min=function(){return H(arguments,1)},j.random=(i=9007199254740992,s=Math.random()*i&2097151?function(){return h(Math.random()*i)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,a,i,o=0,c=[],u=new j(E);if(null==e?e=M:T(e,0,x),a=p(e/N),U)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));o<a;)(i=131072*t[o]+(t[o+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[o]=n[0],t[o+1]=n[1]):(c.push(i%1e14),o+=2);o=a/2}else{if(!crypto.randomBytes)throw U=!1,Error(f+"crypto unavailable");for(t=crypto.randomBytes(a*=7);o<a;)(i=281474976710656*(31&t[o])+1099511627776*t[o+1]+4294967296*t[o+2]+16777216*t[o+3]+(t[o+4]<<16)+(t[o+5]<<8)+t[o+6])>=9e15?crypto.randomBytes(7).copy(t,o):(c.push(i%1e14),o+=7);o=a/7}if(!U)for(;o<a;)(i=s())<9e15&&(c[o++]=i%1e14);for(a=c[--o],e%=N,a&&e&&(i=v[N-e],c[o]=h(a/i)*i);0===c[o];c.pop(),o--);if(o<0)c=[r=0];else{for(r=-1;0===c[0];c.splice(0,1),r-=N);for(o=1,i=c[0];i>=10;i/=10,o++);o<N&&(r-=N-o)}return u.e=r,u.c=c,u}),j.sum=function(){for(var e=1,t=arguments,n=new j(t[0]);e<t.length;)n=n.plus(t[e++]);return n},r=function(){var e="0123456789";function t(e,t,n,r){for(var a,i,s=[0],o=0,c=e.length;o<c;){for(i=s.length;i--;s[i]*=t);for(s[0]+=r.indexOf(e.charAt(o++)),a=0;a<s.length;a++)s[a]>n-1&&(null==s[a+1]&&(s[a+1]=0),s[a+1]+=s[a]/n|0,s[a]%=n)}return s.reverse()}return function(r,a,i,s,o){var c,u,l,m,d,p,h,f,y=r.indexOf("."),g=M,N=q;for(y>=0&&(m=G,G=0,r=r.replace(".",""),p=(f=new j(a)).pow(r.length-y),G=m,f.c=t(z(C(p.c),p.e,"0"),10,i,e),f.e=f.c.length),l=m=(h=t(r,a,i,o?(c=D,e):(c=e,D))).length;0==h[--m];h.pop());if(!h[0])return c.charAt(0);if(y<0?--l:(p.c=h,p.e=l,p.s=s,h=(p=n(p,f,g,N,i)).c,d=p.r,l=p.e),y=h[u=l+g+1],m=i/2,d=d||u<0||null!=h[u+1],d=N<4?(null!=y||d)&&(0==N||N==(p.s<0?3:2)):y>m||y==m&&(4==N||d||6==N&&1&h[u-1]||N==(p.s<0?8:7)),u<1||!h[0])r=d?z(c.charAt(1),-g,c.charAt(0)):c.charAt(0);else{if(h.length=u,d)for(--i;++h[--u]>i;)h[u]=0,u||(++l,h=[1].concat(h));for(m=h.length;!h[--m];);for(y=0,r="";y<=m;r+=c.charAt(h[y++]));r=z(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,a,i,s,o=0,c=e.length,u=t%b,l=t/b|0;for(e=e.slice();c--;)o=((a=u*(i=e[c]%b)+(r=l*i+(s=e[c]/b|0)*u)%b*b+o)/n|0)+(r/b|0)+l*s,e[c]=a%n;return o&&(e=[o].concat(e)),e}function t(e,t,n,r){var a,i;if(n!=r)i=n>r?1:-1;else for(a=i=0;a<n;a++)if(e[a]!=t[a]){i=e[a]>t[a]?1:-1;break}return i}function n(e,t,n,r){for(var a=0;n--;)e[n]-=a,a=e[n]<t[n]?1:0,e[n]=a*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,a,i,s,o){var c,u,l,m,d,p,f,y,w,v,b,x,C,S,T,P,A,z=r.s==a.s?1:-1,I=r.c,E=a.c;if(!(I&&I[0]&&E&&E[0]))return new j(r.s&&a.s&&(I?!E||I[0]!=E[0]:E)?I&&0==I[0]||!E?0*z:z/0:NaN);for(w=(y=new j(z)).c=[],z=i+(u=r.e-a.e)+1,o||(o=g,u=_(r.e/N)-_(a.e/N),z=z/N|0),l=0;E[l]==(I[l]||0);l++);if(E[l]>(I[l]||0)&&u--,z<0)w.push(1),m=!0;else{for(S=I.length,P=E.length,l=0,z+=2,(d=h(o/(E[0]+1)))>1&&(E=e(E,d,o),I=e(I,d,o),P=E.length,S=I.length),C=P,b=(v=I.slice(0,P)).length;b<P;v[b++]=0);A=E.slice(),A=[0].concat(A),T=E[0],E[1]>=o/2&&T++;do{if(d=0,(c=t(E,v,P,b))<0){if(x=v[0],P!=b&&(x=x*o+(v[1]||0)),(d=h(x/T))>1)for(d>=o&&(d=o-1),f=(p=e(E,d,o)).length,b=v.length;1==t(p,v,f,b);)d--,n(p,P<f?A:E,f,o),f=p.length,c=1;else 0==d&&(c=d=1),f=(p=E.slice()).length;if(f<b&&(p=[0].concat(p)),n(v,p,b,o),b=v.length,-1==c)for(;t(E,v,P,b)<1;)d++,n(v,P<b?A:E,b,o),b=v.length}else 0===c&&(d++,v=[0]);w[l++]=d,v[0]?v[b++]=I[C]||0:(v=[I[C]],b=1)}while((C++<S||null!=v[0])&&z--);m=null!=v[0],w[0]||w.splice(0,1)}if(o==g){for(l=1,z=w[0];z>=10;z/=10,l++);W(y,i+(y.e=l+u*N-1)+1,s,m)}else y.e=u,y.r=+m;return y}}(),o=/^(-?)0([xbo])(?=\w[\w.]*$)/i,c=/^([^.]+)\.$/,u=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,m=/^\s*\+(?=[\w.])|^\s+|\s+$/g,a=function(e,t,n,r){var a,i=n?t:t.replace(m,"");if(l.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!n&&(i=i.replace(o,(function(e,t,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=a?e:t})),r&&(a=r,i=i.replace(c,"$1").replace(u,"0.$1")),t!=i))return new j(i,a);if(j.DEBUG)throw Error(f+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},I.absoluteValue=I.abs=function(){var e=new j(this);return e.s<0&&(e.s=1),e},I.comparedTo=function(e,t){return S(this,new j(e,t))},I.decimalPlaces=I.dp=function(e,t){var n,r,a,i=this;if(null!=e)return T(e,0,x),null==t?t=q:T(t,0,8),W(new j(i),e+i.e+1,t);if(!(n=i.c))return null;if(r=((a=n.length-1)-_(this.e/N))*N,a=n[a])for(;a%10==0;a/=10,r--);return r<0&&(r=0),r},I.dividedBy=I.div=function(e,t){return n(this,new j(e,t),M,q)},I.dividedToIntegerBy=I.idiv=function(e,t){return n(this,new j(e,t),0,1)},I.exponentiatedBy=I.pow=function(e,t){var n,r,a,i,s,o,c,u,l=this;if((e=new j(e)).c&&!e.isInteger())throw Error(f+"Exponent not an integer: "+K(e));if(null!=t&&(t=new j(t)),s=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 j(Math.pow(+K(l),s?e.s*(2-P(e)):+K(e))),t?u.mod(t):u;if(o=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new j(NaN);(r=!o&&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||s&&l.c[1]>=24e7:l.c[0]<8e13||s&&l.c[0]<=9999975e7)))return i=l.s<0&&P(e)?-0:0,l.e>-1&&(i=1/i),new j(o?1/i:i);G&&(i=p(G/N+2))}for(s?(n=new j(.5),o&&(e.s=1),c=P(e)):c=(a=Math.abs(+K(e)))%2,u=new j(E);;){if(c){if(!(u=u.times(l)).c)break;i?u.c.length>i&&(u.c.length=i):r&&(u=u.mod(t))}if(a){if(0===(a=h(a/2)))break;c=a%2}else if(W(e=e.times(n),e.e+1,1),e.e>14)c=P(e);else{if(0==(a=+K(e)))break;c=a%2}l=l.times(l),i?l.c&&l.c.length>i&&(l.c.length=i):r&&(l=l.mod(t))}return r?u:(o&&(u=E.div(u)),t?u.mod(t):i?W(u,G,q,void 0):u)},I.integerValue=function(e){var t=new j(this);return null==e?e=q:T(e,0,8),W(t,t.e+1,e)},I.isEqualTo=I.eq=function(e,t){return 0===S(this,new j(e,t))},I.isFinite=function(){return!!this.c},I.isGreaterThan=I.gt=function(e,t){return S(this,new j(e,t))>0},I.isGreaterThanOrEqualTo=I.gte=function(e,t){return 1===(t=S(this,new j(e,t)))||0===t},I.isInteger=function(){return!!this.c&&_(this.e/N)>this.c.length-2},I.isLessThan=I.lt=function(e,t){return S(this,new j(e,t))<0},I.isLessThanOrEqualTo=I.lte=function(e,t){return-1===(t=S(this,new j(e,t)))||0===t},I.isNaN=function(){return!this.s},I.isNegative=function(){return this.s<0},I.isPositive=function(){return this.s>0},I.isZero=function(){return!!this.c&&0==this.c[0]},I.minus=function(e,t){var n,r,a,i,s=this,o=s.s;if(t=(e=new j(e,t)).s,!o||!t)return new j(NaN);if(o!=t)return e.s=-t,s.plus(e);var c=s.e/N,u=e.e/N,l=s.c,m=e.c;if(!c||!u){if(!l||!m)return l?(e.s=-t,e):new j(m?s:NaN);if(!l[0]||!m[0])return m[0]?(e.s=-t,e):new j(l[0]?s:3==q?-0:0)}if(c=_(c),u=_(u),l=l.slice(),o=c-u){for((i=o<0)?(o=-o,a=l):(u=c,a=m),a.reverse(),t=o;t--;a.push(0));a.reverse()}else for(r=(i=(o=l.length)<(t=m.length))?o:t,o=t=0;t<r;t++)if(l[t]!=m[t]){i=l[t]<m[t];break}if(i&&(a=l,l=m,m=a,e.s=-e.s),(t=(r=m.length)-(n=l.length))>0)for(;t--;l[n++]=0);for(t=g-1;r>o;){if(l[--r]<m[r]){for(n=r;n&&!l[--n];l[n]=t);--l[n],l[r]+=g}l[r]-=m[r]}for(;0==l[0];l.splice(0,1),--u);return l[0]?J(e,l,u):(e.s=3==q?-1:1,e.c=[e.e=0],e)},I.modulo=I.mod=function(e,t){var r,a,i=this;return e=new j(e,t),!i.c||!e.s||e.c&&!e.c[0]?new j(NaN):!e.c||i.c&&!i.c[0]?new j(i):(9==$?(a=e.s,e.s=1,r=n(i,e,0,3),e.s=a,r.s*=a):r=n(i,e,0,$),(e=i.minus(r.times(e))).c[0]||1!=$||(e.s=i.s),e)},I.multipliedBy=I.times=function(e,t){var n,r,a,i,s,o,c,u,l,m,d,p,h,f,y,w=this,v=w.c,x=(e=new j(e,t)).c;if(!(v&&x&&v[0]&&x[0]))return!w.s||!e.s||v&&!v[0]&&!x||x&&!x[0]&&!v?e.c=e.e=e.s=null:(e.s*=w.s,v&&x?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=_(w.e/N)+_(e.e/N),e.s*=w.s,(c=v.length)<(m=x.length)&&(h=v,v=x,x=h,a=c,c=m,m=a),a=c+m,h=[];a--;h.push(0));for(f=g,y=b,a=m;--a>=0;){for(n=0,d=x[a]%y,p=x[a]/y|0,i=a+(s=c);i>a;)n=((u=d*(u=v[--s]%y)+(o=p*u+(l=v[s]/y|0)*d)%y*y+h[i]+n)/f|0)+(o/y|0)+p*l,h[i--]=u%f;h[i]=n}return n?++r:h.splice(0,1),J(e,h,r)},I.negated=function(){var e=new j(this);return e.s=-e.s||null,e},I.plus=function(e,t){var n,r=this,a=r.s;if(t=(e=new j(e,t)).s,!a||!t)return new j(NaN);if(a!=t)return e.s=-t,r.minus(e);var i=r.e/N,s=e.e/N,o=r.c,c=e.c;if(!i||!s){if(!o||!c)return new j(a/0);if(!o[0]||!c[0])return c[0]?e:new j(o[0]?r:0*a)}if(i=_(i),s=_(s),o=o.slice(),a=i-s){for(a>0?(s=i,n=c):(a=-a,n=o),n.reverse();a--;n.push(0));n.reverse()}for((a=o.length)-(t=c.length)<0&&(n=c,c=o,o=n,t=a),a=0;t;)a=(o[--t]=o[t]+c[t]+a)/g|0,o[t]=g===o[t]?0:o[t]%g;return a&&(o=[a].concat(o),++s),J(e,o,s)},I.precision=I.sd=function(e,t){var n,r,a,i=this;if(null!=e&&e!==!!e)return T(e,1,x),null==t?t=q:T(t,0,8),W(new j(i),e,t);if(!(n=i.c))return null;if(r=(a=n.length-1)*N+1,a=n[a]){for(;a%10==0;a/=10,r--);for(a=n[0];a>=10;a/=10,r++);}return e&&i.e+1>r&&(r=i.e+1),r},I.shiftedBy=function(e){return T(e,-9007199254740991,w),this.times("1e"+e)},I.squareRoot=I.sqrt=function(){var e,t,r,a,i,s=this,o=s.c,c=s.s,u=s.e,l=M+4,m=new j("0.5");if(1!==c||!o||!o[0])return new j(!c||c<0&&(!o||o[0])?NaN:o?s:1/0);if(0==(c=Math.sqrt(+K(s)))||c==1/0?(((t=C(o)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=_((u+1)/2)-(u<0||u%2),r=new j(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new j(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(i=r,r=m.times(i.plus(n(s,i,l,1))),C(i.c).slice(0,c)===(t=C(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(a||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(W(r,r.e+M+2,1),e=!r.times(r).eq(s));break}if(!a&&(W(i,i.e+M+2,0),i.times(i).eq(s))){r=i;break}l+=4,c+=4,a=1}return W(r,r.e+M+1,q,e)},I.toExponential=function(e,t){return null!=e&&(T(e,0,x),e++),F(this,e,t,1)},I.toFixed=function(e,t){return null!=e&&(T(e,0,x),e=e+this.e+1),F(this,e,t)},I.toFormat=function(e,t,n){var r,a=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=V;else if("object"!=typeof n)throw Error(f+"Argument not an object: "+n);if(r=a.toFixed(e,t),a.c){var i,s=r.split("."),o=+n.groupSize,c=+n.secondaryGroupSize,u=n.groupSeparator||"",l=s[0],m=s[1],d=a.s<0,p=d?l.slice(1):l,h=p.length;if(c&&(i=o,o=c,c=i,h-=i),o>0&&h>0){for(i=h%o||o,l=p.substr(0,i);i<h;i+=o)l+=u+p.substr(i,o);c>0&&(l+=u+p.slice(i)),d&&(l="-"+l)}r=m?l+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?m.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):m):l}return(n.prefix||"")+r+(n.suffix||"")},I.toFraction=function(e){var t,r,a,i,s,o,c,u,l,m,d,p,h=this,y=h.c;if(null!=e&&(!(c=new j(e)).isInteger()&&(c.c||1!==c.s)||c.lt(E)))throw Error(f+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+K(c));if(!y)return new j(h);for(t=new j(E),l=r=new j(E),a=u=new j(E),p=C(y),s=t.e=p.length-h.e-1,t.c[0]=v[(o=s%N)<0?N+o:o],e=!e||c.comparedTo(t)>0?s>0?t:l:c,o=B,B=1/0,c=new j(p),u.c[0]=0;m=n(c,t,0,1),1!=(i=r.plus(m.times(a))).comparedTo(e);)r=a,a=i,l=u.plus(m.times(i=l)),u=i,t=c.minus(m.times(i=t)),c=i;return i=n(e.minus(r),a,0,1),u=u.plus(i.times(l)),r=r.plus(i.times(a)),u.s=l.s=h.s,d=n(l,a,s*=2,q).minus(h).abs().comparedTo(n(u,r,s,q).minus(h).abs())<1?[l,a]:[u,r],B=o,d},I.toNumber=function(){return+K(this)},I.toPrecision=function(e,t){return null!=e&&T(e,1,x),F(this,e,t,2)},I.toString=function(e){var t,n=this,a=n.s,i=n.e;return null===i?a?(t="Infinity",a<0&&(t="-"+t)):t="NaN":(null==e?t=i<=R||i>=O?A(C(n.c),i):z(C(n.c),i,"0"):10===e&&L?t=z(C((n=W(new j(n),M+i+1,q)).c),n.e,"0"):(T(e,2,D.length,"Base"),t=r(z(C(n.c),i,"0"),10,e,a,!0)),a<0&&n.c[0]&&(t="-"+t)),t},I.valueOf=I.toJSON=function(){return K(this)},I._isBigNumber=!0,I[Symbol.toStringTag]="BigNumber",I[Symbol.for("nodejs.util.inspect.custom")]=I.valueOf,null!=t&&j.set(t),j}(),E=I;const M=e=>e.integerValue(E.ROUND_CEIL);class q extends Error{constructor(e){super(e),this.name="BaseError"}}class R extends q{constructor(e){super(e),this.name="AccountError"}}class O extends q{constructor(e){super(e),this.name="AensError"}}class k extends q{constructor(e){super(e),this.name="AeppError"}}class B extends q{constructor(e){super(e),this.name="ChannelError"}}class U extends q{constructor(e){super(e),this.name="CompilerError"}}class $ extends q{constructor(e){super(e),this.name="ContractError"}}class G extends q{constructor(e){super(e),this.name="CryptographyError"}}class V extends q{constructor(e){super(e),this.name="NodeError"}}class D extends q{constructor(e){super(e),this.name="TransactionError"}}class L extends q{constructor(e){super(e),this.name="WalletError"}}class j extends q{constructor(e,t,n){super(`${e} should be ${t}, got ${n} instead`),this.name="ArgumentError"}}class F extends G{constructor(e){super(e),this.name="IllegalArgumentError"}}class H extends q{constructor(e,t,n){super(`${e} expects ${t} arguments, got ${n} instead`),this.name="ArgumentCountMismatchError"}}class J extends q{constructor(e){super(e),this.name="InsufficientBalanceError"}}class W extends q{constructor(e){super(e),this.name="MissingParamError"}}class K extends q{constructor(){super("Byte serialization not supported"),this.name="NoSerializerFoundError"}}class Y extends q{constructor(e){super(`Giving up at height ${e}`),this.name="RequestTimedOutError"}}class Q extends q{constructor(e,t){super(`Giving up after ${e} blocks mined, transaction hash: ${t}`),this.name="TxTimedOutError"}}class X extends q{constructor(e){super(e),this.name="TypeError"}}class Z extends q{constructor(e){super(e),this.name="UnsupportedPlatformError"}}class ee extends q{constructor(e){super(e),this.name="UnsupportedProtocolError"}}class te extends q{constructor(e){super(e),this.name="NotImplementedError"}}class ne extends q{constructor(e,t,n,r){super(`Unsupported ${e} version ${t}. Supported: >= ${n}`+(null==r?"":` < ${r}`)),this.name="UnsupportedVersionError"}}class re extends q{constructor(e){super(e),this.name="LogicError"}}class ae extends q{constructor(e){super(e),this.name="InternalError"}}class ie extends ae{constructor(e="Expected to not happen, required for TS"){super(e),this.name="UnexpectedTsError"}}class se extends R{constructor(e){super(`Account for ${e} not available`),this.name="UnavailableAccountError"}}class oe extends O{constructor(e,t){super(`Name ${e} don't have pointers for ${t}`),this.name="AensPointerContextError"}}class ce extends O{constructor(e,t){super(`the provided fee ${e.toString()} is not enough to execute the claim, required: ${t.toString()}`),this.name="InsufficientNameFeeError"}}class ue extends O{constructor(e){super(e),this.name="InvalidAensNameError"}}class le extends k{constructor(e){super(`Received invalid message: ${e}`),this.name="InvalidRpcMessageError"}}class me extends k{constructor(e){super(`Can't find callback for this messageId ${e}`),this.name="MissingCallbackError"}}class de extends k{constructor(e){super(`You do not have access to account ${e}`),this.name="UnAuthorizedAccountError"}}class pe extends k{constructor(e){super(`RpcClient with id ${e} do not exist`),this.name="UnknownRpcClientError"}}class he extends k{constructor(){super("You are not subscribed for an account."),this.name="UnsubscribedAccountError"}}class fe extends B{constructor(e){super(e),this.name="ChannelCallError"}}class ye extends B{constructor(e){super(e),this.name="ChannelConnectionError"}}class ge extends B{constructor(){super("Server pong timed out"),this.name="ChannelPingTimedOutError"}}class Ne extends B{constructor(e){super(e),this.name="UnexpectedChannelMessageError"}}class we extends B{constructor(e,t){super(e.message),this.handlerError=e,this.incomingMessage=t,this.name="ChannelIncomingMessageError"}}class ve extends B{constructor(){super("State Channels FSM entered unknown state"),this.name="UnknownChannelStateError"}}class be extends U{constructor(e){super(e),this.name="InvalidAuthDataError"}}class xe extends ${constructor(e,t=""){super(`Contract ${e} do not correspond to the bytecode deployed on the chain`+t),this.name="BytecodeMismatchError"}}class _e extends ${constructor(){super("Contract already deployed"),this.name="DuplicateContractError"}}class Ce extends ${constructor(e){super(`Contract with address ${e} not active`),this.name="InactiveContractError"}}class Se extends ${constructor(e){super(e),this.name="InvalidMethodInvocationError"}}class Te extends ${constructor(e){super(e),this.name="MissingContractAddressError"}}class Pe extends ${constructor(){super("Either ACI or sourceCode or sourceCodePath is required"),this.name="MissingContractDefError"}}class Ae extends ${constructor(){super("Function name is required"),this.name="MissingFunctionNameError"}}class ze extends ${constructor(e,t){super("Invocation failed"+(null==e?"":`: "${e}"`)),this.name="NodeInvocationError",this.transaction=t}}class Ie extends ${constructor(e){super(`Function ${e} doesn't exist in contract`),this.name="NoSuchContractFunctionError"}}class Ee extends ${constructor(e,t){super(`You try to pay "${e}" to function "${t}" which is not payable. Only payable function can accept coins`),this.name="NotPayableFunctionError"}}class Me extends ${constructor(e,t){super(`Can't find definition of ${e} event emitted by ${t} (use omitUnknown option to ignore events like this)`),this.name="MissingEventDefinitionError"}}class qe extends ${constructor(e,t){super(`Found multiple definitions of "${t[0][1]}" event with different types emitted by ${e} in ${t.map((([e])=>`"${e}"`)).join(", ")} contracts (use contractAddressToName option to specify contract name corresponding to address)`),this.name="AmbiguousEventDefinitionError"}}class Re extends G{constructor(){super("Invalid checksum"),this.name="InvalidChecksumError"}}class Oe extends G{constructor(){super("Node hash is not equal to provided one"),this.name="MerkleTreeHashMismatchError"}}class ke extends G{constructor(e){super(e),this.name="MissingNodeInTreeError"}}class Be extends G{constructor(e){super(`Unknown node length: ${e}`),this.name="UnknownNodeLengthError"}}class Ue extends G{constructor(e){super(`Unknown path nibble: ${e}`),this.name="UnknownPathNibbleError"}}class $e extends V{constructor(e){super(`Node with name ${e} already exist`),this.name="DuplicateNodeError"}}class Ge extends V{constructor(e){super(e),this.name="NodeNotFoundError"}}class Ve extends D{constructor(e){super(e),this.name="DecodeError"}}class De extends D{constructor(e){super(e),this.name="PayloadLengthError"}}class Le extends D{constructor(e){super(e),this.name="DryRunError"}}class je extends D{constructor(e){super(e),this.name="IllegalBidFeeError"}}class Fe extends D{constructor(e){super(e),this.name="InvalidSignatureError"}}class He extends D{constructor(e){super(`Prefix for id-tag ${e} not found.`),this.name="PrefixNotFoundError"}}class Je extends D{constructor(e,t){super(`Transaction schema not implemented for tag ${e} version ${t}`),this.name="SchemaNotFoundError"}}class We extends D{constructor(e){super(`Id tag for prefix ${e} not found.`),this.name="DecodeError"}}class Ke extends D{constructor(e){super(`Transaction ${e} is removed from chain`),this.name="TxNotInChainError"}}class Ye extends L{constructor(e){super(e),this.name="AlreadyConnectedError"}}class Qe extends L{constructor(e){super(e),this.name="NoWalletConnectedError"}}class Xe extends L{constructor(e){super(e),this.name="RpcConnectionError"}}let Ze=function(e){return e.AE="ae",e.MILI_AE="miliAE",e.MICRO_AE="microAE",e.NANO_AE="nanoAE",e.PICO_AE="picoAE",e.FEMTO_AE="femtoAE",e.AETTOS="aettos",e}({});const et={[Ze.AE]:0,[Ze.MILI_AE]:-3,[Ze.MICRO_AE]:-6,[Ze.NANO_AE]:-9,[Ze.PICO_AE]:-12,[Ze.FEMTO_AE]:-15,[Ze.AETTOS]:-18},tt=(e,{denomination:t=Ze.AETTOS,targetDenomination:n=Ze.AETTOS})=>{if("bigint"!=typeof(r=e)&&(!["number","object","string"].includes(typeof r)||isNaN(r)&&!Number.isInteger(r)&&!E.isBigNumber(r)))throw new j("value","a number",e);var r;return new E("bigint"==typeof e?e.toString():e).shiftedBy(et[t]-et[n]).toFixed()},nt=(e,{denomination:t=Ze.AETTOS}={})=>tt(e,{denomination:t,targetDenomination:Ze.AE}),rt=(e,{denomination:t=Ze.AE}={})=>tt(e,{denomination:t}),at=[{name:"exa",magnitude:18},{name:"giga",magnitude:9},{name:"",magnitude:0},{name:"pico",magnitude:-12}],it=e=>at.reduce(((t,n)=>Math.abs(n.magnitude-e)<Math.abs(t.magnitude-e)?n:t)),st=e=>{var t;return null!==(t=at.find((t=>t.magnitude<=e)))&&void 0!==t?t:at[at.length-1]},ot=e=>{var t;const n=new E(e),r=null!==(t=n.e)&&void 0!==t?t:0,{name:a,magnitude:i}=(r<0?it:st)(r);return`${n.shiftedBy(-i).precision(9+Math.min(r-i,0)).toFixed()}${""!==a?" ":""}${a}`},ct=new Set(["Deserialize","Serialize","Retry","Sign"]);class ut{constructor(e){var t;this._policies=[],this._policies=null!==(t=null==e?void 0:e.slice(0))&&void 0!==t?t:[],this._orderedPolicies=void 0}addPolicy(e,t={}){if(t.phase&&t.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(t.phase&&!ct.has(t.phase))throw new Error(`Invalid phase name: ${t.phase}`);if(t.afterPhase&&!ct.has(t.afterPhase))throw new Error(`Invalid afterPhase name: ${t.afterPhase}`);this._policies.push({policy:e,options:t}),this._orderedPolicies=void 0}removePolicy(e){const t=[];return this._policies=this._policies.filter((n=>!(e.name&&n.policy.name===e.name||e.phase&&n.options.phase===e.phase)||(t.push(n.policy),!1))),this._orderedPolicies=void 0,t}sendRequest(e,t){return this.getOrderedPolicies().reduceRight(((e,t)=>n=>t.sendRequest(n,e)),(t=>e.sendRequest(t)))(t)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new ut(this._policies)}static create(){return new ut}orderPolicies(){const e=[],t=new Map;function n(e){return{name:e,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}const r=n("Serialize"),a=n("None"),i=n("Deserialize"),s=n("Retry"),o=n("Sign"),c=[r,a,i,s,o];function u(e){return"Retry"===e?s:"Serialize"===e?r:"Deserialize"===e?i:"Sign"===e?o:a}for(const e of this._policies){const n=e.policy,r=e.options,a=n.name;if(t.has(a))throw new Error("Duplicate policy names not allowed in pipeline");const i={policy:n,dependsOn:new Set,dependants:new Set};r.afterPhase&&(i.afterPhase=u(r.afterPhase),i.afterPhase.hasAfterPolicies=!0),t.set(a,i),u(r.phase).policies.add(i)}for(const e of this._policies){const{policy:n,options:r}=e,a=n.name,i=t.get(a);if(!i)throw new Error(`Missing node for policy ${a}`);if(r.afterPolicies)for(const e of r.afterPolicies){const n=t.get(e);n&&(i.dependsOn.add(n),n.dependants.add(i))}if(r.beforePolicies)for(const e of r.beforePolicies){const n=t.get(e);n&&(n.dependsOn.add(i),i.dependants.add(n))}}function l(n){n.hasRun=!0;for(const r of n.policies)if((!r.afterPhase||r.afterPhase.hasRun&&!r.afterPhase.policies.size)&&0===r.dependsOn.size){e.push(r.policy);for(const e of r.dependants)e.dependsOn.delete(r);t.delete(r.policy.name),n.policies.delete(r)}}function m(){for(const e of c){if(l(e),e.policies.size>0&&e!==a)return void(a.hasRun||l(a));e.hasAfterPolicies&&l(a)}}let d=0;for(;t.size>0;){d++;const t=e.length;if(m(),e.length<=t&&d>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}}var lt=n(5606);const mt=void 0!==lt&&lt.env&&lt.env.DEBUG||void 0;let dt,pt=[],ht=[];const ft=[];mt&&gt(mt);const yt=Object.assign((e=>wt(e)),{enable:gt,enabled:Nt,disable:function(){const e=dt||"";return gt(""),e},log:function(...e){if(e.length>0){const t=String(e[0]);t.includes(":error")?console.error(...e):t.includes(":warning")?console.warn(...e):t.includes(":info")?console.info(...e):(t.includes(":verbose"),console.debug(...e))}}});function gt(e){dt=e,pt=[],ht=[];const t=/\*/g,n=e.split(",").map((e=>e.trim().replace(t,".*?")));for(const e of n)e.startsWith("-")?ht.push(new RegExp(`^${e.substr(1)}$`)):pt.push(new RegExp(`^${e}$`));for(const e of ft)e.enabled=Nt(e.namespace)}function Nt(e){if(e.endsWith("*"))return!0;for(const t of ht)if(t.test(e))return!1;for(const t of pt)if(t.test(e))return!0;return!1}function wt(e){const t=Object.assign((function(...n){t.enabled&&(n.length>0&&(n[0]=`${e} ${n[0]}`),t.log(...n))}),{enabled:Nt(e),destroy:vt,log:yt.log,namespace:e,extend:bt});return ft.push(t),t}function vt(){const e=ft.indexOf(this);return e>=0&&(ft.splice(e,1),!0)}function bt(e){const t=wt(`${this.namespace}:${e}`);return t.log=this.log,t}var xt=yt,_t=n(5606);const Ct=new Set,St=void 0!==_t&&_t.env&&_t.env.AZURE_LOG_LEVEL||void 0;let Tt;const Pt=xt("azure");Pt.log=(...e)=>{xt.log(...e)};const At=["verbose","info","warning","error"];St&&(Rt(St)?function(e){if(e&&!Rt(e))throw new Error(`Unknown log level '${e}'. Acceptable values: ${At.join(",")}`);Tt=e;const t=[];for(const e of Ct)qt(e)&&t.push(e.namespace);xt.enable(t.join(","))}(St):console.error(`AZURE_LOG_LEVEL set to unknown log level '${St}'; logging is not enabled. Acceptable values: ${At.join(", ")}.`));const zt={verbose:400,info:300,warning:200,error:100};function It(e){const t=Pt.extend(e);return Et(Pt,t),{error:Mt(t,"error"),warning:Mt(t,"warning"),info:Mt(t,"info"),verbose:Mt(t,"verbose")}}function Et(e,t){t.log=(...t)=>{e.log(...t)}}function Mt(e,t){const n=Object.assign(e.extend(t),{level:t});if(Et(e,n),qt(n)){const e=xt.disable();xt.enable(e+","+n.namespace)}return Ct.add(n),n}function qt(e){return Boolean(Tt&&zt[e.level]<=zt[Tt])}function Rt(e){return At.includes(e)}const Ot=It("core-rest-pipeline");class kt extends Error{constructor(e){super(e),this.name="AbortError"}}function Bt(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function Ut(e){if(Bt(e)){const t="string"==typeof e.name,n="string"==typeof e.message;return t&&n}return!1}function $t(e){if(Ut(e))return e.message;{let t;try{t="object"==typeof e&&e?JSON.stringify(e):String(e)}catch(e){t="[unable to stringify input]"}return`Unknown error ${t}`}}function Gt(e,t){switch(t){case"utf-8":return function(e){return(new TextEncoder).encode(e)}(e);case"base64":return Vt(e);case"base64url":return function(e){return Vt(e.replace(/-/g,"+").replace(/_/g,"/"))}(e);case"hex":return function(e){const t=new Uint8Array(e.length/2);for(let n=0;n<e.length/2;++n){const r=e[2*n],a=e[2*n+1];if(!Dt.has(r)||!Dt.has(a))return t.slice(0,n);t[n]=parseInt(`${r}${a}`,16)}return t}(e)}}function Vt(e){return new Uint8Array([...atob(e)].map((e=>e.charCodeAt(0))))}const Dt=new Set("0123456789abcdefABCDEF");var Lt;const jt="function"==typeof(null===(Lt=null===globalThis||void 0===globalThis?void 0:globalThis.crypto)||void 0===Lt?void 0:Lt.randomUUID)?globalThis.crypto.randomUUID.bind(globalThis.crypto):function(){let e="";for(let t=0;t<32;t++){const n=Math.floor(16*Math.random());e+=12===t?"4":16===t?3&n|8:n.toString(16),7!==t&&11!==t&&15!==t&&19!==t||(e+="-")}return e};function Ft(){return jt()}var Ht,Jt,Wt,Kt;"undefined"!=typeof window&&window.document,"object"==typeof self&&"function"==typeof(null===self||void 0===self?void 0:self.importScripts)&&("DedicatedWorkerGlobalScope"===(null===(Ht=self.constructor)||void 0===Ht?void 0:Ht.name)||"ServiceWorkerGlobalScope"===(null===(Jt=self.constructor)||void 0===Jt?void 0:Jt.name)||null===(Wt=self.constructor)||void 0===Wt||Wt.name),"undefined"!=typeof Deno&&void 0!==Deno.version&&Deno.version.deno,"undefined"!=typeof Bun&&Bun.version;const Yt=void 0!==globalThis.process&&Boolean(globalThis.process.version)&&Boolean(null===(Kt=globalThis.process.versions)||void 0===Kt?void 0:Kt.node),Qt=("undefined"!=typeof navigator&&(null===navigator||void 0===navigator||navigator.product),"REDACTED"),Xt=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],Zt=["api-version"];class en{constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:t=[]}={}){e=Xt.concat(e),t=Zt.concat(t),this.allowedHeaderNames=new Set(e.map((e=>e.toLowerCase()))),this.allowedQueryParameters=new Set(t.map((e=>e.toLowerCase())))}sanitize(e){const t=new Set;return JSON.stringify(e,((e,n)=>{if(n instanceof Error)return Object.assign(Object.assign({},n),{name:n.name,message:n.message});if("headers"===e)return this.sanitizeHeaders(n);if("url"===e)return this.sanitizeUrl(n);if("query"===e)return this.sanitizeQuery(n);if("body"!==e&&"response"!==e&&"operationSpec"!==e){if(Array.isArray(n)||Bt(n)){if(t.has(n))return"[Circular]";t.add(n)}return n}}),2)}sanitizeUrl(e){if("string"!=typeof e||null===e||""===e)return e;const t=new URL(e);if(!t.search)return e;for(const[e]of t.searchParams)this.allowedQueryParameters.has(e.toLowerCase())||t.searchParams.set(e,Qt);return t.toString()}sanitizeHeaders(e){const t={};for(const n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?t[n]=e[n]:t[n]=Qt;return t}sanitizeQuery(e){if("object"!=typeof e||null===e)return e;const t={};for(const n of Object.keys(e))this.allowedQueryParameters.has(n.toLowerCase())?t[n]=e[n]:t[n]=Qt;return t}}const tn=["GET","HEAD"];function nn(e={}){const{maxRetries:t=20}=e;return{name:"redirectPolicy",async sendRequest(e,n){const r=await n(e);return rn(n,r,t)}}}async function rn(e,t,n,r=0){const{request:a,status:i,headers:s}=t,o=s.get("location");if(o&&(300===i||301===i&&tn.includes(a.method)||302===i&&tn.includes(a.method)||303===i&&"POST"===a.method||307===i)&&r<n){const t=new URL(o,a.url);a.url=t.toString(),303===i&&(a.method="GET",a.headers.delete("Content-Length"),delete a.body),a.headers.delete("Authorization");const s=await e(a);return rn(e,s,n,r+1)}return t}const an="1.19.1";async function sn(e){const t=new Map;t.set("core-rest-pipeline",an),await async function(e){const t=globalThis.navigator;let n="unknown";if(null==t?void 0:t.userAgentData){const r=await t.userAgentData.getHighEntropyValues(["architecture","platformVersion"]);n=`${r.architecture}-${r.platform}-${r.platformVersion}`;const a=function(e){const t=["Google Chrome","Microsoft Edge","Opera","Brave","Chromium"];for(const n of t){const t=e.find((e=>e.brand===n));if(t)return t}}(t.userAgentData.brands);a&&e.set(a.brand,a.version)}else if(null==t?void 0:t.platform){n=t.platform;const r=function(e){const t=[{name:"Firefox",regex:/Firefox\/([\d.]+)/},{name:"Safari",regex:/Version\/([\d.]+).*Safari/}];for(const n of t){const t=e.match(n.regex);if(t)return{brand:n.name,version:t[1]}}}(t.userAgent);r&&e.set(r.brand,r.version)}else"string"==typeof globalThis.EdgeRuntime&&e.set("EdgeRuntime",globalThis.EdgeRuntime);e.set("OS",n)}(t);const n=function(e){const t=[];for(const[n,r]of e){const e=r?`${n}/${r}`:n;t.push(e)}return t.join(" ")}(t);return e?`${e} ${n}`:n}const on="x-ms-useragent",cn="userAgentPolicy",un=Symbol("rawContent");function ln(e){return"function"==typeof e[un]?e[un]():e.stream()}function mn(e){return Boolean(e&&"function"==typeof e.pipe)}function dn(e){return Boolean(e&&"function"==typeof e.getReader&&"function"==typeof e.tee)}async function pn(e){if(e instanceof Blob||e instanceof Uint8Array)return e;if(dn(e))return new Response(e).blob();const t=ln(e);if(mn(t))throw new Error("Encountered unexpected type. In the browser, `concat` supports Web ReadableStream, Blob, Uint8Array, and files created using `createFile` only.");return pn(t)}function hn(e){let t="";for(const[n,r]of e)t+=`${n}: ${r}\r\n`;return t}function fn(e){return e instanceof Uint8Array?e.byteLength:"function"==typeof e.stream?-1===e.size?void 0:e.size:void 0}const yn="multipartPolicy",gn=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function Nn(){return{name:yn,async sendRequest(e,t){var n;if(!e.multipartBody)return t(e);if(e.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=e.multipartBody.boundary;const a=null!==(n=e.headers.get("Content-Type"))&&void 0!==n?n:"multipart/mixed",i=a.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!i)throw new Error(`Got multipart request body, but content-type header was not multipart: ${a}`);const[,s,o]=i;if(o&&r&&o!==r)throw new Error(`Multipart boundary was specified as ${o} in the header, but got ${r} in the request body`);return null!=r||(r=o),r?function(e){if(e.length>70)throw new Error(`Multipart boundary "${e}" exceeds maximum length of 70 characters`);if(Array.from(e).some((e=>!gn.has(e))))throw new Error(`Multipart boundary "${e}" contains invalid characters`)}(r):r=`----AzSDKFormBoundary${Ft()}`,e.headers.set("Content-Type",`${s}; boundary=${r}`),await async function(e,t,n){const r=[Gt(`--${n}`,"utf-8"),...t.flatMap((e=>[Gt("\r\n","utf-8"),Gt(hn(e.headers),"utf-8"),Gt("\r\n","utf-8"),e.body,Gt(`\r\n--${n}`,"utf-8")])),Gt("--\r\n\r\n","utf-8")],a=function(e){let t=0;for(const n of e){const e=fn(n);if(void 0===e)return;t+=e}return t}(r);a&&e.headers.set("Content-Length",a),e.body=await async function(e){const t=[];for(const n of e)t.push(await pn("function"==typeof n?n():n));return new Blob(t)}(r)}(e,e.multipartBody.parts,r),e.multipartBody=void 0,t(e)}}}function wn(e,t,n){return new Promise(((r,a)=>{let i,s;const o=()=>a(new kt((null==n?void 0:n.abortErrorMsg)?null==n?void 0:n.abortErrorMsg:"The operation was aborted.")),c=()=>{(null==n?void 0:n.abortSignal)&&s&&n.abortSignal.removeEventListener("abort",s)};if(s=()=>(i&&clearTimeout(i),c(),o()),(null==n?void 0:n.abortSignal)&&n.abortSignal.aborted)return o();i=setTimeout((()=>{c(),r(t)}),e),(null==n?void 0:n.abortSignal)&&n.abortSignal.addEventListener("abort",s)}))}function vn(e,t){const n=e.headers.get(t);if(!n)return;const r=Number(n);return Number.isNaN(r)?void 0:r}const bn="Retry-After",xn=["retry-after-ms","x-ms-retry-after-ms",bn];function _n(e){if(e&&[429,503].includes(e.status))try{for(const t of xn){const n=vn(e,t);if(0===n||n)return n*(t===bn?1e3:1)}const t=e.headers.get(bn);if(!t)return;const n=Date.parse(t)-Date.now();return Number.isFinite(n)?Math.max(0,n):void 0}catch(e){return}}function Cn(e={}){var t,n;const r=null!==(t=e.retryDelayInMs)&&void 0!==t?t:1e3,a=null!==(n=e.maxRetryDelayInMs)&&void 0!==n?n:64e3;return{name:"exponentialRetryStrategy",retry({retryCount:t,response:n,responseError:i}){const s=!!(m=i)&&("ETIMEDOUT"===m.code||"ESOCKETTIMEDOUT"===m.code||"ECONNREFUSED"===m.code||"ECONNRESET"===m.code||"ENOENT"===m.code||"ENOTFOUND"===m.code),o=s&&e.ignoreSystemErrors,c=function(e){return Boolean(e&&void 0!==e.status&&(e.status>=500||408===e.status)&&501!==e.status&&505!==e.status)}(n),u=c&&e.ignoreHttpStatusCodes,l=n&&(function(e){return Number.isFinite(_n(e))}(n)||!c);var m;return l||u||o?{skipStrategy:!0}:!i||s||c?function(e,t){const n=t.retryDelayInMs*Math.pow(2,e),r=Math.min(t.maxRetryDelayInMs,n);var a,i;return{retryAfterInMs:r/2+(a=0,i=r/2,a=Math.ceil(a),i=Math.floor(i),Math.floor(Math.random()*(i-a+1))+a)}}(t,{retryDelayInMs:r,maxRetryDelayInMs:a}):{errorToThrow:i}}}}const Sn=It("core-rest-pipeline retryPolicy");function Tn(e,t={maxRetries:3}){const n=t.logger||Sn;return{name:"retryPolicy",async sendRequest(r,a){var i,s;let o,c,u=-1;e:for(;;){u+=1,o=void 0,c=void 0;try{n.info(`Retry ${u}: Attempting to send request`,r.requestId),o=await a(r),n.info(`Retry ${u}: Received a response from request`,r.requestId)}catch(e){if(n.error(`Retry ${u}: Received an error from request`,r.requestId),c=e,!e||"RestError"!==c.name)throw e;o=c.response}if(null===(i=r.abortSignal)||void 0===i?void 0:i.aborted)throw n.error(`Retry ${u}: Request aborted.`),new kt;if(u>=(null!==(s=t.maxRetries)&&void 0!==s?s:3)){if(n.info(`Retry ${u}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),c)throw c;if(o)return o;throw new Error("Maximum retries reached with no response or error to throw")}n.info(`Retry ${u}: Processing ${e.length} retry strategies.`);t:for(const t of e){const e=t.logger||Sn;e.info(`Retry ${u}: Processing retry strategy ${t.name}.`);const n=t.retry({retryCount:u,response:o,responseError:c});if(n.skipStrategy){e.info(`Retry ${u}: Skipped.`);continue t}const{errorToThrow:a,retryAfterInMs:i,redirectTo:s}=n;if(a)throw e.error(`Retry ${u}: Retry strategy ${t.name} throws error:`,a),a;if(i||0===i){e.info(`Retry ${u}: Retry strategy ${t.name} retries after ${i}`),await wn(i,void 0,{abortSignal:r.abortSignal});continue e}if(s){e.info(`Retry ${u}: Retry strategy ${t.name} redirects to ${s}`),r.url=s;continue e}}if(c)throw n.info("None of the retry strategies could work with the received error. Throwing it."),c;if(o)return n.info("None of the retry strategies could work with the received response. Returning it."),o}}}}function Pn(e){return e.toLowerCase()}class An{constructor(e){if(this._headersMap=new Map,e)for(const t of Object.keys(e))this.set(t,e[t])}set(e,t){this._headersMap.set(Pn(e),{name:e,value:String(t).trim()})}get(e){var t;return null===(t=this._headersMap.get(Pn(e)))||void 0===t?void 0:t.value}has(e){return this._headersMap.has(Pn(e))}delete(e){this._headersMap.delete(Pn(e))}toJSON(e={}){const t={};if(e.preserveCase)for(const e of this._headersMap.values())t[e.name]=e.value;else for(const[e,n]of this._headersMap)t[e]=n.value;return t}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return function*(e){for(const t of e.values())yield[t.name,t.value]}(this._headersMap)}}function zn(e){return new An(e)}const In="setClientRequestIdPolicy",En={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function Mn(e={}){let t=new qn(e.parentContext);return e.span&&(t=t.setValue(En.span,e.span)),e.namespace&&(t=t.setValue(En.namespace,e.namespace)),t}class qn{constructor(e){this._contextMap=e instanceof qn?new Map(e._contextMap):new Map}setValue(e,t){const n=new qn(this);return n._contextMap.set(e,t),n}getValue(e){return this._contextMap.get(e)}deleteValue(e){const t=new qn(this);return t._contextMap.delete(e),t}}const Rn={instrumenterImplementation:void 0};function On(){return Rn.instrumenterImplementation||(Rn.instrumenterImplementation={createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(e,t)=>({span:{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{},addEvent:()=>{}},tracingContext:Mn({parentContext:t.tracingContext})}),withContext(e,t,...n){return t(...n)}}),Rn.instrumenterImplementation}const kn={},Bn=new en;class Un extends Error{constructor(e,t={}){super(e),this.name="RestError",this.code=t.code,this.statusCode=t.statusCode,Object.defineProperty(this,"request",{value:t.request,enumerable:!1}),Object.defineProperty(this,"response",{value:t.response,enumerable:!1}),Object.setPrototypeOf(this,Un.prototype)}[kn](){return`RestError: ${this.message} \n ${Bn.sanitize(Object.assign(Object.assign({},this),{request:this.request,response:this.response}))}`}}function $n(e){return e instanceof Un||Ut(e)&&"RestError"===e.name}function Gn(e){var t;const n=ut.create();var r,a;return Yt&&(e.agent&&n.addPolicy((a=e.agent,{name:"agentPolicy",sendRequest:async(e,t)=>(e.agent||(e.agent=a),t(e))})),e.tlsOptions&&n.addPolicy((r=e.tlsOptions,{name:"tlsPolicy",sendRequest:async(e,t)=>(e.tlsSettings||(e.tlsSettings=r),t(e))})),n.addPolicy(function(){throw new Error("proxyPolicy is not supported in browser environment")}(e.proxyOptions)),n.addPolicy(function(){throw new Error("decompressResponsePolicy is not supported in browser environment")}())),n.addPolicy({name:"formDataPolicy",async sendRequest(e,t){if(Yt&&"undefined"!=typeof FormData&&e.body instanceof FormData&&(e.formData=function(e){var t;const n={};for(const[r,a]of e.entries())null!==(t=n[r])&&void 0!==t||(n[r]=[]),n[r].push(a);return n}(e.body),e.body=void 0),e.formData){const t=e.headers.get("Content-Type");t&&-1!==t.indexOf("application/x-www-form-urlencoded")?e.body=function(e){const t=new URLSearchParams;for(const[n,r]of Object.entries(e))if(Array.isArray(r))for(const e of r)t.append(n,e.toString());else t.append(n,r.toString());return t.toString()}(e.formData):await async function(e,t){const n=t.headers.get("Content-Type");if(n&&!n.startsWith("multipart/form-data"))return;t.headers.set("Content-Type",null!=n?n:"multipart/form-data");const r=[];for(const[t,n]of Object.entries(e))for(const e of Array.isArray(n)?n:[n])if("string"==typeof e)r.push({headers:zn({"Content-Disposition":`form-data; name="${t}"`}),body:Gt(e,"utf-8")});else{if(null==e||"object"!=typeof e)throw new Error(`Unexpected value for key ${t}: ${e}. Value should be serialized to string first.`);{const n=e.name||"blob",a=zn();a.set("Content-Disposition",`form-data; name="${t}"; filename="${n}"`),a.set("Content-Type",e.type||"application/octet-stream"),r.push({headers:a,body:e})}}t.multipartBody={parts:r}}(e.formData,e),e.formData=void 0}return t(e)}},{beforePolicies:[yn]}),n.addPolicy(function(e={}){const t=sn(e.userAgentPrefix);return{name:cn,async sendRequest(e,n){return e.headers.has(on)||e.headers.set(on,await t),n(e)}}}(e.userAgentOptions)),n.addPolicy(function(e="x-ms-client-request-id"){return{name:In,async sendRequest(t,n){return t.headers.has(e)||t.headers.set(e,t.requestId),n(t)}}}(null===(t=e.telemetryOptions)||void 0===t?void 0:t.clientRequestIdHeaderName)),n.addPolicy(Nn(),{afterPhase:"Deserialize"}),n.addPolicy(function(e={}){var t;return{name:"defaultRetryPolicy",sendRequest:Tn([{name:"throttlingRetryStrategy",retry({response:e}){const t=_n(e);return Number.isFinite(t)?{retryAfterInMs:t}:{skipStrategy:!0}}},Cn(e)],{maxRetries:null!==(t=e.maxRetries)&&void 0!==t?t:3}).sendRequest}}(e.retryOptions),{phase:"Retry"}),n.addPolicy(function(e={}){const t=sn(e.userAgentPrefix),n=new en({additionalAllowedQueryParameters:e.additionalAllowedQueryParameters}),r=function(){try{return function(e){const{namespace:t,packageName:n,packageVersion:r}=e;function a(e,a,i){var s;const o=On().startSpan(e,Object.assign(Object.assign({},i),{packageName:n,packageVersion:r,tracingContext:null===(s=null==a?void 0:a.tracingOptions)||void 0===s?void 0:s.tracingContext}));let c=o.tracingContext;const u=o.span;return c.getValue(En.namespace)||(c=c.setValue(En.namespace,t)),u.setAttribute("az.namespace",c.getValue(En.namespace)),{span:u,updatedOptions:Object.assign({},a,{tracingOptions:Object.assign(Object.assign({},null==a?void 0:a.tracingOptions),{tracingContext:c})})}}function i(e,t,...n){return On().withContext(e,t,...n)}return{startSpan:a,withSpan:async function(e,t,n,r){const{span:s,updatedOptions:o}=a(e,t,r);try{const e=await i(o.tracingOptions.tracingContext,(()=>Promise.resolve(n(o,s))));return s.setStatus({status:"success"}),e}catch(e){throw s.setStatus({status:"error",error:e}),e}finally{s.end()}},withContext:i,parseTraceparentHeader:function(e){return On().parseTraceparentHeader(e)},createRequestHeaders:function(e){return On().createRequestHeaders(e)}}}({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:an})}catch(e){return void Ot.warning(`Error when creating the TracingClient: ${$t(e)}`)}}();return{name:"tracingPolicy",async sendRequest(e,a){var i;if(!r)return a(e);const s=await t,o={"http.url":n.sanitizeUrl(e.url),"http.method":e.method,"http.user_agent":s,requestId:e.requestId};s&&(o["http.user_agent"]=s);const{span:c,tracingContext:u}=null!==(i=function(e,t,n){try{const{span:r,updatedOptions:a}=e.startSpan(`HTTP ${t.method}`,{tracingOptions:t.tracingOptions},{spanKind:"client",spanAttributes:n});if(!r.isRecording())return void r.end();const i=e.createRequestHeaders(a.tracingOptions.tracingContext);for(const[e,n]of Object.entries(i))t.headers.set(e,n);return{span:r,tracingContext:a.tracingOptions.tracingContext}}catch(e){return void Ot.warning(`Skipping creating a tracing span due to an error: ${$t(e)}`)}}(r,e,o))&&void 0!==i?i:{};if(!c||!u)return a(e);try{const t=await r.withContext(u,a,e);return function(e,t){try{e.setAttribute("http.status_code",t.status);const n=t.headers.get("x-ms-request-id");n&&e.setAttribute("serviceRequestId",n),t.status>=400&&e.setStatus({status:"error"}),e.end()}catch(e){Ot.warning(`Skipping tracing span processing due to an error: ${$t(e)}`)}}(c,t),t}catch(e){throw function(e,t){try{e.setStatus({status:"error",error:Ut(t)?t:void 0}),$n(t)&&t.statusCode&&e.setAttribute("http.status_code",t.statusCode),e.end()}catch(e){Ot.warning(`Skipping tracing span processing due to an error: ${$t(e)}`)}}(c,e),e}}}}(Object.assign(Object.assign({},e.userAgentOptions),e.loggingOptions)),{afterPhase:"Retry"}),Yt&&n.addPolicy(nn(e.redirectOptions),{afterPhase:"Retry"}),n.addPolicy(function(e={}){var t;const n=null!==(t=e.logger)&&void 0!==t?t:Ot.info,r=new en({additionalAllowedHeaderNames:e.additionalAllowedHeaderNames,additionalAllowedQueryParameters:e.additionalAllowedQueryParameters});return{name:"logPolicy",async sendRequest(e,t){if(!n.enabled)return t(e);n(`Request: ${r.sanitize(e)}`);const a=await t(e);return n(`Response status code: ${a.status}`),n(`Headers: ${r.sanitize(a.headers)}`),a}}}(e.loggingOptions),{afterPhase:"Sign"}),n}Un.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",Un.PARSE_ERROR="PARSE_ERROR";class Vn{async sendRequest(e){if("https:"!==new URL(e.url).protocol&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);if(e.proxySettings)throw new Error("HTTP proxy is not supported in browser environment");try{return await async function(e){const{abortController:t,abortControllerCleanup:n}=function(e){const t=new AbortController;let n,r;if(e.abortSignal){if(e.abortSignal.aborted)throw new kt("The operation was aborted. Request has already been canceled.");r=e=>{"abort"===e.type&&t.abort()},e.abortSignal.addEventListener("abort",r),n=()=>{var t;r&&(null===(t=e.abortSignal)||void 0===t||t.removeEventListener("abort",r))}}return e.timeout>0&&setTimeout((()=>{t.abort()}),e.timeout),{abortController:t,abortControllerCleanup:n}}(e);try{const r=function(e){const t=new Headers;for(const[n,r]of e)t.append(n,r);return t}(e.headers),{streaming:a,body:i}=function(e){const t="function"==typeof e.body?e.body():e.body;if(mn(t))throw new Error("Node streams are not supported in browser environment.");return dn(t)?{streaming:!0,body:Dn(t,{onProgress:e.onUploadProgress})}:{streaming:!1,body:t}}(e),s=Object.assign(Object.assign({body:i,method:e.method,headers:r,signal:t.signal},"credentials"in Request.prototype?{credentials:e.withCredentials?"include":"same-origin"}:{}),"cache"in Request.prototype?{cache:"no-store"}:{});a&&(s.duplex="half");const o=await fetch(e.url,s);return function(e){return("function"==typeof Blob||"object"==typeof Blob)&&e instanceof Blob}(e.body)&&e.onUploadProgress&&e.onUploadProgress({loadedBytes:e.body.size}),async function(e,t,n){var r,a;const i=function(e){const t=zn();for(const[n,r]of e.headers)t.set(n,r);return t}(e),s={request:t,headers:i,status:e.status},o=dn(e.body)?Dn(e.body,{onProgress:t.onDownloadProgress,onEnd:n}):e.body;if((null===(r=t.streamResponseStatusCodes)||void 0===r?void 0:r.has(Number.POSITIVE_INFINITY))||(null===(a=t.streamResponseStatusCodes)||void 0===a?void 0:a.has(s.status)))if(t.enableBrowserStreams)s.browserStreamBody=null!=o?o:void 0;else{const e=new Response(o);s.blobBody=e.blob(),null==n||n()}else{const e=new Response(o);s.bodyAsText=await e.text(),null==n||n()}return s}(o,e,n)}catch(e){throw null==n||n(),e}}(e)}catch(t){throw function(e,t){var n;return e&&"AbortError"===(null==e?void 0:e.name)?e:new Un(`Error sending request: ${e.message}`,{code:null!==(n=null==e?void 0:e.code)&&void 0!==n?n:Un.REQUEST_SEND_ERROR,request:t})}(t,e)}}}function Dn(e,t={}){let n=0;const{onProgress:r,onEnd:a}=t;if(function(e){return void 0!==e.pipeThrough&&void 0!==self.TransformStream}(e))return e.pipeThrough(new TransformStream({transform(e,t){null!==e?(t.enqueue(e),n+=e.length,r&&r({loadedBytes:n})):t.terminate()},flush(){null==a||a()}}));{const t=e.getReader();return new ReadableStream({async pull(e){var i;const{done:s,value:o}=await t.read();if(s||!o)return null==a||a(),e.close(),void t.releaseLock();n+=null!==(i=null==o?void 0:o.length)&&void 0!==i?i:0,e.enqueue(o),r&&r({loadedBytes:n})},cancel(e){return null==a||a(),t.cancel(e)}})}}class Ln{constructor(e){var t,n,r,a,i,s,o;this.url=e.url,this.body=e.body,this.headers=null!==(t=e.headers)&&void 0!==t?t:zn(),this.method=null!==(n=e.method)&&void 0!==n?n:"GET",this.timeout=null!==(r=e.timeout)&&void 0!==r?r:0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=null!==(a=e.disableKeepAlive)&&void 0!==a&&a,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=null!==(i=e.withCredentials)&&void 0!==i&&i,this.abortSignal=e.abortSignal,this.tracingOptions=e.tracingOptions,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||Ft(),this.allowInsecureConnection=null!==(s=e.allowInsecureConnection)&&void 0!==s&&s,this.enableBrowserStreams=null!==(o=e.enableBrowserStreams)&&void 0!==o&&o,this.agent=e.agent,this.tlsSettings=e.tlsSettings}}const jn={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:12e4};async function Fn(e,t){try{return[await t(e),void 0]}catch(e){if($n(e)&&e.response)return[e.response,e];throw e}}async function Hn(e){const{scopes:t,getAccessToken:n,request:r}=e,a={abortSignal:r.abortSignal,tracingOptions:r.tracingOptions,enableCae:!0},i=await n(t,a);i&&e.request.headers.set("Authorization",`Bearer ${i.token}`)}function Jn(e){return 401===e.status&&e.headers.has("WWW-Authenticate")}async function Wn(e,t){var n;const{scopes:r}=e,a=await e.getAccessToken(r,{enableCae:!0,claims:t});return!!a&&(e.request.headers.set("Authorization",`${null!==(n=a.tokenType)&&void 0!==n?n:"Bearer"} ${a.token}`),!0)}function Kn(e){var t;if(!e)return;const n=function(e){const t=/(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g,n=/(\w+)="([^"]*)"/g,r=[];let a;for(;null!==(a=t.exec(e));){const e=a[1],t=a[2],i={};let s;for(;null!==(s=n.exec(t));)i[s[1]]=s[2];r.push({scheme:e,params:i})}return r}(e);return null===(t=n.find((e=>"Bearer"===e.scheme&&e.params.claims&&"insufficient_claims"===e.params.error)))||void 0===t?void 0:t.params.claims}var Yn=n(8287).Buffer;const Qn=async e=>new Promise((t=>{setTimeout(t,e)})),Xn=(e,t)=>Object.fromEntries(Object.entries(e).map(t)),Zn=(()=>{try{return Yn.concat([Uint8Array.from([])]),!1}catch(e){return!0}})()?(e,t)=>Yn.concat(e.map((e=>Yn.from(e))),t):Yn.concat;function er(e,t){return e in t}function tr(e,t){return t.includes(e)}function nr(e){return e instanceof Un&&404===e.statusCode&&e.message.includes("Account not found")}function rr(e){if(!(e instanceof Error))throw e}function ar(e){return new Proxy({},Object.fromEntries(["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf","get","has"].map((t=>[t,(n,...r)=>{const a=e();if(null==a)throw new j("wrapped value","defined",a);if("get"===t&&"_wrappedValue"===r[0])return a;const i=Reflect[t](a,...r);return"function"==typeof i&&"get"===t?i.bind(a):i}]))))}var ir=n(8947),sr=n.n(ir),or=n(4156);let cr=function(e){return e.KeyBlockHash="kh",e.MicroBlockHash="mh",e.BlockPofHash="bf",e.BlockTxHash="bx",e.BlockStateHash="bs",e.Channel="ch",e.ContractAddress="ct",e.ContractBytearray="cb",e.ContractStoreKey="ck",e.ContractStoreValue="cv",e.Transaction="tx",e.TxHash="th",e.OracleAddress="ok",e.OracleQuery="ov",e.OracleQueryId="oq",e.OracleResponse="or",e.AccountAddress="ak",e.AccountSecretKey="sk",e.Signature="sg",e.Commitment="cm",e.PeerPubkey="pp",e.Name="nm",e.State="st",e.Poi="pi",e.StateTrees="ss",e.CallStateTree="cs",e.Bytearray="ba",e}({});var ur=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");const t=new Uint8Array(256);for(let e=0;e<t.length;e++)t[e]=255;for(let n=0;n<e.length;n++){const r=e.charAt(n),a=r.charCodeAt(0);if(255!==t[a])throw new TypeError(r+" is ambiguous");t[a]=n}const n=e.length,r=e.charAt(0),a=Math.log(n)/Math.log(256),i=Math.log(256)/Math.log(n);function s(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;let i=0,s=0,o=0;for(;e[i]===r;)s++,i++;const c=(e.length-i)*a+1>>>0,u=new Uint8Array(c);for(;i<e.length;){const r=e.charCodeAt(i);if(r>255)return;let a=t[r];if(255===a)return;let s=0;for(let e=c-1;(0!==a||s<o)&&-1!==e;e--,s++)a+=n*u[e]>>>0,u[e]=a%256>>>0,a=a/256>>>0;if(0!==a)throw new Error("Non-zero carry");o=s,i++}let l=c-o;for(;l!==c&&0===u[l];)l++;const m=new Uint8Array(s+(c-l));let d=s;for(;l!==c;)m[d++]=u[l++];return m}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";let a=0,s=0,o=0;const c=t.length;for(;o!==c&&0===t[o];)o++,a++;const u=(c-o)*i+1>>>0,l=new Uint8Array(u);for(;o!==c;){let e=t[o],r=0;for(let t=u-1;(0!==e||r<s)&&-1!==t;t--,r++)e+=256*l[t]>>>0,l[t]=e%n>>>0,e=e/n>>>0;if(0!==e)throw new Error("Non-zero carry");s=r,o++}let m=u-s;for(;m!==u&&0===l[m];)m++;let d=r.repeat(a);for(;m<u;++m)d+=e.charAt(l[m]);return d},decodeUnsafe:s,decode:function(e){const t=s(e);if(t)return t;throw new Error("Non-base"+n+" character")}}}("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),lr=n(4107),mr=n.n(lr),dr=n(8287).Buffer;function pr(e){return(new(mr())).update(e).digest()}const hr=[cr.ContractBytearray,cr.ContractStoreKey,cr.ContractStoreValue,cr.Transaction,cr.OracleQuery,cr.OracleResponse,cr.State,cr.Poi,cr.StateTrees,cr.CallStateTree,cr.Bytearray],fr=[cr.KeyBlockHash,cr.MicroBlockHash,cr.BlockPofHash,cr.BlockTxHash,cr.BlockStateHash,cr.Channel,cr.ContractAddress,cr.TxHash,cr.OracleAddress,cr.OracleQueryId,cr.AccountAddress,cr.AccountSecretKey,cr.Signature,cr.Commitment,cr.PeerPubkey,cr.Name],yr={[cr.KeyBlockHash]:32,[cr.MicroBlockHash]:32,[cr.BlockPofHash]:32,[cr.BlockTxHash]:32,[cr.BlockStateHash]:32,[cr.Channel]:32,[cr.ContractAddress]:32,[cr.TxHash]:32,[cr.OracleAddress]:32,[cr.OracleQueryId]:32,[cr.AccountAddress]:32,[cr.AccountSecretKey]:32,[cr.Signature]:64,[cr.Commitment]:32,[cr.PeerPubkey]:32,[cr.State]:32};function gr(e,t){if(!er(t,yr))return;const n=yr[t];if(null!=n&&e.length!==n)throw new De(`Payload should be ${n} bytes, got ${e.length} instead`)}const Nr=e=>pr(pr(e)).slice(0,4),wr=e=>Zn([e,Nr(e)]);function vr(e){const t=e.slice(0,-4);if(!Nr(t).equals(e.slice(-4)))throw new Re;return t}const br={encode:e=>wr(e).toString("base64"),decode:e=>vr(dr.from(e,"base64"))},xr={encode:e=>ur.encode(wr(e)),decode:e=>vr(dr.from(ur.decode(e)))},_r=e=>{const t=hr.find((t=>t===e));if(null!=t)return[t,br];const n=fr.find((t=>t===e));if(null!=n)return[n,xr];throw new j("prefix",`one of ${[...fr,...hr].join(", ")}`,e)};function Cr(e){const[t,n,r]=e.split("_");if(null==n)throw new Ve(`Encoded string missing payload: ${e}`);if(null!=r)throw new Ve(`Encoded string have extra parts: ${e}`);const[a,i]=_r(t),s=i.decode(n);return gr(s,a),s}function Sr(e,t){const[,n]=_r(t);return gr(e,t),`${t}_${n.encode(e)}`}var Tr=n(8287).Buffer;function Pr(e,...t){0===t.length&&(t=[cr.AccountAddress]);try{Cr(e);const n=e.split("_")[0];if(!tr(n,t))throw new j("Encoded string type",t.length>1?`one of ${t.join(", ")}`:t[0],n);return!0}catch(e){return!1}}function Ar(e,...t){if(Cr(e),0===t.length)return;const n=e.split("_")[0];if(!tr(n,t))throw new j("Encoded string type",t.length>1?`one of ${t.join(", ")}`:t[0],n)}function zr(e,...t){try{return Ar(e,...t),!0}catch(e){return!1}}function Ir(){const[e]=new BigUint64Array(sr().randomBytes(8).buffer);return Number(e%BigInt(Number.MAX_SAFE_INTEGER))}function Er(e){const t=Tr.allocUnsafe(4);return t.writeUInt32BE(e),t.subarray(t.findIndex((e=>0!==e)))}function Mr(e){return Tr.from((0,or.blake2b)(e,void 0,32))}function qr(e,t,n){return sr().sign.detached.verify(e,t,Cr(n))}function Rr(e){return e<253?Tr.from([e]):Zn(e<=65535?[Tr.from([253]),Tr.from(new Uint16Array([e]).buffer)]:e<=4294967295?[Tr.from([254]),Tr.from(new Uint32Array([e]).buffer)]:[Tr.from([255]),Tr.from(new BigUint64Array([BigInt(e)]).buffer)])}const Or=Tr.from("aeternity Signed Message:\n","utf8"),kr=Rr(Or.length);function Br(e){const t=Tr.from(e,"utf8");return Mr(Zn([kr,Or,Rr(t.length),t]))}function Ur(e,t,n){return qr(Br(e),t,n)}var $r=n(8287).Buffer;function Gr(e,t=!1){if(null==e)return $r.from([]);if(Number.isInteger(e)||E.isBigNumber(e)||t){if(E.isBigNumber(e)||(e=new E(e)),!e.isInteger())throw new X(`Unexpected not integer value: ${e.toFixed()}`);let t=e.toString(16);return t.length%2==1&&(t=`0${t}`),$r.from(t,"hex")}if("string"==typeof e)return $r.from(e);throw new K}const Vr={pub:"ak_11111111111111111111111111111111273Yts",amount:100000000000000000000000000000000000n},Dr=5e4,Lr=1e9,jr=1e14,Fr=.05,Hr=480,Jr=31,Wr=Xn({31:3,30:5,29:8,28:13,27:21,26:34,25:55,24:89,23:144,22:233,21:377,20:610,19:987,18:1597,17:2584,16:4181,15:6765,14:10946,13:17711,12:28657,11:46368,10:75025,9:121393,8:196418,7:317811,6:514229,5:832040,4:1346269,3:2178309,2:3524578,1:5702887},(([e,t])=>[e,new E(t).times(jr)]));let Kr=function(e){return e[e.Ceres=6]="Ceres",e}({}),Yr=function(e){return e[e.NoVm=0]="NoVm",e[e.Sophia=1]="Sophia",e[e.SophiaImprovementsMinerva=3]="SophiaImprovementsMinerva",e[e.SophiaImprovementsFortuna=4]="SophiaImprovementsFortuna",e[e.Fate=5]="Fate",e[e.SophiaImprovementsLima=6]="SophiaImprovementsLima",e[e.Fate2=7]="Fate2",e[e.Fate3=8]="Fate3",e}({}),Qr=function(e){return e[e.NoAbi=0]="NoAbi",e[e.Sophia=1]="Sophia",e[e.Fate=3]="Fate",e}({}),Xr=function(e){return e[e.SignedTx=11]="SignedTx",e[e.SpendTx=12]="SpendTx",e[e.OracleRegisterTx=22]="OracleRegisterTx",e[e.OracleQueryTx=23]="OracleQueryTx",e[e.OracleResponseTx=24]="OracleResponseTx",e[e.OracleRespondTx=24]="OracleRespondTx",e[e.OracleExtendTx=25]="OracleExtendTx",e[e.NameClaimTx=32]="NameClaimTx",e[e.NamePreclaimTx=33]="NamePreclaimTx",e[e.NameUpdateTx=34]="NameUpdateTx",e[e.NameRevokeTx=35]="NameRevokeTx",e[e.NameTransferTx=36]="NameTransferTx",e[e.ContractCreateTx=42]="ContractCreateTx",e[e.ContractCallTx=43]="ContractCallTx",e[e.ChannelCreateTx=50]="ChannelCreateTx",e[e.ChannelDepositTx=51]="ChannelDepositTx",e[e.ChannelWithdrawTx=52]="ChannelWithdrawTx",e[e.ChannelForceProgressTx=521]="ChannelForceProgressTx",e[e.ChannelCloseMutualTx=53]="ChannelCloseMutualTx",e[e.ChannelCloseSoloTx=54]="ChannelCloseSoloTx",e[e.ChannelSlashTx=55]="ChannelSlashTx",e[e.ChannelSettleTx=56]="ChannelSettleTx",e[e.ChannelOffChainTx=57]="ChannelOffChainTx",e[e.ChannelSnapshotSoloTx=59]="ChannelSnapshotSoloTx",e[e.GaAttachTx=80]="GaAttachTx",e[e.GaMetaTx=81]="GaMetaTx",e[e.PayingForTx=82]="PayingForTx",e}({});var Zr=n(8287).Buffer;function ea(e,t){return Sr(Mr(Zr.from([...Cr(e),...Gr(t)])),cr.ContractAddress)}function ta(e,t,n){return Sr(Mr(Zr.from([...Cr(e),...function(e){const t=Gr(e,!0);return Zn([Zr.alloc(32-t.length),t])}(t),...Cr(n)])),cr.OracleQueryId)}const na=".chain";function ra(e){const[t,n,...r]=e.split(".");if(0!==r.length)throw new j("aens name","including only one dot",e);if(n!==na.slice(1))throw new j("aens name",`suffixed with ${na}`,e);if(/\p{Emoji_Presentation}/u.test(t))throw new j("aens name","not containing emoji",e);if("-"===t[2]&&"-"===t[3])throw new j("aens name",'without "-" char in both the third and fourth positions',e);if("-"===t[0])throw new j("aens name",'starting with no "-" char',e);if("-"===t.at(-1))throw new j("aens name",'ending with no "-" char',e);let a;try{const r=new URL(`http://${t}.${n}`);if(r.username+r.password+r.port+r.search+r.hash!==""||"/"!==r.pathname)throw new j("aens name","valid",e);a=r.host}catch(t){if(t instanceof TypeError&&t.message.includes("Invalid URL"))throw new j("aens name","valid",e);throw t}if(!/^[a-z0-9.-]+$/i.test(a))throw new j("aens name","without illegal chars",e);if(a.length>63+na.length)throw new j("aens name","not too long",e);return a}function aa(e){return Sr(Mr(ra(e)),cr.Name)}function ia(e,t=Ir()){return Sr(Mr(Zn([Zr.from(ra(e)),Zr.from(t.toString(16).padStart(64,"0"),"hex")])),cr.Commitment)}function sa(e=Zr.from([])){return BigInt("0x"+Zr.from(e).toString("hex")).toString()}function oa(e){ra(e)}function ca(e){try{return oa(e),!0}catch(e){return!1}}const ua=[[cr.AccountAddress,"account_pubkey"],[cr.OracleAddress,"oracle_pubkey"],[cr.ContractAddress,"contract_pubkey"],[cr.Channel,"channel"]];function la(e){Cr(e);const t=e.substring(0,2),n=ua.find((([e])=>e===t))?.[1];if(null!=n)return n;throw new j("identifier",`prefixed with one of ${ua.map((([e])=>`${e}_`)).join(", ")}`,e)}function ma(e){const t=ra(e).length-na.length;return Wr[Math.min(t,Jr)]}function da(e,{startFee:t,increment:n=Fr}={}){if(Number(n)!==n||n%1==0)throw new je(`Increment must be float. Current increment ${n}`);if(n<Fr)throw new je(`minimum increment percentage is ${Fr}`);return M(new E(null!=t?t:ma(e)).times(new E(Fr).plus(1)))}function pa(e,t){var n,r,a;const i=ra(e).length-na.length;return(null!==(n=null!==(r=null!==(a=i<=4?2400:null)&&void 0!==a?a:i<=8?960:null)&&void 0!==r?r:i<=12?480:null)&&void 0!==n?n:0)+t}function ha(e){return ra(e).length<13+na.length}async function fa(e,t){return Math.floor(await async function(e,{_expectedMineRate:t,_microBlockCycle:n,onNode:r}){if(null!=t&&"key-block"===e)return t;if(null!=n&&"micro-block"===e)return n;const a=await r.getNetworkId();return"ae_dev"===a?0:!["ae_mainnet","ae_uat"].includes(a)&&await r._isHyperchain()?3e3:"key-block"===e?18e4:3e3}(e,t)/3)}const ya=new WeakMap;async function ga({cached:e=!1,...t}){const n=null!==(a=(r=t.onNode)._wrappedValue)&&void 0!==a?a:r;var r,a;if(e){const e=ya.get(n);if(null!=e&&e.time>Date.now()-await fa("key-block",t))return e.height}const{height:i}=await n.getCurrentKeyBlockHeight();return ya.set(n,{height:i,time:Date.now()}),i}async function Na(e,{blocks:t=5,interval:n,...r}){let a;null!=n||(n=await fa("micro-block",r));do{const i=await r.onNode.getTransactionByHash(e);if(-1!==i.blockHeight)return i;null==a&&(a=0!==i.tx.ttl?-1:await ga({...r,cached:!0})+t),await Qn(n)}while(-1===a||await ga({...r,cached:!0})<a);throw new Q(t,e)}async function wa(e,{interval:t,...n}){let r;null!=t||(t=Math.min(await fa("key-block",n),5e3));do{null!=r&&await Qn(t),r=await ga(n)}while(r<e);return r}async function va(e,{confirm:t=3,onNode:n,...r}){const{blockHeight:a}=await n.getTransactionByHash(e),i=await wa(a+t,{onNode:n,...r}),{blockHeight:s}=await n.getTransactionByHash(e);switch(s){case-1:throw new Ke(e);case a:return i;default:return va(e,{onNode:n,confirm:t,...r})}}async function ba(e,{height:t,hash:n,onNode:r}){return null!=t?r.getAccountByPubkeyAndHeight(e,t):null!=n?r.getAccountByPubkeyAndHash(e,n):r.getAccountByPubkey(e)}async function xa(e,{format:t=Ze.AETTOS,...n}){const r=e.startsWith("ok_")?Sr(Cr(e),cr.AccountAddress):e,{balance:a}=await ba(r,n).catch((e=>{if(!nr(e))throw e;return{balance:0n}}));return tt(a,{targetDenomination:t})}async function _a({onNode:e}){return e.getCurrentGeneration()}async function Ca(e,{onNode:t}){return"number"==typeof e?t.getGenerationByHeight(e):t.getGenerationByHash(e)}async function Sa(e,{onNode:t}){return(await t.getMicroBlockTransactionsByHash(e)).transactions}async function Ta(e,{onNode:t}){return"number"==typeof e?t.getKeyBlockByHeight(e):t.getKeyBlockByHash(e)}async function Pa(e,{onNode:t}){return t.getMicroBlockHeaderByHash(e)}const Aa=new Map;async function za(e,t){const n=Aa.get(e);if(Aa.delete(e),null==n)throw new ae("Can't get dry-run request");let r;try{const e="number"==typeof n[0].top?(await t.getKeyBlockByHeight(n[0].top)).hash:n[0].top;r=await t.protectedDryRunTxs({top:e,txEvents:n[0].txEvents,txs:n.map((e=>({tx:e.tx}))),accounts:Array.from(new Set(n.map((e=>e.accountAddress)))).map((e=>({pubKey:e,amount:Vr.amount})))})}catch(e){return void n.forEach((({reject:t})=>t(e)))}const{results:a,txEvents:i}=r;a.forEach((({result:e,reason:t,...r},a)=>{const{resolve:s,reject:o,tx:c,accountAddress:u}=n[a];"ok"===e?s({...r,txEvents:i}):o(Object.assign(new Le(t),{tx:c,accountAddress:u}))}))}async function Ia(e,t,{top:n,txEvents:r,combine:a,onNode:i}){var s;const o=!0===a?[n,r].join():"immediate",c=null!==(s=Aa.get(o))&&void 0!==s?s:[];return Aa.set(o,c),new Promise(((s,u)=>{var l;c.push({tx:e,accountAddress:t,top:n,txEvents:r,resolve:s,reject:u}),!0===a?null!==(l=c.timeout)&&void 0!==l||(c.timeout=setTimeout((()=>{za(o,i)}))):za(o,i)}))}async function Ea(e,{onNode:t}){return t.getContractCode(e)}async function Ma(e,{onNode:t}){return t.getContract(e)}async function qa(e,{onNode:t}){return t.getNameEntryByName(e)}async function Ra(e,t,{verify:n=!0,resolveByNode:r=!1,onNode:a}){if(ca(e)){if(n||r){const n=(await a.getNameEntryByName(e)).pointers.find((e=>e.key===t));if(null==n)throw new oe(e,t);if(r)return n.id}return aa(e)}try{return Cr(e),e}catch(t){throw new ue(`Invalid name or address: ${e}`)}}var Oa=n(8287).Buffer;const ka={[Kr.Ceres]:{"contract-create":{vmVersion:[Yr.Fate3],abiVersion:[Qr.Fate]},"contract-call":{vmVersion:[],abiVersion:[Qr.Fate]},"oracle-call":{vmVersion:[],abiVersion:[Qr.NoAbi,Qr.Fate]}}};function Ba(e,t){var n;const r=ka[e][t];return{vmVersion:null!==(n=r.vmVersion[0])&&void 0!==n?n:Yr.Fate2,abiVersion:r.abiVersion[0]}}var Ua={serialize(e,t,{consensusProtocolVersion:n=Kr.Ceres}){return null!=e||(e=Ba(n,"contract-create")),Oa.from([e.vmVersion,0,e.abiVersion])},async prepare(e,t,n){return null!=e?e:null==n.consensusProtocolVersion&&2!==Object.keys(Kr).length&&null!=n.onNode?Ba((await n.onNode.getNodeInfo()).consensusProtocolVersion,"contract-create"):void 0},deserialize(e){const[t,,n]=e;return{vmVersion:+t,abiVersion:+n}}},$a=n(8287).Buffer,Ga={_getProtocolDetails(e,t){return Ba(e,Xr.ContractCallTx===t||Xr.GaMetaTx===t?"contract-call":"oracle-call").abiVersion},serialize(e,{tag:t},{consensusProtocolVersion:n=Kr.Ceres}){const r=null!=e?e:this._getProtocolDetails(n,t);return $a.from([r])},async prepare(e,{tag:t},n){return null!=e?e:null==n.consensusProtocolVersion&&2!==Object.keys(Kr).length&&null!=n.onNode?this._getProtocolDetails((await n.onNode.getNodeInfo()).consensusProtocolVersion,t):void 0},deserialize(e){return e[0]}},Va=n(8287).Buffer;const Da=[cr.AccountAddress,cr.Name,cr.Commitment,cr.OracleAddress,cr.ContractAddress,cr.Channel];function La(...e){return{serialize(t){const n=t.slice(0,2);if(!tr(n,Da))throw new We(n);if(!tr(n,e))throw new j("Address encoding",e.join(", "),n);const r=Da.indexOf(n)+1;return Va.from([...Gr(r),...Cr(t)])},deserialize(t){const n=Va.from(t).readUIntBE(0,1),r=Da[n-1];if(null==r)throw new He(n);if(!tr(r,e))throw new j("Address encoding",e.join(", "),r);return Sr(t.subarray(1),r)}}}function ja(e){return{serialize(t,n){return t.map((t=>e.serialize(t,n)))},deserialize(t,n){return t.map((t=>e.deserialize(t,n)))}}}var Fa={serialize(e){if(Number(e)<0)throw new j("value","greater or equal to 0",e);return Gr(e,!0)},deserialize(e){return sa(e)}},Ha={...Fa,serializeAettos(e,t,n){return null!=e?e:"0"},serialize(e,t,{denomination:n=Ze.AETTOS,...r}){return Fa.serialize(this.serializeAettos(null!=e?tt(e,{denomination:n}):e,t,r))}},Ja=n(8287).Buffer;function Wa(e,t){return{serialize(e){if(null==e){if(!0===t)return Ja.from([]);throw new j("Encoded data","provided",e)}return Cr(e)},deserialize(t){return Sr(t,e)}}}var Ka=n(8287).Buffer;function Ya(e){return{serialize(t,{packEntry:n}){return ArrayBuffer.isView(t)?Ka.from(t):"string"==typeof t&&t.startsWith("tx_")?Cr(t):Cr(n({...t,...null!=e&&{tag:e}}))},deserialize(t,{unpackEntry:n}){return n(Sr(t,cr.Bytearray),e)}}}var Qa=n(8287).Buffer;function Xa(e){const t=Object.values(e).filter((e=>"number"==typeof e));return{serialize(e){if("number"!=typeof e)throw new j("value","to be a number",e);if(e>255)throw new j("value","to be less than 256",e);if(!tr(e,t))throw new j("value","to be a value of Enum",e);return Qa.from([e])},deserialize(e){if(1!==e.length)throw new j("buffer","to have single element",e.length);const n=e[0];if(!tr(n,t))throw new j("value","to be a value of Enum",n);return n}}}const Za=new WeakMap;async function ei(e){const t=Za.get(e);if(null!=t&&t.time>Date.now()-2e4)return t.gasPrice;const{minGasPrice:n,utilization:r}=(await e.getRecentGasPrices())[0];let a=r<70?0n:BigInt(new E(n.toString()).times(1.01).integerValue().toFixed());const i=100000n*BigInt(Lr);return a>i&&(console.warn(`Estimated gas price ${a} exceeds the maximum safe value for unknown reason. It will be limited to ${i}. To overcome this restriction provide \`gasPrice\`/\`fee\` in options.`),a=i),Za.set(e,{gasPrice:a,time:Date.now()}),a}var ti={...Ha,async prepare(e,t,{onNode:n,denomination:r}){if(null!=e)return e;if(null==n)throw new j("onNode","provided (or provide `gasPrice` instead)",n);const a=await ei(n);return 0n!==a?tt(a,{targetDenomination:r}):void 0},serializeAettos(e=Lr.toString()){if(+e<Lr)throw new F(`Gas price ${e.toString()} must be bigger than ${Lr}`);return e}};function ni(e){const t={[Xr.OracleRegisterTx]:"oracleTtlValue",[Xr.OracleExtendTx]:"oracleTtlValue",[Xr.OracleQueryTx]:"queryTtlValue",[Xr.OracleRespondTx]:"responseTtlValue"},{tag:n}=e;return er(n,t)?e[t[n]]:1}function ri(e,t,n){const{length:r}=Cr(e),a=t(e);let i=0;return a.tag!==Xr.GaMetaTx&&a.tag!==Xr.PayingForTx||(i=Cr(n(a.tx.encodedTx)).length),(e=>{var t;return 15e3*(null!==(t={[Xr.ChannelForceProgressTx]:30,[Xr.ChannelOffChainTx]:0,[Xr.ContractCreateTx]:5,[Xr.ContractCallTx]:12,[Xr.GaAttachTx]:5,[Xr.GaMetaTx]:5,[Xr.PayingForTx]:.2}[e])&&void 0!==t?t:1)})(a.tag)+((e,t,{relativeTtl:n,innerTxSize:r})=>{switch(e){case Xr.OracleRegisterTx:case Xr.OracleExtendTx:case Xr.OracleQueryTx:case Xr.OracleRespondTx:return 20*t+Math.ceil(32e3*n/Math.floor(175200));case Xr.GaMetaTx:case Xr.PayingForTx:return 20*(t-r);default:return 20*t}})(a.tag,r,{relativeTtl:ni(a),innerTxSize:i})}const ai="_gas-price:";var ii={...Ha,async prepare(e,t,{onNode:n}){if(null!=e)return e;if(null==n)throw new j("onNode","provided (or provide `fee` instead)",n);const r=await ei(n);return 0n!==r?ai+r:void 0},serializeAettos(e,{rebuildTx:t,unpackTx:n,buildTx:r,_computingMinFee:a},{_canIncreaseFee:i}){if(null!=a)return a.toFixed();const s=function(e,t,n){let r,a=new E(0);do{r=a,a=new E(Lr).times(ri(e(a),t,n))}while(!a.eq(r));return a}((e=>t({_computingMinFee:e})),n,r),o=!0===e?.startsWith(ai)?s.dividedBy(Lr).times(e.replace(ai,"")):new E(null!=e?e:s);if(s.gt(o)){if(!0===i)return s.toFixed();throw new F(`Fee ${o.toString()} must be bigger than ${s}`)}return o.toFixed()},serialize(e,t,n){return"string"==typeof e&&e.startsWith(ai)?Fa.serialize(this.serializeAettos(e,t,n)):Ha.serialize.call(this,e,t,n)}},si={serialize(e){return Fa.serialize(e)},deserialize(e){return+Fa.deserialize(e)}},oi={...si,serialize(e,{tag:t,rebuildTx:n,unpackTx:r,buildTx:a,_computingGasLimit:i},{gasMax:s=6e6}){if(null!=i)return si.serialize(i);const o=t===Xr.GaMetaTx?Dr:function(e,t,n,r){return e-+ri(t(e),n,r)}(s,(e=>n({_computingGasLimit:e,_canIncreaseFee:!0})),r,a),c=null!=e?e:o;if(c>o)throw new F(`Gas limit ${c} must be less or equal to ${o}`);return si.serialize(c)}},ci=n(8287).Buffer,ui={serialize(e){return ci.from(e)},deserialize(e){return e.toString()}},li={serialize(e){return ui.serialize(e)},deserialize(e){return ui.deserialize(e)}},mi={...Ha,serializeAettos(e,t){const n=ma(t.name),r=new E(null!=e?e:n);if(n.gt(r))throw new ce(r,n);return r.toFixed()},serialize(e,t,n){return Ha.serialize.call(this,e,t,n)}};const di=La(cr.Name);var pi={...di,serialize(e){return di.serialize(ca(e)?aa(e):e)}};function hi(e){return{...si,serialize(e,{tag:t}){if(Xr.GaAttachTx===t&&1!==e)throw new j("nonce","equal 1 if GaAttachTx",e);return si.serialize(e)},async prepare(t,n,r){if(null!=t)return t;const{onNode:a,strategy:i}=r,s=r[e],o="provided (or provide `nonce` instead)";if(null==a)throw new j("onNode",o,a);if(null==s)throw new j("senderId",o,s);return(await a.getAccountNextNonce(s.replace(/^ok_/,"ak_"),{strategy:i}).catch((e=>{if(!nr(e))throw e;return{nextNonce:1}}))).nextNonce},senderKey:e}}var fi=n(8287).Buffer;const yi=fi.from([1]),gi=fi.from([2]),Ni=La(...Da);var wi=e=>({serialize(t){if(t.length>32)throw new F(`Expected 32 pointers or less, got ${t.length} instead`);return t.map((({key:t,id:n})=>{let r;if(zr(n,...Da)&&(r=[...e?[yi]:[],Ni.serialize(n)]),zr(n,cr.Bytearray)){const e=Cr(n);if(e.length>1024)throw new j("Raw pointer","shorter than 1025 bytes",`${e.length} bytes`);r=[gi,e]}if(null==r)throw new Ve(`Unknown AENS pointer value: ${n}`);return[Gr(t),fi.concat(r)]}))},deserialize(t){return t.map((([t,n])=>{if(!e)return{key:t.toString(),id:Ni.deserialize(n)};const r=n.subarray(0,1),a=n.subarray(1);let i;if(r.equals(yi)&&(i=Ni.deserialize(a)),r.equals(gi)&&(i=Sr(a,cr.Bytearray)),null==i)throw new Ve(`Unknown AENS pointer tag: ${r}`);return{key:t.toString(),id:i}}))}}),vi={...Ha,async prepare(e,t,n){if(null!=e)return e;const{onNode:r,oracleId:a}=n,i="provided (or provide `queryFee` instead)";if(null==r)throw new j("onNode",i,r);if(null==a)throw new j("oracleId",i,a);return(await r.getOracleByPubkey(a)).queryFee.toString()}},bi=n(8287).Buffer,xi={serialize(e){return bi.from(e)},deserialize(e){return e}};function _i(e,t){return{serialize(n){if((!0!==t||null!=n)&&n!==e)throw new j("ShortUIntConst",e,n);return si.serialize(e)},deserialize(t){const n=si.deserialize(t);if(n!==e)throw new j("ShortUIntConst",e,n);return e},constValue:e,constValueOptional:!0===t}}var Ci={serialize(e){return Gr(e)},deserialize(e){return e.toString()}},Si=n(8287).Buffer;function Ti(e){return{serialize(t,{buildTx:n}){return ArrayBuffer.isView(t)?Si.from(t):"string"==typeof t&&t.startsWith("tx_")?Cr(t):Cr(n({...t,...null!=e&&{tag:e}}))},deserialize(t,{unpackTx:n}){return n(Sr(t,cr.Transaction),e)}}}var Pi={...si,serialize(e){return si.serialize(null!=e?e:0)},async prepare(e,t,{onNode:n,absoluteTtl:r,_isInternalBuild:a,...i}){if(!0!==r&&0!==e&&(null!=e||!0===a)){if(null==n)throw new j("onNode","provided",n);e=(null!=e?e:3)+await ga({...i,onNode:n,cached:!0})}return e}};function Ai(e,t){return{...t,serialize(n,r){return t.serialize(null!=n?n:e,r)}}}function zi(e,t){return{...t,serialize(n,r,a){return t.serialize(e(n),r,a)}}}let Ii=function(e){return e[e.Ok=0]="Ok",e[e.Error=1]="Error",e[e.Revert=2]="Revert",e}({}),Ei=function(e){return e[e.Account=10]="Account",e[e.Oracle=20]="Oracle",e[e.Name=30]="Name",e[e.Contract=40]="Contract",e[e.ContractCall=41]="ContractCall",e[e.ChannelOffChainUpdateTransfer=570]="ChannelOffChainUpdateTransfer",e[e.ChannelOffChainUpdateDeposit=571]="ChannelOffChainUpdateDeposit",e[e.ChannelOffChainUpdateWithdraw=572]="ChannelOffChainUpdateWithdraw",e[e.ChannelOffChainUpdateCreateContract=573]="ChannelOffChainUpdateCreateContract",e[e.ChannelOffChainUpdateCallContract=574]="ChannelOffChainUpdateCallContract",e[e.Channel=58]="Channel",e[e.TreesPoi=60]="TreesPoi",e[e.StateTrees=62]="StateTrees",e[e.Mtree=63]="Mtree",e[e.MtreeValue=64]="MtreeValue",e[e.ContractsMtree=621]="ContractsMtree",e[e.CallsMtree=622]="CallsMtree",e[e.ChannelsMtree=623]="ChannelsMtree",e[e.NameserviceMtree=624]="NameserviceMtree",e[e.OraclesMtree=625]="OraclesMtree",e[e.AccountsMtree=626]="AccountsMtree",e[e.GaMetaTxAuthData=810]="GaMetaTxAuthData",e}({}),Mi=function(e){return e[e.delta=0]="delta",e[e.block=1]="block",e}({});const qi=Ti(),Ri=Ti(Xr.SignedTx),Oi=Ya(Ei.TreesPoi),ki=Ai(3600,si),Bi=zi((e=>{const t=18e4;if(null!=e||(e=t),e>=1&&e<=t)return e;throw new j("nameTtl","a number between 1 and 180000 blocks",e)}),si),Ui=[{tag:_i(Xr.SignedTx),version:_i(1,!0),signatures:ja(xi),encodedTx:qi},{tag:_i(Xr.SpendTx),version:_i(1,!0),senderId:La(cr.AccountAddress),recipientId:La(cr.AccountAddress,cr.ContractAddress,cr.Name),amount:Ha,fee:ii,ttl:Pi,nonce:hi("senderId"),payload:Wa(cr.Bytearray,!0)},{tag:_i(Xr.NamePreclaimTx),version:_i(1,!0),accountId:La(cr.AccountAddress),nonce:hi("accountId"),commitmentId:La(cr.Commitment),fee:ii,ttl:Pi},{tag:_i(Xr.NameClaimTx),version:_i(2,!0),accountId:La(cr.AccountAddress),nonce:hi("accountId"),name:li,nameSalt:Ai(0,Fa),nameFee:mi,fee:ii,ttl:Pi},{tag:_i(Xr.NameUpdateTx),version:_i(1,!0),accountId:La(cr.AccountAddress),nonce:hi("accountId"),nameId:pi,nameTtl:Bi,pointers:wi(!1),clientTtl:ki,fee:ii,ttl:Pi},{tag:_i(Xr.NameUpdateTx),version:_i(2),accountId:La(cr.AccountAddress),nonce:hi("accountId"),nameId:pi,nameTtl:Bi,pointers:wi(!0),clientTtl:ki,fee:ii,ttl:Pi},{tag:_i(Xr.NameTransferTx),version:_i(1,!0),accountId:La(cr.AccountAddress),nonce:hi("accountId"),nameId:pi,recipientId:La(cr.AccountAddress,cr.Name),fee:ii,ttl:Pi},{tag:_i(Xr.NameRevokeTx),version:_i(1,!0),accountId:La(cr.AccountAddress),nonce:hi("accountId"),nameId:pi,fee:ii,ttl:Pi},{tag:_i(Xr.ContractCreateTx),version:_i(1,!0),ownerId:La(cr.AccountAddress),nonce:hi("ownerId"),code:Wa(cr.ContractBytearray),ctVersion:Ua,fee:ii,ttl:Pi,deposit:zi(((e=0)=>{if(0==+e)return e;throw new j("deposit","equal 0 (because is not refundable)",e)}),Ha),amount:Ha,gasLimit:oi,gasPrice:ti,callData:Wa(cr.ContractBytearray)},{tag:_i(Xr.ContractCallTx),version:_i(1,!0),callerId:La(cr.AccountAddress),nonce:hi("callerId"),contractId:La(cr.ContractAddress,cr.Name),abiVersion:Ga,fee:ii,ttl:Pi,amount:Ha,gasLimit:oi,gasPrice:ti,callData:Wa(cr.ContractBytearray)},{tag:_i(Xr.OracleRegisterTx),version:_i(1,!0),accountId:La(cr.AccountAddress),nonce:hi("accountId"),queryFormat:Ci,responseFormat:Ci,queryFee:Ha,oracleTtlType:Ai(Mi.delta,Xa(Mi)),oracleTtlValue:Ai(500,si),fee:ii,ttl:Pi,abiVersion:Ga},{tag:_i(Xr.OracleExtendTx),version:_i(1,!0),oracleId:La(cr.OracleAddress,cr.Name),nonce:hi("oracleId"),oracleTtlType:Ai(Mi.delta,Xa(Mi)),oracleTtlValue:Ai(500,si),fee:ii,ttl:Pi},{tag:_i(Xr.OracleQueryTx),version:_i(1,!0),senderId:La(cr.AccountAddress),nonce:hi("senderId"),oracleId:La(cr.OracleAddress,cr.Name),query:Ci,queryFee:vi,queryTtlType:Ai(Mi.delta,Xa(Mi)),queryTtlValue:Ai(10,si),responseTtlType:Ai(Mi.delta,Xa(Mi)),responseTtlValue:Ai(10,si),fee:ii,ttl:Pi},{tag:_i(Xr.OracleRespondTx),version:_i(1,!0),oracleId:La(cr.OracleAddress),nonce:hi("oracleId"),queryId:Wa(cr.OracleQueryId),response:Ci,responseTtlType:Ai(Mi.delta,Xa(Mi)),responseTtlValue:Ai(10,si),fee:ii,ttl:Pi},{tag:_i(Xr.ChannelCreateTx),version:_i(2,!0),initiator:La(cr.AccountAddress),initiatorAmount:Fa,responder:La(cr.AccountAddress),responderAmount:Fa,channelReserve:Fa,lockPeriod:Fa,ttl:Pi,fee:ii,initiatorDelegateIds:ja(La(...Da)),responderDelegateIds:ja(La(...Da)),stateHash:Wa(cr.State),nonce:hi("initiator")},{tag:_i(Xr.ChannelCloseMutualTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),initiatorAmountFinal:Fa,responderAmountFinal:Fa,ttl:Pi,fee:ii,nonce:hi("fromId")},{tag:_i(Xr.ChannelCloseSoloTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),payload:Wa(cr.Transaction),poi:Oi,ttl:Pi,fee:ii,nonce:hi("fromId")},{tag:_i(Xr.ChannelSlashTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),payload:Wa(cr.Transaction),poi:Oi,ttl:Pi,fee:ii,nonce:hi("fromId")},{tag:_i(Xr.ChannelDepositTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),amount:Fa,ttl:Pi,fee:ii,stateHash:Wa(cr.State),round:si,nonce:hi("fromId")},{tag:_i(Xr.ChannelWithdrawTx),version:_i(1,!0),channelId:La(cr.Channel),toId:La(cr.AccountAddress),amount:Fa,ttl:Pi,fee:ii,stateHash:Wa(cr.State),round:si,nonce:hi("fromId")},{tag:_i(Xr.ChannelSettleTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),initiatorAmountFinal:Fa,responderAmountFinal:Fa,ttl:Pi,fee:ii,nonce:hi("fromId")},{tag:_i(Xr.ChannelForceProgressTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),payload:Wa(cr.Transaction),round:si,update:Wa(cr.ContractBytearray),stateHash:Wa(cr.State),offChainTrees:Wa(cr.StateTrees),ttl:Pi,fee:ii,nonce:hi("fromId")},{tag:_i(Xr.ChannelOffChainTx),version:_i(2,!0),channelId:La(cr.Channel),round:si,stateHash:Wa(cr.State)},{tag:_i(Xr.ChannelSnapshotSoloTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),payload:Wa(cr.Transaction),ttl:Pi,fee:ii,nonce:hi("fromId")},{tag:_i(Xr.GaAttachTx),version:_i(1,!0),ownerId:La(cr.AccountAddress),nonce:hi("ownerId"),code:Wa(cr.ContractBytearray),authFun:xi,ctVersion:Ua,fee:ii,ttl:Pi,gasLimit:oi,gasPrice:ti,callData:Wa(cr.ContractBytearray)},{tag:_i(Xr.GaMetaTx),version:_i(2,!0),gaId:La(cr.AccountAddress),authData:Wa(cr.ContractBytearray),abiVersion:Ga,fee:ii,gasLimit:oi,gasPrice:ti,tx:Ri},{tag:_i(Xr.PayingForTx),version:_i(1,!0),payerId:La(cr.AccountAddress),nonce:hi("payerId"),fee:ii,tx:Ri}];var $i=n(858),Gi=n(8287).Buffer;function Vi(e,t,n,r){const a=e.filter((e=>e.tag.constValue===n));if(0===a.length)throw new Je(`${t[n]} (${n})`,0);if(null==r){const e=a.find((e=>e.version.constValueOptional));if(null==e)throw new ae(`Can't find default schema of ${t[n]} (${n})`);r=e.version.constValue}const i=a.find((e=>e.version.constValue===r));if(null==i)throw new Je(`${t[n]} (${n})`,r);return Object.entries(i)}function Di(e,t,n,r,a){const i=Vi(e,t,n.tag,n.version).map((([e,t])=>t.serialize(n[e],{...n,...r},n)));return Sr((0,$i.encode)(i),a)}function Li(e,t,n,r,a){const i=(0,$i.decode)(Cr(n));if(!ArrayBuffer.isView(i[0])||!ArrayBuffer.isView(i[1]))throw new Ve("Can't parse tag or version in provided RLP");const s=Gi.from(i[0]).readUintBE(0,i[0].length),o=Vi(e,t,s,Gi.from(i[1]).readUintBE(0,i[1].length));if(null!=r&&r!==s)throw new Ve(`Expected ${t[r]} tag, got ${t[s]} instead`);if(i.length!==o.length)throw new j("RLP length",o.length,i.length);return Object.fromEntries(o.map((([e,t],n)=>[e,t.deserialize(i[n],a)])))}var ji=n(8287).Buffer,Fi={serialize(e){return ji.from([e?1:0])},deserialize(e){return 1===e[0]}};function Hi(e,t){return{serialize(e,{packEntry:n}){return Cr(n({tag:Ei.Mtree,values:Object.entries(e).map((([e,r])=>({tag:Ei.MtreeValue,key:Cr(e),value:Cr(n({...r,tag:t}))})))}))},deserialize(n,{unpackEntry:r}){const{values:a}=r(Sr(n,cr.Bytearray),Ei.Mtree);return Object.fromEntries(a.filter((({key:t})=>e!==cr.ContractAddress||32===t.length)).map((({key:n,value:a})=>[Sr(n,e),r(Sr(a,cr.Bytearray),t)])))},recursiveType:!0}}var Ji,Wi=n(8287).Buffer;function Ki(e,t,n){Yi(e,t),t.set(e,n)}function Yi(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Qi(e,t,n){return e.set(Zi(e,t),n),n}function Xi(e,t){return e.get(Zi(e,t))}function Zi(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var es=function(e){return e[e.Branch=0]="Branch",e[e.Extension=1]="Extension",e[e.Leaf=2]="Leaf",e}(es||{}),ts=new WeakMap,ns=new WeakMap,rs=new WeakMap,as=new WeakMap,is=new WeakMap,ss=new WeakMap,os=new WeakSet;class cs{get isComplete(){return Xi(ns,this)}constructor(e,t,n,r){var a;if(Yi(this,a=os),a.add(this),Ki(this,ts,void 0),Ki(this,ns,!0),Ki(this,rs,void 0),Ki(this,as,void 0),Ki(this,is,void 0),Ki(this,ss,void 0),Qi(as,this,t),Qi(is,this,n),Qi(ss,this,r),Qi(ts,this,e[0].toString("hex")),Qi(rs,this,Object.fromEntries(e[1].map((e=>[e[0].toString("hex"),e[1]])))),null!=Xi(rs,this)[Xi(ts,this)])Object.entries(Xi(rs,this)).forEach((([e,t])=>{if(us.call(cs,t)!==e)throw new Oe;const{type:n}=ls.call(cs,t);switch(n){case es.Branch:t.slice(0,16).filter((e=>e.length)).forEach((e=>{null==Xi(rs,this)[e.toString("hex")]&&Qi(ns,this,!1)}));break;case es.Extension:if(null==Xi(rs,this)[t[1].toString("hex")])throw new ke("Can't find a node by hash in extension node");break;case es.Leaf:break;default:throw new ae(`Unknown MPTree node type: ${n}`)}}));else{if(0!==Object.keys(Xi(rs,this)).length)throw new ke("Can't find a node by root hash");Qi(ns,this,!1)}}isEqual(e){return Xi(ts,this)===Xi(ts,e)}serialize(){return[Wi.from(Xi(ts,this),"hex"),Object.entries(Xi(rs,this)).map((([e,t])=>[Wi.from(e,"hex"),t]))]}get(e){const t=Zi(os,this,ms).call(this,Cr(e).toString("hex"));return null==t?t:Xi(ss,this).call(this,Sr(t,cr.Bytearray),Xi(is,this))}toObject(){return Object.fromEntries(Zi(os,this,ds).call(this).filter((([e])=>Xi(as,this)!==cr.ContractAddress||66!==e.length)).map((([e,t])=>[Sr(Wi.from(e,"hex"),Xi(as,this)),Xi(ss,this).call(this,Sr(t,cr.Bytearray),Xi(is,this))])))}}function us(e){return Wi.from(Mr((0,$i.encode)(e))).toString("hex")}function ls(e){switch(e.length){case 17:return{type:es.Branch,...0!==e[16].length&&{value:e[16]}};case 2:{const t=e[0][0]>>4;if(t>3)throw new Ue(t);const n=t<=1?es.Extension:es.Leaf,r=[0,2].includes(t)?2:1;return{type:n,...n===es.Leaf&&{value:e[1]},path:e[0].toString("hex").slice(r)}}default:throw new Be(e.length)}}function ms(e){let t=Xi(ts,this),n=e;for(;;){const e=Xi(rs,this)[t];if(null==e){if(!this.isComplete)return;throw new ae("Can't find node in complete tree")}const{type:r,value:a,path:i}=ls.call(Ji,e);switch(r){case es.Branch:if(0===n.length)return a;t=e[+`0x${n[0]}`].toString("hex"),n=n.substring(1);break;case es.Extension:if(n.substring(0,i?.length)!==i)return;t=e[1].toString("hex"),n=n.substring(i.length);break;case es.Leaf:if(i!==n)return;return a;default:throw new ae(`Unknown MPTree node type: ${r}`)}}}function ds(){const e=[],t=(n,r)=>{const a=Xi(rs,this)[n];if(null==a){if(!this.isComplete)return;throw new ae("Can't find node in complete tree")}const{type:i,value:s,path:o}=ls.call(Ji,a);switch(i){case es.Branch:a.slice(0,16).map(((e,t)=>[e,t])).filter((([e])=>e.length)).forEach((([e,n])=>t(e.toString("hex"),r+n.toString(16)))),null!=s&&e.push([r,s]);break;case es.Extension:t(a[1].toString("hex"),r+o);break;case es.Leaf:if(null==s)throw new ie;e.push([r+o,s]);break;default:throw new ae(`Unknown MPTree node type: ${i}`)}};return t(Xi(ts,this),""),e}function ps(e,t){return{serialize(e){return e.serialize()},deserialize(n,{unpackEntry:r}){return new cs(n,e,t,r)}}}function hs(e){return{serialize(t,{packEntry:n}){return Cr(n({tag:e,payload:t}))},deserialize(t,{unpackEntry:n}){return n(Sr(t,cr.Bytearray),e).payload},recursiveType:!0}}Ji=cs;const fs=ja(Ya(Ei.MtreeValue)),ys=Hi(cr.ContractAddress,Ei.Contract),gs=Hi(cr.AccountAddress,Ei.Account),Ns=Hi(cr.Bytearray,Ei.ContractCall),ws=Hi(cr.Channel,Ei.Channel),vs=Hi(cr.Name,Ei.Name),bs=Hi(cr.OracleAddress,Ei.Oracle),xs=[{tag:_i(Ei.Account),version:_i(1),nonce:si,balance:Fa},{tag:_i(Ei.Account),version:_i(2,!0),flags:Fa,nonce:si,balance:Fa,gaContract:La(cr.ContractAddress,cr.Name),gaAuthFun:Wa(cr.ContractBytearray)},{tag:_i(Ei.Name),version:_i(1,!0),accountId:La(cr.AccountAddress),nameTtl:si,status:xi,clientTtl:si,pointers:wi},{tag:_i(Ei.Contract),version:_i(1,!0),owner:La(cr.AccountAddress),ctVersion:Ua,code:Wa(cr.ContractBytearray),log:Wa(cr.ContractBytearray),active:Fi,referers:ja(La(cr.AccountAddress)),deposit:Ha},{tag:_i(Ei.ContractCall),version:_i(2,!0),callerId:La(cr.AccountAddress),callerNonce:si,height:si,contractId:La(cr.ContractAddress),gasPrice:Fa,gasUsed:si,returnValue:Wa(cr.ContractBytearray),returnType:Xa(Ii),log:ja(xi)},{tag:_i(Ei.Oracle),version:_i(1,!0),accountId:La(cr.AccountAddress),queryFormat:Ci,responseFormat:Ci,queryFee:Ha,oracleTtlValue:si,abiVersion:Ga},{tag:_i(Ei.Channel),version:_i(3,!0),initiator:La(cr.AccountAddress),responder:La(cr.AccountAddress),channelAmount:Fa,initiatorAmount:Fa,responderAmount:Fa,channelReserve:Fa,initiatorDelegateIds:ja(La(...Da)),responderDelegateIds:ja(La(...Da)),stateHash:Wa(cr.State),round:si,soloRound:Fa,lockPeriod:Fa,lockedUntil:Fa,initiatorAuth:Wa(cr.ContractBytearray),responderAuth:Wa(cr.ContractBytearray)},{tag:_i(Ei.ChannelOffChainUpdateTransfer),version:_i(1,!0),from:La(cr.AccountAddress),to:La(cr.AccountAddress),amount:Fa},{tag:_i(Ei.ChannelOffChainUpdateDeposit),version:_i(1,!0),from:La(cr.AccountAddress),amount:Fa},{tag:_i(Ei.ChannelOffChainUpdateWithdraw),version:_i(1,!0),from:La(cr.AccountAddress),amount:Fa},{tag:_i(Ei.ChannelOffChainUpdateCreateContract),version:_i(1,!0),owner:La(cr.AccountAddress),ctVersion:Ua,code:Wa(cr.ContractBytearray),deposit:Fa,callData:Wa(cr.ContractBytearray)},{tag:_i(Ei.ChannelOffChainUpdateCallContract),version:_i(1,!0),caller:La(cr.AccountAddress),contract:La(cr.ContractAddress),abiVersion:Ga,amount:Fa,callData:Wa(cr.ContractBytearray),callStack:xi,gasPrice:ti,gasLimit:oi},{tag:_i(Ei.TreesPoi),version:_i(1,!0),accounts:ja(ps(cr.AccountAddress,Ei.Account)),calls:ja(ps(cr.Bytearray,Ei.ContractCall)),channels:ja(ps(cr.Channel,Ei.Channel)),contracts:ja(ps(cr.ContractAddress,Ei.Contract)),ns:ja(ps(cr.Name,Ei.Name)),oracles:ja(ps(cr.OracleAddress,Ei.Oracle))},{tag:_i(Ei.StateTrees),version:_i(0,!0),contracts:hs(Ei.ContractsMtree),calls:hs(Ei.CallsMtree),channels:hs(Ei.ChannelsMtree),ns:hs(Ei.NameserviceMtree),oracles:hs(Ei.OraclesMtree),accounts:hs(Ei.AccountsMtree)},{tag:_i(Ei.Mtree),version:_i(1,!0),values:fs},{tag:_i(Ei.MtreeValue),version:_i(1,!0),key:xi,value:xi},{tag:_i(Ei.ContractsMtree),version:_i(1,!0),payload:ys},{tag:_i(Ei.CallsMtree),version:_i(1,!0),payload:Ns},{tag:_i(Ei.ChannelsMtree),version:_i(1,!0),payload:ws},{tag:_i(Ei.NameserviceMtree),version:_i(1,!0),payload:vs},{tag:_i(Ei.OraclesMtree),version:_i(1,!0),payload:bs},{tag:_i(Ei.AccountsMtree),version:_i(1,!0),payload:gs},{tag:_i(Ei.GaMetaTxAuthData),version:_i(1,!0),fee:Ha,gasPrice:ti,txHash:Wa(cr.TxHash)}],_s=[[Ei.CallsMtree,cr.CallStateTree],[Ei.StateTrees,cr.StateTrees],[Ei.TreesPoi,cr.Poi]];function Cs(e){var t;const n=null!==(t=_s.find((([t])=>t===e.tag))?.[1])&&void 0!==t?t:cr.Bytearray;return Di(xs,Ei,e,{packEntry:Cs},n)}function Ss(e,t){return null!=t||(t=_s.find((([,t])=>e.startsWith(t)))?.[0]),Li(xs,Ei,e,t,{unpackEntry:Ss})}function Ts(e,t){return Vi(Ui,Xr,e,t)}function Ps(e){return Di(Ui,Xr,e,{unpackTx:zs,buildTx:Ps,rebuildTx:t=>Ps({...e,...t}),packEntry:Cs},cr.Transaction)}async function As(e){return await Promise.all(Ts(e.tag,e.version).map((async([t,n])=>{null!=n.prepare&&(e[t]=await n.prepare(e[t],e,e))}))),Ps(e)}function zs(e,t){return Li(Ui,Xr,e,t,{unpackTx:zs,unpackEntry:Ss})}function Is(e){return Sr(Mr("string"==typeof e&&e.startsWith("tx_")?Cr(e):e),cr.TxHash)}function Es(e){let t=zs(e);if(Xr.SignedTx===t.tag&&(t=t.encodedTx),Xr.ContractCreateTx!==t.tag&&Xr.GaAttachTx!==t.tag)throw new j("contractTx","a contractCreateTx or gaAttach",t.tag);return ea(t.ownerId,t.nonce)}function Ms(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function qs(e){const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}const Rs="$",Os="_",ks=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,Bs=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;function Us(e,t){var n,r;const a=e.parsedHeaders;if("HEAD"===e.request.method)return Object.assign(Object.assign({},a),{body:e.parsedBody});const i=t&&t.bodyMapper,s=Boolean(null==i?void 0:i.nullable),o=null==i?void 0:i.type.name;if("Stream"===o)return Object.assign(Object.assign({},a),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody});const c="Composite"===o&&i.type.modelProperties||{},u=Object.keys(c).some((e=>""===c[e].serializedName));if("Sequence"===o||u){const t=null!==(n=e.parsedBody)&&void 0!==n?n:[];for(const n of Object.keys(c))c[n].serializedName&&(t[n]=null===(r=e.parsedBody)||void 0===r?void 0:r[n]);if(a)for(const e of Object.keys(a))t[e]=a[e];return!s||e.parsedBody||a||0!==Object.getOwnPropertyNames(c).length?t:null}return function(e){const t=Object.assign(Object.assign({},e.headers),e.body);return e.hasNullableType&&0===Object.getOwnPropertyNames(t).length?e.shouldWrapBody?{body:null}:null:e.shouldWrapBody?Object.assign(Object.assign({},e.headers),{body:e.body}):t}({body:e.parsedBody,headers:a,hasNullableType:s,shouldWrapBody:(l=e.parsedBody,m=o,"Composite"!==m&&"Dictionary"!==m&&("string"==typeof l||"number"==typeof l||"boolean"==typeof l||null!==(null==m?void 0:m.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i))||null==l))});var l,m}class $s{constructor(e={},t=!1){this.modelMappers=e,this.isXML=t}validateConstraints(e,t,n){const r=(e,r)=>{throw new Error(`"${n}" with value "${t}" should satisfy the constraint "${e}": ${r}.`)};if(e.constraints&&null!=t){const{ExclusiveMaximum:n,ExclusiveMinimum:a,InclusiveMaximum:i,InclusiveMinimum:s,MaxItems:o,MaxLength:c,MinItems:u,MinLength:l,MultipleOf:m,Pattern:d,UniqueItems:p}=e.constraints;if(void 0!==n&&t>=n&&r("ExclusiveMaximum",n),void 0!==a&&t<=a&&r("ExclusiveMinimum",a),void 0!==i&&t>i&&r("InclusiveMaximum",i),void 0!==s&&t<s&&r("InclusiveMinimum",s),void 0!==o&&t.length>o&&r("MaxItems",o),void 0!==c&&t.length>c&&r("MaxLength",c),void 0!==u&&t.length<u&&r("MinItems",u),void 0!==l&&t.length<l&&r("MinLength",l),void 0!==m&&t%m!=0&&r("MultipleOf",m),d){const e="string"==typeof d?new RegExp(d):d;"string"==typeof t&&null!==t.match(e)||r("Pattern",d)}p&&t.some(((e,t,n)=>n.indexOf(e)!==t))&&r("UniqueItems",p)}}serialize(e,t,n,r={xml:{}}){var a,i,s;const o={xml:{rootName:null!==(a=r.xml.rootName)&&void 0!==a?a:"",includeRoot:null!==(i=r.xml.includeRoot)&&void 0!==i&&i,xmlCharKey:null!==(s=r.xml.xmlCharKey)&&void 0!==s?s:Os}};let c={};const u=e.type.name;n||(n=e.serializedName),null!==u.match(/^Sequence$/i)&&(c=[]),e.isConstant&&(t=e.defaultValue);const{required:l,nullable:m}=e;if(l&&m&&void 0===t)throw new Error(`${n} cannot be undefined.`);if(l&&!m&&null==t)throw new Error(`${n} cannot be null or undefined.`);if(!l&&!1===m&&null===t)throw new Error(`${n} cannot be null.`);return null==t||null!==u.match(/^any$/i)?c=t:null!==u.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)?c=function(e,t,n){if(null!=n)if(null!==e.match(/^Number$/i)){if("number"!=typeof n)throw new Error(`${t} with value ${n} must be of type number.`)}else if(null!==e.match(/^String$/i)){if("string"!=typeof n.valueOf())throw new Error(`${t} with value "${n}" must be of type string.`)}else if(null!==e.match(/^Uuid$/i)){if("string"!=typeof n.valueOf()||(r=n,!Bs.test(r)))throw new Error(`${t} with value "${n}" must be of type string and a valid uuid.`)}else if(null!==e.match(/^Boolean$/i)){if("boolean"!=typeof n)throw new Error(`${t} with value ${n} must be of type boolean.`)}else if(null!==e.match(/^Stream$/i)){const e=typeof n;if(!("string"===e||"function"==typeof n.pipe||"function"==typeof n.tee||n instanceof ArrayBuffer||ArrayBuffer.isView(n)||("function"==typeof Blob||"object"==typeof Blob)&&n instanceof Blob||"function"===e))throw new Error(`${t} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`)}var r;return n}(u,n,t):null!==u.match(/^Enum$/i)?c=function(e,t,n){if(!t)throw new Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`);if(!t.some((e=>"string"==typeof e.valueOf()?e.toLowerCase()===n.toLowerCase():e===n)))throw new Error(`${n} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`);return n}(n,e.type.allowedValues,t):null!==u.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)?c=function(e,t,n){if(null!=t)if(null!==e.match(/^Date$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(null!==e.match(/^DateTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(null!==e.match(/^DateTimeRfc1123$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in RFC-1123 format.`);t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(null!==e.match(/^UnixTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw new Error(`${n} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`);t=function(e){if(e)return"string"==typeof e.valueOf()&&(e=new Date(e)),Math.floor(e.getTime()/1e3)}(t)}else if(null!==e.match(/^TimeSpan$/i)&&!function(e){return ks.test(e)}(t))throw new Error(`${n} must be a string in ISO 8601 format. Instead was "${t}".`);return t}(u,t,n):null!==u.match(/^ByteArray$/i)?c=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);t=Ms(t)}return t}(n,t):null!==u.match(/^Base64Url$/i)?c=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw new Error(`${e} must be of type Uint8Array.`);t=function(e){if(e){if(!(e instanceof Uint8Array))throw new Error("Please provide an input of type Uint8Array for converting to Base64Url.");return function(e){let t=e.length;for(;t-1>=0&&"="===e[t-1];)--t;return e.substr(0,t)}(Ms(e)).replace(/\+/g,"-").replace(/\//g,"_")}}(t)}return t}(n,t):null!==u.match(/^Sequence$/i)?c=function(e,t,n,r,a,i){var s;if(!Array.isArray(n))throw new Error(`${r} must be of type Array.`);let o=t.type.element;if(!o||"object"!=typeof o)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${r}.`);"Composite"===o.type.name&&o.type.className&&(o=null!==(s=e.modelMappers[o.type.className])&&void 0!==s?s:o);const c=[];for(let t=0;t<n.length;t++){const s=e.serialize(o,n[t],r,i);if(a&&o.xmlNamespace){const e=o.xmlNamespacePrefix?`xmlns:${o.xmlNamespacePrefix}`:"xmlns";"Composite"===o.type.name?(c[t]=Object.assign({},s),c[t][Rs]={[e]:o.xmlNamespace}):(c[t]={},c[t][i.xml.xmlCharKey]=s,c[t][Rs]={[e]:o.xmlNamespace})}else c[t]=s}return c}(this,e,t,n,Boolean(this.isXML),o):null!==u.match(/^Dictionary$/i)?c=function(e,t,n,r,a,i){if("object"!=typeof n)throw new Error(`${r} must be of type object.`);const s=t.type.value;if(!s||"object"!=typeof s)throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${r}.`);const o={};for(const t of Object.keys(n)){const c=e.serialize(s,n[t],r,i);o[t]=js(s,c,a,i)}if(a&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns",n=o;return n[Rs]={[e]:t.xmlNamespace},n}return o}(this,e,t,n,Boolean(this.isXML),o):null!==u.match(/^Composite$/i)&&(c=function(e,t,n,r,a,i){if(Js(e,t)&&(t=Hs(e,t,n,"clientName")),null!=n){const s={},o=Ls(e,t,r);for(const c of Object.keys(o)){const u=o[c];if(u.readOnly)continue;let l,m=s;if(e.isXML)l=u.xmlIsWrapped?u.xmlName:u.xmlElementName||u.xmlName;else{const e=Vs(u.serializedName);l=e.pop();for(const t of e){null==m[t]&&(void 0!==n[c]&&null!==n[c]||void 0!==u.defaultValue)&&(m[t]={}),m=m[t]}}if(null!=m){if(a&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns";m[Rs]=Object.assign(Object.assign({},m[Rs]),{[e]:t.xmlNamespace})}const s=""!==u.serializedName?r+"."+u.serializedName:r;let o=n[c];const d=Js(e,t);d&&d.clientName===c&&null==o&&(o=t.serializedName);const p=e.serialize(u,o,s,i);if(void 0!==p&&null!=l){const e=js(u,p,a,i);a&&u.xmlIsAttribute?(m[Rs]=m[Rs]||{},m[Rs][l]=p):a&&u.xmlIsWrapped?m[l]={[u.xmlElementName]:e}:m[l]=e}}}const c=function(e,t,n){const r=t.type.additionalProperties;if(!r&&t.type.className){const r=Ds(e,t,n);return null==r?void 0:r.type.additionalProperties}return r}(e,t,r);if(c){const t=Object.keys(o);for(const a in n)t.every((e=>e!==a))&&(s[a]=e.serialize(c,n[a],r+'["'+a+'"]',i))}return s}return n}(this,e,t,n,Boolean(this.isXML),o)),c}deserialize(e,t,n,r={xml:{}}){var a,i,s,o;const c={xml:{rootName:null!==(a=r.xml.rootName)&&void 0!==a?a:"",includeRoot:null!==(i=r.xml.includeRoot)&&void 0!==i&&i,xmlCharKey:null!==(s=r.xml.xmlCharKey)&&void 0!==s?s:Os},ignoreUnknownProperties:null!==(o=r.ignoreUnknownProperties)&&void 0!==o&&o};if(null==t)return this.isXML&&"Sequence"===e.type.name&&!e.xmlIsWrapped&&(t=[]),void 0!==e.defaultValue&&(t=e.defaultValue),t;let u;const l=e.type.name;if(n||(n=e.serializedName),null!==l.match(/^Composite$/i))u=function(e,t,n,r,a){var i,s;const o=null!==(i=a.xml.xmlCharKey)&&void 0!==i?i:Os;Js(e,t)&&(t=Hs(e,t,n,"serializedName"));const c=Ls(e,t,r);let u={};const l=[];for(const i of Object.keys(c)){const m=c[i],d=Vs(c[i].serializedName);l.push(d[0]);const{serializedName:p,xmlName:h,xmlElementName:f}=m;let y=r;""!==p&&void 0!==p&&(y=r+"."+p);const g=m.headerCollectionPrefix;if(g){const t={};for(const r of Object.keys(n))r.startsWith(g)&&(t[r.substring(g.length)]=e.deserialize(m.type.value,n[r],y,a)),l.push(r);u[i]=t}else if(e.isXML)if(m.xmlIsAttribute&&n[Rs])u[i]=e.deserialize(m,n[Rs][h],y,a);else if(m.xmlIsMsText)void 0!==n[o]?u[i]=n[o]:"string"==typeof n&&(u[i]=n);else{const t=f||h||p;if(m.xmlIsWrapped){const t=n[h],r=null!==(s=null==t?void 0:t[f])&&void 0!==s?s:[];u[i]=e.deserialize(m,r,y,a),l.push(h)}else{const r=n[t];u[i]=e.deserialize(m,r,y,a),l.push(t)}}else{let r,s=n,o=0;for(const e of d){if(!s)break;o++,s=s[e]}null===s&&o<d.length&&(s=void 0),r=s;const l=t.type.polymorphicDiscriminator;let p;if(l&&i===l.clientName&&null==r&&(r=t.serializedName),Array.isArray(n[i])&&""===c[i].serializedName){r=n[i];const t=e.deserialize(m,r,y,a);for(const[e,n]of Object.entries(u))Object.prototype.hasOwnProperty.call(t,e)||(t[e]=n);u=t}else void 0===r&&void 0===m.defaultValue||(p=e.deserialize(m,r,y,a),u[i]=p)}}const m=t.type.additionalProperties;if(m){const t=e=>{for(const t in c)if(Vs(c[t].serializedName)[0]===e)return!1;return!0};for(const i in n)t(i)&&(u[i]=e.deserialize(m,n[i],r+'["'+i+'"]',a))}else if(n&&!a.ignoreUnknownProperties)for(const e of Object.keys(n))void 0!==u[e]||l.includes(e)||Fs(e,a)||(u[e]=n[e]);return u}(this,e,t,n,c);else{if(this.isXML){const e=c.xml.xmlCharKey;void 0!==t[Rs]&&void 0!==t[e]&&(t=t[e])}null!==l.match(/^Number$/i)?(u=parseFloat(t),isNaN(u)&&(u=t)):null!==l.match(/^Boolean$/i)?u="true"===t||"false"!==t&&t:null!==l.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)?u=t:null!==l.match(/^(Date|DateTime|DateTimeRfc1123)$/i)?u=new Date(t):null!==l.match(/^UnixTime$/i)?u=function(e){if(e)return new Date(1e3*e)}(t):null!==l.match(/^ByteArray$/i)?u=qs(t):null!==l.match(/^Base64Url$/i)?u=function(e){if(e){if(e&&"string"!=typeof e.valueOf())throw new Error("Please provide an input of type string for converting to Uint8Array");return qs(e=e.replace(/-/g,"+").replace(/_/g,"/"))}}(t):null!==l.match(/^Sequence$/i)?u=function(e,t,n,r,a){var i;let s=t.type.element;if(!s||"object"!=typeof s)throw new Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${r}`);if(n){Array.isArray(n)||(n=[n]),"Composite"===s.type.name&&s.type.className&&(s=null!==(i=e.modelMappers[s.type.className])&&void 0!==i?i:s);const t=[];for(let i=0;i<n.length;i++)t[i]=e.deserialize(s,n[i],`${r}[${i}]`,a);return t}return n}(this,e,t,n,c):null!==l.match(/^Dictionary$/i)&&(u=function(e,t,n,r,a){const i=t.type.value;if(!i||"object"!=typeof i)throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${r}`);if(n){const t={};for(const s of Object.keys(n))t[s]=e.deserialize(i,n[s],r,a);return t}return n}(this,e,t,n,c))}return e.isConstant&&(u=e.defaultValue),u}}function Gs(e={},t=!1){return new $s(e,t)}function Vs(e){const t=[];let n="";if(e){const r=e.split(".");for(const e of r)"\\"===e.charAt(e.length-1)?n+=e.substr(0,e.length-1)+".":(n+=e,t.push(n),n="")}return t}function Ds(e,t,n){const r=t.type.className;if(!r)throw new Error(`Class name for model "${n}" is not provided in the mapper "${JSON.stringify(t,void 0,2)}".`);return e.modelMappers[r]}function Ls(e,t,n){let r=t.type.modelProperties;if(!r){const a=Ds(e,t,n);if(!a)throw new Error(`mapper() cannot be null or undefined for model "${t.type.className}".`);if(r=null==a?void 0:a.type.modelProperties,!r)throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(a)}" of type "${t.type.className}" for object "${n}".`)}return r}function js(e,t,n,r){if(!n||!e.xmlNamespace)return t;const a=e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:"xmlns",i={[a]:e.xmlNamespace};if(["Composite"].includes(e.type.name)){if(t[Rs])return t;{const e=Object.assign({},t);return e[Rs]=i,e}}const s={};return s[r.xml.xmlCharKey]=t,s[Rs]=i,s}function Fs(e,t){return[Rs,t.xml.xmlCharKey].includes(e)}function Hs(e,t,n,r){var a;const i=Js(e,t);if(i){let s=i[r];if(s){"serializedName"===r&&(s=s.replace(/\\/gi,""));const i=n[s],o=null!==(a=t.type.uberParent)&&void 0!==a?a:t.type.className;if("string"==typeof i&&o){const n=function(e,t,n){const r=[n];for(;r.length;){const n=r.shift(),a=t===n?t:n+"."+t;if(Object.prototype.hasOwnProperty.call(e,a))return e[a];for(const[t,a]of Object.entries(e))t.startsWith(n+".")&&a.type.uberParent===n&&a.type.className&&r.push(a.type.className)}}(e.modelMappers.discriminators,i,o);n&&(t=n)}}}return t}function Js(e,t){return t.type.polymorphicDiscriminator||Ws(e,t.type.uberParent)||Ws(e,t.type.className)}function Ws(e,t){return t&&e.modelMappers[t]&&e.modelMappers[t].type.polymorphicDiscriminator}const Ks="Sequence",Ys="Stream",Qs={operationRequestMap:new WeakMap};function Xs(e,t,n){let r=t.parameterPath;const a=t.mapper;let i;if("string"==typeof r&&(r=[r]),Array.isArray(r)){if(r.length>0)if(a.isConstant)i=a.defaultValue;else{let t=Zs(e,r);!t.propertyFound&&n&&(t=Zs(n,r));let s=!1;t.propertyFound||(s=a.required||"options"===r[0]&&2===r.length),i=s?a.defaultValue:t.propertyValue}}else{a.required&&(i={});for(const t in r){const s=a.type.modelProperties[t],o=Xs(e,{parameterPath:r[t],mapper:s},n);void 0!==o&&(i||(i={}),i[t]=o)}}return i}function Zs(e,t){const n={propertyFound:!1};let r=0;for(;r<t.length;++r){const n=t[r];if(!e||!(n in e))break;e=e[n]}return r===t.length&&(n.propertyValue=e,n.propertyFound=!0),n}const eo=Symbol.for("@azure/core-client original request");function to(e){if(function(e){return eo in e}(e))return to(e[eo]);let t=Qs.operationRequestMap.get(e);return t||(t={},Qs.operationRequestMap.set(e,t)),t}const no=["application/json","text/json"],ro=["application/xml","application/atom+xml"];function ao(e){const{parameterPath:t,mapper:n}=e;let r;return r="string"==typeof t?t:Array.isArray(t)?t.join("."):n.serializedName,r}function io(e={}){const t=Gn(null!=e?e:{});return e.credentialOptions&&t.addPolicy(function(e){var t,n,r;const{credential:a,scopes:i,challengeCallbacks:s}=e,o=e.logger||Ot,c={authorizeRequest:null!==(n=null===(t=null==s?void 0:s.authorizeRequest)||void 0===t?void 0:t.bind(s))&&void 0!==n?n:Hn,authorizeRequestOnChallenge:null===(r=null==s?void 0:s.authorizeRequestOnChallenge)||void 0===r?void 0:r.bind(s)},u=a?function(e,t){let n,r=null,a=null;const i=Object.assign(Object.assign({},jn),t),s={get isRefreshing(){return null!==r},get shouldRefresh(){var e;return!s.isRefreshing&&(!!((null==a?void 0:a.refreshAfterTimestamp)&&a.refreshAfterTimestamp<Date.now())||(null!==(e=null==a?void 0:a.expiresOnTimestamp)&&void 0!==e?e:0)-i.refreshWindowInMs<Date.now())},get mustRefresh(){return null===a||a.expiresOnTimestamp-i.forcedRefreshWindowInMs<Date.now()}};function o(t,o){var c;return s.isRefreshing||(r=async function(e,t,n){async function r(){if(!(Date.now()<n)){const t=await e();if(null===t)throw new Error("Failed to refresh access token.");return t}try{return await e()}catch(e){return null}}let a=await r();for(;null===a;)await wn(t),a=await r();return a}((()=>e.getToken(t,o)),i.retryIntervalInMs,null!==(c=null==a?void 0:a.expiresOnTimestamp)&&void 0!==c?c:Date.now()).then((e=>(r=null,a=e,n=o.tenantId,a))).catch((e=>{throw r=null,a=null,n=void 0,e}))),r}return async(e,t)=>{const r=Boolean(t.claims),i=n!==t.tenantId;return r&&(a=null),i||r||s.mustRefresh?o(e,t):(s.shouldRefresh&&o(e,t),a)}}(a):()=>Promise.resolve(null);return{name:"bearerTokenAuthenticationPolicy",async sendRequest(e,t){if(!e.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");let n,r,a;if(await c.authorizeRequest({scopes:Array.isArray(i)?i:[i],request:e,getAccessToken:u,logger:o}),[n,r]=await Fn(e,t),Jn(n)){let s=Kn(n.headers.get("WWW-Authenticate"));if(s){let c;try{c=atob(s)}catch(e){return o.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${s}`),n}a=await Wn({scopes:Array.isArray(i)?i:[i],response:n,request:e,getAccessToken:u,logger:o},c),a&&([n,r]=await Fn(e,t))}else if(c.authorizeRequestOnChallenge&&(a=await c.authorizeRequestOnChallenge({scopes:Array.isArray(i)?i:[i],request:e,response:n,getAccessToken:u,logger:o}),a&&([n,r]=await Fn(e,t)),Jn(n)&&(s=Kn(n.headers.get("WWW-Authenticate")),s))){let c;try{c=atob(s)}catch(e){return o.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${s}`),n}a=await Wn({scopes:Array.isArray(i)?i:[i],response:n,request:e,getAccessToken:u,logger:o},c),a&&([n,r]=await Fn(e,t))}}if(r)throw r;return n}}}({credential:e.credentialOptions.credential,scopes:e.credentialOptions.credentialScopes})),t.addPolicy(function(e={}){const t=e.stringifyXML;return{name:"serializationPolicy",async sendRequest(e,n){const r=to(e),a=null==r?void 0:r.operationSpec,i=null==r?void 0:r.operationArguments;return a&&i&&(function(e,t,n){var r,a;if(n.headerParameters)for(const r of n.headerParameters){let a=Xs(t,r);if(null!=a||r.mapper.required){a=n.serializer.serialize(r.mapper,a,ao(r));const t=r.mapper.headerCollectionPrefix;if(t)for(const n of Object.keys(a))e.headers.set(t+n,a[n]);else e.headers.set(r.mapper.serializedName||ao(r),a)}}const i=null===(a=null===(r=t.options)||void 0===r?void 0:r.requestOptions)||void 0===a?void 0:a.customHeaders;if(i)for(const t of Object.keys(i))e.headers.set(t,i[t])}(e,i,a),function(e,t,n,r=function(){throw new Error("XML serialization unsupported!")}){var a,i,s,o,c;const u=null===(a=t.options)||void 0===a?void 0:a.serializerOptions,l={xml:{rootName:null!==(i=null==u?void 0:u.xml.rootName)&&void 0!==i?i:"",includeRoot:null!==(s=null==u?void 0:u.xml.includeRoot)&&void 0!==s&&s,xmlCharKey:null!==(o=null==u?void 0:u.xml.xmlCharKey)&&void 0!==o?o:Os}},m=l.xml.xmlCharKey;if(n.requestBody&&n.requestBody.mapper){e.body=Xs(t,n.requestBody);const a=n.requestBody.mapper,{required:i,serializedName:s,xmlName:o,xmlElementName:u,xmlNamespace:d,xmlNamespacePrefix:p,nullable:h}=a,f=a.type.name;try{if(void 0!==e.body&&null!==e.body||h&&null===e.body||i){const t=ao(n.requestBody);e.body=n.serializer.serialize(a,e.body,t,l);const i=f===Ys;if(n.isXML){const t=p?`xmlns:${p}`:"xmlns",n=function(e,t,n,r,a){if(e&&!["Composite","Sequence","Dictionary"].includes(n)){const n={};return n[a.xml.xmlCharKey]=r,n[Rs]={[t]:e},n}return r}(d,t,f,e.body,l);f===Ks?e.body=r(function(e,t,n,r){if(Array.isArray(e)||(e=[e]),!n||!r)return{[t]:e};const a={[t]:e};return a[Rs]={[n]:r},a}(n,u||o||s,t,d),{rootName:o||s,xmlCharKey:m}):i||(e.body=r(n,{rootName:o||s,xmlCharKey:m}))}else{if("String"===f&&((null===(c=n.contentType)||void 0===c?void 0:c.match("text/plain"))||"text"===n.mediaType))return;i||(e.body=JSON.stringify(e.body))}}}catch(e){throw new Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(s,void 0," ")}.`)}}else if(n.formDataParameters&&n.formDataParameters.length>0){e.formData={};for(const r of n.formDataParameters){const a=Xs(t,r);if(null!=a){const t=r.mapper.serializedName||ao(r);e.formData[t]=n.serializer.serialize(r.mapper,a,ao(r),l)}}}}(e,i,a,t)),n(e)}}}(e.serializationOptions),{phase:"Serialize"}),t.addPolicy(function(e={}){var t,n,r,a,i,s,o;const c=null!==(n=null===(t=e.expectedContentTypes)||void 0===t?void 0:t.json)&&void 0!==n?n:no,u=null!==(a=null===(r=e.expectedContentTypes)||void 0===r?void 0:r.xml)&&void 0!==a?a:ro,l=e.parseXML,m=e.serializerOptions,d={xml:{rootName:null!==(i=null==m?void 0:m.xml.rootName)&&void 0!==i?i:"",includeRoot:null!==(s=null==m?void 0:m.xml.includeRoot)&&void 0!==s&&s,xmlCharKey:null!==(o=null==m?void 0:m.xml.xmlCharKey)&&void 0!==o?o:Os}};return{name:"deserializationPolicy",async sendRequest(e,t){const n=await t(e);return async function(e,t,n,r,a){const i=await async function(e,t,n,r,a){var i;if(!(null===(i=n.request.streamResponseStatusCodes)||void 0===i?void 0:i.has(n.status))&&n.bodyAsText){const i=n.bodyAsText,s=n.headers.get("Content-Type")||"",o=s?s.split(";").map((e=>e.toLowerCase())):[];try{if(0===o.length||o.some((t=>-1!==e.indexOf(t))))return n.parsedBody=JSON.parse(i),n;if(o.some((e=>-1!==t.indexOf(e)))){if(!a)throw new Error("Parsing XML not supported.");const e=await a(i,r.xml);return n.parsedBody=e,n}}catch(e){const t=`Error "${e}" occurred while parsing the response body - ${n.bodyAsText}.`,r=e.code||Un.PARSE_ERROR;throw new Un(t,{code:r,statusCode:n.status,request:n.request,response:n})}}return n}(e,t,n,r,a);if(!function(e){const t=to(e.request),n=null==t?void 0:t.shouldDeserialize;let r;return r=void 0===n||("boolean"==typeof n?n:n(e)),r}(i))return i;const s=to(i.request),o=null==s?void 0:s.operationSpec;if(!o||!o.responses)return i;const c=function(e){let t;const n=to(e.request),r=null==n?void 0:n.operationSpec;return r&&(t=(null==n?void 0:n.operationResponseGetter)?null==n?void 0:n.operationResponseGetter(r,e):r.responses[e.status]),t}(i),{error:u,shouldReturnResponse:l}=function(e,t,n,r){var a,i,s,o,c;const u=200<=e.status&&e.status<300,l=function(e){const t=Object.keys(e.responses);return 0===t.length||1===t.length&&"default"===t[0]}(t)?u:!!n;if(l){if(!n)return{error:null,shouldReturnResponse:!1};if(!n.isError)return{error:null,shouldReturnResponse:!1}}const m=null!=n?n:t.responses.default,d=(null===(a=e.request.streamResponseStatusCodes)||void 0===a?void 0:a.has(e.status))?`Unexpected status code: ${e.status}`:e.bodyAsText,p=new Un(d,{statusCode:e.status,request:e.request,response:e});if(!(m||(null===(s=null===(i=e.parsedBody)||void 0===i?void 0:i.error)||void 0===s?void 0:s.code)&&(null===(c=null===(o=e.parsedBody)||void 0===o?void 0:o.error)||void 0===c?void 0:c.message)))throw p;const h=null==m?void 0:m.bodyMapper,f=null==m?void 0:m.headersMapper;try{if(e.parsedBody){const n=e.parsedBody;let a;if(h){let e=n;if(t.isXML&&h.type.name===Ks){e=[];const t=h.xmlElementName;"object"==typeof n&&t&&(e=n[t])}a=t.serializer.deserialize(h,e,"error.response.parsedBody",r)}const i=n.error||a||n;p.code=i.code,i.message&&(p.message=i.message),h&&(p.response.parsedBody=a)}e.headers&&f&&(p.response.parsedHeaders=t.serializer.deserialize(f,e.headers.toJSON(),"operationRes.parsedHeaders"))}catch(t){p.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:p,shouldReturnResponse:!1}}(i,o,c,r);if(u)throw u;if(l)return i;if(c){if(c.bodyMapper){let e=i.parsedBody;o.isXML&&c.bodyMapper.type.name===Ks&&(e="object"==typeof e?e[c.bodyMapper.xmlElementName]:[]);try{i.parsedBody=o.serializer.deserialize(c.bodyMapper,e,"operationRes.parsedBody",r)}catch(e){throw new Un(`Error ${e} occurred in deserializing the responseBody - ${i.bodyAsText}`,{statusCode:i.status,request:i.request,response:i})}}else"HEAD"===o.httpMethod&&(i.parsedBody=n.status>=200&&n.status<300);c.headersMapper&&(i.parsedHeaders=o.serializer.deserialize(c.headersMapper,i.headers.toJSON(),"operationRes.parsedHeaders",{xml:{},ignoreUnknownProperties:!0}))}return i}(c,u,n,d,l)}}}(e.deserializationOptions),{phase:"Deserialize"}),t}let so;const oo={CSV:",",SSV:" ",Multi:"Multi",TSV:"\t",Pipes:"|"};function co(e,t,n,r){const a=function(e,t,n){var r;const a=new Map;if(null===(r=e.urlParameters)||void 0===r?void 0:r.length)for(const r of e.urlParameters){let i=Xs(t,r,n);const s=ao(r);i=e.serializer.serialize(r.mapper,i,s),r.skipEncoding||(i=encodeURIComponent(i)),a.set(`{${r.mapper.serializedName||s}}`,i)}return a}(t,n,r);let i=!1,s=uo(e,a);if(t.path){let e=uo(t.path,a);"/{nextLink}"===t.path&&e.startsWith("/")&&(e=e.substring(1)),e.includes("://")?(s=e,i=!0):s=function(e,t){if(!t)return e;const n=new URL(e);let r=n.pathname;r.endsWith("/")||(r=`${r}/`),t.startsWith("/")&&(t=t.substring(1));const a=t.indexOf("?");if(-1!==a){const e=t.substring(0,a),i=t.substring(a+1);r+=e,i&&(n.search=n.search?`${n.search}&${i}`:i)}else r+=t;return n.pathname=r,n.toString()}(s,e)}const{queryParams:o,sequenceParams:c}=function(e,t,n){var r;const a=new Map,i=new Set;if(null===(r=e.queryParameters)||void 0===r?void 0:r.length)for(const r of e.queryParameters){"Sequence"===r.mapper.type.name&&r.mapper.serializedName&&i.add(r.mapper.serializedName);let s=Xs(t,r,n);if(null!=s||r.mapper.required){s=e.serializer.serialize(r.mapper,s,ao(r));const t=r.collectionFormat?oo[r.collectionFormat]:"";if(Array.isArray(s)&&(s=s.map((e=>null==e?"":e))),"Multi"===r.collectionFormat&&0===s.length)continue;!Array.isArray(s)||"SSV"!==r.collectionFormat&&"TSV"!==r.collectionFormat||(s=s.join(t)),r.skipEncoding||(s=Array.isArray(s)?s.map((e=>encodeURIComponent(e))):encodeURIComponent(s)),!Array.isArray(s)||"CSV"!==r.collectionFormat&&"Pipes"!==r.collectionFormat||(s=s.join(t)),a.set(r.mapper.serializedName||ao(r),s)}}return{queryParams:a,sequenceParams:i}}(t,n,r);return s=function(e,t,n,r=!1){if(0===t.size)return e;const a=new URL(e),i=function(e){const t=new Map;if(!e||"?"!==e[0])return t;const n=(e=e.slice(1)).split("&");for(const e of n){const[n,r]=e.split("=",2),a=t.get(n);a?Array.isArray(a)?a.push(r):t.set(n,[a,r]):t.set(n,r)}return t}(a.search);for(const[e,a]of t){const t=i.get(e);if(Array.isArray(t))if(Array.isArray(a)){t.push(...a);const n=new Set(t);i.set(e,Array.from(n))}else t.push(a);else t?(Array.isArray(a)?a.unshift(t):n.has(e)&&i.set(e,[t,a]),r||i.set(e,a)):i.set(e,a)}const s=[];for(const[e,t]of i)if("string"==typeof t)s.push(`${e}=${t}`);else if(Array.isArray(t))for(const n of t)s.push(`${e}=${n}`);else s.push(`${e}=${t}`);return a.search=s.length?`?${s.join("&")}`:"",a.toString()}(s,o,c,i),s}function uo(e,t){let n=e;for(const[e,r]of t)n=n.split(e).join(r);return n}const lo=It("core-client");class mo{constructor(e={}){var t,n;if(this._requestContentType=e.requestContentType,this._endpoint=null!==(t=e.endpoint)&&void 0!==t?t:e.baseUri,e.baseUri&&lo.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."),this._allowInsecureConnection=e.allowInsecureConnection,this._httpClient=e.httpClient||(so||(so=new Vn),so),this.pipeline=e.pipeline||function(e){const t=function(e){if(e.credentialScopes)return e.credentialScopes;if(e.endpoint)return`${e.endpoint}/.default`;if(e.baseUri)return`${e.baseUri}/.default`;if(e.credential&&!e.credentialScopes)throw new Error("When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy")}(e),n=e.credential&&t?{credentialScopes:t,credential:e.credential}:void 0;return io(Object.assign(Object.assign({},e),{credentialOptions:n}))}(e),null===(n=e.additionalPolicies)||void 0===n?void 0:n.length)for(const{policy:t,position:n}of e.additionalPolicies){const e="perRetry"===n?"Sign":void 0;this.pipeline.addPolicy(t,{afterPhase:e})}}async sendRequest(e){return this.pipeline.sendRequest(this._httpClient,e)}async sendOperationRequest(e,t){const n=t.baseUrl||this._endpoint;if(!n)throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.");const r=function(e){return new Ln(e)}({url:co(n,t,e,this)});r.method=t.httpMethod;const a=to(r);a.operationSpec=t,a.operationArguments=e;const i=t.contentType||this._requestContentType;i&&t.requestBody&&r.headers.set("Content-Type",i);const s=e.options;if(s){const e=s.requestOptions;e&&(e.timeout&&(r.timeout=e.timeout),e.onUploadProgress&&(r.onUploadProgress=e.onUploadProgress),e.onDownloadProgress&&(r.onDownloadProgress=e.onDownloadProgress),void 0!==e.shouldDeserialize&&(a.shouldDeserialize=e.shouldDeserialize),e.allowInsecureConnection&&(r.allowInsecureConnection=!0)),s.abortSignal&&(r.abortSignal=s.abortSignal),s.tracingOptions&&(r.tracingOptions=s.tracingOptions)}this._allowInsecureConnection&&(r.allowInsecureConnection=!0),void 0===r.streamResponseStatusCodes&&(r.streamResponseStatusCodes=function(e){const t=new Set;for(const n in e.responses){const r=e.responses[n];r.bodyMapper&&r.bodyMapper.type.name===Ys&&t.add(Number(n))}return t}(t));try{const e=await this.sendRequest(r),n=Us(e,t.responses[e.status]);return(null==s?void 0:s.onResponse)&&s.onResponse(e,n),n}catch(e){if("object"==typeof e&&(null==e?void 0:e.response)){const n=e.response,r=Us(n,t.responses[e.statusCode]||t.responses.default);e.details=r,(null==s?void 0:s.onResponse)&&s.onResponse(n,r,e)}throw e}}}function po(e,t){const n=e=>e.split(/[-+]/)[0].split(".").map((e=>+e)),r=n(e),a=n(t),i=Math.max(...r,...a)+1,s=e=>e.reverse().reduce(((e,t,n)=>e+t*i**n),0);return s(r)-s(a)}function ho(e,t,n){return po(e,t)>=0&&(null==n||po(e,n)<0)}const fo="_sdk-big-int-",yo=(...e)=>{const t=Gs(...e),{serialize:n,deserialize:r}=t;return Object.assign(t,{serialize(...[e,t,r,a]){if("BigInt"!==e.type.name||null==t)return n.call(this,e,t,r,a);if("bigint"!=typeof t)throw null!=r||(r=e.serializedName),new Error(`${r} with value ${t} must be of type bigint.`);return t.toString()},deserialize(...[e,t,n,a]){if("BigInt"!==e.type.name||null==t){"string"==typeof t&&t.startsWith(fo)&&(console.warn(`AeSdk internal error: BigInt value ${t} handled incorrectly`),t=+t.replace(fo,""));const i=r.call(this,e,t,n,a);return i instanceof Date?new Date(+i/1e3):i}if("number"==typeof t&&t>Number.MAX_SAFE_INTEGER)throw new ae(`Number ${t} is not accurate to be converted to BigInt`);return BigInt(t.toString().replace(fo,""))}})},go=Number.MAX_SAFE_INTEGER.toString().length,No=new RegExp(String.raw`("\w+":\s*)(\d{${go},})(\s*[,}])`,"m"),wo=new RegExp(String.raw`([[,]\s*)(\d{${go},})\b`,"m"),vo={name:"parse-big-int",async sendRequest(e,t){const n=await t(e);return null==n.bodyAsText||(n.bodyAsText=n.bodyAsText.replaceAll(new RegExp(No,"g"),(e=>{const t=e.match(No);if(null==t)throw new ie;const[,n,r,a]=t;return[n,+r>Number.MAX_SAFE_INTEGER?`"${fo}${r}"`:r,a].join("")})),n.bodyAsText=n.bodyAsText.replaceAll(new RegExp(wo,"g"),(e=>{const t=e.match(wo);if(null==t)throw new ie;const[,n,r]=t;return`${n}"${fo}${r}"`}))),n}},bo=()=>{const e=new Map;return{policy:{name:"request-queues",async sendRequest(t,n){var r;const a=t.headers.get("__queue");t.headers.delete("__queue");const i=async()=>n(t);if(null==a)return i();const s=(null!==(r=e.get(a))&&void 0!==r?r:Promise.resolve()).then(i);return e.set(a,s.catch((()=>{}))),s}},position:"perCall"}},xo=()=>{const e=new Map;return{policy:{name:"combine-get-requests",async sendRequest(t,n){var r;if("GET"!==t.method)return n(t);const a=JSON.stringify([t.url,t.body]),i=null!==(r=e.get(a))&&void 0!==r?r:n(t);e.set(a,i);try{return await i}finally{e.delete(a)}}},position:"perCall"}},_o=()=>{const e=new Map;return{policy:{name:"aggressive-cache-get-responses",async sendRequest(t,n){var r;if("GET"!==t.method)return n(t);const a=JSON.stringify([t.url,t.body]),i=null!==(r=e.get(a))&&void 0!==r?r:n(t);return e.set(a,i),i}},position:"perCall"}},Co=e=>({policy:{name:"error-formatter",async sendRequest(t,n){try{return await n(t)}catch(t){if(!(t instanceof Un)||null==t.request||t.message.startsWith("Error "))throw t;const n=`${new URL(t.request.url).pathname.slice(1)} error`;if(null==t.response?.bodyAsText)throw""===t.message&&(t.message=`${n}: ${t.code}`),t;const r=t.response.parsedBody;t.message=n;const a=null==r?` ${t.response.status} status code`:e(r);throw""!==a&&(t.message+=`:${a}`),t}}},position:"perCall"}),So=(e,t,n,r,a)=>({policy:{name:"version-check",async sendRequest(i,s){if(i.headers.has("__version-check"))return i.headers.delete("__version-check"),s(i);const o=[await t({requestOptions:{customHeaders:{"__version-check":"true"}}}),n,r];if(!ho(...o)){const t=new ne(e,...o);if(!a)throw t;console.warn(t.message)}return s(i)}},position:"perCall"}),To=(e,t)=>({policy:{name:"retry-on-failure",async sendRequest(n,r){var a;if(null!=n.headers.get("__no-retry"))return n.headers.delete("__no-retry"),r(n);const i=null!==(a=n.headers.get("__retry-code"))&&void 0!==a?a:NaN;n.headers.delete("__retry-code");const s=[200,400,403,410,500].filter((e=>e!==+i)),o=new Array(e).fill(0).map(((t,n)=>((n+1)/e)**2)),c=o.reduce(((e,t)=>e+t),0),u=o.map((e=>Math.floor(e/c*t)));let l=new Un("Not expected to be thrown");for(let t=0;t<=e;t+=1){if(0!==t){await Qn(u[t-1]);const e=new URL(n.url);e.searchParams.set("__sdk-retry",t.toString()),n.url=e.toString()}try{return await r(n)}catch(e){var m;if(!(e instanceof Un))throw e;if(s.includes(null!==(m=e.response?.status)&&void 0!==m?m:0))throw e;l=e}}throw l}},position:"perCall"}),Po={type:{name:"Composite",className:"Account",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},balance:{constraints:{InclusiveMinimum:0},serializedName:"balance",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},payable:{serializedName:"payable",type:{name:"Boolean"}},kind:{serializedName:"kind",type:{name:"Enum",allowedValues:["basic","generalized"]}},contractId:{serializedName:"contract_id",type:{name:"String"}},authFun:{serializedName:"auth_fun",type:{name:"String"}}}}},Ao={type:{name:"Composite",className:"ErrorModel",modelProperties:{reason:{serializedName:"reason",required:!0,type:{name:"String"}},errorCode:{serializedName:"error_code",type:{name:"String"}}}}},zo={type:{name:"Composite",className:"NextNonceResponse",modelProperties:{nextNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"next_nonce",required:!0,type:{name:"Number"}}}}},Io={type:{name:"Composite",className:"SignedTxs",modelProperties:{transactions:{serializedName:"transactions",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedTx"}}}}}}},Eo={type:{name:"Composite",className:"SignedTx",modelProperties:{tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}},blockHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:-1},serializedName:"block_height",required:!0,type:{name:"Number"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},hash:{serializedName:"hash",required:!0,type:{name:"String"}},encodedTx:{serializedName:"encoded_tx",type:{name:"String"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Mo={type:{name:"Composite",className:"Tx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",type:{name:"String"}},initiatorId:{serializedName:"initiator_id",type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",type:{name:"BigInt"}},responderId:{serializedName:"responder_id",type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",type:{name:"Number"}},stateHash:{serializedName:"state_hash",type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}},channelId:{serializedName:"channel_id",type:{name:"String"}},fromId:{serializedName:"from_id",type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",type:{name:"Number"}},toId:{serializedName:"to_id",type:{name:"String"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",type:{name:"BigInt"}},poi:{serializedName:"poi",type:{name:"String"}},initiatorDelegateIds:{serializedName:"initiator_delegate_ids",type:{name:"Sequence",element:{type:{name:"String"}}}},responderDelegateIds:{serializedName:"responder_delegate_ids",type:{name:"Sequence",element:{type:{name:"String"}}}},queryFormat:{serializedName:"query_format",type:{name:"String"}},responseFormat:{serializedName:"response_format",type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},accountId:{serializedName:"account_id",type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",type:{name:"String"}},query:{serializedName:"query",type:{name:"String"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},queryId:{serializedName:"query_id",type:{name:"String"}},response:{serializedName:"response",type:{name:"String"}},commitmentId:{serializedName:"commitment_id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},nameId:{serializedName:"name_id",type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",type:{name:"Number"}},pointers:{serializedName:"pointers",type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",type:{name:"Number"}},ownerId:{serializedName:"owner_id",type:{name:"String"}},code:{serializedName:"code",type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",type:{name:"BigInt"}},callData:{serializedName:"call_data",type:{name:"String"}},callerId:{serializedName:"caller_id",type:{name:"String"}},contractId:{serializedName:"contract_id",type:{name:"String"}},authFun:{constraints:{Pattern:new RegExp("^(0x|0X)?[a-fA-F0-9]+$")},serializedName:"auth_fun",type:{name:"String"}},gaId:{serializedName:"ga_id",type:{name:"String"}},authData:{serializedName:"auth_data",type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}},payerId:{serializedName:"payer_id",type:{name:"String"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["SpendTx","ChannelCreateTx","ChannelDepositTx","ChannelWithdrawTx","ChannelForceProgressTx","ChannelCloseMutualTx","ChannelCloseSoloTx","ChannelSlashTx","ChannelSettleTx","ChannelSnapshotSoloTx","ChannelSetDelegatesTx","OracleRegisterTx","OracleExtendTx","OracleQueryTx","OracleRespondTx","NamePreclaimTx","NameClaimTx","NameUpdateTx","NameTransferTx","NameRevokeTx","ContractCreateTx","ContractCallTx","GAAttachTx","GAMetaTx","PayingForTx"]}}}}},qo={type:{name:"Composite",className:"Delegates",modelProperties:{initiator:{serializedName:"initiator",type:{name:"Sequence",element:{type:{name:"String"}}}},responder:{serializedName:"responder",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Ro={type:{name:"Composite",className:"OffChainUpdate",uberParent:"OffChainUpdate",polymorphicDiscriminator:{serializedName:"op",clientName:"op"},modelProperties:{op:{serializedName:"op",required:!0,type:{name:"String"}}}}},Oo={type:{name:"Composite",className:"RelativeTTL",modelProperties:{type:{defaultValue:"delta",isConstant:!0,serializedName:"type",type:{name:"String"}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},ko={type:{name:"Composite",className:"Ttl",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["delta","block"]}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},Bo={type:{name:"Composite",className:"NamePointer",modelProperties:{key:{serializedName:"key",required:!0,type:{name:"String"}},encodedKey:{serializedName:"encoded_key",type:{name:"String"}},id:{serializedName:"id",required:!0,type:{name:"String"}}}}},Uo={type:{name:"Composite",className:"AuctionEntry",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},startedAt:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"started_at",required:!0,type:{name:"Number"}},endsAt:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ends_at",required:!0,type:{name:"Number"}},highestBidder:{serializedName:"highest_bidder",required:!0,type:{name:"String"}},highestBid:{constraints:{InclusiveMinimum:0},serializedName:"highest_bid",required:!0,type:{name:"BigInt"}}}}},$o={type:{name:"Composite",className:"Channel",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},channelAmount:{constraints:{InclusiveMinimum:0},serializedName:"channel_amount",required:!0,type:{name:"BigInt"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},soloRound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"solo_round",required:!0,type:{name:"Number"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",required:!0,type:{name:"Number"}},lockedUntil:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"locked_until",required:!0,type:{name:"Number"}}}}},Go={type:{name:"Composite",className:"ContractObject",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},active:{serializedName:"active",required:!0,type:{name:"Boolean"}},referrerIds:{serializedName:"referrer_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},deposit:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}}}}},Vo={type:{name:"Composite",className:"ByteCode",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},Do={type:{name:"Composite",className:"PoI",modelProperties:{poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},Lo={type:{name:"Composite",className:"Currency",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},symbol:{serializedName:"symbol",required:!0,type:{name:"String"}},subunit:{serializedName:"subunit",required:!0,type:{name:"String"}},subunitsPerUnit:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"subunits_per_unit",required:!0,type:{name:"BigInt"}},fiatConverstionUrl:{serializedName:"fiat_converstion_url",type:{name:"String"}},fiatConversionUrl:{serializedName:"fiat_conversion_url",type:{name:"String"}},logo:{serializedName:"logo",type:{name:"Composite",className:"Image"}},primaryColour:{serializedName:"primary_colour",required:!0,type:{name:"String"}},secondaryColour:{serializedName:"secondary_colour",required:!0,type:{name:"String"}},networkName:{serializedName:"network_name",required:!0,type:{name:"String"}}}}},jo={type:{name:"Composite",className:"Image",modelProperties:{type:{serializedName:"type",type:{name:"String"}},data:{serializedName:"data",type:{name:"String"}}}}},Fo={type:{name:"Composite",className:"DryRunInput",modelProperties:{top:{serializedName:"top",type:{name:"String"}},accounts:{serializedName:"accounts",type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunAccount"}}}},txs:{serializedName:"txs",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunInputItem"}}}},txEvents:{defaultValue:!1,serializedName:"tx_events",type:{name:"Boolean"}}}}},Ho={type:{name:"Composite",className:"DryRunAccount",modelProperties:{pubKey:{serializedName:"pub_key",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},Jo={type:{name:"Composite",className:"DryRunInputItem",modelProperties:{tx:{serializedName:"tx",type:{name:"String"}},txHash:{serializedName:"tx_hash",type:{name:"String"}},callReq:{serializedName:"call_req",type:{name:"Composite",className:"DryRunCallReq"}}}}},Wo={type:{name:"Composite",className:"DryRunCallReq",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},contract:{serializedName:"contract",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",type:{name:"BigInt"}},gas:{constraints:{InclusiveMinimum:0},serializedName:"gas",type:{name:"Number"}},caller:{serializedName:"caller",type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}},context:{serializedName:"context",type:{name:"Composite",className:"DryRunCallContext"}}}}},Ko={type:{name:"Composite",className:"DryRunCallContext",modelProperties:{tx:{serializedName:"tx",type:{name:"String"}},txHash:{serializedName:"tx_hash",type:{name:"String"}},stateful:{serializedName:"stateful",type:{name:"Boolean"}}}}},Yo={type:{name:"Composite",className:"DryRunResults",modelProperties:{results:{serializedName:"results",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DryRunResult"}}}},txEvents:{serializedName:"tx_events",type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}}}},Qo={type:{name:"Composite",className:"DryRunResult",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},result:{serializedName:"result",required:!0,type:{name:"String"}},reason:{serializedName:"reason",type:{name:"String"}},callObj:{serializedName:"call_obj",type:{name:"Composite",className:"ContractCallObject"}}}}},Xo={type:{name:"Composite",className:"ContractCallObject",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},callerNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"caller_nonce",required:!0,type:{name:"Number"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},gasUsed:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas_used",required:!0,type:{name:"Number"}},log:{serializedName:"log",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Event"}}}},returnValue:{serializedName:"return_value",required:!0,type:{name:"String"}},returnType:{serializedName:"return_type",required:!0,type:{name:"Enum",allowedValues:["ok","error","revert"]}}}}},Zo={type:{name:"Composite",className:"Event",modelProperties:{address:{serializedName:"address",required:!0,type:{name:"String"}},topics:{serializedName:"topics",required:!0,type:{name:"Sequence",element:{constraints:{InclusiveMinimum:0},type:{name:"BigInt"}}}},data:{serializedName:"data",required:!0,type:{name:"String"}}}}},ec={type:{name:"Composite",className:"Generation",modelProperties:{keyBlock:{serializedName:"key_block",type:{name:"Composite",className:"KeyBlock"}},microBlocks:{serializedName:"micro_blocks",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},tc={type:{name:"Composite",className:"KeyBlock",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},miner:{serializedName:"miner",required:!0,type:{name:"String"}},beneficiary:{serializedName:"beneficiary",required:!0,type:{name:"String"}},flags:{serializedName:"flags",required:!0,type:{name:"String"}},target:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"target",required:!0,type:{name:"Number"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},type:{name:"Number"}}}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},info:{serializedName:"info",required:!0,type:{name:"String"}}}}},nc={type:{name:"Composite",className:"Header",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},miner:{serializedName:"miner",type:{name:"String"}},beneficiary:{serializedName:"beneficiary",type:{name:"String"}},flags:{serializedName:"flags",type:{name:"String"}},target:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"target",type:{name:"Number"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},type:{name:"Number"}}}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},info:{serializedName:"info",type:{name:"String"}},pofHash:{serializedName:"pof_hash",type:{name:"String"}},txsHash:{serializedName:"txs_hash",type:{name:"String"}},signature:{serializedName:"signature",type:{name:"String"}}}}},rc={type:{name:"Composite",className:"PinningTx",modelProperties:{epoch:{serializedName:"epoch",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},parentPayload:{serializedName:"parent_payload",required:!0,type:{name:"String"}},lastLeader:{serializedName:"last_leader",required:!0,type:{name:"String"}},parentType:{serializedName:"parent_type",required:!0,type:{name:"String"}},parentNetworkId:{serializedName:"parent_network_id",required:!0,type:{name:"String"}}}}},ac={type:{name:"Composite",className:"HCContractPubkeys",modelProperties:{staking:{serializedName:"staking",required:!0,type:{name:"String"}},election:{serializedName:"election",type:{name:"String"}},rewards:{serializedName:"rewards",type:{name:"String"}}}}},ic={type:{name:"Composite",className:"HashResponse",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}}}}},sc={type:{name:"Composite",className:"HeightResponse",modelProperties:{height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}}}}},oc={type:{name:"Composite",className:"MicroBlockHeader",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},pofHash:{serializedName:"pof_hash",required:!0,type:{name:"String"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},txsHash:{serializedName:"txs_hash",required:!0,type:{name:"String"}},signature:{serializedName:"signature",required:!0,type:{name:"String"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}}}}},cc={type:{name:"Composite",className:"CountResponse",modelProperties:{count:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"count",required:!0,type:{name:"Number"}}}}},uc={type:{name:"Composite",className:"NameEntry",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},owner:{serializedName:"owner",type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointerComplete"}}}}}}},lc={type:{name:"Composite",className:"NamePointerComplete",modelProperties:{key:{serializedName:"key",required:!0,type:{name:"String"}},encodedKey:{serializedName:"encoded_key",required:!0,type:{name:"String"}},id:{serializedName:"id",required:!0,type:{name:"String"}}}}},mc={type:{name:"Composite",className:"RegisteredOracle",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},queryFormat:{serializedName:"query_format",required:!0,type:{name:"String"}},responseFormat:{serializedName:"response_format",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}}}}},dc={type:{name:"Composite",className:"OracleQueries",modelProperties:{oracleQueries:{serializedName:"oracle_queries",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleQuery"}}}}}}},pc={type:{name:"Composite",className:"OracleQuery",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},senderNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"sender_nonce",required:!0,type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"Ttl"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}}}}},hc={type:{name:"Composite",className:"PeerPubKey",modelProperties:{pubkey:{serializedName:"pubkey",required:!0,type:{name:"String"}}}}},fc={type:{name:"Composite",className:"GasPricesItem",modelProperties:{minGasPrice:{constraints:{InclusiveMinimum:0},serializedName:"min_gas_price",required:!0,type:{name:"BigInt"}},utilization:{constraints:{InclusiveMaximum:100,InclusiveMinimum:0},serializedName:"utilization",required:!0,type:{name:"Number"}},minutes:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"minutes",required:!0,type:{name:"Number"}}}}},yc={type:{name:"Composite",className:"Status",modelProperties:{genesisKeyBlockHash:{serializedName:"genesis_key_block_hash",required:!0,type:{name:"String"}},solutions:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"solutions",required:!0,type:{name:"Number"}},difficulty:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"difficulty",required:!0,type:{name:"Number"}},hashrate:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"hashrate",required:!0,type:{name:"Number"}},syncing:{serializedName:"syncing",required:!0,type:{name:"Boolean"}},syncProgress:{constraints:{InclusiveMaximum:100,InclusiveMinimum:0},serializedName:"sync_progress",type:{name:"Number"}},uptime:{serializedName:"uptime",required:!0,type:{name:"String"}},listening:{serializedName:"listening",required:!0,type:{name:"Boolean"}},protocols:{serializedName:"protocols",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Protocol"}}}},nodeVersion:{serializedName:"node_version",required:!0,type:{name:"String"}},nodeRevision:{serializedName:"node_revision",required:!0,type:{name:"String"}},peerCount:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"peer_count",required:!0,type:{name:"Number"}},peerConnections:{serializedName:"peer_connections",type:{name:"Composite",className:"PeerConnections"}},pendingTransactionsCount:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"pending_transactions_count",required:!0,type:{name:"Number"}},networkId:{serializedName:"network_id",required:!0,type:{name:"String"}},peerPubkey:{serializedName:"peer_pubkey",required:!0,type:{name:"String"}},topKeyBlockHash:{serializedName:"top_key_block_hash",required:!0,type:{name:"String"}},topBlockHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"top_block_height",required:!0,type:{name:"Number"}}}}},gc={type:{name:"Composite",className:"Protocol",modelProperties:{version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},effectiveAtHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"effective_at_height",required:!0,type:{name:"Number"}}}}},Nc={type:{name:"Composite",className:"PeerConnections",modelProperties:{inbound:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"inbound",required:!0,type:{name:"Number"}},outbound:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"outbound",required:!0,type:{name:"Number"}}}}},wc={type:{name:"Composite",className:"SyncStatus",modelProperties:{progress:{serializedName:"progress",required:!0,type:{name:"Number"}},target:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"target",required:!0,type:{name:"Number"}},speed:{serializedName:"speed",required:!0,type:{name:"Number"}},estimate:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"estimate",required:!0,type:{name:"Number"}}}}},vc={type:{name:"Composite",className:"EncodedTx",modelProperties:{tx:{serializedName:"tx",required:!0,type:{name:"String"}}}}},bc={type:{name:"Composite",className:"PostTxResponse",modelProperties:{txHash:{serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},xc={type:{name:"Composite",className:"TxInfoObject",modelProperties:{callInfo:{serializedName:"call_info",type:{name:"Composite",className:"ContractCallObject"}},gaInfo:{serializedName:"ga_info",type:{name:"Composite",className:"GAObject"}},txInfo:{serializedName:"tx_info",type:{name:"String"}}}}},_c={type:{name:"Composite",className:"GAObject",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},gasUsed:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas_used",required:!0,type:{name:"Number"}},returnValue:{serializedName:"return_value",required:!0,type:{name:"String"}},returnType:{serializedName:"return_type",required:!0,type:{name:"Enum",allowedValues:["ok","error"]}},innerObject:{serializedName:"inner_object",type:{name:"Composite",className:"TxInfoObject"}}}}},Cc={type:{name:"Composite",className:"ChannelCloseMutualTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},Sc={type:{name:"Composite",className:"ChannelCloseSoloTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},Tc={type:{name:"Composite",className:"ChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}}}}},Pc={type:{name:"Composite",className:"ChannelDepositTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},Ac={type:{name:"Composite",className:"ChannelForceProgressTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}}}}},zc={type:{name:"Composite",className:"ChannelSetDelegatesTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorDelegateIds:{serializedName:"initiator_delegate_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},responderDelegateIds:{serializedName:"responder_delegate_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Ic={type:{name:"Composite",className:"ChannelSettleTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},Ec={type:{name:"Composite",className:"ChannelSlashTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},Mc={type:{name:"Composite",className:"ChannelSnapshotSoloTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},qc={type:{name:"Composite",className:"ChannelWithdrawTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},toId:{serializedName:"to_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},Rc={type:{name:"Composite",className:"CheckTxInPoolResponse",modelProperties:{status:{serializedName:"status",required:!0,type:{name:"String"}}}}},Oc={type:{name:"Composite",className:"CommitmentId",modelProperties:{commitmentId:{serializedName:"commitment_id",required:!0,type:{name:"String"}}}}},kc={type:{name:"Composite",className:"ContractCallTx",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},Bc={type:{name:"Composite",className:"ContractCreateTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},Uc={type:{name:"Composite",className:"UnsignedTx",modelProperties:{tx:{serializedName:"tx",required:!0,type:{name:"String"}}}}},$c={type:{name:"Composite",className:"GAAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}},authFun:{constraints:{Pattern:new RegExp("^(0x|0X)?[a-fA-F0-9]+$")},serializedName:"auth_fun",required:!0,type:{name:"String"}}}}},Gc={type:{name:"Composite",className:"GAMetaTx",modelProperties:{gaId:{serializedName:"ga_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},authData:{serializedName:"auth_data",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},Vc={type:{name:"Composite",className:"NameClaimTx",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",required:!0,type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Dc={type:{name:"Composite",className:"NameHash",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}}}}},Lc={type:{name:"Composite",className:"NamePreclaimTx",modelProperties:{commitmentId:{serializedName:"commitment_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},jc={type:{name:"Composite",className:"NameRevokeTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Fc={type:{name:"Composite",className:"NameTransferTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Hc={type:{name:"Composite",className:"NameUpdateTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Jc={type:{name:"Composite",className:"PeerDetails",modelProperties:{host:{serializedName:"host",required:!0,type:{name:"String"}},port:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"port",required:!0,type:{name:"Number"}},firstSeen:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"first_seen",required:!0,type:{name:"Number"}},lastSeen:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"last_seen",required:!0,type:{name:"Number"}},genesisHash:{serializedName:"genesis_hash",required:!0,type:{name:"String"}},topHash:{serializedName:"top_hash",required:!0,type:{name:"String"}},topDifficulty:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"top_difficulty",required:!0,type:{name:"Number"}},networkId:{serializedName:"network_id",type:{name:"String"}},nodeVersion:{serializedName:"node_version",type:{name:"String"}},nodeRevision:{serializedName:"node_revision",type:{name:"String"}},nodeVendor:{serializedName:"node_vendor",type:{name:"String"}},nodeOs:{serializedName:"node_os",type:{name:"String"}}}}},Wc={type:{name:"Composite",className:"OracleExtendTx",modelProperties:{fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}}}}},Kc={type:{name:"Composite",className:"OracleQueryTx",modelProperties:{oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Yc={type:{name:"Composite",className:"OracleRegisterTx",modelProperties:{queryFormat:{serializedName:"query_format",required:!0,type:{name:"String"}},responseFormat:{serializedName:"response_format",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"Ttl"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}}}}},Qc={type:{name:"Composite",className:"OracleRespondTx",modelProperties:{queryId:{serializedName:"query_id",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Xc={type:{name:"Composite",className:"PayingForTx",modelProperties:{payerId:{serializedName:"payer_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},Zc={type:{name:"Composite",className:"PeerCount",modelProperties:{connected:{serializedName:"connected",type:{name:"Composite",className:"PeerCountConnected"}},available:{serializedName:"available",type:{name:"Composite",className:"PeerCountAvailable"}},blocked:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"blocked",required:!0,type:{name:"Number"}}}}},eu={type:{name:"Composite",className:"PeerCountConnected",modelProperties:{inbound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"inbound",type:{name:"Number"}},outbound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"outbound",type:{name:"Number"}}}}},tu={type:{name:"Composite",className:"PeerCountAvailable",modelProperties:{verified:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"verified",type:{name:"Number"}},unverified:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"unverified",type:{name:"Number"}}}}},nu={type:{name:"Composite",className:"Peers",modelProperties:{peers:{serializedName:"peers",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},blocked:{serializedName:"blocked",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},ru={type:{name:"Composite",className:"PubKey",modelProperties:{pubKey:{serializedName:"pub_key",required:!0,type:{name:"String"}}}}},au={type:{name:"Composite",className:"SpendTx",modelProperties:{recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}}}}},iu={type:{name:"Composite",className:"TokenSupply",modelProperties:{accounts:{constraints:{InclusiveMinimum:0},serializedName:"accounts",type:{name:"Number"}},contracts:{constraints:{InclusiveMinimum:0},serializedName:"contracts",type:{name:"Number"}},contractOracles:{constraints:{InclusiveMinimum:0},serializedName:"contract_oracles",type:{name:"Number"}},locked:{constraints:{InclusiveMinimum:0},serializedName:"locked",type:{name:"Number"}},oracles:{constraints:{InclusiveMinimum:0},serializedName:"oracles",type:{name:"Number"}},oracleQueries:{constraints:{InclusiveMinimum:0},serializedName:"oracle_queries",type:{name:"Number"}},pendingRewards:{constraints:{InclusiveMinimum:0},serializedName:"pending_rewards",type:{name:"Number"}},total:{constraints:{InclusiveMinimum:0},serializedName:"total",type:{name:"Number"}}}}},su={serializedName:"OffChainCallContract",type:{name:"Composite",className:"OffChainCallContract",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ro.type.polymorphicDiscriminator,modelProperties:{...Ro.type.modelProperties,caller:{serializedName:"caller",required:!0,type:{name:"String"}},contract:{serializedName:"contract",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},ou={serializedName:"OffChainDeposit",type:{name:"Composite",className:"OffChainDeposit",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ro.type.polymorphicDiscriminator,modelProperties:{...Ro.type.modelProperties,from:{serializedName:"from",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},cu={serializedName:"OffChainNewContract",type:{name:"Composite",className:"OffChainNewContract",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ro.type.polymorphicDiscriminator,modelProperties:{...Ro.type.modelProperties,owner:{serializedName:"owner",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},code:{serializedName:"code",type:{name:"Composite",className:"ByteCode"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},uu={serializedName:"OffChainTransfer",type:{name:"Composite",className:"OffChainTransfer",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ro.type.polymorphicDiscriminator,modelProperties:{...Ro.type.modelProperties,from:{serializedName:"from",required:!0,type:{name:"String"}},to:{serializedName:"to",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},lu={serializedName:"OffChainWithdrawal",type:{name:"Composite",className:"OffChainWithdrawal",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ro.type.polymorphicDiscriminator,modelProperties:{...Ro.type.modelProperties,to:{serializedName:"to",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},mu={type:{name:"Composite",className:"CreateContractUnsignedTx",modelProperties:{...Uc.type.modelProperties,contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}}}}};let du={OffChainUpdate:Ro,"OffChainUpdate.OffChainCallContract":su,"OffChainUpdate.OffChainDeposit":ou,"OffChainUpdate.OffChainNewContract":cu,"OffChainUpdate.OffChainTransfer":uu,"OffChainUpdate.OffChainWithdrawal":lu};const pu={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},hu={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},fu={parameterPath:"pubkey",mapper:{serializedName:"pubkey",required:!0,type:{name:"String"}}},yu={parameterPath:"hash",mapper:{serializedName:"hash",required:!0,type:{name:"String"}}},gu={parameterPath:"height",mapper:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}}},Nu={parameterPath:"name",mapper:{serializedName:"name",required:!0,type:{name:"String"}}},wu={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},vu={parameterPath:"body",mapper:Fo},bu={parameterPath:"body",mapper:vc};class xu extends mo{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const a="azsdk-js-node/1.0.0-beta.1",i=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${a}`:`${a}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:i},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}getAccountByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Cu)}getAccountByPubkeyAndHash(e,t,n){return this.sendOperationRequest({pubkey:e,hash:t,options:n},Su)}getAccountByPubkeyAndHeight(e,t,n){return this.sendOperationRequest({pubkey:e,height:t,options:n},Tu)}getAccountNextNonce(e,t){return this.sendOperationRequest({pubkey:e,options:t},Pu)}getPendingAccountTransactionsByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Au)}getAuctionEntryByName(e,t){return this.sendOperationRequest({name:e,options:t},zu)}getChannelByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Iu)}getContract(e,t){return this.sendOperationRequest({pubkey:e,options:t},Eu)}getContractCode(e,t){return this.sendOperationRequest({pubkey:e,options:t},Mu)}getContractPoI(e,t){return this.sendOperationRequest({pubkey:e,options:t},qu)}getCurrency(e){return this.sendOperationRequest({options:e},Ru)}protectedDryRunTxs(e,t){return this.sendOperationRequest({body:e,options:t},Ou)}getCurrentGeneration(e){return this.sendOperationRequest({options:e},ku)}getGenerationByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Bu)}getGenerationByHeight(e,t){return this.sendOperationRequest({height:e,options:t},Uu)}getTopHeader(e){return this.sendOperationRequest({options:e},$u)}getPinningTx(e){return this.sendOperationRequest({options:e},Gu)}getHyperchainContractPubkeys(e){return this.sendOperationRequest({options:e},Vu)}getCurrentKeyBlock(e){return this.sendOperationRequest({options:e},Du)}getCurrentKeyBlockHash(e){return this.sendOperationRequest({options:e},Lu)}getCurrentKeyBlockHeight(e){return this.sendOperationRequest({options:e},ju)}getKeyBlockByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Fu)}getKeyBlockByHeight(e,t){return this.sendOperationRequest({height:e,options:t},Hu)}getPendingKeyBlock(e){return this.sendOperationRequest({options:e},Ju)}getMicroBlockHeaderByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Wu)}getMicroBlockTransactionsByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Ku)}getMicroBlockTransactionsCountByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Yu)}getMicroBlockTransactionByHashAndIndex(e,t,n){return this.sendOperationRequest({hash:e,index:t,options:n},Qu)}getNameEntryByName(e,t){return this.sendOperationRequest({name:e,options:t},Xu)}getNameEntryByNameHash(e,t){return this.sendOperationRequest({nameHash:e,options:t},Zu)}getOracleByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},el)}getOracleQueriesByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},tl)}getOracleQueryByPubkeyAndQueryId(e,t,n){return this.sendOperationRequest({pubkey:e,queryId:t,options:n},nl)}getPeerPubkey(e){return this.sendOperationRequest({options:e},rl)}getRecentGasPrices(e){return this.sendOperationRequest({options:e},al)}getStatus(e){return this.sendOperationRequest({options:e},il)}getChainEnds(e){return this.sendOperationRequest({options:e},sl)}getSyncStatus(e){return this.sendOperationRequest({options:e},ol)}postTransaction(e,t){return this.sendOperationRequest({body:e,options:t},cl)}getTransactionByHash(e,t){return this.sendOperationRequest({hash:e,options:t},ul)}getTransactionInfoByHash(e,t){return this.sendOperationRequest({hash:e,options:t},ll)}}const _u=yo(a,!1),Cu={path:"/v3/accounts/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:Po},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,fu],headerParameters:[pu],serializer:_u},Su={path:"/v3/accounts/{pubkey}/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Po},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,fu,yu],headerParameters:[pu],serializer:_u},Tu={path:"/v3/accounts/{pubkey}/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:Po},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0},410:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,fu,gu],headerParameters:[pu],serializer:_u},Pu={path:"/v3/accounts/{pubkey}/next-nonce",httpMethod:"GET",responses:{200:{bodyMapper:zo},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},queryParameters:[{parameterPath:["options","strategy"],mapper:{defaultValue:"max",serializedName:"strategy",type:{name:"Enum",allowedValues:["max","continuity"]}}}],urlParameters:[hu,fu],headerParameters:[pu],serializer:_u},Au={path:"/v3/accounts/{pubkey}/transactions/pending",httpMethod:"GET",responses:{200:{bodyMapper:Io},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,fu],headerParameters:[pu],serializer:_u},zu={path:"/v3/auctions/{name}",httpMethod:"GET",responses:{200:{bodyMapper:Uo},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,Nu],headerParameters:[pu],serializer:_u},Iu={path:"/v3/channels/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:$o},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,fu],headerParameters:[pu],serializer:_u},Eu={path:"/v3/contracts/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:Go},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,fu],headerParameters:[pu],serializer:_u},Mu={path:"/v3/contracts/{pubkey}/code",httpMethod:"GET",responses:{200:{bodyMapper:Vo},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,fu],headerParameters:[pu],serializer:_u},qu={path:"/v3/contracts/{pubkey}/poi",httpMethod:"GET",responses:{200:{bodyMapper:Do},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,fu],headerParameters:[pu],serializer:_u},Ru={path:"/v3/currency",httpMethod:"GET",responses:{200:{bodyMapper:Lo}},urlParameters:[hu],headerParameters:[pu],serializer:_u},Ou={path:"/v3/dry-run",httpMethod:"POST",responses:{200:{bodyMapper:Yo},400:{bodyMapper:Ao,isError:!0},403:{bodyMapper:Ao,isError:!0}},requestBody:vu,urlParameters:[hu],headerParameters:[pu,wu],mediaType:"json",serializer:_u},ku={path:"/v3/generations/current",httpMethod:"GET",responses:{200:{bodyMapper:ec},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu],headerParameters:[pu],serializer:_u},Bu={path:"/v3/generations/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:ec},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,yu],headerParameters:[pu],serializer:_u},Uu={path:"/v3/generations/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:ec},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,gu],headerParameters:[pu],serializer:_u},$u={path:"/v3/headers/top",httpMethod:"GET",responses:{200:{bodyMapper:nc},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu],headerParameters:[pu],serializer:_u},Gu={path:"/v3/hyperchain/pin-tx",httpMethod:"GET",responses:{200:{bodyMapper:rc},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu],headerParameters:[pu],serializer:_u},Vu={path:"/v3/hyperchain/contracts",httpMethod:"GET",responses:{200:{bodyMapper:ac},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu],headerParameters:[pu],serializer:_u},Du={path:"/v3/key-blocks/current",httpMethod:"GET",responses:{200:{bodyMapper:tc},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu],headerParameters:[pu],serializer:_u},Lu={path:"/v3/key-blocks/current/hash",httpMethod:"GET",responses:{200:{bodyMapper:ic},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu],headerParameters:[pu],serializer:_u},ju={path:"/v3/key-blocks/current/height",httpMethod:"GET",responses:{200:{bodyMapper:sc},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu],headerParameters:[pu],serializer:_u},Fu={path:"/v3/key-blocks/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:tc},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,yu],headerParameters:[pu],serializer:_u},Hu={path:"/v3/key-blocks/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:tc},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,gu],headerParameters:[pu],serializer:_u},Ju={path:"/v3/key-blocks/pending",httpMethod:"GET",responses:{200:{bodyMapper:tc},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu],headerParameters:[pu],serializer:_u},Wu={path:"/v3/micro-blocks/hash/{hash}/header",httpMethod:"GET",responses:{200:{bodyMapper:oc},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,yu],headerParameters:[pu],serializer:_u},Ku={path:"/v3/micro-blocks/hash/{hash}/transactions",httpMethod:"GET",responses:{200:{bodyMapper:Io},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,yu],headerParameters:[pu],serializer:_u},Yu={path:"/v3/micro-blocks/hash/{hash}/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:cc},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,yu],headerParameters:[pu],serializer:_u},Qu={path:"/v3/micro-blocks/hash/{hash}/transactions/index/{index}",httpMethod:"GET",responses:{200:{bodyMapper:Eo},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,yu,{parameterPath:"index",mapper:{constraints:{InclusiveMinimum:1},serializedName:"index",required:!0,type:{name:"Number"}}}],headerParameters:[pu],serializer:_u},Xu={path:"/v3/names/{name}",httpMethod:"GET",responses:{200:{bodyMapper:uc},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,Nu],headerParameters:[pu],serializer:_u},Zu={path:"/v3/names/hash/{name_hash}",httpMethod:"GET",responses:{200:{bodyMapper:uc},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,{parameterPath:"nameHash",mapper:{serializedName:"name_hash",required:!0,type:{name:"String"}}}],headerParameters:[pu],serializer:_u},el={path:"/v3/oracles/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:mc},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,fu],headerParameters:[pu],serializer:_u},tl={path:"/v3/oracles/{pubkey}/queries",httpMethod:"GET",responses:{200:{bodyMapper:dc},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},queryParameters:[{parameterPath:["options","from"],mapper:{serializedName:"from",type:{name:"String"}}},{parameterPath:["options","limit"],mapper:{defaultValue:20,constraints:{InclusiveMaximum:1e3,InclusiveMinimum:1},serializedName:"limit",type:{name:"Number"}}},{parameterPath:["options","type"],mapper:{defaultValue:"all",serializedName:"type",type:{name:"Enum",allowedValues:["open","closed","all"]}}}],urlParameters:[hu,fu],headerParameters:[pu],serializer:_u},nl={path:"/v3/oracles/{pubkey}/queries/{query-id}",httpMethod:"GET",responses:{200:{bodyMapper:pc},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,fu,{parameterPath:"queryId",mapper:{serializedName:"query-id",required:!0,type:{name:"String"}}}],headerParameters:[pu],serializer:_u},rl={path:"/v3/peers/pubkey",httpMethod:"GET",responses:{200:{bodyMapper:hc}},urlParameters:[hu],headerParameters:[pu],serializer:_u},al={path:"/v3/recent-gas-prices",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"GasPricesItem"}}}}},400:{bodyMapper:Ao,isError:!0}},urlParameters:[hu],headerParameters:[pu],serializer:_u},il={path:"/v3/status",httpMethod:"GET",responses:{200:{bodyMapper:yc}},urlParameters:[hu],headerParameters:[pu],serializer:_u},sl={path:"/v3/status/chain-ends",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"String"}}}}}},urlParameters:[hu],headerParameters:[pu],serializer:_u},ol={path:"/v3/sync-status",httpMethod:"GET",responses:{200:{bodyMapper:wc},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu],headerParameters:[pu],serializer:_u},cl={path:"/v3/transactions",httpMethod:"POST",responses:{200:{bodyMapper:bc},400:{bodyMapper:Ao,isError:!0}},requestBody:bu,urlParameters:[hu],headerParameters:[pu,wu],mediaType:"json",serializer:_u},ul={path:"/v3/transactions/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Eo},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,yu],headerParameters:[pu],serializer:_u},ll={path:"/v3/transactions/{hash}/info",httpMethod:"GET",responses:{200:{bodyMapper:xc},400:{bodyMapper:Ao,isError:!0},404:{bodyMapper:Ao,isError:!0},410:{bodyMapper:Ao,isError:!0}},urlParameters:[hu,yu],headerParameters:[pu],serializer:_u};function ml(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function dl(e,t){return e.get(hl(e,t))}function pl(e,t,n){return e.set(hl(e,t),n),n}function hl(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var fl=new WeakMap,yl=new WeakMap,gl=new WeakMap;class Nl extends xu{constructor(e,{ignoreVersion:t=!1,retryCount:n=3,retryOverallDelay:r=800,...a}={}){super(e,{allowInsecureConnection:!0,additionalPolicies:[So("node",(async e=>(await this._getCachedStatus(e)).nodeVersion),"7.1.0","8.0.0",t),bo(),xo(),To(n,r),Co((e=>[" ",e.reason,null==e.errorCode?"":` (${e.errorCode})`].join("")))],...a}),ml(this,fl,void 0),ml(this,yl,void 0),ml(this,gl,void 0),pl(fl,this,t),this.pipeline.addPolicy(vo,{phase:"Deserialize"}),this.pipeline.removePolicy({name:cn}),this.pipeline.removePolicy({name:In}),this.pipeline.removePolicy({name:"defaultRetryPolicy"})}async _getCachedStatus(e){return null!=dl(yl,this)?dl(yl,this):this.getStatus(e)}async getStatus(...e){const t=super.getStatus(...e);return t.then((()=>{pl(yl,this,t)}),(()=>{})),t}async _isHyperchain(){return null!=dl(gl,this)||pl(gl,this,this.getHyperchainContractPubkeys({requestOptions:{customHeaders:{"__no-retry":"true"}}}).then((()=>!0),(e=>{if("v3/hyperchain/contracts error: 404 status code"!==e.message)throw e;return!1}))),dl(gl,this)}async getNetworkId(){return(await this._getCachedStatus()).networkId}async getNodeInfo(){const{nodeVersion:e,networkId:t,protocols:n,topBlockHeight:r}=await this.getStatus(),a=n.filter((({effectiveAtHeight:e})=>r>=e)).reduce(((e,t)=>t.effectiveAtHeight>e.effectiveAtHeight?t:e),{effectiveAtHeight:-1,version:0}).version;if(null==Kr[a]){const e=a.toString(),t=Object.values(Kr).filter((e=>"number"==typeof e)).map((e=>+e)),n=Math.min(...t).toString(),r=(Math.max(...t)+1).toString(),i=new ne("consensus protocol",e,n,r);if(!dl(fl,this))throw i;console.warn(i.message)}return{url:this.$host,nodeNetworkId:t,version:e,consensusProtocolVersion:a}}}function wl(e){const t=zs(e);switch(t.tag){case Xr.SignedTx:return wl(Ps(t.encodedTx));case Xr.GaMetaTx:return t.gaId}const n=Ts(t.tag,t.version).find((([e])=>"nonce"===e))?.[1];if(null==n)throw new D(`Transaction doesn't have nonce: ${Xr[t.tag]}`);if(!("senderKey"in n))throw new ie;return t[n.senderKey].replace(/^ok_/,"ak_")}class vl{}class bl extends Error{constructor(e){super(e),this.name="TypeResolveError"}}var xl=bl;const _l=e=>({name:"bytes",size:e}),Cl=(e,t)=>({name:"oracle_pubkey",questionType:e,answerType:t}),Sl=(e,t)=>({name:"oracle_query_id",questionType:e,answerType:t}),Tl=e=>({name:"list",valuesType:e}),Pl=(e=[])=>({name:"tuple",valueTypes:e}),Al=(e,t)=>({name:"record",keys:e,valueTypes:t}),zl=e=>({name:"set",valuesType:e}),Il=(e,t)=>({name:"map",keyType:e,valueType:t}),El=e=>({name:"variant",variants:e}),Ml=()=>El([{RelativeTTL:[{name:"int"}]},{FixedTTL:[{name:"int"}]}]),ql=()=>El([{"AENS.AccountPt":[{name:"account_pubkey"}]},{"AENS.OraclePt":[{name:"account_pubkey"}]},{"AENS.ContractPt":[{name:"account_pubkey"}]},{"AENS.ChannelPt":[{name:"account_pubkey"}]}]),Rl=()=>{const e=[{"AENSv2.AccountPt":[{name:"account_pubkey"}]},{"AENSv2.OraclePt":[{name:"account_pubkey"}]},{"AENSv2.ContractPt":[{name:"account_pubkey"}]},{"AENSv2.ChannelPt":[{name:"account_pubkey"}]},{"AENSv2.DataPt":[_l()]}];return El(e)},Ol=e=>({name:"tvar",id:e});var kl=class{isCustomType(){return!1}resolveTypeDef(e,t){return[e,t]}resolveValueTypes(e,t){return Array.isArray(e)?e.map((e=>{const n=e.hasOwnProperty("type")?e.type:e,r=t.hasOwnProperty(n)?t[n]:n;return this.resolveType(r,t)})):[]}resolveType(e,t={}){let n=e,r=[],a=[];var i;if((i=e)&&"object"==typeof i&&i.constructor===Object&&([[n,r]]=Object.entries(e)),this.isCustomType(n)){const[e,t]=this.resolveTypeDef(n,r);return this.resolveType(e,t)}if("variant"!==n&&(a=this.resolveValueTypes(r,t)),"void"===n)return{name:"void"};if("unit"===n)return Pl([]);if("int"===n)return{name:"int"};if("bool"===n)return{name:"bool"};if("string"===n)return{name:"string"};if("bits"===n)return{name:"bits"};if("hash"===n)return{name:"hash"};if("signature"===n)return{name:"signature"};if("address"===n)return{name:"account_pubkey"};if("contract_pubkey"===n)return{name:"contract_pubkey"};if("Chain.ttl"===n)return Ml();if("Chain.ga_meta_tx"===n)return El([{"Chain.GAMetaTx":[{name:"account_pubkey"},{name:"int"}]}]);if("Chain.paying_for_tx"===n)return El([{"Chain.PayingForTx":[{name:"account_pubkey"},{name:"int"}]}]);if("Chain.base_tx"===n)return El([{"Chain.SpendTx":[{name:"account_pubkey"},{name:"int"},{name:"string"}]},{"Chain.OracleRegisterTx":[]},{"Chain.OracleQueryTx":[]},{"Chain.OracleResponseTx":[]},{"Chain.OracleExtendTx":[]},{"Chain.NamePreclaimTx":[]},{"Chain.NameClaimTx":[{name:"string"}]},{"Chain.NameUpdateTx":[{name:"hash"}]},{"Chain.NameRevokeTx":[{name:"hash"}]},{"Chain.NameTransferTx":[{name:"account_pubkey"},{name:"hash"}]},{"Chain.ChannelCreateTx":[{name:"account_pubkey"}]},{"Chain.ChannelDepositTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.ChannelWithdrawTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.ChannelForceProgressTx":[{name:"account_pubkey"}]},{"Chain.ChannelCloseMutualTx":[{name:"account_pubkey"}]},{"Chain.ChannelCloseSoloTx":[{name:"account_pubkey"}]},{"Chain.ChannelSlashTx":[{name:"account_pubkey"}]},{"Chain.ChannelSettleTx":[{name:"account_pubkey"}]},{"Chain.ChannelSnapshotSoloTx":[{name:"account_pubkey"}]},{"Chain.ContractCreateTx":[{name:"account_pubkey"}]},{"Chain.ContractCallTx":[{name:"account_pubkey"},{name:"int"}]},{"Chain.GAAttachTx":[]}]);if("AENS.pointee"===n)return ql();if("AENSv2.pointee"===n)return Rl();if("AENS.name"===n)return(()=>{const e=[{"AENS.Name":[{name:"account_pubkey"},Ml(),Il({name:"string"},ql())]}];return El(e)})();if("AENSv2.name"===n)return(()=>{const e=[{"AENSv2.Name":[{name:"account_pubkey"},Ml(),Il({name:"string"},Rl())]}];return El(e)})();if("Set.set"===n)return zl(...a);if("MCL_BLS12_381.fr"===n)return{name:"bls12_381.fr"};if("MCL_BLS12_381.fp"===n)return{name:"bls12_381.fp"};if("bytes"===n)return _l("any"===r?void 0:r);if("list"===n)return Tl(...a);if("map"===n)return Il(...a);if(("tuple"===n||"record"===n)&&1===a.length)return a[0];if("tuple"===n)return Pl(a);if("record"===n){const e=r.map((e=>e.name));return Al(e,a)}if("variant"===n)return this.resolveVariant(r,t);if("option"===n)return(e=>El([{None:[]},{Some:e}]))(a);if("oracle"===n)return Cl(...a);if("oracle_query"===n)return Sl(...a);throw new xl("Cannot resolve type: "+JSON.stringify(e))}resolveVariant(e,t){const n=e.map((e=>{const[[n,r]]=Object.entries(e),a=r.map((e=>{const n=t.hasOwnProperty(e)?t[e]:e;return this.resolveType(n,t)}));return{[n]:a}}));return El(n)}},Bl=class{constructor(){this._internalResolver=new kl}resolveType(e,t={}){return this._internalResolver.resolveType(e,t)}};class Ul extends Error{constructor(e){super(e),this.name="InternalError"}}var $l=Ul,Gl=(e,t)=>{if(!e)throw new $l(t)},Vl=Object.freeze({SMALL_INT:0,LONG_STRING:1,SHORT_STRING:1,SHORT_LIST:3,TYPE_INTEGER:7,TYPE_BOOLEAN:23,TYPE_LIST:39,TYPE_TUPLE:55,TYPE_OBJECT:71,TYPE_BITS:87,TYPE_MAP:103,TYPE_STRING:119,TYPE_VARIANT:135,TYPE_BYTES:151,TYPE_CONTRACT_BYTEARRAY:167,TYPE_VAR:231,TYPE_ANY:247,LONG_TUPLE:11,SHORT_TUPLE:11,LONG_LIST:31,MAP:47,EMPTY_TUPLE:63,POS_BITS:79,EMPTY_STRING:95,POS_BIG_INT:111,FALSE:127,CONTRACT_BYTEARRAY:143,OBJECT:159,VARIANT:175,MAP_ID:191,NEG_BITS:207,EMPTY_MAP:223,NEG_BIG_INT:239,TRUE:255,OTYPE_ADDRESS:0,OTYPE_BYTES:1,OTYPE_CONTRACT:2,OTYPE_ORACLE:3,OTYPE_ORACLE_QUERY:4,OTYPE_CHANNEL:5});class Dl extends Error{constructor(e){super("Invalid FATE prefix: 0b"+e.toString(2).padStart(8,"0")),this.name="FatePrefixError",this.prefix=e}}var Ll=Dl;const jl={[Vl.OTYPE_ADDRESS]:{name:"account_pubkey"},[Vl.OTYPE_BYTES]:_l(),[Vl.OTYPE_CONTRACT]:{name:"contract_pubkey"},[Vl.OTYPE_ORACLE]:Cl(),[Vl.OTYPE_ORACLE_QUERY]:Sl(),[Vl.OTYPE_CHANNEL]:{name:"channel"}};var Fl=class{createType(e){const t=e[0];if(t===Vl.TRUE||t===Vl.FALSE)return{name:"bool"};if((1&t)===Vl.SMALL_INT||t===Vl.POS_BIG_INT||t===Vl.NEG_BIG_INT)return{name:"int"};if((3&t)===Vl.SHORT_STRING||t===Vl.LONG_STRING||t===Vl.EMPTY_STRING)return{name:"string"};if((15&t)===Vl.SHORT_LIST||t===Vl.LONG_LIST)return Tl();if((15&t)===Vl.SHORT_TUPLE||t===Vl.LONG_TUPLE||t===Vl.EMPTY_TUPLE)return Pl();if(t===Vl.MAP||t===Vl.EMPTY_MAP)return Il();if(t===Vl.POS_BITS||t===Vl.NEG_BITS)return{name:"bits"};if(t===Vl.VARIANT)return El();if(t===Vl.OBJECT){const t=e[1];return Gl(jl.hasOwnProperty(t),`Unsupported object type "${t}"`),jl[t]}if(t===Vl.CONTRACT_BYTEARRAY)return{name:"contract_bytearray"};if(t===Vl.TYPE_INTEGER||t===Vl.TYPE_BOOLEAN||t===Vl.TYPE_LIST||t===Vl.TYPE_TUPLE||t===Vl.TYPE_OBJECT||t===Vl.TYPE_BITS||t===Vl.TYPE_MAP||t===Vl.TYPE_STRING||t===Vl.TYPE_VARIANT||t===Vl.TYPE_BYTES||t===Vl.TYPE_CONTRACT_BYTEARRAY||t===Vl.TYPE_VAR||t===Vl.TYPE_ANY)return{name:"type",type:undefined};throw new Ll(t)}},Hl=class{constructor(e){this.name=e}valueOf(){throw new $l("Not implemented.")}accept(e){return e.visitData(this)}};class Jl extends Error{constructor(e){super(e),this.name="SerializerError"}}var Wl=Jl,Kl=class{constructor(e){this.globalSerializer=e}serialize(e){throw new Wl("Not implemented.")}deserialize(e,t){const[n,r]=this.deserializeStream(e,t);return n}deserializeStream(e,t){throw new Wl("Not implemented.")}};const Yl=e=>{const t=BigInt(e);return t<256n?new Uint8Array([Number(t)]):new Uint8Array([...Yl(t>>8n),Number(0xffn&t)])},Ql=e=>[...e].map((e=>e.toString(16).padStart(2,"0"))),Xl=e=>{if(0===e.length)return 0n;const t=Ql(e);return BigInt("0x"+t.join(""))},Zl=e=>Ql(e).join("");class em extends Error{constructor(e){super(e),this.name="FormatError"}}var tm=em;class nm extends Error{constructor(e,t){super(t),this.name="FateTypeError",this.type=e}}var rm=nm,am=class extends Hl{constructor(e,t,n="bytes"){if(super(n),this._value=((e,t=0)=>{if(Array.isArray(e)||ArrayBuffer.isView(e))return new Uint8Array(e);if("string"==typeof e)return(e=>{const t=e.match(/^(0x)?([a-f0-9]*)$/i);if(!t)throw new tm(`Invalid hex string: ${e}`);return new Uint8Array(t[2].split(/(.{1,2})/).filter((e=>e)).map((e=>parseInt(e,16))))})(e);if("bigint"!=typeof e&&!Number.isInteger(e))throw new rm("byte_array",`Should be one of: Array, ArrayBuffer, hex string, Number, BigInt; got ${e} instead`);const n=Yl(e);if(n.length>=t)return n;const r=new Uint8Array(t);return r.set(n,t-n.length),r})(e,t),t&&this._value.byteLength!==t)throw new rm(n,`Invalid length: got ${this._value.byteLength} bytes instead of ${t} bytes`);this._size=t}get value(){return this._value}get size(){return this._size}get type(){return _l(this._size)}valueOf(){return this._value}},im=class extends am{constructor(e,t,n){super(e,32,t),this._prefix=n}get prefix(){return this._prefix}accept(e){return e.visitAddress(this)}},sm=class extends im{constructor(e){super(e,"account_pubkey","ak")}get type(){return{name:"account_pubkey"}}},om=class extends Kl{serialize(e){return[Vl.OBJECT,Vl.OTYPE_ADDRESS,...$i.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=$i.decode(t.slice(2),!0);return[new sm(n.data),new Uint8Array(n.remainder)]}};function cm(e){return new Uint8Array($i.encode(Yl(e)))}function um(e){const t=$i.decode(e,!0);return[Xl(t.data),t.remainder]}var lm=class extends Hl{constructor(e){super("bits"),this._value=BigInt(e)}get type(){return{name:"bits"}}get value(){return this._value}valueOf(){return this._value}},mm=e=>e>0?e:-1n*e,dm=class extends Kl{serialize(e){return[e.value>=0?Vl.POS_BITS:Vl.NEG_BITS,...cm(mm(e.value))]}deserializeStream(e){const t=new Uint8Array(e),n=t[0]===Vl.POS_BITS?1n:-1n,[r,a]=um(t.slice(1));return[new lm(r*n),new Uint8Array(a)]}},pm=class extends Hl{constructor(e){super("bool"),this._value=!!e}get value(){return this._value}get type(){return{name:"bool"}}valueOf(){return this._value}},hm=class extends Kl{serialize(e){return!0===e.valueOf()?[Vl.TRUE]:[Vl.FALSE]}deserializeStream(e){const t=new Uint8Array(e),n=t[0],r=t.slice(1);if(n===Vl.TRUE)return[new pm(!0),r];if(n===Vl.FALSE)return[new pm(!1),r];throw new Ll(n)}},fm=class extends Hl{constructor(e=[]){super("byte_array"),this._value=new Uint8Array(e)}get length(){return this._value.length}get type(){return{name:"byte_array"}}valueOf(){return this._value}},ym=class extends Hl{constructor(e){super("int"),this._value=BigInt(e)}get value(){return this._value}get type(){return{name:"int"}}valueOf(){return this._value}},gm=class extends Kl{serialize(e){const t=e instanceof ym?e.value:BigInt(e),n=mm(t);if(n<64){const e=Number(n);return t>=0?[e<<1]:[e<<1&254|128]}return t<0?[Vl.NEG_BIG_INT,...cm(n-64n)]:[Vl.POS_BIG_INT,...cm(n-64n)]}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(!(1&n))return 128&n?[new ym(-((126&n)>>1)),t.slice(1)]:[new ym(n>>1),t.slice(1)];if(n===Vl.POS_BIG_INT||n===Vl.NEG_BIG_INT){const e=n===Vl.POS_BIG_INT?1n:-1n,[r,a]=um(t.slice(1));return[new ym((r+64n)*e),new Uint8Array(a)]}throw new Ll(n)}};const Nm=new gm;var wm=class extends Kl{serialize(e){return 0===e.length?[Vl.EMPTY_STRING]:e.length<64?[e.length<<2|Vl.SHORT_STRING,...e.valueOf()]:[Vl.LONG_STRING,...Nm.serialize(e.length-64),...e.valueOf()]}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(n===Vl.EMPTY_STRING)return[new fm,t.slice(1)];if(n===Vl.LONG_STRING){const[e,n]=Nm.deserializeStream(t.slice(1)),r=Number(e.valueOf())+64;return[new fm(n.slice(0,r)),n.slice(r)]}const r=1+(n>>2);return[new fm(t.slice(1,r)),t.slice(r)]}};const vm=new wm;var bm=class extends Kl{serialize(e){return[Vl.OBJECT,Vl.OTYPE_BYTES,...vm.serialize(e.value)]}deserializeStream(e){const t=new Uint8Array(e),[n,r]=vm.deserializeStream(t.slice(2));return[new am(n.valueOf()),r]}},xm=class extends im{constructor(e){super(e,"channel","ch")}get type(){return{name:"channel"}}},_m=class extends Kl{serialize(e){return[Vl.OBJECT,Vl.OTYPE_CHANNEL,...$i.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=$i.decode(t.slice(2),!0);return[new xm(n.data),new Uint8Array(n.remainder)]}},Cm=class extends im{constructor(e){super(e,"contract_pubkey","ct")}get type(){return{name:"contract_pubkey"}}},Sm=class extends Kl{serialize(e){return[Vl.OBJECT,Vl.OTYPE_CONTRACT,...$i.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=$i.decode(t.slice(2),!0);return[new Cm(n.data),new Uint8Array(n.remainder)]}},Tm=class extends Hl{constructor(){super("void"),this._value=void 0}get value(){return this._value}get type(){return{name:"void"}}valueOf(){return this._value}},Pm=class extends Kl{serialize(){return""}deserialize(){return new Tm}deserializeStream(e){return[new Tm,e]}},Am=class extends Hl{constructor(e,t=[]){super("list"),this._itemsType=e,this.items=Array.from(t)}get itemsType(){return this._itemsType}get type(){return Tl(this.itemsType)}get length(){return this.items.length}valueOf(){return this.items.map((e=>e.valueOf()))}accept(e){return e.visitList(this)}},zm=class extends Kl{serialize(e){const t=e.items.map((e=>this.globalSerializer.serialize(e))).flat(1/0),n=e.items.length;return n<16?[n<<4|Vl.SHORT_LIST,...t]:[Vl.LONG_LIST,...cm(n-16),...t]}deserializeStream(e,t){const n=new Uint8Array(e),r=n[0];let a,i,s=0n,o=n.slice(1);r===Vl.LONG_LIST&&([s,o]=um(n.slice(1)),s+=16n),(15&r)===Vl.SHORT_LIST&&(s=BigInt((240&r)>>4)),void 0!==t&&(a=t.valuesType);const c=[];for(let e=0n;e<s;e++)[i,o]=this.globalSerializer.deserializeStream(o,a),c.push(i);return 0n===s?[new Am,o]:(void 0===t&&(a=c[0].type),[new Am(a,c),o])}};const Im=e=>{const[t,n]=e;return{key:t,value:n}};var Em=class extends Hl{constructor(e,t,n=[]){super("map"),this._keyType=e,this._valueType=t,this._type=Il(e,t),this._value=new Map(n)}get items(){return[...this._value.entries()].map(Im)}get keyType(){return this._keyType}get valueType(){return this._valueType}get type(){return this._type}get length(){return this._value.size}get iterator(){return this._value[Symbol.iterator]()}get keys(){return this._value.keys()}valueOf(){const e=new Map;for(const[t,n]of this.iterator)e.set(t.valueOf(),n.valueOf());return e}accept(e){return e.visitMap(this)}},Mm=class extends Hl{constructor(e=[],t=[]){super("tuple"),this._valueTypes=e.hasOwnProperty("valueTypes")?e.valueTypes:e,this._type=Array.isArray(e)?Pl(e):e,this._items=Array.from(t)}get valueTypes(){return this._valueTypes}get type(){return this._type}get size(){return this._items.length}get items(){return this._items}valueOf(){return this.prepareItems((e=>e.valueOf()))}prepareItems(e){const t=this._items.map(e);return"record"===this._type.name?(n=this._type.keys,r=t,n.reduce(((e,t,n)=>(e[t]=r[n],e)),{})):t;var n,r}accept(e){return e.visitTuple(this)}},qm=class extends Hl{constructor(e,t=[]){super("set"),this._itemsType=e,this._items=new Set(t)}get items(){return Array.from(this._items.values())}get itemsType(){return this._itemsType}get type(){return zl(this.itemsType)}get length(){return this._items.size}valueOf(){return new Set(this.items.map((e=>e.valueOf())))}accept(e){return e.visitSet(this)}},Rm=class extends Kl{serialize(e){return this.globalSerializer.serialize(new Em(e.itemsType,Pl(),e.items.map((e=>[e,new Mm]))))}deserializeStream(e,t){const n=Il(t.valuesType,Pl()),[r,a]=this.globalSerializer.deserializeStream(e,n);return[new qm(t.valuesType,r.keys),a]}};const Om=(e,t)=>{if(0===e.length)return-1;if(0===t.length)return 1;const n=Gm(e.itemsType);for(let r=0;r<e.length;r++){if(void 0===t.items[r])return 1;const a=n(e.items[r],t.items[r]);if(0!==a)return a}return e.length===t.length?0:-1},km=e=>{const t=Gm(e);return(e,n)=>t(e.key,n.key)},Bm=(e,t)=>{const n=new Am({name:"int"},e.valueOf()),r=new Am({name:"int"},t.valueOf());return Om(n,r)},Um=(e,t)=>Number(BigInt(e)-BigInt(t)),$m={int:Um,bool:(e,t)=>e-t,string:(e,t)=>{const n=new TextEncoder,r=e.toString(),a=t.toString();return r.length===a.length?Bm(n.encode(e),n.encode(t)):r.length-a.length},bits:(e,t)=>e<0||t<0?-Um(e,t):Um(e,t),list:Om,tuple:(e,t)=>{if(0===e.size)return-1;const n=e.size-t.size;if(0!==n)return n;for(let n=0;n<e.size;n++){const r=e.valueTypes[n],a=Gm(r)(e.items[n],t.items[n]);if(0!==a)return a}return 0},variant:(e,t)=>{const n=e.arities.length-t.arities.length;if(0!==n)return n;const r=new Am(e.aritiesType,e.arities),a=new Am(t.aritiesType,t.arities),i=Gm(r)(r,a);if(0!==i)return i;const s=e.tag-t.tag;return 0!==s?s:Gm(Pl())(new Mm(e.valueTypes,e.value),new Mm(t.valueTypes,t.value))},map:(e,t)=>{const n=[...e.items],r=[...t.items];n.sort(km(e.keyType)),r.sort(km(t.keyType));const a=Gm(e.keyType),i=Gm(e.valueType);for(let e=0;e<n.length;e++){if(void 0===r[e])return 1;const t=n[e],s=r[e],o=a(t.key,s.key);if(0!==o)return o;const c=i(t.value,s.value);if(0!==c)return c}return n.length===r.length?0:-1},bytes:Bm,account_pubkey:Bm,channel:Bm,contract_pubkey:Bm,oracle_query_id:Bm,oracle_pubkey:Bm},Gm=e=>(Gl(e.hasOwnProperty("name"),`Cannot determine type name of ${JSON.stringify(e)}`),Gl($m.hasOwnProperty(e.name),`Unsupported comparator for ${e.name}`),$m[e.name]);var Vm=Gm,Dm=class extends Kl{serialize(e){const t=e.length,n=Vm(e.keyType),r=[...e.items];r.sort(((e,t)=>n(e.key,t.key)));const a=r.map((e=>[this.globalSerializer.serialize(e.key),this.globalSerializer.serialize(e.value)]));return[Vl.MAP,...cm(t),...a.flat(1/0)]}deserializeStream(e,t){const n=new Uint8Array(e),r=n[0];if(r!==Vl.MAP)throw new Ll(r);const[a,i]=um(n.slice(1));let s,o,c=i;if(0n===a)return[new Em,c];void 0!==t&&({keyType:s,valueType:o}=t);const u=[];for(let e=0n;e<a;e++){const[e,t]=this.globalSerializer.deserializeStream(c,s),[n,r]=this.globalSerializer.deserializeStream(t,o);u.push([e,n]),c=r}const l=u[0];return void 0===t&&(s=l[0].type,o=l[1].type),[new Em(s,o,u),c]}},Lm=class extends im{constructor(e){super(e,"oracle_query_id","oq")}get type(){return Sl()}},jm=class extends Kl{serialize(e){return[Vl.OBJECT,Vl.OTYPE_ORACLE_QUERY,...$i.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=$i.decode(t.slice(2),!0);return[new Lm(n.data),new Uint8Array(n.remainder)]}},Fm=class extends im{constructor(e){super(e,"oracle_pubkey","ok")}get type(){return Cl()}},Hm=class extends Kl{serialize(e){return[Vl.OBJECT,Vl.OTYPE_ORACLE,...$i.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=$i.decode(t.slice(2),!0);return[new Fm(n.data),new Uint8Array(n.remainder)]}};const Jm=e=>e instanceof Uint8Array?(new TextDecoder).decode(e):e.toString(),Wm=e=>"string"==typeof e?(new TextEncoder).encode(e):e;var Km=class extends Hl{constructor(e){super("string"),this._value=Wm(e)}get type(){return{name:"string"}}toString(){return Jm(this._value)}toBytes(){return this._value}valueOf(){return(e=>{const t=Wm(Jm(e));return Xl(e)===Xl(t)})(this._value)?this.toString():this._value}};const Ym=new wm;var Qm=class extends Kl{serialize(e){let t=e.valueOf();return"string"==typeof t&&(t=(new TextEncoder).encode(t)),Ym.serialize(t)}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if((3&n)!==Vl.SHORT_STRING&&![Vl.EMPTY_STRING,Vl.LONG_STRING].includes(n))throw new Ll(n);const[r,a]=Ym.deserializeStream(t);return[new Km(r.valueOf()),a]}},Xm=class extends Kl{serialize(e){const t=e.size;if(0===t)return[Vl.EMPTY_TUPLE];const n=e.items.map((e=>this.globalSerializer.serialize(e))).flat(1/0);return t<16?[t<<4|Vl.SHORT_TUPLE,...n]:[Vl.LONG_TUPLE,...cm(t-16),...n]}deserializeStream(e,t){const n=new Uint8Array(e),r=n[0];let a=0n,i=n.slice(1);if(r===Vl.EMPTY_TUPLE)return[new Mm,i];(15&r)===Vl.SHORT_TUPLE&&(a=(240&r)>>4),r===Vl.LONG_TUPLE&&([a,i]=um(n.slice(1)),a+=16n);let s=[];void 0!==t&&(s=t.valueTypes);const o=[];let c=null;for(let e=0n;e<a;e++)[c,i]=this.globalSerializer.deserializeStream(i,s[e]),o.push(c);let u=t;return void 0===t&&(u=o.map((e=>e.type))),[new Mm(u,o),i]}},Zm=class extends Hl{constructor(e,t,n=[],r=[],a=[]){super("variant"),this.arities=Array.from(e),this._tag=t,this._value=n,this._valueTypes=r,this._type=El(a)}get valueTypes(){return this._valueTypes}get type(){return this._type}get tag(){return this._tag}get value(){return this._value}get aritiesType(){return{name:"int"}}get variantType(){return Pl(this._valueTypes)}get variants(){return this._type.variants}get variantName(){if(0===this.variants.length)return this.tag;const e=this.variants[this.tag];return Object.keys(e)[0]}valueOf(){if(0===this.variants.length)return this;const e=this._value.map((e=>e.valueOf()));return{[this.variantName]:e}}accept(e){return e.visitVariant(this)}},ed=class extends Kl{serialize(e){const t=new Mm(e.valueTypes,e.value);return[Vl.VARIANT,...$i.encode(new Uint8Array(e.arities)),e.tag,...this.globalSerializer.serialize(t)]}deserializeStream(e,t){const n=new Uint8Array(e),r=$i.decode(n.slice(1),!0),a=[...r.data],i=r.remainder[0],s=r.remainder.slice(1);let o,c=[];void 0!==t&&void 0!==t.variants&&(c=t.variants,o=Pl(Object.values(c[i])[0]));const[u,l]=this.globalSerializer.deserializeStream(s,o);return[new Zm(a,i,u.items,u.valueTypes,c),l]}},td=class extends Hl{constructor(e,t,n){if(super(n),!Array.isArray(e)&&!ArrayBuffer.isView(e))throw new rm(n,`Should be one of: Array or ArrayBuffer; got ${e} instead`);const r=new Uint8Array(e);if(r.byteLength!==t)throw new rm(n,`Invalid length: got ${r.byteLength} bytes instead of ${t} bytes`);this._value=r,this._size=t}get value(){return this._value}get size(){return this._size}valueOf(){return this._value}},nd=class extends td{constructor(e){super(e,32,"bls12_381.fr")}get type(){return{name:"bls12_381.fr"}}accept(e){return e.visitBls12381Fr(this)}},rd=class extends td{constructor(e){super(e,48,"bls12_381.fp")}get type(){return{name:"bls12_381.fp"}}accept(e){return e.visitBls12381Fp(this)}};const ad=new bm,id=(e,t)=>{switch(e.name){case"bls12_381.fr":return new nd(t);case"bls12_381.fp":return new rd(t);default:throw new Error(`Unsupported type "${e.name}"`)}};var sd=class extends Kl{serialize(e){return ad.serialize(e)}deserializeStream(e,t){const[n,r]=ad.deserializeStream(e);return[id(t,n.valueOf()),r]}},od=class extends Hl{constructor(e,t,n){super("calldata"),this._functionId=new Uint8Array(e),this._argTypes=t,this._args=n}get functionId(){return this._functionId}get argTypes(){return this._argTypes}get args(){return this._args}valueOf(){return{functionId:this._functionId,args:this._args}}accept(e){return e.visitCalldata(this)}},cd=class extends Kl{serialize(e){const t=new fm(e.functionId),n=new Mm(e.argTypes,e.args),r=new Mm([t.type,n.type],[t,n]);return this.globalSerializer.serialize(r)}deserialize(e,t){const n=Pl([{name:"byte_array"},Pl(t.argumentTypes)]),[r]=this.globalSerializer.deserializeStream(e,n),[a,i]=r.items;return new od(a.valueOf(),i.valueTypes,i.items)}};const ud={[Vl.TYPE_INTEGER]:{name:"int"},[Vl.TYPE_BOOLEAN]:{name:"bool"},[Vl.TYPE_BITS]:{name:"bits"},[Vl.TYPE_STRING]:{name:"string"},[Vl.TYPE_ANY]:{name:"any"}},ld={[Vl.OTYPE_ADDRESS]:{name:"account_pubkey"},[Vl.OTYPE_CONTRACT]:{name:"contract_pubkey"},[Vl.OTYPE_ORACLE]:Cl(),[Vl.OTYPE_ORACLE_QUERY]:Sl(),[Vl.OTYPE_CHANNEL]:{name:"channel"}};var md=class extends Kl{constructor(e){super(e),this._intSerializer=new gm}serialize(e){const t=Object.entries(ud).find((([t,{name:n}])=>n===e.name))?.[0];if(null!=t)return new Uint8Array([t]);const n=Object.entries(ld).find((([t,{name:n}])=>n===e.name))?.[0];if(null!=n)return new Uint8Array([Vl.TYPE_OBJECT,n]);if("tvar"===e.name)return new Uint8Array([Vl.TYPE_VAR,e.id]);if("bytes"===e.name)return new Uint8Array([Vl.TYPE_BYTES,...this._intSerializer.serialize(e.size)]);if("list"===e.name)return new Uint8Array([Vl.TYPE_LIST,...this.serialize(e.valuesType)]);if("map"===e.name)return new Uint8Array([Vl.TYPE_MAP,...this.serialize(e.keyType),...this.serialize(e.valueType)]);if("tuple"===e.name)return new Uint8Array([Vl.TYPE_TUPLE,e.valueTypes.length,...e.valueTypes.map((e=>[...this.serialize(e)])).flat()]);if("variant"===e.name)return new Uint8Array([Vl.TYPE_VARIANT,e.variants.length,...e.variants.map((e=>[...this.serialize(e)])).flat()]);throw new rm(e.name,`Unsupported type: ${e.name}`)}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(ud.hasOwnProperty(n))return[ud[n],t.slice(1)];if(n===Vl.TYPE_OBJECT){const e=t[1];if(!ld.hasOwnProperty(e))throw new Ll(e,"Unsupported object type");return[ld[e],t.slice(2)]}if(n===Vl.TYPE_VAR)return[Ol(t[1]),t.slice(2)];if(n===Vl.TYPE_BYTES){const[e,n]=this._intSerializer.deserializeStream(t.slice(1));return[_l(e.valueOf()),n]}if(n===Vl.TYPE_LIST){const[e,n]=this.deserializeStream(t.slice(1));return[Tl(e),n]}if(n===Vl.TYPE_MAP){const[e,n]=this.deserializeStream(t.slice(1)),[r,a]=this.deserializeStream(n);return[Il(e,r),a]}if(n===Vl.TYPE_TUPLE){const e=t[1],n=[];let r,a=t.slice(2);for(let t=0;t<e;t++)[r,a]=this.deserializeStream(a),n.push(r);return[Pl(n),a]}if(n===Vl.TYPE_VARIANT){const e=t[1],n=[];let r,a=t.slice(2);for(let t=0;t<e;t++)[r,a]=this.deserializeStream(a),n.push(r);return[El(n),a]}throw new Ll(n)}},dd=Object.freeze({0:{mnemonic:"RETURN",args:0,end:!0},1:{mnemonic:"RETURNR",args:1,end:!0},2:{mnemonic:"CALL",args:1,end:!0},3:{mnemonic:"CALL_R",args:5,end:!0},4:{mnemonic:"CALL_T",args:1,end:!0},5:{mnemonic:"CALL_GR",args:6,end:!0},6:{mnemonic:"JUMP",args:1,end:!0},7:{mnemonic:"JUMPIF",args:2,end:!0},8:{mnemonic:"SWITCH_V2",args:3,end:!0},9:{mnemonic:"SWITCH_V3",args:4,end:!0},10:{mnemonic:"SWITCH_VN",args:2,end:!0},11:{mnemonic:"CALL_VALUE",args:1,end:!1},12:{mnemonic:"PUSH",args:1,end:!1},13:{mnemonic:"DUPA",args:0,end:!1},14:{mnemonic:"DUP",args:1,end:!1},15:{mnemonic:"POP",args:1,end:!1},16:{mnemonic:"INCA",args:0,end:!1},17:{mnemonic:"INC",args:1,end:!1},18:{mnemonic:"DECA",args:0,end:!1},19:{mnemonic:"DEC",args:1,end:!1},20:{mnemonic:"ADD",args:3,end:!1},21:{mnemonic:"SUB",args:3,end:!1},22:{mnemonic:"MUL",args:3,end:!1},23:{mnemonic:"DIV",args:3,end:!1},24:{mnemonic:"MOD",args:3,end:!1},25:{mnemonic:"POW",args:3,end:!1},26:{mnemonic:"STORE",args:2,end:!1},27:{mnemonic:"SHA3",args:2,end:!1},28:{mnemonic:"SHA256",args:2,end:!1},29:{mnemonic:"BLAKE2B",args:2,end:!1},30:{mnemonic:"LT",args:3,end:!1},31:{mnemonic:"GT",args:3,end:!1},32:{mnemonic:"EQ",args:3,end:!1},33:{mnemonic:"ELT",args:3,end:!1},34:{mnemonic:"EGT",args:3,end:!1},35:{mnemonic:"NEQ",args:3,end:!1},36:{mnemonic:"AND",args:3,end:!1},37:{mnemonic:"OR",args:3,end:!1},38:{mnemonic:"NOT",args:2,end:!1},39:{mnemonic:"TUPLE",args:2,end:!1},40:{mnemonic:"ELEMENT",args:3,end:!1},41:{mnemonic:"SETELEMENT",args:4,end:!1},42:{mnemonic:"MAP_EMPTY",args:1,end:!1},43:{mnemonic:"MAP_LOOKUP",args:3,end:!1},44:{mnemonic:"MAP_LOOKUPD",args:4,end:!1},45:{mnemonic:"MAP_UPDATE",args:4,end:!1},46:{mnemonic:"MAP_DELETE",args:3,end:!1},47:{mnemonic:"MAP_MEMBER",args:3,end:!1},48:{mnemonic:"MAP_FROM_LIST",args:2,end:!1},49:{mnemonic:"MAP_SIZE",args:2,end:!1},50:{mnemonic:"MAP_TO_LIST",args:2,end:!1},51:{mnemonic:"IS_NIL",args:2,end:!1},52:{mnemonic:"CONS",args:3,end:!1},53:{mnemonic:"HD",args:2,end:!1},54:{mnemonic:"TL",args:2,end:!1},55:{mnemonic:"LENGTH",args:2,end:!1},56:{mnemonic:"NIL",args:1,end:!1},57:{mnemonic:"APPEND",args:3,end:!1},58:{mnemonic:"STR_JOIN",args:3,end:!1},59:{mnemonic:"INT_TO_STR",args:2,end:!1},60:{mnemonic:"ADDR_TO_STR",args:2,end:!1},61:{mnemonic:"STR_REVERSE",args:2,end:!1},62:{mnemonic:"STR_LENGTH",args:2,end:!1},63:{mnemonic:"BYTES_TO_INT",args:2,end:!1},64:{mnemonic:"BYTES_TO_STR",args:2,end:!1},65:{mnemonic:"BYTES_CONCAT",args:3,end:!1},66:{mnemonic:"BYTES_SPLIT",args:3,end:!1},67:{mnemonic:"INT_TO_ADDR",args:2,end:!1},68:{mnemonic:"VARIANT",args:4,end:!1},69:{mnemonic:"VARIANT_TEST",args:3,end:!1},70:{mnemonic:"VARIANT_ELEMENT",args:3,end:!1},71:{mnemonic:"BITS_NONEA",args:0,end:!1},72:{mnemonic:"BITS_NONE",args:1,end:!1},73:{mnemonic:"BITS_ALLA",args:0,end:!1},74:{mnemonic:"BITS_ALL",args:1,end:!1},75:{mnemonic:"BITS_ALL_N",args:2,end:!1},76:{mnemonic:"BITS_SET",args:3,end:!1},77:{mnemonic:"BITS_CLEAR",args:3,end:!1},78:{mnemonic:"BITS_TEST",args:3,end:!1},79:{mnemonic:"BITS_SUM",args:2,end:!1},80:{mnemonic:"BITS_OR",args:3,end:!1},81:{mnemonic:"BITS_AND",args:3,end:!1},82:{mnemonic:"BITS_DIFF",args:3,end:!1},83:{mnemonic:"BALANCE",args:1,end:!1},84:{mnemonic:"ORIGIN",args:1,end:!1},85:{mnemonic:"CALLER",args:1,end:!1},86:{mnemonic:"BLOCKHASH",args:2,end:!1},87:{mnemonic:"BENEFICIARY",args:1,end:!1},88:{mnemonic:"TIMESTAMP",args:1,end:!1},89:{mnemonic:"GENERATION",args:1,end:!1},90:{mnemonic:"MICROBLOCK",args:1,end:!1},91:{mnemonic:"DIFFICULTY",args:1,end:!1},92:{mnemonic:"GASLIMIT",args:1,end:!1},93:{mnemonic:"GAS",args:1,end:!1},94:{mnemonic:"ADDRESS",args:1,end:!1},95:{mnemonic:"GASPRICE",args:1,end:!1},96:{mnemonic:"LOG0",args:1,end:!1},97:{mnemonic:"LOG1",args:2,end:!1},98:{mnemonic:"LOG2",args:3,end:!1},99:{mnemonic:"LOG3",args:4,end:!1},100:{mnemonic:"LOG4",args:5,end:!1},101:{mnemonic:"SPEND",args:2,end:!1},102:{mnemonic:"ORACLE_REGISTER",args:7,end:!1},103:{mnemonic:"ORACLE_QUERY",args:8,end:!1},104:{mnemonic:"ORACLE_RESPOND",args:6,end:!1},105:{mnemonic:"ORACLE_EXTEND",args:3,end:!1},106:{mnemonic:"ORACLE_GET_ANSWER",args:5,end:!1},107:{mnemonic:"ORACLE_GET_QUESTION",args:5,end:!1},108:{mnemonic:"ORACLE_QUERY_FEE",args:2,end:!1},109:{mnemonic:"AENS_RESOLVE",args:4,end:!1},110:{mnemonic:"AENS_PRECLAIM",args:3,end:!1},111:{mnemonic:"AENS_CLAIM",args:5,end:!1},112:{mnemonic:"AENS_UPDATE",args:6,end:!1},113:{mnemonic:"AENS_TRANSFER",args:4,end:!1},114:{mnemonic:"AENS_REVOKE",args:3,end:!1},115:{mnemonic:"BALANCE_OTHER",args:2,end:!1},116:{mnemonic:"VERIFY_SIG",args:4,end:!1},117:{mnemonic:"VERIFY_SIG_SECP256K1",args:4,end:!1},118:{mnemonic:"CONTRACT_TO_ADDRESS",args:2,end:!1},119:{mnemonic:"AUTH_TX_HASH",args:1,end:!1},120:{mnemonic:"ORACLE_CHECK",args:4,end:!1},121:{mnemonic:"ORACLE_CHECK_QUERY",args:5,end:!1},122:{mnemonic:"IS_ORACLE",args:2,end:!1},123:{mnemonic:"IS_CONTRACT",args:2,end:!1},124:{mnemonic:"IS_PAYABLE",args:2,end:!1},125:{mnemonic:"CREATOR",args:1,end:!1},126:{mnemonic:"ECVERIFY_SECP256K1",args:4,end:!1},127:{mnemonic:"ECRECOVER_SECP256K1",args:3,end:!1},128:{mnemonic:"ADDRESS_TO_CONTRACT",args:2,end:!1},129:{mnemonic:"BLS12_381_G1_NEG",args:2,end:!1},130:{mnemonic:"BLS12_381_G1_NORM",args:2,end:!1},131:{mnemonic:"BLS12_381_G1_VALID",args:2,end:!1},132:{mnemonic:"BLS12_381_G1_IS_ZERO",args:2,end:!1},133:{mnemonic:"BLS12_381_G1_ADD",args:3,end:!1},134:{mnemonic:"BLS12_381_G1_MUL",args:3,end:!1},135:{mnemonic:"BLS12_381_G2_NEG",args:2,end:!1},136:{mnemonic:"BLS12_381_G2_NORM",args:2,end:!1},137:{mnemonic:"BLS12_381_G2_VALID",args:2,end:!1},138:{mnemonic:"BLS12_381_G2_IS_ZERO",args:2,end:!1},139:{mnemonic:"BLS12_381_G2_ADD",args:3,end:!1},140:{mnemonic:"BLS12_381_G2_MUL",args:3,end:!1},141:{mnemonic:"BLS12_381_GT_INV",args:2,end:!1},142:{mnemonic:"BLS12_381_GT_ADD",args:3,end:!1},143:{mnemonic:"BLS12_381_GT_MUL",args:3,end:!1},144:{mnemonic:"BLS12_381_GT_POW",args:3,end:!1},145:{mnemonic:"BLS12_381_GT_IS_ONE",args:2,end:!1},146:{mnemonic:"BLS12_381_PAIRING",args:3,end:!1},147:{mnemonic:"BLS12_381_MILLER_LOOP",args:3,end:!1},148:{mnemonic:"BLS12_381_FINAL_EXP",args:2,end:!1},149:{mnemonic:"BLS12_381_INT_TO_FR",args:2,end:!1},150:{mnemonic:"BLS12_381_INT_TO_FP",args:2,end:!1},151:{mnemonic:"BLS12_381_FR_TO_INT",args:2,end:!1},152:{mnemonic:"BLS12_381_FP_TO_INT",args:2,end:!1},153:{mnemonic:"AENS_LOOKUP",args:2,end:!1},154:{mnemonic:"ORACLE_EXPIRY",args:2,end:!1},155:{mnemonic:"AUTH_TX",args:1,end:!1},156:{mnemonic:"STR_TO_LIST",args:2,end:!1},157:{mnemonic:"STR_FROM_LIST",args:2,end:!1},158:{mnemonic:"STR_TO_UPPER",args:2,end:!1},159:{mnemonic:"STR_TO_LOWER",args:2,end:!1},160:{mnemonic:"CHAR_TO_INT",args:2,end:!1},161:{mnemonic:"CHAR_FROM_INT",args:2,end:!1},162:{mnemonic:"CALL_PGR",args:7,end:!0},163:{mnemonic:"CREATE",args:3,end:!0},164:{mnemonic:"CLONE",args:4,end:!0},165:{mnemonic:"CLONE_G",args:5,end:!0},166:{mnemonic:"BYTECODE_HASH",args:2,end:!1},167:{mnemonic:"FEE",args:1,end:!1},168:{mnemonic:"ADDRESS_TO_BYTES",args:2,end:!1},169:{mnemonic:"POSEIDON",args:3,end:!1},170:{mnemonic:"MULMOD",args:4,end:!1},171:{mnemonic:"BAND",args:3,end:!1},172:{mnemonic:"BOR",args:3,end:!1},173:{mnemonic:"BXOR",args:3,end:!1},174:{mnemonic:"BNOT",args:2,end:!1},175:{mnemonic:"BSL",args:3,end:!1},176:{mnemonic:"BSR",args:3,end:!1},250:{mnemonic:"DEACTIVATE",args:0,end:!1},251:{mnemonic:"ABORT",args:1,end:!0},252:{mnemonic:"EXIT",args:1,end:!0},253:{mnemonic:"NOP",args:0,end:!1},254:{mnemonic:"FUNCTION",args:0,end:!1},255:{mnemonic:"EXTEND",args:0,end:!1}});const pd={3:"immediate",2:"var",1:"arg",0:"stack"};var hd=class extends Kl{constructor(e){super(e),this._typeSerializer=new md}deserialize(e){const t=$i.decode(e,!0),n=$i.decode(t.remainder,!0),r=$i.decode(n.remainder),a=this.deserializeSymbols(n.data);return{functions:this.deserializeFunctions(t.data,a),symbols:a,annotations:this.deserializeAnnotations(r)}}deserializeFunctions(e,t){let n={},r=e;const a=[];for(;r.length;)[n,r]=this.deserializeFunction(r,t),a.push(n);return a}deserializeFunction(e,t){const n=e[0],r=Zl(e.slice(1,5));if(254!==n)throw new Error(`Wrong function prefix, expected 0xfe got 0x${e[0].toString(16)}`);const a=t[r],[i,s]=this.deserializeAttributes(e.slice(5)),[o,c,u]=this.deserializeSignature(s),[l,m]=this.deserializeInstructions(u);return[{id:r,name:a,attributes:i,args:o,returnType:c,instructions:l},m]}deserializeInstructions(e){let t={},n=e;const r=[];let a=0,i=!1;for(;n.length&&254!==n[0];)void 0===r[a]&&(r[a]=[]),[t,n,i]=this.deserializeInstruction(n),r[a].push(t),i&&a++;return[r,n]}deserializeInstruction(e){const t=e[0],n=e.slice(1);if(!dd.hasOwnProperty(t))throw new Error(`Unsupported opcode: 0x${t.toString(16)}`);const r=dd[t],{mnemonic:a,end:i}=r;if(0===r.args)return[{mnemonic:a,args:[]},n,i];const[s,o]=this.deserializeArguments(n,r.args);return[{mnemonic:a,args:s},o,i]}deserializeArguments(e,t){const n=t<=4?1:2,r=e.subarray(0,n),a=e.slice(n),i=((e,t=1)=>{const n=[];let r=Number(Xl(e));for(let e=0;e<2*t;e+=2)n.push(3&r),r>>=2;if(0!==r)throw new Error(`Invalid argument modifier data. Unexpected padding: 0b${r.toString(2)}`);return n})(r,t),s=[];let o,c=a;return i.forEach((e=>{[o,c]=this.deserializeArgument(e,c),s.push(o)})),[s,c]}deserializeArgument(e,t){const n=pd[e];if("stack"===n)return[{mod:n,arg:0},t];const[r,a]=this.globalSerializer.deserializeStream(t);return[{mod:n,arg:r.valueOf()},a]}deserializeSignature(e){const[t,n]=this._typeSerializer.deserializeStream(e),[r,a]=this._typeSerializer.deserializeStream(n);return[t,r,a]}deserializeAttributes(e){const[t,n]=this.globalSerializer.deserializeStream(e),r=Number(t.valueOf()),a=[];return 1&r&&a.push("private"),2&r&&a.push("payable"),[a,n]}deserializeSymbols(e){const t=Il({name:"byte_array"},{name:"string"}),n=this.globalSerializer.deserializeWithType(e,t).valueOf(),r={};return n.forEach(((e,t)=>{const n=Zl(t);r[n]=e})),r}deserializeAnnotations(e){return this.globalSerializer.deserialize(e).valueOf()}},fd=class extends Kl{constructor(e){super(),this._bytecodeSerializer=new hd(e),this._intSerializer=new gm}deserializeStream(e){const t=new Uint8Array(e),[n,r]=this._intSerializer.deserializeStream(t.slice(1)),a=Number(n),i=$i.decode(r.slice(0,a)),s=new TextDecoder;return[{tag:Xl(i[0]),vsn:Xl(i[1]),sourceHash:Zl(i[2]),aevmTypeInfo:i[3],bytecode:this._bytecodeSerializer.deserialize(i[4]),compilerVersion:s.decode(i[5]),payable:Boolean(i[6][0])},r.slice(a)]}},yd=class extends Kl{constructor(){super(),this.typeFactory=new Fl,this._serializers={void:new Pm,bool:new hm,int:new gm,tuple:new Xm(this),record:new Xm(this),list:new zm(this),set:new Rm(this),map:new Dm(this),byte_array:new wm,string:new Qm,hash:new bm,signature:new bm,bits:new dm,variant:new ed(this),bytes:new bm,account_pubkey:new om,contract_pubkey:new Sm,oracle_pubkey:new Hm,oracle_query_id:new jm,channel:new _m,"bls12_381.fr":new sd,"bls12_381.fp":new sd,calldata:new cd(this),contract_bytearray:new fd(this),type:new md}}_getSerializer(e){if(!e.hasOwnProperty("name"))throw new Wl("Unsupported type: "+JSON.stringify(e));const t=e.name;if(!this._serializers.hasOwnProperty(t))throw new Wl("Unsupported type: "+JSON.stringify(t));return this._serializers[t]}serialize(e){if("object"!=typeof e)throw new Wl("Only object serialization is supported. Got: "+JSON.stringify(e));if(!(e instanceof Hl))throw new Wl("Only instances of FateData is supported.");return this._getSerializer(e).serialize(e)}deserializeWithType(e,t){if(!(e instanceof Uint8Array))throw new Wl("Only instances of Uint8Array is supported.");return this._getSerializer(t).deserialize(e,t)}deserialize(e){if(!(e instanceof Uint8Array))throw new Wl("Only instances of Uint8Array is supported.");const t=this.typeFactory.createType(e);return this.deserializeWithType(e,t)}deserializeStream(e,t){if(!(e instanceof Uint8Array))throw new Wl("Only instances of Uint8Array is supported.");let n=t;return void 0===t&&(n=this.typeFactory.createType(e)),this._getSerializer(n).deserializeStream(e,t)}},gd=n(2861);const Nd=e=>(new lr).update(e).digest(),wd=e=>Nd(Nd(e)).slice(0,4),vd=e=>{const t=gd.Buffer.from(e),n=wd(e);return gd.Buffer.concat([t,n],t.length+4)},bd=e=>{const t=gd.Buffer.from(e),n=t.slice(0,-4),r=t.slice(-4),a=wd(n);if(!r.equals(a))throw new tm("Invalid checksum");return new Uint8Array(n)},xd=e=>vd(e).toString("base64"),_d=e=>{const t=gd.Buffer.from(e,"base64");return bd(t)},Cd=e=>ur.encode(vd(e)),Sd=e=>bd(ur.decode(e)),Td={key_block_hash:{tag:"kh",size:32,encoder:s},micro_block_hash:{tag:"mh",size:32,encoder:s},block_pof_hash:{tag:"bf",size:32,encoder:s},block_tx_hash:{tag:"bx",size:32,encoder:s},block_state_hash:{tag:"bs",size:32,encoder:s},contract_bytearray:{tag:"cb",size:0,encoder:i},contract_pubkey:{tag:"ct",size:32,encoder:s},account_pubkey:{tag:"ak",size:32,encoder:s},account_seckey:{tag:"sk",size:32,encoder:s},channel:{tag:"ch",size:32,encoder:s},oracle_pubkey:{tag:"ok",size:32,encoder:s},oracle_query_id:{tag:"oq",size:32,encoder:s},peer_pubkey:{tag:"pp",size:32,encoder:s},name:{tag:"nm",size:0,encoder:s},tx_hash:{tag:"th",size:32,encoder:s},signature:{tag:"sg",size:64,encoder:s},commitment:{tag:"cm",size:32,encoder:s},bytearray:{tag:"ba",size:0,encoder:i}},Pd={kh:"key_block_hash",mh:"micro_block_hash",bf:"block_pof_hash",bx:"block_tx_hash",bs:"block_state_hash",cb:"contract_bytearray",ct:"contract_pubkey",ak:"account_pubkey",sk:"account_seckey",ch:"channel",ok:"oracle_pubkey",oq:"oracle_query_id",pp:"peer_pubkey",nm:"name",th:"tx_hash",sg:"signature",cm:"commitment",ba:"bytearray"};var Ad=class{encode(e,t){if(!Td.hasOwnProperty(e))throw new rm(e,`Unsupported API type ${e}`);const n=Td[e];if(n.size>0&&t.length!==n.size)throw new rm(e,`Invalid payload. Expected size ${n.size}, but got ${t.length}`);const r=n.encoder.encode(t);return`${n.tag}_${r}`}decode(e){const t=e.substring(0,2);if(!Pd.hasOwnProperty(t))throw new tm(`Invalid API data format. Unsupported tag: ${t}`);if("_"!==e[2])throw new tm(`Invalid API data format. Expected _ separator on position 2, got ${e[2]}`);const n=Td[Pd[t]],r=e.substring(3),a=n.encoder.decode(r);if(n.size>0&&a.length!==n.size)throw new tm(`Invalid API data format. Expected size ${n.size}, but got ${a.length}`);return a}decodeWithType(e,t){const n=e.substring(0,2);if(!Td.hasOwnProperty(t))throw new rm(t,"Unsupported API type");const r=Td[t].tag;if(n!==r){const n=this.capitalizeType(t);throw new rm(t,`${n} should start with ${r}_, got ${e} instead`)}return this.decode(e)}capitalizeType(e){const t=e.replace("_"," ");return t.charAt(0).toUpperCase()+t.slice(1)}};const zd={r:{R:1n<<256n,N:0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001n},p:{R:1n<<384n,N:0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn}},Id=(e,t)=>{if(0n===t)return[1n,0n,e];const[n,r,a]=Id(t,e%t);return[r,n-r*(e/t),a]},Ed=(e,t)=>{const n=zd[t],r=BigInt(e)*n.R%n.N;return Yl(r)},Md=(e,t)=>{const n=zd[t],r=(e=>{const t=Ql(e).reverse();return BigInt("0x"+t.join(""))})(e),a=((e,t)=>{const[n,r,a]=Id(e,t);return(n+t)%t})(n.R,n.N);return r*a%n.N};var qd=class{constructor(){this._apiEncoder=new Ad}toCanonical(e){return e.accept(this)}visitData(e){return e.valueOf()}visitAddress(e){return this._apiEncoder.encode(e.name,e.value)}visitList(e){return e.items.map((e=>e.accept(this)))}visitSet(e){return new Set(e.items.map((e=>e.accept(this))))}visitMap(e){const t=new Map;for(const[n,r]of e.iterator)t.set(n.accept(this),r.accept(this));return t}visitTuple(e){return e.prepareItems((e=>e.accept(this)))}visitVariant(e){const t=e.value.map((e=>e.accept(this)));if("None"!==e.variantName)return"Some"===e.variantName?t[0]:{[e.variantName]:t}}visitBls12381Fr(e){return Md(e.valueOf(),"r")}visitBls12381Fp(e){return Md(e.valueOf(),"p")}visitCalldata(e){const{functionId:t,args:n}=e.valueOf();return{functionId:Zl(t),args:n.map((e=>e.accept(this)))}}},Rd=class extends am{constructor(e){super(e,32,"hash")}},Od=class extends am{constructor(e){super(e,64,"signature")}},kd=class{constructor(e){this._valueFactory=e}get valueFactory(){return this._valueFactory}supports({_name:e,_valueTypes:t}){return!1}create(e,t){throw new Error("Not implemented.")}};const Bd=["int","bool","string","bits","hash","bytes","signature","account_pubkey","contract_pubkey","channel","oracle_pubkey","oracle_query_id"];var Ud=class extends kd{supports({name:e,_valueTypes:t}){return Bd.includes(e)}create(e,t){switch(e.name){case"int":return new ym(t);case"bool":return new pm(t);case"string":return new Km(t);case"bits":return new lm(t);case"hash":return new Rd(t);case"bytes":return new am(t,e.valueTypes);case"signature":return new Od(t);case"account_pubkey":return new sm(t);case"contract_pubkey":return new Cm(t);case"channel":return new xm(t);case"oracle_pubkey":return new Fm(t);case"oracle_query_id":return new Lm(t);default:throw new Error(`Unsupported type "${e.name}"`)}}},$d=class extends kd{supports({name:e,_valueTypes:t}){return"list"===e}create(e,t){if(!Array.isArray(t))throw new rm(e.name,`Fate list must be an Array, got ${t} instead`);const n=t.map((t=>this.valueFactory.create(e.valuesType,t)));return new Am(e.valuesType,n)}},Gd=class extends kd{supports({name:e,_valueTypes:t}){return"set"===e}create(e,t){const n=[];for(const r of t)n.push(this.valueFactory.create(e.valuesType,r));return new qm(e.valuesType,n)}},Vd=class extends kd{supports({name:e,_valueTypes:t}){return"map"===e}create(e,t){const n=[];for(const r of t)n.push([this.valueFactory.create(e.keyType,r[0]),this.valueFactory.create(e.valueType,r[1])]);return new Em(e.keyType,e.valueType,n)}},Dd=class extends kd{supports({name:e,_valueTypes:t}){return"tuple"===e}create(e,t){if(!Array.isArray(t))throw new rm(e.name,`Fate tuple must be an Array, got ${t} instead`);const n=e.valueTypes.map(((e,n)=>this.valueFactory.create(e,t[n])));return 1===n.length?n[0]:new Mm(e.valueTypes,n)}},Ld=class extends kd{supports({name:e,_valueTypes:t}){return"record"===e}create(e,t){if("object"!=typeof t)throw new rm(e.name,`Fate record must be an Object, got ${t} instead`);const n=Object.keys(t).length;if(n!==e.keys.length)throw new rm(e.name,`Number of expected keys (${e.keys.length}) and actual keys (${n}) should match`);const r=e.valueTypes.map(((n,r)=>{const a=e.keys[r];return this.valueFactory.create(n,t[a])}));return 1===r.length?r[0]:new Mm(Al(e.keys,e.valueTypes),r)}};const jd=["variant","Chain.ttl","AENS.pointee","AENSv2.pointee","AENS.name","AENSv2.name"];var Fd=class extends kd{supports({name:e,_valueTypes:t}){return jd.includes(e)}create(e,t){if(!this.isValid(t))throw new rm(e.name,`Variant should be an object mapping constructor to array of values, got "${t}" instead`);const[n,r]=Object.entries(t)[0],a=e.variants.map((e=>{const[[,t]]=Object.entries(e);return t.length})),i=e.variants.findIndex((e=>{const[[t,r]]=Object.entries(e);return t===n}));if(-1===i)throw new rm(e.name,`Unknown variant constructor: ${n}`);const[[,s]]=Object.entries(e.variants[i]);if(r.length!==s.length)throw new rm(e.name,`"${n}" variant constructor expects ${s.length} argument(s) but got ${r.length} instead`);const o=this.valueFactory.createMultiple(s,r);return new Zm(a,i,o,s,e.variants)}isValid(e){return"object"==typeof e&&null!==e&&1===Object.entries(e).length&&Array.isArray(Object.values(e)[0])}};const Hd=e=>Array.from(or.blake2b(e,null,32)),Jd=["string","signature","bytes"];var Wd=class extends kd{supports({name:e,_valueTypes:t}){return"event"===e}create({variantType:e,topics:t},n){const[r,...a]=t;if("bigint"!=typeof r)throw new xl(`Event name hash (first topic) should be of type "BigInt", got "${typeof r}" instead.`);const i=e.variants.map((e=>Xl(Hd(Object.keys(e)[0])))).findIndex((e=>e===r));if(-1===i)throw new xl("Event name hash does not match any event variant constructor");const s=e.variants[i],o=Object.keys(s)[0],[c]=Object.values(s),u=c.map((e=>this._isData(e)?n:a.shift()));return this.valueFactory.create(e,{[o]:u})}_isData(e){return!(!Jd.includes(e.name)||"bytes"===e.name&&e.size<=32)}};const Kd=["bls12_381.fr","bls12_381.fp"];var Yd=class extends kd{supports({name:e,_valueTypes:t}){return Kd.includes(e)}create(e,t){switch(e.name){case"bls12_381.fr":return new nd(t);case"bls12_381.fp":return new rd(t);default:throw new Error(`Unsupported type "${e.name}"`)}}},Qd=class extends kd{supports({name:e,_valueTypes:t}){return"calldata"===e}create(e,t){if(!Array.isArray(t))throw new rm(e.name,`Fate calldata arguments must be an Array, got ${t} instead`);const n=this.valueFactory.createMultiple(e.argumentTypes,t),r=(a=e.functionName,Hd(a).slice(0,4));var a;return new od(r,e.argumentTypes,n)}},Xd=class{constructor(){this._factories=[new Ud(this),new $d(this),new Gd(this),new Vd(this),new Dd(this),new Ld(this),new Wd(this),new Fd(this),new Yd(this),new Qd(this)]}createMultiple(e,t){return Gl(t.length===e.length,`Number of types (${e.length}) and values (${t.length}) should match`),((e,...t)=>e.map(((e,n)=>t.reduce(((e,t)=>[...e,t[n]]),[e]))))(e,t).map((e=>this.create(...e)))}create(e,t){const n=this._factories.find((t=>t.supports(e)));return Gl(n,`Unsupported type "${e.name}"`),n.create(e,t)}},Zd=class{constructor(){this._apiEncoder=new Ad}toInternal(e,t){switch(e.name){case"account_pubkey":case"contract_pubkey":case"channel":case"oracle_pubkey":case"oracle_query_id":return this.toAddress(e,t);case"variant":return this.toVariant(e,t);case"map":return this.toMap(e,t);case"set":return this.toSet(e,t);case"record":return this.toRecord(e,t);case"bls12_381.fr":return this.toBls12381Fr(e,t);case"bls12_381.fp":return this.toBls12381Fp(e,t);default:return t}}toAddress({name:e,_:t},n){return this._apiEncoder.decodeWithType(n,e)}toVariant(e,t){if(!this.isOptionVariant(e))return t;if([void 0,null].includes(t))return{None:[]};const[n]=Object.keys(t);return["Some","None"].includes(n)?t:{Some:[t]}}isOptionVariant({_name:e,variants:t}){return t.some((({None:e})=>e&&0===e.length))&&t.some((({Some:e})=>e))}toMap(e,t){if("object"!=typeof t||null===t)throw new rm("map",`Fate map must be one of: Map, Array, Object; got ${t} instead`);return Array.isArray(t)||t instanceof Map?t:Object.entries(t)}toSet(e,t){if(t instanceof Set)return t;if(Array.isArray(t))return new Set(t);throw new rm("set",`Fate set must be a Set or Array, got "${t}" instead`)}toRecord(e,t){return e.keys.reduce(((e,n)=>({...e,[n]:t[n]})),{})}validateBls12381Field(e,t){if("bigint"!=typeof t&&!Number.isInteger(t))throw new rm(e.name,`Should be one of: BigInt or Number; got ${t} instead`)}toBls12381Fr(e,t){return this.validateBls12381Field(e,t),Ed(t,"r")}toBls12381Fp(e,t){return this.validateBls12381Field(e,t),Ed(t,"p")}},ep=class extends Xd{constructor(){super(),this._mapper=new Zd}create(e,t){const n=this._mapper.toInternal(e,t);return super.create(e,n)}},tp=class{constructor(){this._serializer=new yd,this._apiEncoder=new Ad,this._externalDataFactory=new ep,this._canonicalMapper=new qd}encode(e,t){const n=this._externalDataFactory.create(e,t),r=this._serializer.serialize(n),a=new Uint8Array(r.flat(1/0));return this._apiEncoder.encode("contract_bytearray",a)}decode(e){const t=this._apiEncoder.decodeWithType(e,"contract_bytearray"),n=this._serializer.deserialize(t);return this._canonicalMapper.toCanonical(n)}decodeWithType(e,t){const n=this._apiEncoder.decodeWithType(e,"contract_bytearray"),r=this._serializer.deserializeWithType(n,t);return this._canonicalMapper.toCanonical(r)}},np=class{constructor(){this._internalEncoder=new tp}encodeWithType(e,t){return this._internalEncoder.encode(t,e)}decode(e){return this._internalEncoder.decode(e)}decodeWithType(e,t){return this._internalEncoder.decodeWithType(e,t)}},rp=n(2341),ap=n.n(rp);function ip(e){var t;return Mr(null!==(t=ap()(e))&&void 0!==t?t:"")}function sp(e){const t=(new Bl).resolveType({record:[{name:"name",type:{option:["string"]}},{name:"version",type:{option:["int"]}},{name:"networkId",type:{option:["string"]}},{name:"contractAddress",type:{option:["contract_pubkey"]}}]},{});return Mr(Cr((new np).encodeWithType(e,t)))}function op(e,t,n){return Mr(Zn([kr,new Uint8Array([0]),sp(n),ip(t),Mr(Cr(e))]))}var cp=n(8287).Buffer;function up(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function lp(e,t,n){const r=[t];n&&r.push("inner_tx");const a=Cr(e);return Zn([cp.from(r.join("-")),Mr(a)])}var mp=new WeakMap;class dp extends vl{constructor(e){super(),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,mp,void 0),this.secretKey=e;const t=sr().sign.keyPair.fromSeed(Cr(e));var n,r;n=mp,r=t.secretKey,n.set(up(n,this),r),this.address=Sr(t.publicKey,cr.AccountAddress)}static generate(){const e=Sr(sr().randomBytes(32),cr.AccountSecretKey);return new dp(e)}async sign(e,t){return this.unsafeSign(e,t)}async unsafeSign(e,t){return sr().sign.detached(cp.from(e),(n=mp).get(up(n,this)));var n}async signTransaction(e,{innerTx:t,networkId:n,...r}={}){if(null==n)throw new j("networkId","provided",n);const a=Cr(e),i=lp(e,n,!0===t),s=[await this.unsafeSign(i,r)];return Ps({tag:Xr.SignedTx,encodedTx:a,signatures:s})}async signMessage(e,t){return this.unsafeSign(Br(e),t)}async signTypedData(e,t,{name:n,version:r,networkId:a,contractAddress:i,...s}={}){const o=op(e,t,{name:n,version:r,networkId:a,contractAddress:i});return Sr(await this.unsafeSign(o,s),cr.Signature)}async signDelegation(e,{networkId:t}={}){if(null==t)throw new j("networkId","provided",t);const n=Zn([kr,new Uint8Array([1]),cp.from(t),Cr(e)]);return Sr(await this.unsafeSign(n),cr.Signature)}}function pp(e,{innerTx:t,gasUsed:n,queryFee:r,isInitiator:a}={}){const i=zs(e);if(i.tag===Xr.SignedTx)throw new F("Transaction shouldn't be a SignedTx, use `getExecutionCostBySignedTx` instead");let s=0n;return"fee"in i&&"freeloader"!==t&&(s+=BigInt(i.fee)),i.tag===Xr.NameClaimTx&&(s+=BigInt(i.nameFee)),i.tag===Xr.OracleQueryTx&&(s+=BigInt(i.queryFee)),i.tag===Xr.OracleRespondTx&&(s-=BigInt(null!=r?r:0)),i.tag===Xr.ChannelSettleTx&&(!0===a&&(s-=BigInt(i.initiatorAmountFinal)),!1===a&&(s-=BigInt(i.responderAmountFinal))),i.tag!==Xr.SpendTx&&i.tag!==Xr.ContractCreateTx&&i.tag!==Xr.ContractCallTx&&i.tag!==Xr.ChannelDepositTx||"fee-payer"===t||(s+=BigInt(i.amount)),i.tag===Xr.ContractCreateTx&&(s+=BigInt(i.deposit)),i.tag!==Xr.ContractCreateTx&&i.tag!==Xr.ContractCallTx&&i.tag!==Xr.GaAttachTx&&i.tag!==Xr.GaMetaTx||"freeloader"===t||(s+=BigInt(i.gasPrice)*BigInt(null!=n?n:i.gasLimit)),i.tag!==Xr.GaMetaTx&&i.tag!==Xr.PayingForTx||(s+=pp(Ps(i.tx.encodedTx),i.tag===Xr.PayingForTx?{innerTx:"fee-payer"}:{})),s}function hp(e,t,n){const r=zs(e,Xr.SignedTx);if(r.encodedTx.tag===Xr.GaMetaTx)return pp(Ps(r.encodedTx),n);const a=Ps(r.encodedTx),i=wl(a),[s,o]=[!0,!1].map((e=>qr(lp(a,t,e),r.signatures[0],i)));if(!s&&!o)throw new D("Can't verify signature");return pp(Ps(r.encodedTx),{...s&&{innerTx:"freeloader"},...n})}async function fp(e,t,{isMined:n,...r}={}){let a=zs(e);const i=a.tag===Xr.SignedTx,s=i&&!0===n&&Is(e);if(a.tag===Xr.SignedTx&&(a=a.encodedTx),null==r.gasUsed&&!1!==s&&[Xr.ContractCreateTx,Xr.ContractCallTx,Xr.GaAttachTx,Xr.GaMetaTx].includes(a.tag)){const{callInfo:e,gaInfo:n}=await t.getTransactionInfoByHash(s),a=null!=e?e:n;if(null==a)throw new ae(`callInfo and gaInfo is not available for transaction ${s}`);r.gasUsed=a.gasUsed}if(null==r.queryFee&&Xr.OracleRespondTx===a.tag&&(r.queryFee=(await t.getOracleByPubkey(a.oracleId)).queryFee.toString()),null==r.isInitiator&&Xr.ChannelSettleTx===a.tag&&!0!==n){const{initiatorId:e}=await t.getChannelByPubkey(a.channelId);r.isInitiator=a.fromId===e}return i?hp(e,await t.getNetworkId(),r):pp(e,r)}var yp=n(8287).Buffer;const gp=[];async function Np(e,t,n){const r=wl(Ps(e)),[a,{height:i},{consensusProtocolVersion:s,nodeNetworkId:o}]=await Promise.all([t.getAccountByPubkey(r).catch((e=>{if(!nr(e))throw e;return{id:r,balance:0n,nonce:0}})).then((e=>({...e,id:e.id}))),t.getCurrentKeyBlockHeight(),t.getNodeInfo()]);return(await Promise.all(gp.map((async r=>r(e,{node:t,account:a,height:i,consensusProtocolVersion:s,nodeNetworkId:o,parentTxTypes:n}))))).flat()}async function wp(e,t){const n=t.pipeline.clone();n.removePolicy({name:"parse-big-int"});const r=new Nl(t.$host,{ignoreVersion:!0,pipeline:n,additionalPolicies:[_o()]});return r._getCachedStatus=async()=>t._getCachedStatus(),Np(zs(e),r,[])}gp.push(((e,{account:t,nodeNetworkId:n,parentTxTypes:r})=>{if(e.tag!==Xr.SignedTx)return[];const{encodedTx:a,signatures:i}=e;if(null==(null!=a?a:i))return[];if(1!==i.length)return[];const s=yp.from([n,...r.includes(Xr.PayingForTx)?["inner_tx"]:[]].join("-")),o=Cr(Ps(a)),c=Zn([s,o]),u=Zn([s,Mr(o)]);return qr(c,i[0],t.id)||qr(u,i[0],t.id)?[]:[{message:"Signature cannot be verified, please ensure that you transaction have the correct prefix and the correct private key for the sender address",key:"InvalidSignature",checkedKeys:["encodedTx","signatures"]}]}),(async(e,{node:t,parentTxTypes:n})=>{let r;return"encodedTx"in e&&(r=e.encodedTx),"tx"in e&&(r=e.tx),null==r?[]:Np(r,t,[...n,e.tag])}),((e,{height:t})=>"ttl"in e?0===e.ttl||e.ttl>t?[]:[{message:`TTL ${e.ttl} is already expired, current height is ${t}`,key:"ExpiredTTL",checkedKeys:["ttl"]}]:[]),(async(e,{account:t,parentTxTypes:n,node:r})=>{if(0!==n.length)return[];const a=await fp(Ps(e),r).catch((()=>0n));return a<=t.balance?[]:[{message:`Account balance ${t.balance} is not enough to execute the transaction that costs ${a}`,key:"InsufficientBalance",checkedKeys:["amount","fee","nameFee","gasLimit","gasPrice"]}]}),(async(e,{node:t})=>{if(e.tag!==Xr.SpendTx||zr(e.recipientId,cr.Name))return[];const n=await t.getAccountByPubkey(e.recipientId).catch((e=>{if(!nr(e))throw e;return null}));return null==n||!0===n.payable?[]:[{message:"Recipient account is not payable",key:"RecipientAccountNotPayable",checkedKeys:["recipientId"]}]}),((e,{account:t})=>{let n;return e.tag===Xr.SignedTx&&"generalized"===t.kind&&0!==e.signatures.length&&(n="Generalized account can't be used to generate SignedTx with signatures"),e.tag===Xr.GaMetaTx&&"basic"===t.kind&&(n="Basic account can't be used to generate GaMetaTx"),null==n?[]:[{message:n,key:"InvalidAccountType",checkedKeys:["tag"]}]}),((e,{consensusProtocolVersion:t})=>{var n,r;const a=Xr.OracleRegisterTx===e.tag,i=Xr.ContractCreateTx===e.tag||Xr.GaAttachTx===e.tag,s=Xr.ContractCallTx===e.tag||Xr.GaMetaTx===e.tag,o=null!==(n=null!==(r=a?"oracle-call":null)&&void 0!==r?r:i?"contract-create":null)&&void 0!==n?n:s?"contract-call":null;if(null==o)return[];const c=ka[t][o];let u;if("abiVersion"in e&&(u={abiVersion:e.abiVersion}),"ctVersion"in e&&(u=e.ctVersion),null==u)throw new ie;return!c.abiVersion.includes(u.abiVersion)||i&&!c.vmVersion.includes(u.vmVersion)?[{message:`ABI/VM version ${JSON.stringify(u)} is wrong, supported is: ${JSON.stringify(c)}`,key:"VmAndAbiVersionMismatch",checkedKeys:["ctVersion","abiVersion"]}]:[]}),(async(e,{node:t})=>{if(Xr.ContractCallTx!==e.tag)return[];if(e.contractId.startsWith("nm_"))return[];try{const{active:n}=await t.getContract(e.contractId);return n?[]:[{message:`Contract ${e.contractId} is not active`,key:"ContractNotActive",checkedKeys:["contractId"]}]}catch(e){if(!(e instanceof Un)||null==e.response?.bodyAsText)throw e;return[{message:JSON.parse(e.response.bodyAsText).reason,key:"ContractNotFound",checkedKeys:["contractId"]}]}}));class vp extends D{constructor(e,t,n){super(e),this.name="InvalidTxError",this.validation=t,this.transaction=n}}async function bp(e,{onNode:t,onAccount:n,verify:r=!0,waitMined:a=!0,confirm:i,innerTx:s,...o}){const c=await n.signTransaction(e,{...o,onNode:t,innerTx:s,networkId:await t.getNetworkId()});if(!0===s)return{hash:Is(c),rawTx:c};if(r){const e=await wp(c,t);if(e.length>0){const t=`Transaction verification errors: ${e.map((e=>e.message)).join(", ")}`;throw new vp(t,e,c)}}try{let e;try{e=null!=n?`tx-${n.address}`:null}catch(t){e=null}const{txHash:r}=await t.postTransaction({tx:c},{requestOptions:{customHeaders:{"__retry-code":"400",...null!=e?{__queue:e}:{}}}});if(a){const e=await Na(r,{onNode:t,...o}),n={...e,hash:e.hash,rawTx:c};if(null!=i&&+i>0){const e="boolean"==typeof i?void 0:i;return{...n,confirmationHeight:await va(r,{onNode:t,confirm:e,...o})}}return n}return{hash:r,rawTx:c}}catch(e){throw rr(e),Object.assign(e,{rawTx:c,verifyTx:async()=>wp(c,t)})}}var xp=n(8287).Buffer;const _p=e=>xp.from(e).toString("base64").replaceAll("/","_").replaceAll("+","-").replace(/=+$/,""),Cp=e=>xp.from(e.replaceAll("_","/").replaceAll("-","+"),"base64"),Sp=e=>{var t;return _p(null!==(t=ap()(e))&&void 0!==t?t:"")},Tp="eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9";async function Pp(e,t){const n={...e};"sub_jwk"in n||(n.sub_jwk={kty:"OKP",crv:"Ed25519",x:_p(Cr(t.address))}),void 0===n.sub_jwk&&delete n.sub_jwk;const r=`${Tp}.${Sp(n)}`,a=await t.unsafeSign(r);return`${r}.${_p(a)}`}function Ap(e,t){var n;const r=e.split(".");if(3!==r.length)throw new j("JWT components count",3,r.length);const[a,i,s]=r;if(a!==Tp)throw new j("JWT header",Tp,a);const o=JSON.parse(Cp(i).toString()),c=null!==(n=o.sub_jwk)&&void 0!==n?n:{},u=null==c.x||"OKP"!==c.kty||"Ed25519"!==c.crv?t:Sr(Cp(c.x),cr.AccountAddress);if(null!=t&&u!==t)throw new j("address",`${u} ("sub_jwk")`,t);if(null!=u&&!qr(xp.from(`${a}.${i}`),Cp(s),u))throw new Fe(`JWT is not signed by ${u}`);return{payload:o,signer:u}}function zp(e){try{return Ap(e),!0}catch(e){return!1}}function Ip(e){Ap(e)}function Ep(e,t){try{const{signer:n}=Ap(e,t);return null!=n}catch(e){return!1}}let Mp=function(e){return e[e.AensWildcard=1]="AensWildcard",e[e.AensName=2]="AensName",e[e.AensPreclaim=3]="AensPreclaim",e[e.Oracle=4]="Oracle",e[e.OracleResponse=5]="OracleResponse",e}({});const qp=La(cr.OracleAddress),Rp={serialize(e){return qp.serialize(Sr(Cr(e),cr.OracleAddress))},deserialize(e){return Sr(Cr(qp.deserialize(e)),cr.OracleQueryId)}},Op=La(cr.ContractAddress),kp=[{tag:_i(Mp.AensWildcard),version:_i(1,!0),accountAddress:La(cr.AccountAddress),contractAddress:Op},{tag:_i(Mp.AensName),version:_i(1,!0),accountAddress:La(cr.AccountAddress),nameId:pi,contractAddress:Op},{tag:_i(Mp.AensPreclaim),version:_i(1,!0),accountAddress:La(cr.AccountAddress),contractAddress:Op},{tag:_i(Mp.Oracle),version:_i(1,!0),accountAddress:La(cr.AccountAddress),contractAddress:Op},{tag:_i(Mp.OracleResponse),version:_i(1,!0),queryId:Rp,contractAddress:Op}];function Bp(e){return Di(kp,Mp,e,{},cr.Bytearray)}function Up(e,t){return Li(kp,Mp,e,t,{})}function $p(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}class Gp extends re{constructor(e,t){super(`Can't ${t} because ${e} is not an auction name`),this.name="NotAuctionNameError"}}var Vp=new WeakMap;class Dp{constructor(e,t){var n,r,a;a=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=Vp),r.set(n,a),this.value=e,this.options=t,this.options=t}get id(){return aa(this.value)}async revoke(e={}){const t={...this.options,...e};return bp(await As({_isInternalBuild:!0,...t,tag:Xr.NameRevokeTx,nameId:this.value,accountId:t.onAccount.address}),t)}async update(e,t={}){const{extendPointers:n,...r}={...this.options,...t},a={...!0===n&&Object.fromEntries((await r.onNode.getNameEntryByName(this.value)).pointers.map((({key:e,id:t})=>[e,t]))),...e},i=Object.values(a).some((e=>zr(e,cr.Bytearray))),s=await As({_isInternalBuild:!0,...r,tag:Xr.NameUpdateTx,version:i?2:1,nameId:this.value,accountId:r.onAccount.address,pointers:Object.entries(a).map((([e,t])=>({key:e,id:t})))});return bp(s,r)}async transfer(e,t={}){const n={...this.options,...t};return bp(await As({_isInternalBuild:!0,...n,tag:Xr.NameTransferTx,nameId:this.value,accountId:n.onAccount.address,recipientId:e}),n)}async getState(e={}){var t;const n=null!==(t=e.onNode)&&void 0!==t?t:this.options.onNode,r=await n.getNameEntryByName(this.value);return{...r,id:r.id,owner:r.owner}}async getAuctionState(e={}){var t;if(!ha(this.value))throw new Gp(this.value,"get auction state");const n=null!==(t=e.onNode)&&void 0!==t?t:this.options.onNode,r=await n.getAuctionEntryByName(this.value);return{...r,id:r.id,highestBidder:r.highestBidder}}async extendTtl(e,t={}){return this.update({},{...t,nameTtl:e,extendPointers:!0})}async claim(e={}){const t={...this.options,...e};var n;return bp(await As({_isInternalBuild:!0,nameSalt:(n=Vp,n.get($p(n,this))),...t,tag:Xr.NameClaimTx,accountId:t.onAccount.address,name:this.value}),t)}async preclaim(e={}){const t={...this.options,...e},n=Ir(),r=await As({_isInternalBuild:!0,...t,tag:Xr.NamePreclaimTx,accountId:t.onAccount.address,commitmentId:ia(this.value,n)}),a=await bp(r,t);var i,s;return s=n,(i=Vp).set($p(i,this),s),{...a,nameSalt:n}}async bid(e,t={}){if(!ha(this.value))throw new Gp(this.value,"make a bid");const n={...this.options,...t};return bp(await As({_isInternalBuild:!0,...n,tag:Xr.NameClaimTx,accountId:n.onAccount.address,nameSalt:0,name:this.value,nameFee:e}),n)}}const Lp=({type:e})=>{let t,n=e;var r;return(r=n)&&"object"==typeof r&&r.constructor===Object&&([[n,t]]=Object.entries(n)),"option"===n};var jp=class extends kl{constructor(e){super(),this.aci=e}getCallTypes(e,t){const n=this.getNamespaceAci(e).functions.find((e=>e.name===t));if(n){const e=n.arguments.map((e=>this.resolveType(e.type))),t=n.arguments.filter(Lp);return{types:e,required:e.length-t.length}}if("init"===t)return{types:[],required:0};throw new xl(`Unknown function ${t}`)}getReturnType(e,t){if("init"===t)return this.resolveType("void");const n=this.getNamespaceAci(e).functions.find((e=>e.name===t));if(!n)throw new xl(`Unknown function ${t}`);return this.resolveType(n.returns)}getEventType(e,t){const n=this.getNamespaceAci(e);if(!n.hasOwnProperty("event"))throw new xl("Missing event declaration");return((e,t)=>({name:"event",variantType:e,topics:t}))(this.resolveType(n.event),t)}isCustomType(e){if("string"!=typeof e)return!1;if(this.isStdType(e))return!1;const[t,n]=e.split(".");return!!this.getNamespaceAci(t)}isStdType(e){return"Set.set"===e}getNamespaceAci(e){for(const t of this.aci){const[[n,r]]=Object.entries(t);if(r.name===e)return r}return null}resolveTypeDef(e,t=[]){const[n,r]=e.split("."),a=this.getNamespaceAci(n);if(!a)throw new xl("Unknown namespace for "+JSON.stringify(e));if(a.name===e)return["contract_pubkey",[]];const i=[...a.typedefs||a.type_defs,...a.state?[{name:"state",typedef:a.state,vars:[]}]:[]].find((e=>e.name===r));if(!i)throw new xl("Unknown type definition: "+JSON.stringify(e));const s={};return i.vars.forEach(((e,n)=>{const[[r,a]]=Object.entries(e);s[a]=t[n]})),[s.hasOwnProperty(i.typedef)?s[i.typedef]:i.typedef,s]}},Fp=class{constructor(){this._dataFactory=new Xd,this._apiEncoder=new Ad,this._canonicalMapper=new qd}decodeWithType(e,t){const n=this._apiEncoder.decode(e),r=this._dataFactory.create(t,n);return this._canonicalMapper.toCanonical(r)}};class Hp extends Error{constructor(e){super(e),this.name="EncoderError"}}var Jp=Hp,Wp=class{constructor(e){this._byteArrayEncoder=new tp,this._typeResolver=new jp(e),this._apiEncoder=new Ad,this._eventEncoder=new Fp,this._canonicalMapper=new qd}encode(e,t,n){const{types:r,required:a}=this._typeResolver.getCallTypes(e,t);if(n.length>r.length||n.length<a)throw new Jp(`Non matching number of arguments. ${t} expects between ${a} and ${r.length} number of arguments but got ${n.length}`);for(;n.length<r.length;)n.push(void 0);return this._byteArrayEncoder.encode({name:"calldata",functionName:t,argumentTypes:r},n)}decode(e,t,n){const r=this._typeResolver.getReturnType(e,t);return this._byteArrayEncoder.decodeWithType(n,r)}decodeContractByteArray(e){return this._byteArrayEncoder.decode(e)}decodeString(e){const t=new TextDecoder,n=this._apiEncoder.decodeWithType(e,"contract_bytearray");return t.decode(n)}decodeFateString(e){return this._byteArrayEncoder.decodeWithType(e,{name:"string"})}decodeEvent(e,t,n){const r=this._typeResolver.getEventType(e,n);return this._eventEncoder.decodeWithType(t,r)}},Kp=class{constructor(e){this._internalEncoder=new Wp(e)}encode(e,t,n){return this._internalEncoder.encode(e,t,n)}decode(e,t,n){return this._internalEncoder.decode(e,t,n)}decodeContractByteArray(e){return this._internalEncoder.decodeContractByteArray(e)}decodeString(e){return this._internalEncoder.decodeString(e)}decodeFateString(e){return this._internalEncoder.decodeFateString(e)}decodeEvent(e,t,n){return this._internalEncoder.decodeEvent(e,t,n)}};function Yp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Qp(e,t){return e.get(Xp(e,t))}function Xp(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Zp=new WeakSet,eh=new WeakMap;function th({returnType:e,returnValue:t,log:n},r,a,i){let s;switch(e){case"ok":{const e=Xp(Zp,this,rh).call(this,r);return{decodedResult:this._calldata.decode(this._name,e.name,t),decodedEvents:this.$decodeEvents(n,i)}}case"revert":s=this._calldata.decodeFateString(t);break;case"error":if(s=Cr(t).toString(),/Expected \d+ arguments, got \d+/.test(s))throw new xe("ACI",`. Error provided by node: "${s}".`);if(/Trying to call undefined function: <<\d+,\d+,\d+,\d+>>/.test(s))throw new xe("ACI",`. Error provided by node: "${s}", function name: ${r}.`);break;default:throw new ae(`Unknown return type: ${e}`)}throw new ze(s,a)}async function nh(e,t,n){const r=await bp(e,{...this.$options,...n});return{hash:r.hash,tx:zs(r.rawTx),txData:r,rawTx:r.rawTx,...null!=r.blockHeight&&await this.$getCallResultByTxHash(r.hash,t,n)}}function rh(e){const t=Qp(eh,this).functions.find((t=>t.name===e));if(null!=t)return t;if("init"===e)return{arguments:[],name:"init",payable:!1,returns:"unit",stateful:!0};throw new Ie(e)}function ah(e,t,{contractAddressToName:n}){const r={...this.$options.contractAddressToName,...n};if(null!=r[e])return r[e];const a=this._aci.map((({contract:e})=>e)).filter((e=>e?.event)),i=a.map((e=>[e.name,e.event.variant])).map((([e,t])=>t.map((t=>[e,Object.keys(t)[0],Object.values(t)[0]])))).flat().filter((([,e])=>BigInt(`0x${Mr(e).toString("hex")}`)===t)).filter((([,,e],t,n)=>!n.slice(0,t).some((t=>{return n=t[2],r=e,JSON.stringify(n)===JSON.stringify(r);var n,r}))));switch(i.length){case 0:throw new Me(t.toString(),e);case 1:return i[0][0];default:throw new qe(e,i)}}const ih=class{async $compile(){if(null!=this.$options.bytecode)return this.$options.bytecode;if(null==this.$options.onCompiler)throw new F("Can't compile without compiler");if(null!=this.$options.sourceCode){const{bytecode:e}=await this.$options.onCompiler.compileBySourceCode(this.$options.sourceCode,this.$options.fileSystem);this.$options.bytecode=e}if(null!=this.$options.sourceCodePath){const{bytecode:e}=await this.$options.onCompiler.compile(this.$options.sourceCodePath);this.$options.bytecode=e}if(null==this.$options.bytecode)throw new F("Can't compile without sourceCode and sourceCodePath");return this.$options.bytecode}async $getCallResultByTxHash(e,t,n){const{callInfo:r}=await this.$options.onNode.getTransactionInfoByHash(e);if(null==r)throw new $(`callInfo is not available for transaction ${e}`);const a=r;return{...Xp(Zp,this,th).call(this,a,t,void 0,n),result:a}}async _estimateGas(e,t,n={}){const{result:r}=await this.$call(e,t,{...n,callStatic:!0});if(null==r)throw new ie;const{gasUsed:a}=r;return Math.floor(1.25*a)}async $deploy(e,t){var n;const{callStatic:r,...a}={...this.$options,...t};if(null==this.$options.bytecode&&await this.$compile(),!0===r)return this.$call("init",e,{...a,callStatic:r});if(null!=this.$options.address)throw new _e;if(null==a.onAccount)throw new F("Can't deploy without account");const i=a.onAccount.address;if(null==this.$options.bytecode)throw new F("Can't deploy without bytecode");const s=await As({_isInternalBuild:!0,...a,tag:Xr.ContractCreateTx,gasLimit:null!==(n=a.gasLimit)&&void 0!==n?n:await this._estimateGas("init",e,a),callData:this._calldata.encode(this._name,"init",e),code:this.$options.bytecode,ownerId:i}),{hash:o,...c}=await Xp(Zp,this,nh).call(this,s,"init",{...a,onAccount:a.onAccount});return this.$options.address=Es(c.rawTx),{...c,...null!=c.result?.log&&{decodedEvents:this.$decodeEvents(c.result.log,a)},owner:i,transaction:o,address:this.$options.address}}async $call(e,t,n={}){var r;const{callStatic:a,top:i,...s}={...this.$options,...n},o=Xp(Zp,this,rh).call(this,e),{address:c,name:u}=this.$options,l=null!=u?aa(u):c,{onNode:m}=s;if(null==e)throw new Ae;if("init"===e&&!0!==a)throw new Se('"init" can be called only via dryRun');if("init"!==e&&null!=s.amount&&Number(s.amount)>0&&!o.payable)throw new Ee(s.amount,e);let d;try{if(null==s.onAccount)throw new ae("Use fallback account");d=s.onAccount.address}catch(e){if(!0!==a||!(e instanceof X&&"Account should be an address (ak-prefixed string), or instance of AccountBase, got undefined instead"===e.message||e instanceof Qe||e instanceof ae&&"Use fallback account"===e.message))throw e;d=Vr.pub}const p=this._calldata.encode(this._name,e,t);if(!0===a){if(null==s.nonce){const e=null!=i&&{["number"==typeof i?"height":"hash"]:i},t=await ba(d,{...e,onNode:m}).catch((e=>{if(!nr(e))throw e;return{kind:"basic",nonce:0}}));s.nonce="generalized"===t.kind?0:t.nonce+1}const t={...s,onNode:m,callData:p};let n;if("init"===e){if(null==this.$options.bytecode)throw new F('Can\'t dry-run "init" without bytecode');n=await As({...t,tag:Xr.ContractCreateTx,code:this.$options.bytecode,ownerId:d})}else{if(null==l)throw new Te("Can't dry-run contract without address");n=await As({...t,tag:Xr.ContractCallTx,callerId:d,contractId:l})}const{callObj:r,...a}=await Ia(n,d,{...s,top:i});if(null==r)throw new ae(`callObj is not available for transaction ${n}`);const o=r;return{...a,...Xp(Zp,this,th).call(this,o,e,n,s),tx:zs(n),result:o,rawTx:n,hash:Is(n),txData:void 0}}if(null!=i)throw new F("Can't handle `top` option in on-chain contract call");if(null==l)throw new Te("Can't call contract without address");const h=await As({_isInternalBuild:!0,...s,tag:Xr.ContractCallTx,gasLimit:null!==(r=s.gasLimit)&&void 0!==r?r:await this._estimateGas(e,t,s),callerId:d,contractId:l,callData:p});if(null==s.onAccount)throw new F("Can't call contract on chain without account");return Xp(Zp,this,nh).call(this,h,e,{...s,onAccount:s.onAccount})}$decodeEvents(e,{omitUnknown:t,...n}={}){return e.map((e=>{let r;try{r=Xp(Zp,this,ah).call(this,e.address,e.topics[0],n)}catch(e){if(null!=t&&t&&e instanceof Me)return null;throw e}const a=this._calldata.decodeEvent(r,e.data,e.topics),[i,s]=Object.entries(a)[0];return{name:i,args:s,contract:{name:r,address:e.address}}})).filter((e=>null!=e))}static async initialize({onCompiler:e,onNode:t,bytecode:n,aci:r,address:a,sourceCodePath:i,sourceCode:s,fileSystem:o,validateBytecode:c,...u}){if(null==r&&null!=e){let t;null!=i&&(t=await e.compile(i)),null!=s&&(t=await e.compileBySourceCode(s,o)),null!=t&&(r=t.aci,null!=n||(n=t.bytecode))}if(null==r)throw new Pe;let l;if(null!=a&&ca(a=await Ra(a,"contract_pubkey",{resolveByNode:!0,onNode:t}))&&(l=a),null==a&&null==s&&null==i&&null==n)throw new Te("Can't create instance by ACI without address");if(null!=a&&null==(await t.getContract(a)).active)throw new Ce(a);if(!0===c){if(null==a)throw new Te("Can't validate bytecode without contract address");const r=(await t.getContractCode(a)).bytecode;let c=!1;if(null!=n)c=n===r;else if(null!=s){if(null==e)throw new F("Can't validate bytecode without compiler");c=await e.validateBySourceCode(r,s,o)}else if(null!=i){if(null==e)throw new F("Can't validate bytecode without compiler");c=await e.validate(r,i)}if(!c)throw new xe(null!=(null!=s?s:i)?"source code":"bytecode")}return new ih({onCompiler:e,onNode:t,sourceCode:s,sourceCodePath:i,bytecode:n,aci:r,address:a,name:l,fileSystem:o,...u})}constructor({aci:e,...t}){var n;Yp(this,n=Zp),n.add(this),function(e,t){Yp(e,t),t.set(e,void 0)}(this,eh),this._aci=e;const r=e[e.length-1];if(null==r.contract)throw new F(`The last 'aci' item should have 'contract' key, got ${Object.keys(r)} keys instead`);!function(e,t,n){e.set(Xp(e,t),n)}(eh,this,r.contract),this._name=Qp(eh,this).name,this._calldata=new Kp(e),this.$options=t,Object.assign(this,Object.fromEntries(Qp(eh,this).functions.map((({name:e,arguments:t,stateful:n})=>{const r="init"!==e&&!n;return[e,async(...n)=>{const a=n.length===t.length+1?n.pop():{};if("object"!=typeof a)throw new X(`Options should be an object: ${a}`);return"init"===e?this.$deploy(n,{callStatic:r,...a}):this.$call(e,n,{callStatic:r,...a})}]}))))}};var sh=ih;function oh(e){return{...e,id:e.id,decodedQuery:Cr(e.query).toString(),decodedResponse:Cr(e.response).toString()}}class ch{constructor(e,t){this.address=e,this.options=t}async getState(e={}){return{...this.options,...e}.onNode.getOracleByPubkey(this.address)}async getQueries(e={}){const t={...this.options,...e};return(await t.onNode.getOracleQueriesByPubkey(this.address)).oracleQueries.map(oh)}async getQuery(e,t={}){const{onNode:n}={...this.options,...t};return oh(await n.getOracleQueryByPubkeyAndQueryId(this.address,e))}}function uh(e,t,n){return e.set(mh(e,t),n),n}function lh(e,t){return e.get(mh(e,t))}function mh(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var dh=new WeakMap;class ph extends ch{constructor(e,t){var n,r,a;super(Sr(Cr(e.address),cr.OracleAddress),t),a=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=dh),r.set(n,a),this.account=e,this.options=t}async register(e,t,n={}){const r={...this.options,...n};return bp(await As({_isInternalBuild:!0,...r,tag:Xr.OracleRegisterTx,accountId:this.account.address,queryFormat:e,responseFormat:t}),{...r,onAccount:this.account})}async extendTtl(e={}){const t={...this.options,...e};return bp(await As({_isInternalBuild:!0,...t,tag:Xr.OracleExtendTx,oracleId:this.address}),{...t,onAccount:this.account})}pollQueries(e,t={}){const n={...this.options,...t},r=new Set;let a=!1;const i=async()=>{if(a)return;a=!0;const i=(await this.getQueries(n)).filter((({id:e})=>!r.has(e))).filter((e=>!0===t.includeResponded||""===e.decodedResponse));i.forEach((e=>r.add(e.id))),a=!1,await Promise.all(i.map((t=>e(t))))};i();const s=(async e=>{const t=null!==(e=n.interval)&&void 0!==e?e:await fa("micro-block",n);return setInterval((async()=>i()),t)})();return async()=>{const e=await s;clearInterval(e)}}async respondToQuery(e,t,n={}){const r={...this.options,...n};return bp(await As({_isInternalBuild:!0,...r,tag:Xr.OracleRespondTx,oracleId:this.address,queryId:e,response:t}),{...r,onAccount:this.account})}handleQueries(e,t={}){if(null!=lh(dh,this))throw new re("Another query handler already running, it needs to be stopped to run a new one");const n={...this.options,...t};let r=Promise.resolve();const a=async t=>{const a=await e(t),i=r.then((async()=>this.respondToQuery(t.id,a,n)));r=i.then((()=>{}),(()=>{})),await i};uh(dh,this,Promise.resolve());const i=this.pollQueries((async e=>{const t=a(e);if(null==lh(dh,this))throw new ie;return uh(dh,this,lh(dh,this).then((async()=>t)).then((()=>{}),(()=>{}))),t}),n);return async()=>{i(),await lh(dh,this),uh(dh,this,void 0)}}}class hh extends ch{constructor(e,t){super(e,t),this.options=t}async postQuery(e,t={}){const n={...this.options,...t},r=n.onAccount.address,a=await As({_isInternalBuild:!0,...n,tag:Xr.OracleQueryTx,oracleId:this.address,senderId:r,query:e}),{nonce:i}=zs(a,Xr.OracleQueryTx);return{...await bp(a,n),queryId:ta(r,i,this.address)}}async pollForResponse(e,t={}){var n;const r={...this.options,...t},a=null!==(n=r.interval)&&void 0!==n?n:await fa("micro-block",r);let i,s,o;do{({response:o,ttl:s}=await this.getQuery(e,r));const t=Cr(o);if(t.length>0)return t.toString();await Qn(a),i=await ga({...r,cached:!0})}while(s>=i);throw new Y(i)}async query(e,t={}){const{queryId:n}=await this.postQuery(e,t);return this.pollForResponse(n,t)}}async function fh(e,t,n){return bp(await As({_isInternalBuild:!0,...n,tag:Xr.SpendTx,senderId:n.onAccount.address,recipientId:await Ra(t,"account_pubkey",n),amount:e}),n)}async function yh(e,t,n){if(+e<0||+e>1)throw new j("fraction","a number between 0 and 1",e);const r=await Ra(t,"account_pubkey",n),a=n.onAccount.address,i=new E(await xa.bind(n.onAccount)(a,n)),s=i.times(e).integerValue(E.ROUND_HALF_UP),{fee:o}=zs(await As({_isInternalBuild:!0,...n,tag:Xr.SpendTx,senderId:a,recipientId:r,amount:s}),Xr.SpendTx),c=s.plus(o).gt(i)?i.minus(o):s;return bp(await As({_isInternalBuild:!0,...n,tag:Xr.SpendTx,senderId:a,recipientId:r,amount:c}),n)}async function gh(e,t){return bp(await As({_isInternalBuild:!0,...t,tag:Xr.PayingForTx,payerId:t.onAccount.address,tx:e}),t)}var Nh=n(8287).Buffer;async function wh(e,t,{onAccount:n,onCompiler:r,onNode:a,bytecode:i,aci:s,sourceCodePath:o,sourceCode:c,fileSystem:u,...l}){var m;const d=n.address;if("generalized"===(await ba(d,{onNode:a})).kind)throw new F(`Account ${d} is already GA`);const p=await sh.initialize({onAccount:n,onCompiler:r,onNode:a,bytecode:i,aci:s,sourceCodePath:o,sourceCode:c,fileSystem:u}),h=await As({_isInternalBuild:!0,...l,tag:Xr.GaAttachTx,onNode:a,code:await p.$compile(),gasLimit:null!==(m=l.gasLimit)&&void 0!==m?m:await p._estimateGas("init",t,l),ownerId:d,callData:p._calldata.encode(p._name,"init",t),authFun:Mr(e)}),{hash:f,rawTx:y}=await bp(h,{onNode:a,onAccount:n,onCompiler:r,...l}),g=Es(y);return Object.freeze({owner:d,transaction:f,rawTx:y,gaContractId:g})}async function vh(e,{fee:t,gasPrice:n,onNode:r}){const{nodeNetworkId:a,consensusProtocolVersion:i}=await r.getNodeInfo();let s=Mr(Zn([Nh.from(a),Cr(e)]));if(i===Kr.Ceres){if(null==t)throw new j("fee","provided (in Ceres)",t);if(null==n)throw new j("gasPrice","provided (in Ceres)",n);s=Mr(Cr(Cs({tag:Ei.GaMetaTxAuthData,fee:t,gasPrice:n,txHash:Sr(s,cr.TxHash)})))}return s}async function bh(e,{onNode:t}){const n=zs(e,Xr.SignedTx);if(n.encodedTx.tag!==Xr.GaMetaTx)throw new j("transaction","to include GaMetaTx",Xr[n.encodedTx.tag]);return vh(Ps(n.encodedTx.tx.encodedTx),{fee:n.encodedTx.fee,gasPrice:n.encodedTx.gasPrice,onNode:t})}var xh=n(4997),_h=n(2321),Ch=n(2231);function Sh(e){return Sh="function"==typeof _h&&"symbol"==typeof Ch?function(e){return typeof e}:function(e){return e&&"function"==typeof _h&&e.constructor===_h&&e!==_h.prototype?"symbol":typeof e},Sh(e)}var Th=n(9280);function Ph(e,t,n){return(t=function(e){var t=function(e){if("object"!=Sh(e)||!e)return e;var t=e[Th];if(void 0!==t){var n=t.call(e,"string");if("object"!=Sh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Sh(t)?t:t+""}(t))in e?xh(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ah(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const zh={...t,sendTransaction:bp,...o,...c};var Ih=new WeakMap;class Eh{constructor(e={}){var t,n;Ph(this,"_options",{}),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,Ih,void 0),Object.assign(this._options,e),t=Ih,n={onAccount:ar((()=>this._options.onAccount)),onNode:ar((()=>this._options.onNode)),onCompiler:ar((()=>this._options.onCompiler))},t.set(Ah(t,this),n)}getContext(e={}){return{...this._options,...(t=Ih,t.get(Ah(t,this))),...e};var t}async buildTx(e){return As({...this.getContext(),...e})}}Object.assign(Eh.prototype,Xn(zh,(([e,t])=>[e,function(...e){e.length=t.length;const n=e[e.length-1];return e[e.length-1]=this.getContext(n),t(...e)}])));var Mh=Eh;function qh(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Rh=new WeakMap;class Oh extends Mh{constructor({nodes:e=[],...t}={}){var n,r;super(t),Ph(this,"pool",new Map),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,Rh,void 0),e.forEach((({name:e,instance:t},n)=>this.addNode(e,t,0===n))),n=Rh,r={onNode:ar((()=>this.api)),onCompiler:ar((()=>this.compilerApi)),onAccount:ar((()=>this._resolveAccount()))},n.set(qh(n,this),r)}get compilerApi(){if(null==this._options.onCompiler)throw new U("You can't use Compiler API. Compiler is not ready!");return this._options.onCompiler}get api(){return this.ensureNodeConnected(),this.pool.get(this.selectedNodeName)}addNode(e,t,n=!1){if(this.pool.has(e))throw new $e(e);this.pool.set(e,t),(n||null==this.selectedNodeName)&&this.selectNode(e)}selectNode(e){if(!this.pool.has(e))throw new Ge(`Node with name ${e} not in pool`);this.selectedNodeName=e}isNodeConnected(){return null!=this.selectedNodeName}ensureNodeConnected(){if(!this.isNodeConnected())throw new Ge("You can't use Node API. Node is not connected or not defined!")}async getNodeInfo(){return this.ensureNodeConnected(),{name:this.selectedNodeName,...await this.api.getNodeInfo()}}async getNodesInPool(){return Promise.all(Array.from(this.pool.entries()).map((async([e,t])=>({name:e,...await t.getNodeInfo()}))))}addresses(){return[]}_resolveAccount(e=this._options.onAccount){if("string"==typeof e)throw new te("Address in AccountResolver");if("object"==typeof e)return e;throw new X(`Account should be an address (ak-prefixed string), or instance of AccountBase, got ${String(e)} instead`)}get address(){return this._resolveAccount().address}async sign(e,t={}){return this.unsafeSign(e,t)}async unsafeSign(e,{onAccount:t,...n}={}){return this._resolveAccount(t).unsafeSign(e,n)}async signTransaction(e,{onAccount:t,...n}={}){const r=null!==this.selectedNodeName?await this.api.getNetworkId():void 0;return this._resolveAccount(t).signTransaction(e,{networkId:r,...n})}async signMessage(e,{onAccount:t,...n}={}){return this._resolveAccount(t).signMessage(e,n)}async signTypedData(e,t,{onAccount:n,...r}={}){return this._resolveAccount(n).signTypedData(e,t,r)}async signDelegation(e,{onAccount:t,...n}={}){var r;return null!==(r=n.networkId)&&void 0!==r||(n.networkId=null!==this.selectedNodeName?await this.api.getNetworkId():void 0),this._resolveAccount(t).signDelegation(e,n)}getContext(e={}){return{...this._options,...(t=Rh,t.get(qh(t,this))),...e,...null!=e.onAccount&&{onAccount:this._resolveAccount(e.onAccount)}};var t}}class kh extends Oh{constructor({accounts:e,...t}={}){super(t),Ph(this,"accounts",{}),e?.forEach(((e,t)=>this.addAccount(e,{select:0===t})))}_resolveAccount(e=this.selectedAddress){if("string"==typeof e){const t=e;if(Cr(t),null==this.accounts[t])throw new se(e);e=this.accounts[t]}return super._resolveAccount(e)}addresses(){return Object.keys(this.accounts)}addAccount(e,{select:t}={}){const{address:n}=e;this.accounts[n]=e,!0===t&&this.selectAccount(n)}removeAccount(e){if(null==this.accounts[e])throw new se(e);delete this.accounts[e],this.selectedAddress===e&&delete this.selectedAddress}selectAccount(e){if(Cr(e),null==this.accounts[e])throw new se(e);this.selectedAddress=e}}let Bh=function(e){return e.to_waellet="to_waellet",e.to_aepp="to_aepp",e}({}),Uh=function(e){return e.window="window",e.extension="extension",e}({}),$h=function(e){return e.subscribe="subscribe",e.unsubscribe="unsubscribe",e}({}),Gh=function(e){return e.readyToConnect="connection.announcePresence",e.updateAddress="address.update",e.address="address.get",e.connect="connection.open",e.unsafeSign="data.unsafeSign",e.sign="transaction.sign",e.signMessage="message.sign",e.signTypedData="typedData.sign",e.signDelegation="delegation.sign",e.subscribeAddress="address.subscribe",e.updateNetwork="networkId.update",e.closeConnection="connection.close",e}({}),Vh=function(e){return e.CONNECTED="CONNECTED",e.DISCONNECTED="DISCONNECTED",e.WAITING_FOR_CONNECTION_REQUEST="WAITING_FOR_CONNECTION_REQUEST",e}({});const Dh=[];class Lh extends q{toJSON(){return{code:this.code,message:this.message,data:this.data}}static deserialize(e){const t=Dh.find((t=>t.code===e.code));if(null==t)throw new ae(`Can't find RpcError with code: ${e.code}`);return new t(e.data)}}class jh extends Lh{constructor(e){super("Invalid transaction"),Ph(this,"code",2),this.data=e,this.name="RpcInvalidTransactionError"}}Ph(jh,"code",2),Dh.push(jh);class Fh extends Lh{constructor(e){super("Operation rejected by user"),Ph(this,"code",4),this.data=e,this.name="RpcRejectedByUserError"}}Ph(Fh,"code",4),Dh.push(Fh);class Hh extends Lh{constructor(){super("Unsupported Protocol Version"),Ph(this,"code",5),this.name="RpcUnsupportedProtocolError"}}Ph(Hh,"code",5),Dh.push(Hh);class Jh extends Lh{constructor(e){super("Wallet deny your connection request"),Ph(this,"code",9),this.data=e,this.name="RpcConnectionDenyError"}}Ph(Jh,"code",9),Dh.push(Jh);class Wh extends Lh{constructor(){super("You are not connected to the wallet"),Ph(this,"code",10),this.name="RpcNotAuthorizeError"}}Ph(Wh,"code",10),Dh.push(Wh);class Kh extends Lh{constructor(e){super(`You are not subscribed for account ${e}`),Ph(this,"code",11),this.data=e,this.name="RpcPermissionDenyError"}}Ph(Kh,"code",11),Dh.push(Kh);class Yh extends Lh{constructor(){super("The peer failed to execute your request due to unknown error"),Ph(this,"code",12),this.name="RpcInternalError"}}Ph(Yh,"code",12),Dh.push(Yh);class Qh extends Lh{constructor(e){super(`Wallet can't find a network by id "${e}"`),Ph(this,"code",13),this.data=e,this.name="RpcNoNetworkById"}}Ph(Qh,"code",13),Dh.push(Qh);class Xh extends Lh{constructor(){super("Method not found"),Ph(this,"code",-32601),this.name="RpcMethodNotFoundError"}}Ph(Xh,"code",-32601),Dh.push(Xh);var Zh=n(8287).Buffer;class ef extends vl{constructor(e,t){super(),this._rpcClient=e,this.address=t}async sign(e){return this.unsafeSign(e)}async unsafeSign(e){const t=Sr(Zh.from(e),cr.Bytearray),{signature:n}=await this._rpcClient.request(Gh.unsafeSign,{onAccount:this.address,data:t});return Cr(n)}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null==n)throw new j("networkId","provided",n);const r=await this._rpcClient.request(Gh.sign,{onAccount:this.address,tx:e,returnSigned:!0,networkId:n,innerTx:t});if(null==r.signedTransaction)throw new ee("signedTransaction is missed in wallet response");return r.signedTransaction}async signMessage(e){const{signature:t}=await this._rpcClient.request(Gh.signMessage,{onAccount:this.address,message:e});return Zh.from(t,"hex")}async signTypedData(e,t,{name:n,version:r,contractAddress:a,networkId:i}={}){const{signature:s}=await this._rpcClient.request(Gh.signTypedData,{onAccount:this.address,domain:{name:n,version:r,networkId:i,contractAddress:a},aci:t,data:e});return s}async signDelegation(e){const{signature:t}=await this._rpcClient.request(Gh.signDelegation,{delegation:e,onAccount:this.address});return t}}function tf(e,t,n){nf(e,t),t.set(e,n)}function nf(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function rf(e,t){return e.get(sf(e,t))}function af(e,t,n){return e.set(sf(e,t),n),n}function sf(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var of=new WeakMap,cf=new WeakMap,uf=new WeakMap,lf=new WeakSet;class mf{constructor(e,t,n){var r;nf(this,r=lf),r.add(this),tf(this,of,new Map),tf(this,cf,0),tf(this,uf,void 0),this.connection=e,af(uf,this,n),e.connect(sf(lf,this,df).bind(this),t)}async request(e,t){return sf(lf,this,pf).call(this,af(cf,this,rf(cf,this)+1),e,t),new Promise(((e,t)=>{rf(of,this).set(rf(cf,this),{resolve:e,reject:t})}))}notify(e,t){sf(lf,this,pf).call(this,void 0,e,t)}}async function df(e,t){if("2.0"!==e?.jsonrpc)throw new le(JSON.stringify(e));if("result"in e||"error"in e)return void sf(lf,this,ff).call(this,e);const n=e;let r,a;try{if(!(n.method in rf(uf,this)))throw new Xh;const e=n.method;r=await rf(uf,this)[e](n.params,t)}catch(e){rr(e),a=e}if(null!=n.id&&sf(lf,this,hf).call(this,n.id,n.method,r,null==a||a instanceof Lh?a:new Yh),null!=a&&!(a instanceof Lh))throw a}function pf(e,t,n){this.connection.sendMessage({jsonrpc:"2.0",...null!=e?{id:e}:{},method:t,...null!=n?{params:n}:{}})}function hf(e,t,n,r){this.connection.sendMessage({jsonrpc:"2.0",id:e,method:t,...null!=r?{error:r.toJSON()}:{result:n}})}function ff({id:e,error:t,result:n}){const r=rf(of,this).get(e);if(null==r)throw new me(e);null!=t?r.reject(Lh.deserialize(t)):r.resolve(n),rf(of,this).delete(e)}class yf extends Oh{constructor({name:e,onAddressChange:t=()=>{},onDisconnect:n=()=>{},onNetworkChange:r=()=>{},...a}){super(a),this.onAddressChange=t,this.onDisconnect=n,this.onNetworkChange=r,this.name=e}_resolveAccount(e=this.addresses()[0]){if("string"==typeof e){const t=e;if(Cr(t),!this.addresses().includes(t))throw new de(t);this._ensureConnected(),e=new ef(this.rpcClient,t)}return null==e&&this._ensureAccountAccess(),super._resolveAccount(e)}addresses(){if(null==this._accounts)return[];const e=Object.keys(this._accounts.current)[0];return[...null!=e?[e]:[],...Object.keys(this._accounts.connected)]}async connectToWallet(e,{connectNode:t=!1,name:n="wallet-node"}={}){if(null!=this.rpcClient)throw new Ye("You are already connected to wallet");let r;const a=e=>{if(t){if(null==e.node?.url)throw new Xe("Missing URLs of the Node");this.pool.delete(n),this.addNode(n,new Nl(e.node.url),!0)}this.onNetworkChange(e)},i=new mf(e,(()=>{delete this.rpcClient,delete this._accounts,this.onDisconnect(r)}),{[Gh.updateAddress]:e=>{this._accounts=e,this.onAddressChange(e)},[Gh.updateNetwork]:a,[Gh.closeConnection]:e=>{r=e,i.connection.disconnect()},[Gh.readyToConnect]:()=>{}}),s=await i.request(Gh.connect,{name:this.name,version:1,connectNode:t});return a(s),this.rpcClient=i,s}disconnectWallet(){this._ensureConnected(),this.rpcClient.notify(Gh.closeConnection,{reason:"bye"}),this.rpcClient.connection.disconnect()}async askAddresses(){return this._ensureConnected(),this.rpcClient.request(Gh.address,void 0)}async subscribeAddress(e,t){this._ensureConnected();const n=await this.rpcClient.request(Gh.subscribeAddress,{type:e,value:t});return this._accounts=n.address,n}async askToSelectNetwork(e){this._ensureConnected(),await this.rpcClient.request(Gh.updateNetwork,e)}_ensureConnected(){if(null==this.rpcClient)throw new Qe("You are not connected to Wallet")}_ensureAccountAccess(){if(this._ensureConnected(),0===this.addresses().length)throw new he}}var gf=n(228);function Nf(e,t,n){wf(e,t),t.set(e,n)}function wf(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function vf(e,t,n){return e.set(xf(e,t),n),n}function bf(e,t){return e.get(xf(e,t))}function xf(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var _f=new WeakMap,Cf=new WeakSet,Sf=new WeakMap;class Tf extends gf{get isConnected(){return null!=bf(_f,this)}get accounts(){return bf(Sf,this)}constructor(){var e;super(),wf(this,e=Cf),e.add(this),Nf(this,_f,void 0),Nf(this,Sf,[])}static async _connect(e,t,n,r){let a;const i=new mf(t,(()=>{vf(_f,n,void 0),vf(Sf,n,[]),n.emit("disconnect",a)}),{[Gh.updateAddress]:xf(Cf,n,Af).bind(n),[Gh.updateNetwork]:n._updateNetwork.bind(n),[Gh.closeConnection]:e=>{a=e,i.connection.disconnect()},[Gh.readyToConnect]:()=>{}});vf(_f,n,i);const s=await bf(_f,n).request(Gh.connect,{name:e,version:1,connectNode:r});n._updateNetwork(s)}disconnect(){const e=xf(Cf,this,Pf).call(this);e.notify(Gh.closeConnection,{reason:"bye"}),e.connection.disconnect()}async getAccounts(){const e=xf(Cf,this,Pf).call(this);return(await e.request(Gh.address,void 0)).map((t=>new ef(e,t)))}async subscribeAccounts(e,t){const n=await xf(Cf,this,Pf).call(this).request(Gh.subscribeAddress,{type:e,value:t});return xf(Cf,this,Af).call(this,n.address),bf(Sf,this)}async askToSelectNetwork(e){await xf(Cf,this,Pf).call(this).request(Gh.updateNetwork,e)}}function Pf(){if(null==bf(_f,this))throw new Qe("You are not connected to Wallet");return bf(_f,this)}function Af(e){const t=[...new Set([...Object.keys(e.current),...Object.keys(e.connected)])];vf(Sf,this,t.map((e=>new ef(xf(Cf,this,Pf).call(this),e)))),this.emit("accountsChange",bf(Sf,this))}function zf(e,t){return e.get(If(e,t))}function If(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ef=new WeakMap;class Mf extends Tf{constructor(...e){var t,n,r;super(...e),r="",function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=Ef),n.set(t,r)}get networkId(){return zf(Ef,this)}_updateNetwork(e){var t,n;t=Ef,n=e.networkId,t.set(If(t,this),n),this.emit("networkIdChange",zf(Ef,this))}static async connect(e,t){const n=new Mf;return await Mf._connect(e,t,n,!1),n}}function qf(e,t){return e.get(Rf(e,t))}function Rf(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Of=new WeakMap;class kf extends Tf{constructor(...e){var t,n,r;super(...e),r=null,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=Of),n.set(t,r)}get node(){return qf(Of,this)}_updateNetwork(e){if(null==e.node?.url)throw new Xe("Missing URLs of the Node");var t,n;t=Of,n=new Nl(e.node.url),t.set(Rf(t,this),n),this.emit("nodeChange",qf(Of,this))}static async connect(e,t){const n=new kf;return await super._connect(e,t,n,!0),n}}var Bf=n(1013);const Uf=n.n(Bf)()({storeAsString:!0}),$f=e=>{if("object"==typeof e&&null!==e&&e.constructor===Object)return Xn(e,(([e,t])=>[e,$f(t)]));if(Array.isArray(e))return e.map((e=>$f(e)));if("string"==typeof e&&new E(e).toString(10)===e){const t=new E(e);return t.toJSON=()=>t.toString(10),t}return e};var Gf={stringify:(...e)=>Uf.stringify($f(e[0]),...e.slice(1)),parse:Uf.parse},Vf=n(8287).Buffer;class Df extends kh{constructor({name:e,id:t,type:n,onConnection:r,onSubscription:a,onDisconnect:i,onAskAccounts:s,onAskToSelectNetwork:o,...c}){super(c),Ph(this,"_clients",new Map),this.onConnection=r,this.onSubscription=a,this.onDisconnect=i,this.onAskAccounts=s,this.onAskToSelectNetwork=o,this.name=e,this.id=t,this._type=n}_getAccountsForClient({addressSubscription:e}){const{current:t,connected:n}=this.getAccounts();return{current:e.has("current")||e.has("connected")?t:{},connected:e.has("connected")?n:{}}}_pushAccountsToApps(){null!=this._clients&&Array.from(this._clients.keys()).filter((e=>this._isRpcClientConnected(e))).map((e=>this._getClient(e))).filter((e=>0!==e.addressSubscription.size)).forEach((e=>e.rpc.notify(Gh.updateAddress,this._getAccountsForClient(e))))}selectAccount(e){super.selectAccount(e),this._pushAccountsToApps()}addAccount(e,t){super.addAccount(e,t),this._pushAccountsToApps()}_getNode(){return this.ensureNodeConnected(),{node:{url:this.api.$host,name:this.selectedNodeName}}}async selectNode(e){super.selectNode(e);const t=await this.api.getNetworkId();Array.from(this._clients.keys()).filter((e=>this._isRpcClientConnected(e))).map((e=>this._getClient(e))).forEach((e=>{e.rpc.notify(Gh.updateNetwork,{networkId:t,...e.connectNode&&this._getNode()})}))}_getClient(e){const t=this._clients.get(e);if(null==t)throw new pe(e);return t}_isRpcClientConnected(e){return Vh.CONNECTED===this._getClient(e).status&&this._getClient(e).rpc.connection.isConnected()}_disconnectRpcClient(e){const t=this._getClient(e);t.rpc.connection.disconnect(),t.status=Vh.DISCONNECTED,t.addressSubscription=new Set}removeRpcClient(e){this._disconnectRpcClient(e),this._clients.delete(e)}addRpcClient(e){const t=Vf.from(sr().randomBytes(8)).toString("base64");let n;const r={id:t,status:Vh.WAITING_FOR_CONNECTION_REQUEST,addressSubscription:new Set,connectNode:!1,rpc:new mf(e,(()=>{this._clients.delete(t),this.onDisconnect(t,n)}),{[Gh.closeConnection]:e=>{n=e,this._disconnectRpcClient(t)},[Gh.connect]:async({name:e,version:n,icons:a,connectNode:i},s)=>{if(1!==n)throw new Hh;return await this.onConnection(t,{name:e,icons:a,connectNode:i},s),r.status=Vh.CONNECTED,r.connectNode=i,{...await this.getWalletInfo(),...i&&this._getNode()}},[Gh.subscribeAddress]:async({type:e,value:n},a)=>{if(!this._isRpcClientConnected(t))throw new Wh;switch(e){case $h.subscribe:await this.onSubscription(t,{type:e,value:n},a),r.addressSubscription.add(n);break;case $h.unsubscribe:r.addressSubscription.delete(n);break;default:throw new ae(`Unknown subscription type: ${e}`)}return{subscription:Array.from(r.addressSubscription),address:this._getAccountsForClient(r)}},[Gh.address]:async(e,n)=>{if(!this._isRpcClientConnected(t))throw new Wh;return await this.onAskAccounts(t,e,n),this.addresses()},[Gh.sign]:async({tx:e,onAccount:n=this.address,returnSigned:r,innerTx:a},i)=>{if(!this._isRpcClientConnected(t))throw new Wh;if(!this.addresses().includes(n))throw new Kh(n);const s={onAccount:n,aeppOrigin:i,aeppRpcClientId:t,innerTx:a};if(r||!0===a)return{signedTransaction:await this.signTransaction(e,s)};try{return Gf.parse(Gf.stringify({transactionHash:await this.sendTransaction(e,{...s,verify:!1})}))}catch(t){const n=await wp(e,this.api);if(n.length>0)throw new jh(n);throw t}},[Gh.signMessage]:async({message:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Wh;if(!this.addresses().includes(n))throw new Kh(n);const a={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:Vf.from(await this.signMessage(e,a)).toString("hex")}},[Gh.signTypedData]:async({domain:e,aci:n,data:r,onAccount:a=this.address},i)=>{if(!this._isRpcClientConnected(t))throw new Wh;if(!this.addresses().includes(a))throw new Kh(a);const s={...e,onAccount:a,aeppOrigin:i,aeppRpcClientId:t};return{signature:await this.signTypedData(r,n,s)}},[Gh.unsafeSign]:async({data:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Wh;if(!this.addresses().includes(n))throw new Kh(n);const a={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:Sr(await this.unsafeSign(Cr(e),a),cr.Signature)}},[Gh.signDelegation]:async({delegation:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Wh;if(!this.addresses().includes(n))throw new Kh(n);const a={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:await this.signDelegation(e,a)}},[Gh.updateNetwork]:async(e,n)=>{if(!this._isRpcClientConnected(t))throw new Wh;return await this.onAskToSelectNetwork(t,e,n),null}})};return this._clients.set(t,r),t}async shareWalletInfo(e){this._getClient(e).rpc.notify(Gh.readyToConnect,await this.getWalletInfo())}async getWalletInfo(){const{origin:e}=window.location;return{id:this.id,name:this.name,networkId:await this.api.getNetworkId(),origin:"file://"===e?"*":e,type:this._type}}getAccounts(){return{current:null!=this.selectedAddress?{[this.selectedAddress]:{}}:{},connected:this.addresses().filter((e=>e!==this.selectedAddress)).reduce(((e,t)=>({...e,[t]:{}})),{})}}}function Lf(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function jf(e,...t){if(!((n=e)instanceof Uint8Array||ArrayBuffer.isView(n)&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Ff(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.createHasher");Lf(e.outputLen),Lf(e.blockLen)}function Hf(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 Jf(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Wf(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const Kf=async()=>{};async function Yf(e,t,n){let r=Date.now();for(let a=0;a<e;a++){n(a);const e=Date.now()-r;e>=0&&e<t||(await Kf(),r+=e)}}function Qf(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}function Xf(e){return"string"==typeof e&&(e=Qf(e)),jf(e),e}function Zf(e){return"string"==typeof e&&(e=Qf(e)),jf(e),e}class ey{}function ty(e){const t=t=>e().update(Xf(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}class ny extends ey{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,Ff(e);const n=Xf(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 r=this.blockLen,a=new Uint8Array(r);a.set(n.length>r?e.create().update(n).digest():n);for(let e=0;e<a.length;e++)a[e]^=54;this.iHash.update(a),this.oHash=e.create();for(let e=0;e<a.length;e++)a[e]^=106;this.oHash.update(a),Jf(a)}update(e){return Hf(this),this.iHash.update(e),this}digestInto(e){Hf(this),jf(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:n,finished:r,destroyed:a,blockLen:i,outputLen:s}=this;return e.finished=r,e.destroyed=a,e.blockLen=i,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const ry=(e,t,n)=>new ny(e,t).update(n).digest();function ay(e,t,n,r){Ff(e);const a=function(e,t){if(void 0!==t&&"[object Object]"!=={}.toString.call(t))throw new Error("options should be object or undefined");return Object.assign({dkLen:32,asyncTick:10},t)}(0,r),{c:i,dkLen:s,asyncTick:o}=a;if(Lf(i),Lf(s),Lf(o),i<1)throw new Error("iterations (c) should be >= 1");const c=Zf(t),u=Zf(n),l=new Uint8Array(s),m=ry.create(e,c),d=m._cloneInto().update(u);return{c:i,dkLen:s,asyncTick:o,DK:l,PRF:m,PRFSalt:d}}function iy(e,t,n,r,a){return e.destroy(),t.destroy(),r&&r.destroy(),Jf(a),n}ry.create=(e,t)=>new ny(e,t);class sy extends ey{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=Wf(this.buffer)}update(e){Hf(this),jf(e=Xf(e));const{view:t,buffer:n,blockLen:r}=this,a=e.length;for(let i=0;i<a;){const s=Math.min(r-this.pos,a-i);if(s!==r)n.set(e.subarray(i,i+s),this.pos),this.pos+=s,i+=s,this.pos===r&&(this.process(t,0),this.pos=0);else{const t=Wf(e);for(;r<=a-i;i+=r)this.process(t,i)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){Hf(this),function(e,t){jf(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:a}=this;let{pos:i}=this;t[i++]=128,Jf(this.buffer.subarray(i)),this.padOffset>r-i&&(this.process(n,0),i=0);for(let e=i;e<r;e++)t[e]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const a=BigInt(32),i=BigInt(4294967295),s=Number(n>>a&i),o=Number(n&i),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,o,r)}(n,r-8,BigInt(8*this.length),a),this.process(n,0);const s=Wf(e),o=this.outputLen;if(o%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=o/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)s.setUint32(4*e,u[e],a)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:a,destroyed:i,pos:s}=this;return e.destroyed=i,e.finished=a,e.length=r,e.pos=s,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}}const oy=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),cy=BigInt(2**32-1),uy=BigInt(32);function ly(e,t=!1){return t?{h:Number(e&cy),l:Number(e>>uy&cy)}:{h:0|Number(e>>uy&cy),l:0|Number(e&cy)}}const my=(e,t,n)=>e>>>n,dy=(e,t,n)=>e<<32-n|t>>>n,py=(e,t,n)=>e>>>n|t<<32-n,hy=(e,t,n)=>e<<32-n|t>>>n,fy=(e,t,n)=>e<<64-n|t>>>n-32,yy=(e,t,n)=>e>>>n-32|t<<64-n;function gy(e,t,n,r){const a=(t>>>0)+(r>>>0);return{h:e+n+(a/2**32|0)|0,l:0|a}}const Ny=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),wy=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,vy=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),by=(e,t,n,r,a)=>t+n+r+a+(e/2**32|0)|0,xy=(e,t,n,r,a)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(a>>>0),_y=(e,t,n,r,a,i)=>t+n+r+a+i+(e/2**32|0)|0,Cy=(()=>function(e,t=!1){const n=e.length;let r=new Uint32Array(n),a=new Uint32Array(n);for(let i=0;i<n;i++){const{h:n,l:s}=ly(e[i],t);[r[i],a[i]]=[n,s]}return[r,a]}(["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)))))(),Sy=(()=>Cy[0])(),Ty=(()=>Cy[1])(),Py=new Uint32Array(80),Ay=new Uint32Array(80);class zy extends sy{constructor(e=64){super(128,e,16,!1),this.Ah=0|oy[0],this.Al=0|oy[1],this.Bh=0|oy[2],this.Bl=0|oy[3],this.Ch=0|oy[4],this.Cl=0|oy[5],this.Dh=0|oy[6],this.Dl=0|oy[7],this.Eh=0|oy[8],this.El=0|oy[9],this.Fh=0|oy[10],this.Fl=0|oy[11],this.Gh=0|oy[12],this.Gl=0|oy[13],this.Hh=0|oy[14],this.Hl=0|oy[15]}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:a,Cl:i,Dh:s,Dl:o,Eh:c,El:u,Fh:l,Fl:m,Gh:d,Gl:p,Hh:h,Hl:f}=this;return[e,t,n,r,a,i,s,o,c,u,l,m,d,p,h,f]}set(e,t,n,r,a,i,s,o,c,u,l,m,d,p,h,f){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|a,this.Cl=0|i,this.Dh=0|s,this.Dl=0|o,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|m,this.Gh=0|d,this.Gl=0|p,this.Hh=0|h,this.Hl=0|f}process(e,t){for(let n=0;n<16;n++,t+=4)Py[n]=e.getUint32(t),Ay[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|Py[e-15],n=0|Ay[e-15],r=py(t,n,1)^py(t,n,8)^my(t,0,7),a=hy(t,n,1)^hy(t,n,8)^dy(t,n,7),i=0|Py[e-2],s=0|Ay[e-2],o=py(i,s,19)^fy(i,s,61)^my(i,0,6),c=hy(i,s,19)^yy(i,s,61)^dy(i,s,6),u=vy(a,c,Ay[e-7],Ay[e-16]),l=by(u,r,o,Py[e-7],Py[e-16]);Py[e]=0|l,Ay[e]=0|u}let{Ah:n,Al:r,Bh:a,Bl:i,Ch:s,Cl:o,Dh:c,Dl:u,Eh:l,El:m,Fh:d,Fl:p,Gh:h,Gl:f,Hh:y,Hl:g}=this;for(let e=0;e<80;e++){const t=py(l,m,14)^py(l,m,18)^fy(l,m,41),N=hy(l,m,14)^hy(l,m,18)^yy(l,m,41),w=l&d^~l&h,v=xy(g,N,m&p^~m&f,Ty[e],Ay[e]),b=_y(v,y,t,w,Sy[e],Py[e]),x=0|v,_=py(n,r,28)^fy(n,r,34)^fy(n,r,39),C=hy(n,r,28)^yy(n,r,34)^yy(n,r,39),S=n&a^n&s^a&s,T=r&i^r&o^i&o;y=0|h,g=0|f,h=0|d,f=0|p,d=0|l,p=0|m,({h:l,l:m}=gy(0|c,0|u,0|b,0|x)),c=0|s,u=0|o,s=0|a,o=0|i,a=0|n,i=0|r;const P=Ny(x,C,T);n=wy(P,b,_,S),r=0|P}({h:n,l:r}=gy(0|this.Ah,0|this.Al,0|n,0|r)),({h:a,l:i}=gy(0|this.Bh,0|this.Bl,0|a,0|i)),({h:s,l:o}=gy(0|this.Ch,0|this.Cl,0|s,0|o)),({h:c,l:u}=gy(0|this.Dh,0|this.Dl,0|c,0|u)),({h:l,l:m}=gy(0|this.Eh,0|this.El,0|l,0|m)),({h:d,l:p}=gy(0|this.Fh,0|this.Fl,0|d,0|p)),({h:h,l:f}=gy(0|this.Gh,0|this.Gl,0|h,0|f)),({h:y,l:g}=gy(0|this.Hh,0|this.Hl,0|y,0|g)),this.set(n,r,a,i,s,o,c,u,l,m,d,p,h,f,y,g)}roundClean(){Jf(Py,Ay)}destroy(){Jf(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Iy=ty((()=>new zy));function Ey(e){if("string"!=typeof e)throw new TypeError("invalid mnemonic type: "+typeof e);return e.normalize("NFKD")}function My(e){const t=Ey(e),n=t.split(" ");if(![12,15,18,21,24].includes(n.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:n}}const qy=e=>Ey("mnemonic"+e);var Ry=n(9234),Oy=n.n(Ry);class ky{async discover(e){let t=0;const n=[];let r;do{null!=r&&n.push(r),r=await this.initialize(t),t+=1}while(await e.getAccountByPubkey(r.address).then((()=>!0),(()=>!1)));return n}}var By=n(8287).Buffer;function Uy(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function $y(e,t){return e.get(Vy(e,t))}function Gy(e,t,n){return e.set(Vy(e,t),n),n}function Vy(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Dy=By.from("ed25519 seed");function Ly(e,t){const n=Oy().full(e,t);return{secretKey:n.slice(0,32),chainCode:n.slice(32)}}function jy(e,t){return t.reduce((({secretKey:e,chainCode:t},n)=>{const r=By.allocUnsafe(4);return r.writeUInt32BE(n+2147483648,0),Ly(Zn([By.alloc(1,0),e,r]),t)}),e)}var Fy=new WeakMap,Hy=new WeakSet;class Jy extends ky{constructor(e){var t;super(),Uy(this,t=Hy),t.add(this),function(e,t){Uy(e,t),t.set(e,void 0)}(this,Fy),Gy(Fy,this,e)}async getWallet(){return Vy(Hy,this,Wy).call(this,!1)}getWalletSync(){return Vy(Hy,this,Wy).call(this,!0)}async initialize(e){const t=await this.getWallet();return Vy(Hy,this,Ky).call(this,e,t)}initializeSync(e){const t=this.getWalletSync();return Vy(Hy,this,Ky).call(this,e,t)}}function Wy(e){const t=e=>{const t=jy(Ly(e,Dy),[44,457]);return Gy(Fy,this,{secretKey:Sr(t.secretKey,cr.Bytearray),chainCode:Sr(t.chainCode,cr.Bytearray)}),$y(Fy,this)};if(ArrayBuffer.isView($y(Fy,this))){if(64!==$y(Fy,this).length)throw new j("seed length",64,$y(Fy,this).length);return t($y(Fy,this))}return"object"==typeof $y(Fy,this)?$y(Fy,this):e?t(function(e,t=""){return function(e,t,n){const{c:r,dkLen:a,DK:i,PRF:s,PRFSalt:o}=ay(e,t,n,{c:2048,dkLen:64});let c;const u=new Uint8Array(4),l=Wf(u),m=new Uint8Array(s.outputLen);for(let e=1,t=0;t<a;e++,t+=s.outputLen){const n=i.subarray(t,t+s.outputLen);l.setInt32(0,e,!1),(c=o._cloneInto(c)).update(u).digestInto(m),n.set(m.subarray(0,n.length));for(let e=1;e<r;e++){s._cloneInto(c).update(m).digestInto(m);for(let e=0;e<n.length;e++)n[e]^=m[e]}}return iy(s,o,i,c,m)}(Iy,My(e).nfkd,qy(t))}($y(Fy,this))):function(e,t=""){return async function(e,t,n){const{c:r,dkLen:a,asyncTick:i,DK:s,PRF:o,PRFSalt:c}=ay(e,t,n,{c:2048,dkLen:64});let u;const l=new Uint8Array(4),m=Wf(l),d=new Uint8Array(o.outputLen);for(let e=1,t=0;t<a;e++,t+=o.outputLen){const n=s.subarray(t,t+o.outputLen);m.setInt32(0,e,!1),(u=c._cloneInto(u)).update(l).digestInto(d),n.set(d.subarray(0,n.length)),await Yf(r-1,i,(()=>{o._cloneInto(u).update(d).digestInto(d);for(let e=0;e<n.length;e++)n[e]^=d[e]}))}return iy(o,c,s,u,d)}(Iy,My(e).nfkd,qy(t))}($y(Fy,this)).then(t)}function Ky(e,t){const n=jy({secretKey:Cr(t.secretKey),chainCode:Cr(t.chainCode)},[e,0,0]).secretKey;return new dp(Sr(n,cr.AccountSecretKey))}function Yy(e,t){return e.get(Qy(e,t))}function Qy(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Xy=new WeakMap;class Zy extends vl{constructor(e){var t,n,r;super(),r=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=Xy),n.set(t,r),Cr(e),this.address=e}async sign(){return this.unsafeSign()}async unsafeSign(){throw new te("Can't sign using generalized account")}async signMessage(){throw new te("Can't sign using generalized account")}async signTypedData(){throw new te("Can't sign using generalized account")}async signDelegation(){throw new te("signing delegation using generalized account")}async signTransaction(e,{authData:t,onCompiler:n,onNode:r}){if(null==t||null==n||null==r)throw new j("authData, onCompiler, onNode","provided",null);const{callData:a,sourceCode:i,args:s,fee:o,gasLimit:c,gasPrice:u}="function"==typeof t?await t(e):t,l=null!=a?a:await(async()=>{if(null==Yy(Xy,this)){const n=await ba(this.address,{onNode:r});if("generalized"!==n.kind)throw new j("account kind","generalized",n.kind);e=Xy,t=n.authFun,e.set(Qy(e,this),t)}var e,t;if(null==Yy(Xy,this))throw new ae("Account in generalised, but authFun not provided");if(null==i||null==s)throw new be("Auth data must contain sourceCode and args or callData.");const a=await sh.initialize({onCompiler:n,onNode:r,sourceCode:i});return a._calldata.encode(a._name,Yy(Xy,this),s)})(),m=await As({tag:Xr.GaMetaTx,tx:{tag:Xr.SignedTx,encodedTx:Cr(e),signatures:[]},gaId:this.address,authData:l,fee:o,gasLimit:c,gasPrice:u,onNode:r});return Ps({tag:Xr.SignedTx,encodedTx:Cr(m),signatures:[]})}}var eg=n(8287).Buffer;const tg=224;class ng extends vl{constructor(e,t,n){super(),this.transport=e,this.index=t,this.address=n,e.decorateAppAPIMethods(this,["signTransaction","signMessage"],"w0w")}async sign(){return this.unsafeSign()}async unsafeSign(){throw new te("RAW signing using Ledger HW")}async signTypedData(){throw new te("Typed data signing using Ledger HW")}async signDelegation(){throw new te("signing delegation using Ledger HW")}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null!=t)throw new te("innerTx option in AccountLedger");if(null==n)throw new j("networkId","provided",n);const r=Cr(e);let a=0;const i=eg.from(n),s=[];for(;a!==r.length;){const e=0===a?141-i.length:150,t=a+e>r.length?r.length-a:e,n=eg.alloc(0===a?9+i.length+t:t);if(0===a){let e=n.writeUInt32BE(this.index,0);e=n.writeUInt32BE(r.length,e),e=n.writeUInt8(i.length,e),e+=i.copy(n,e,0,i.length),r.copy(n,e,0,150-e)}else r.copy(n,0,a,a+t);s.push(n),a+=t}const o=[(await s.reduce((async(e,t,n)=>(await e,this.transport.send(tg,4,0===n?0:128,0,t))),Promise.resolve(eg.alloc(0)))).subarray(0,64)];return Ps({tag:Xr.SignedTx,encodedTx:r,signatures:o})}async signMessage(e){let t=0;const n=eg.from(e),r=[];for(;t!==n.length;){const e=0===t?142:150,a=t+e>n.length?n.length-t:e,i=eg.alloc(0===t?8+a:a);0===t?(i.writeUInt32BE(this.index,0),i.writeUInt32BE(n.length,4),n.copy(i,8,t,t+a)):n.copy(i,0,t,t+a),r.push(i),t+=a}return(await r.reduce((async(e,t,n)=>(await e,this.transport.send(tg,8,0===n?0:128,0,t))),Promise.resolve(eg.alloc(0)))).subarray(0,64)}}var rg=n(8287).Buffer;function ag(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ig(e,t){return e.get(og(e,t))}function sg(e,t,n){return e.set(og(e,t),n),n}function og(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var cg=new WeakMap,ug=new WeakSet;class lg extends ky{constructor(e){var t;super(),ag(this,t=ug),t.add(this),function(e,t){ag(e,t),t.set(e,void 0)}(this,cg),Ph(this,"_enableExperimentalLedgerAppSupport",!1),this.transport=e,e.decorateAppAPIMethods(this,["getAddress","getAppConfiguration"],"w0w")}async ensureReady(){const{version:e}=await og(ug,this,dg).call(this),t=[e,"0.4.4","0.5.0"],n=[e,"1.0.0","2.0.0"];if(!(ho(...t)||this._enableExperimentalLedgerAppSupport&&ho(...n)))throw new ne("Aeternity app on Ledger",...t);sg(cg,this,Promise.resolve())}async getAppConfiguration(){return og(ug,this,dg).call(this)}async getAddress(e,t=!1){await og(ug,this,mg).call(this);const n=rg.alloc(4);n.writeUInt32BE(e,0);const r=await this.transport.send(tg,2,t?1:0,0,n),a=r[0];return r.subarray(1,1+a).toString("ascii")}async initialize(e){return new ng(this.transport,e,await this.getAddress(e))}}async function mg(){var e;return null!==(e=ig(cg,this))&&void 0!==e||sg(cg,this,this.ensureReady()),ig(cg,this)}async function dg(){let e=await this.transport.send(tg,6,0,0);return 6===e.length&&(e=e.subarray(1)),{version:[e[0],e[1],e[2]].join(".")}}var pg=n(8287).Buffer;const hg="npm:@aeternity-snap/plugin";async function fg(e,t,n,r){const a=await e.request({method:"wallet_invokeSnap",params:{snapId:hg,request:{method:t,params:n}}});if(null==a)throw new ae("Empty MetaMask response");if(!(r in a))throw new ae(`Key ${r} missed in response ${JSON.stringify(a)}`);return a[r]}class yg extends vl{constructor(e,t,n){super(),this.provider=e,this.index=t,this.address=n}async sign(){return this.unsafeSign()}async unsafeSign(){throw new te("RAW signing using MetaMask")}async signTypedData(){throw new te("Typed data signing using MetaMask")}async signDelegation(){throw new te("signing delegation using MetaMask")}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null!=t)throw new te("innerTx option in AccountMetamask");if(null==n)throw new j("networkId","provided",n);return fg(this.provider,"signTransaction",{derivationPath:[`${this.index}'`,"0'","0'"],tx:e,networkId:n},"signedTx")}async signMessage(e){const t=await fg(this.provider,"signMessage",{derivationPath:[`${this.index}'`,"0'","0'"],message:pg.from(e).toString("base64")},"signature");return pg.from(t,"base64")}}function gg(e,t,n){Ng(e,t),t.set(e,n)}function Ng(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function wg(e,t,n){return e.set(bg(e,t),n),n}function vg(e,t){return e.get(bg(e,t))}function bg(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const xg="0.0.9",_g="0.1.0";var Cg=new WeakMap,Sg=new WeakSet,Tg=new WeakMap;class Pg extends ky{get provider(){if(null==vg(Cg,this))throw new Z("Metamask is not detected yet");return vg(Cg,this)}constructor(e){var t;if(super(),Ng(this,t=Sg),t.add(this),gg(this,Cg,void 0),gg(this,Tg,void 0),wg(Cg,this,e),null==vg(Cg,this)&&null==window)throw new Z("Window object not found, you can run AccountMetamaskFactory only in browser or setup a provider")}async installSnap(){const e=await bg(Sg,this,Ig).call(this);return(await e.request({method:"wallet_requestSnaps",params:{[hg]:{version:xg}}}))[hg]}async requestSnap(e=`>=${xg} <${_g}`){const t=await bg(Sg,this,Ig).call(this);return(await t.request({method:"wallet_requestSnaps",params:{[hg]:{version:e}}}))[hg]}async ensureReady(){const e=[await this.getSnapVersion(),xg,_g];if(!ho(...e))throw new ne("Aeternity snap in MetaMask",...e)}async getSnapVersion(){const e=await bg(Sg,this,Ig).call(this),t=await e.request({method:"wallet_getSnaps"}),n=t[hg]?.version;if(null==n)throw new Z("Aeternity snap is not installed to MetaMask or not connected to this aepp");return n}async initialize(e){await this.requestSnap();const t=await bg(Sg,this,Ig).call(this),n=await fg(t,"getPublicKey",{derivationPath:[`${e}'`,"0'","0'"]},"publicKey");return new yg(t,e,n)}}async function Ag(){if(!("ethereum"in window)||null==window.ethereum)return;const e=window.ethereum,t=await e.request({method:"web3_clientVersion"});if(null==t)throw new ae("Can't get Ethereum Provider version");return t.startsWith("MetaMask/v")?e:void 0}async function zg(){return setTimeout((()=>window.dispatchEvent(new Event("eip6963:requestProvider")))),new Promise((e=>{const t=n=>{"io.metamask"===n.detail.info.rdns&&(window.removeEventListener("eip6963:announceProvider",t),e(n.detail.provider))};window.addEventListener("eip6963:announceProvider",t),setTimeout((()=>{window.removeEventListener("eip6963:announceProvider",t),e(void 0)}),500)}))}async function Ig(){var e;return null!==(e=vg(Tg,this))&&void 0!==e||wg(Tg,this,(async(e,t)=>{if(null!==(e=vg(Cg,this))&&void 0!==e||wg(Cg,this,null!==(t=await bg(Sg,this,Ag).call(this))&&void 0!==t?t:await bg(Sg,this,zg).call(this)),null==vg(Cg,this))throw new Z("Can't find a Metamask extension as an injected provider and over EIP-6963. Ensure that Metamask is installed or setup a provider.");const n=await vg(Cg,this).request({method:"web3_clientVersion"});if(null==n)throw new ae("Can't get Ethereum Provider version");const r=[n.slice(10),"12.2.4"];if(!ho(...r))throw new ne("Metamask",...r);return vg(Cg,this)})()),vg(Tg,this)}class Eg{}const Mg={type:{name:"Composite",className:"Contract",modelProperties:{code:{serializedName:"code",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}}}}},qg={type:{name:"Composite",className:"CompileOpts",modelProperties:{fileSystem:{serializedName:"file_system",type:{name:"Dictionary",value:{type:{name:"any"}}}},srcFile:{serializedName:"src_file",type:{name:"String"}}}}},Rg={type:{name:"Composite",className:"CompilerError",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},pos:{serializedName:"pos",type:{name:"Composite",className:"ErrorPos"}},message:{serializedName:"message",required:!0,type:{name:"String"}},context:{serializedName:"context",type:{name:"String"}}}}},Og={type:{name:"Composite",className:"ErrorPos",modelProperties:{file:{serializedName:"file",type:{name:"String"}},line:{serializedName:"line",required:!0,type:{name:"Number"}},col:{serializedName:"col",required:!0,type:{name:"Number"}}}}},kg={type:{name:"Composite",className:"CompileResult",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},aci:{serializedName:"aci",required:!0,type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}},warnings:{serializedName:"warnings",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}}}}},Bg={type:{name:"Composite",className:"SophiaCallResultInput",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},function:{serializedName:"function",required:!0,type:{name:"String"}},callResult:{serializedName:"call-result",required:!0,type:{name:"String"}},callValue:{serializedName:"call-value",required:!0,type:{name:"String"}}}}},Ug={type:{name:"Composite",className:"BytecodeCallResultInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},callResult:{serializedName:"call-result",required:!0,type:{name:"String"}},callValue:{serializedName:"call-value",required:!0,type:{name:"String"}}}}},$g={type:{name:"Composite",className:"DecodedCallresult",modelProperties:{function:{serializedName:"function",required:!0,type:{name:"String"}},result:{serializedName:"result",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Gg={type:{name:"Composite",className:"FunctionCallInput",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},function:{serializedName:"function",required:!0,type:{name:"String"}},arguments:{serializedName:"arguments",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Vg={type:{name:"Composite",className:"Calldata",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}}}}},Dg={type:{name:"Composite",className:"DecodeCalldataBytecode",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},Lg={type:{name:"Composite",className:"DecodedCalldata",modelProperties:{function:{serializedName:"function",required:!0,type:{name:"String"}},arguments:{serializedName:"arguments",required:!0,type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}}}},jg={type:{name:"Composite",className:"ErrorModel",modelProperties:{reason:{serializedName:"reason",required:!0,type:{name:"String"}}}}},Fg={type:{name:"Composite",className:"DecodeCalldataSource",modelProperties:{source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}},calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}}}}},Hg={type:{name:"Composite",className:"ByteCodeInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},Jg={type:{name:"Composite",className:"FateAssembler",modelProperties:{fateAssembler:{serializedName:"fate-assembler",required:!0,type:{name:"String"}}}}},Wg={type:{name:"Composite",className:"ValidateByteCodeInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}},source:{serializedName:"source",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}}}}},Kg={type:{name:"Composite",className:"CompilerVersion",modelProperties:{version:{serializedName:"version",required:!0,type:{name:"String"}}}}},Yg={type:{name:"Composite",className:"ApiVersion",modelProperties:{apiVersion:{serializedName:"api-version",required:!0,type:{name:"String"}}}}},Qg={type:{name:"Composite",className:"SophiaBinaryData",modelProperties:{sophiaType:{serializedName:"sophia-type",required:!0,type:{name:"String"}},data:{serializedName:"data",required:!0,type:{name:"String"}}}}},Xg={type:{name:"Composite",className:"SophiaJsonData",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Zg={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},eN={parameterPath:"body",mapper:Mg},tN={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},nN={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},rN={parameterPath:"body",mapper:Bg},aN={parameterPath:"body",mapper:Ug},iN={parameterPath:"body",mapper:Gg},sN={parameterPath:"body",mapper:Dg},oN={parameterPath:"body",mapper:Fg},cN={parameterPath:"body",mapper:Hg},uN={parameterPath:"body",mapper:Wg};class lN extends mo{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const a="azsdk-js-compiler/1.0.0-beta.1",i=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${a}`:`${a}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:i},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}generateACI(e,t){return this.sendOperationRequest({body:e,options:t},dN)}compileContract(e,t){return this.sendOperationRequest({body:e,options:t},pN)}decodeCallResult(e,t){return this.sendOperationRequest({body:e,options:t},hN)}decodeCallResultBytecode(e,t){return this.sendOperationRequest({body:e,options:t},fN)}encodeCalldata(e,t){return this.sendOperationRequest({body:e,options:t},yN)}decodeCalldataBytecode(e,t){return this.sendOperationRequest({body:e,options:t},gN)}decodeCalldataSource(e,t){return this.sendOperationRequest({body:e,options:t},NN)}getFateAssemblerCode(e,t){return this.sendOperationRequest({body:e,options:t},wN)}validateByteCode(e,t){return this.sendOperationRequest({body:e,options:t},vN)}getCompilerVersion(e,t){return this.sendOperationRequest({body:e,options:t},bN)}version(e){return this.sendOperationRequest({options:e},xN)}apiVersion(e){return this.sendOperationRequest({options:e},_N)}api(e){return this.sendOperationRequest({options:e},CN)}}const mN=Gs(u,!1),dN={path:"/aci",httpMethod:"POST",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:eN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},pN={path:"/compile",httpMethod:"POST",responses:{200:{bodyMapper:kg},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:eN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},hN={path:"/decode-call-result",httpMethod:"POST",responses:{200:{bodyMapper:{type:{name:"any"}}},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:rN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},fN={path:"/decode-call-result/bytecode",httpMethod:"POST",responses:{200:{bodyMapper:$g},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:aN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},yN={path:"/encode-calldata",httpMethod:"POST",responses:{200:{bodyMapper:Vg},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:iN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},gN={path:"/decode-calldata/bytecode",httpMethod:"POST",responses:{200:{bodyMapper:Lg},400:{bodyMapper:jg,isError:!0}},requestBody:sN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},NN={path:"/decode-calldata/source",httpMethod:"POST",responses:{200:{bodyMapper:Lg},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:oN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},wN={path:"/fate-assembler",httpMethod:"POST",responses:{200:{bodyMapper:Jg},400:{bodyMapper:jg,isError:!0}},requestBody:cN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},vN={path:"/validate-byte-code",httpMethod:"POST",responses:{200:{},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:uN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},bN={path:"/compiler-version",httpMethod:"POST",responses:{200:{bodyMapper:Kg},400:{bodyMapper:jg,isError:!0}},requestBody:cN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},xN={path:"/version",httpMethod:"GET",responses:{200:{bodyMapper:Kg},500:{bodyMapper:jg,isError:!0}},urlParameters:[nN],headerParameters:[tN],serializer:mN},_N={path:"/api-version",httpMethod:"GET",responses:{200:{bodyMapper:Yg},500:{bodyMapper:jg,isError:!0}},urlParameters:[nN],headerParameters:[tN],serializer:mN},CN={path:"/api",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Dictionary",value:{type:{name:"any"}}}}},400:{bodyMapper:jg,isError:!0}},urlParameters:[nN],headerParameters:[tN],serializer:mN};class SN extends Eg{constructor(e,{ignoreVersion:t=!1}={}){let n;super(),this.api=new lN(e,{allowInsecureConnection:!0,additionalPolicies:[So("compiler",(async e=>(null!=n||(n=(await this.api.apiVersion(e)).apiVersion),n)),"8.0.0","9.0.0",t),Co((e=>{let t="";return"reason"in e&&(t+=` ${e.reason}${null!=e.parameter?` in ${e.parameter}`:""}${null!=e.info?` (${JSON.stringify(e.info)})`:""}`),Array.isArray(e)&&(t+=`\n${e.map((e=>`${e.type}:${e.pos.line}:${e.pos.col}: ${e.message}${null!=e.context?` (${e.context})`:""}`)).join("\n")}`),t}))]}),this.api.pipeline.removePolicy({name:cn}),this.api.pipeline.removePolicy({name:In})}async compileBySourceCode(e,t){try{const n=await this.api.compileContract({code:e,options:{fileSystem:t}}),r=n.warnings.map((({type:e,...t})=>t));return{...n,warnings:r}}catch(e){if(e instanceof Un&&400===e.statusCode)throw new U(e.message);throw e}}async compile(e){throw new te("File system access, use CompilerHttpNode instead")}async generateAciBySourceCode(e,t){try{return await this.api.generateACI({code:e,options:{fileSystem:t}})}catch(e){if(e instanceof Un&&400===e.statusCode)throw new U(e.message);throw e}}async generateAci(e){throw new te("File system access, use CompilerHttpNode instead")}async validateBySourceCode(e,t,n){try{return await this.api.validateByteCode({bytecode:e,source:t,options:{fileSystem:n}}),!0}catch{return!1}}async validate(e,t){throw new te("File system access, use CompilerHttpNode instead")}async version(){return(await this.api.version()).version}}function TN(e){return e.replace(/_./g,(e=>e[1].toUpperCase()))}var PN=n(952),AN=n.n(PN);const{w3cwebsocket:zN}=AN();function IN(e,...t){const[n,...r]=t;e._eventEmitter.emit(n,...r)}function EN(e,t){if(null==t)throw new ve;e._debug("enter state",t.handler.name),e._fsm=t,null!=t?.handler?.enter&&t.handler.enter(e),kN(e)}function MN(e,t,n){e._debug(t,`(prev. ${e._status})`,null!=n?n:""),t!==e._status&&(e._status=t,IN(e,"statusChanged",t))}function qN(e,t){e._state=t,IN(e,"stateChanged",t)}function RN(e,t){e._debug("send message",t.method,t.params),e._websocket.send(Gf.stringify({jsonrpc:"2.0",...t}))}function ON(e,t,n={}){RN(e,{method:t,params:n})}async function kN(e){if(e._isActionQueueLocked)return;const t=e._actionQueue;if(0===t.length)return;const n=t.findIndex((t=>t.guard(e,e._fsm)));if(-1===n)return;e._actionQueue=t.filter(((e,t)=>n!==t)),e._isActionQueueLocked=!0;const r=await t[n].action(e,e._fsm);e._isActionQueueLocked=!1,EN(e,r)}async function BN(e,t){const{handler:n,state:r}=e._fsm,a=await Promise.resolve(n(e,t,r));if(EN(e,a),"OffChainNewContract"===t?.params?.data?.updates?.[0]?.op&&"channelOpen"===a?.handler.name){const n=e.round();if(null==n)throw new ie("Round is null");const r=t?.params?.data?.updates?.[0]?.owner;IN(e,"newContract",ea(r,n+1))}}function UN(e){e._websocket.close(),clearTimeout(e._pingTimeoutId)}function $N(e){clearTimeout(e._pingTimeoutId),e._pingTimeoutId=setTimeout((()=>{ON(e,"channels.system",{action:"ping"}),e._pingTimeoutId=setTimeout((()=>{UN(e),IN(e,"error",new ge)}),15e3)}),1e4)}async function GN(e,t,n){return new Promise(((r,a)=>{const i=e._nextRpcMessageId;e._nextRpcMessageId+=1,e._rpcCallbacks.set(i,(e=>{if(null!=e.error){var t;const n=null!==(t=e.error.data[0].message)&&void 0!==t?t:"";a(new fe(e.error.message+n))}else r(e.result)})),RN(e,{method:t,id:i,params:n})}))}async function VN(e,t){const{signatures:n,encodedTx:r}=zs(e,Xr.SignedTx),a=Ps(r),i=await t(a);if("string"==typeof i){const{signatures:e}=zs(i,Xr.SignedTx);return Ps({tag:Xr.SignedTx,signatures:n.concat(e),encodedTx:Cr(a)})}return i}async function DN(e,t,n,r){let a;if(null!=n.tx)a=await r(n.tx);else{if(null==n.signed_tx)throw new B("Can't find transaction in message");a=await VN(n.signed_tx,r)}const i="string"!=typeof a,s=null!=n.tx?"tx":"signed_tx";return ON(e,t,i?{error:null!=a?a:1}:{[s]:a}),i}function LN(e,t,n){return n?.reject?.(Object.assign(new Ne(`Unexpected message received:\n\n${JSON.stringify(t)}`),{wsMessage:t})),{handler:QN}}function jN(e,t,n,r){if(null!=r&&"channels.update"===t.method)return r(e,t,n);if("channels.conflict"===t.method)return n.resolve({accepted:!1,errorCode:t.params.data.error_code,errorMessage:t.params.data.error_msg}),{handler:QN};if("channels.info"===t.method&&"aborted_update"===t.params.data.event)return n.resolve({accepted:!1}),{handler:QN};if(null!=t.error){const e=t.error.data.map((e=>e.code));return e.includes(1001)?n.reject(new J("Insufficient balance")):e.includes(1002)?n.reject(new F("Amount cannot be negative")):n.reject(new ye(t.error.message)),{handler:QN}}return LN(0,t,n)}function FN(e,t){if("channels.info"===t.method){const n=t.params.data.event;let r=null;return"channel_accept"===n&&(r="accepted"),"funding_created"===n&&(r="halfSigned"),null!=r?(MN(e,r),{handler:WN}):"channel_reestablished"===t.params.data.event?{handler:YN}:"fsm_up"===t.params.data.event?(e._fsmId=t.params.data.fsm_id,{handler:FN}):{handler:FN}}if("channels.error"===t.method)return IN(e,"error",new ye(t?.payload?.message)),{handler:tw}}async function HN(e,t,n){return"channels.info"===t.method&&"fsm_up"===t.params.data.event?(e._fsmId=t.params.data.fsm_id,{handler:function(e,t,n){return"channels.info"===t.method&&"channel_reestablished"===t.params.data.event?{handler:YN}:LN(0,t,n)}}):LN(0,t,n)}async function JN(e,t,n){if("channels.info"===t.method&&"fsm_up"===t.params.data.event){e._fsmId=t.params.data.fsm_id;const{signedTx:n}=await e.state();return qN(e,null==n?"":Ps(n)),{handler:QN}}return LN(0,t,n)}async function WN(e,t){const n="initiator"===e._options.role?"initiator_sign":"responder_sign";if(t.method===`channels.sign.${n}`)return await DN(e,`channels.${n}`,t.params.data,(async t=>e._options.sign(n,t))),{handler:KN}}function KN(e,t){if("channels.on_chain_tx"===t.method){const{info:n}=t.params.data,{role:r}=e._options;if("funding_signed"===n&&"initiator"===r||"funding_created"===n&&"responder"===r)return{handler:function t(n,r){if("channels.info"===r.method)switch(r.params.data.event){case"funding_created":case"own_funding_locked":return{handler:t};case"funding_locked":return{handler:YN}}if("channels.on_chain_tx"===r.method)return IN(e,"onChainTx",r.params.data.tx,{info:r.params.data.info,type:r.params.data.type}),{handler:t}}}}if("channels.info"===t.method&&"funding_signed"===t.params.data.event&&"initiator"===e._options.role)return e._channelId=t.params.channel_id,MN(e,"signed"),{handler:KN}}function YN(e,t,n){return"channels.info"===t.method&&"open"===t.params.data.event?(e._channelId=t.params.channel_id,{handler:function(t,n,r){return"channels.update"===n.method?(qN(e,n.params.data.state),{handler:QN}):LN(0,n,r)}}):LN(0,t,n)}async function QN(e,t,n){switch(t.method){case"channels.info":switch(t.params.data.event){case"update":case"withdraw_created":case"deposit_created":return{handler:XN};case"own_withdraw_locked":case"withdraw_locked":case"own_deposit_locked":case"deposit_locked":case"peer_disconnected":case"channel_reestablished":case"open":return IN(e,TN(t.params.data.event)),{handler:QN};case"fsm_up":return e._fsmId=t.params.data.fsm_id,{handler:QN};case"timeout":case"close_mutual":case"shutdown":return{handler:QN};case"closing":return MN(e,"closing"),{handler:QN};case"closed_confirmed":return MN(e,"closed"),{handler:tw};case"died":return MN(e,"died"),{handler:tw}}break;case"channels.on_chain_tx":return IN(e,"onChainTx",t.params.data.tx,{info:t.params.data.info,type:t.params.data.type}),{handler:QN};case"channels.leave":return{handler:QN};case"channels.update":return qN(e,t.params.data.state),{handler:QN};case"channels.sign.shutdown_sign_ack":return XN(e,t,n)}}async function XN(e,t,n){var r;const[,a]=null!==(r=t.method.match(/^channels\.sign\.([^.]+)$/))&&void 0!==r?r:[];return null==a?LN(0,t,n):await DN(e,`channels.${a}`,t.params.data,(async n=>e._options.sign(a,n,{updates:t.params.data.updates})))?{handler:function e(t,r){return null!=r.error?{handler:e,state:n}:"channels.conflict"===r.method?{handler:QN}:LN(0,r,n)},state:n}:{handler:QN}}async function ZN(e,t,n){return"channels.sign.shutdown_sign"!==t.method?LN(0,t,n):(await DN(e,"channels.shutdown_sign",t.params.data,(async e=>n.sign(e))),{handler(e,t){return"channels.on_chain_tx"!==t.method?LN(0,t,n):{handler:tw,state:n}},state:n})}function ew(e,t,n){return"channels.leave"===t.method?(n.resolve({channelId:t.params.channel_id,signedTx:t.params.data.state}),UN(e),{handler:tw}):"channels.error"===t.method?(n.reject(new ye(t.data.message)),{handler:QN}):LN(0,t,n)}function tw(e,t,n){return null==n?{handler:tw}:"closing"===t.params.data.event?{handler:tw,state:n}:"channel_closed"===t.params.data.info?(n.closeTx=t.params.data.tx,{handler:tw,state:n}):"closed_confirmed"===t.params.data.event?(n.resolve(n.closeTx),{handler:tw}):{handler:tw,state:n}}QN.enter=e=>{MN(e,"open")};var nw=n(7007),rw=n.n(nw);function aw(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}let iw=0;var sw=new WeakMap;class ow{constructor(){var e,t;Ph(this,"_eventEmitter",new(rw())),Ph(this,"_nextRpcMessageId",0),Ph(this,"_rpcCallbacks",new Map),Ph(this,"_messageQueue",[]),Ph(this,"_isMessageQueueLocked",!1),Ph(this,"_actionQueue",[]),Ph(this,"_isActionQueueLocked",!1),Ph(this,"_status","disconnected"),Ph(this,"_state",""),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,sw,void 0),iw+=1,t=iw,(e=sw).set(aw(e,this),t)}_debug(...e){var t;!0===this._options.debug&&console.debug(`Channel #${t=sw,t.get(aw(t,this))}`,...e)}static async initialize(e){return ow._initialize(new ow,e)}static async _initialize(e,t){var n;const r=null!=(null!==(n=t.existingFsmId)&&void 0!==n?n:t.existingChannelId);if(r&&(null==t.existingFsmId||null==t.existingChannelId))throw new F("`existingChannelId`, `existingFsmId` should be both provided or missed");const a=l[!0===t.reestablish?"awaitingReestablish":"awaitingReconnection"];return await async function(e,t,n,{url:r,...a}){e._options={url:r,...a};const i=new URL(r);Object.entries(a).filter((([e])=>!["sign","debug"].includes(e))).forEach((([e,t])=>i.searchParams.set(e.replace(/[A-Z]/g,(e=>`_${e.toLowerCase()}`)),t.toString()))),i.searchParams.set("protocol","json-rpc"),MN(e,"connecting"),e._websocket=new zN(i.toString()),await new Promise(((n,r)=>{Object.assign(e._websocket,{onerror:r,onopen:async r=>{n(),MN(e,"connected",r),EN(e,{handler:t}),$N(e)},onclose:t=>{MN(e,"disconnected",t),clearTimeout(e._pingTimeoutId)},onmessage:({data:t})=>function(e,t){const n=Gf.parse(t);if(e._debug("received message",n.method,n.params),null==n.id)"channels.message"!==n.method?"channels.system.pong"!==n.method?(e._messageQueue.push(n),async function(e){if(!e._isMessageQueueLocked){for(e._isMessageQueueLocked=!0;e._messageQueue.length>0;){const t=e._messageQueue.shift();if(null==t)throw new ie;try{await BN(e,t)}catch(n){rr(n),IN(e,"error",new we(n,t))}}e._isMessageQueueLocked=!1}}(e)):n.params.channel_id!==e._channelId&&null!=e._channelId||$N(e):IN(e,"message",n.params.data.message);else{const t=e._rpcCallbacks.get(n.id);if(null==t)return void IN(e,"error",new B(`Can't find callback by id: ${n.id}`));try{t(n)}finally{e._rpcCallbacks.delete(n.id)}}}(e,t)})}))}(e,r?a:FN,0,t),e}on(e,t){this._eventEmitter.on(e,t)}off(e,t){this._eventEmitter.removeListener(e,t)}disconnect(){return UN(this)}status(){return this._status}async state(){const e=(t=await GN(this,"channels.get.offchain_state",{}),Object.entries(t).reduce(((e,[t,n])=>({...e,[TN(t)]:n})),{}));var t;return{calls:Ss(e.calls),...""!==e.halfSignedTx&&{halfSignedTx:zs(e.halfSignedTx,Xr.SignedTx)},...""!==e.signedTx&&{signedTx:zs(e.signedTx,Xr.SignedTx)},trees:Ss(e.trees)}}round(){if(""===this._state)return null;const e=zs(this._state,Xr.SignedTx).encodedTx;switch(e.tag){case Xr.ChannelCreateTx:return 1;case Xr.ChannelOffChainTx:case Xr.ChannelWithdrawTx:case Xr.ChannelDepositTx:return e.round;default:return null}}id(){if(null==this._channelId)throw new B("Channel is not initialized");return this._channelId}fsmId(){if(null==this._fsmId)throw new B("Channel is not initialized");return this._fsmId}async enqueueAction(e){return async function(e,t,n){const r=new Promise(((r,a)=>{e._actionQueue.push({guard:t,action(){const e=n();return{...e,state:{...e.state,resolve:r,reject:a}}}})}));return kN(e),r}(this,((e,t)=>t?.handler===QN),e)}async leave(){return this.enqueueAction((()=>(ON(this,"channels.leave"),{handler:ew})))}async shutdown(e){return this.enqueueAction((()=>(ON(this,"channels.shutdown"),{handler:ZN,state:{sign:e}})))}}class cw extends ow{async update(e,t,n,r,a=[]){return this.enqueueAction((()=>{ON(this,"channels.update.new",{from:e,to:t,amount:n,meta:a});const i=async(e,t,n)=>"channels.sign.update"===t.method?await DN(this,"channels.update",t.params.data,(async e=>r(e,{updates:t.params.data.updates})))?{handler:i,state:n}:{handler:(e,t)=>jN(this,t,n,(()=>(qN(this,t.params.data.state),n.resolve({accepted:!0,signedTx:t.params.data.state}),{handler:QN}))),state:n}:"channels.error"===t.method?(n.reject(new ye(t.data.message)),{handler:QN}):jN(this,t,n);return{handler:i}}))}async poi({accounts:e,contracts:t}){const{poi:n}=await GN(this,"channels.get.poi",{accounts:e,contracts:t});return Ss(n)}async balances(e){return Object.fromEntries((await GN(this,"channels.get.balances",{accounts:e})).map((e=>[e.account,e.balance])))}async awaitingActionTx(e,t,n){if(t.method!==`channels.sign.${e}_tx`)return LN(0,t,n);const r=(t,a)=>{if("channels.on_chain_tx"===a.method)return n.onOnChainTx?.(a.params.data.tx),{handler:r,state:n};if("channels.info"===a.method&&[`own_${e}_locked`,`${e}_locked`].includes(a.params.data.event)){const t="deposit"===e?"Deposit":"Withdraw",i=a.params.data.event.startsWith("own_");return n[`on${i?"Own":""}${t}Locked`]?.(),{handler:r,state:n}}return jN(this,a,n,(()=>(qN(this,a.params.data.state),n.resolve({accepted:!0,signedTx:a.params.data.state}),{handler:QN})))},{sign:a}=n;return await DN(this,`channels.${e}_tx`,t.params.data,(async e=>a(e,{updates:t.params.data.updates}))),{handler:r,state:n}}async withdraw(e,t,{onOnChainTx:n,onOwnWithdrawLocked:r,onWithdrawLocked:a}={}){return this.enqueueAction((()=>(ON(this,"channels.withdraw",{amount:e}),{handler:async(e,t,n)=>this.awaitingActionTx("withdraw",t,n),state:{sign:t,onOnChainTx:n,onOwnWithdrawLocked:r,onWithdrawLocked:a}})))}async deposit(e,t,{onOnChainTx:n,onOwnDepositLocked:r,onDepositLocked:a}={}){return this.enqueueAction((()=>(ON(this,"channels.deposit",{amount:e}),{handler:async(e,t,n)=>this.awaitingActionTx("deposit",t,n),state:{sign:t,onOnChainTx:n,onOwnDepositLocked:r,onDepositLocked:a}})))}async sendMessage(e,t){const n="object"==typeof e?JSON.stringify(e):e;"connecting"===this.status()&&(await new Promise((e=>{const t=n=>{"connecting"!==n&&(e(),this.off("statusChanged",t))};this.on("statusChanged",t)})),await Qn(500)),ON(this,"channels.message",{info:n,to:t})}}function uw(e){return Object.entries(e).reduce(((e,[t,n])=>({...e,[TN(t)]:n})),{})}class lw extends cw{static async initialize(e){return ow._initialize(new lw,e)}async createContract({code:e,callData:t,deposit:n,vmVersion:r,abiVersion:a},i){return this.enqueueAction((()=>(ON(this,"channels.update.new_contract",{code:e,call_data:t,deposit:n,vm_version:r,abi_version:a}),{handler:async(e,t,n)=>"channels.sign.update"!==t.method?LN(0,t,n):(await DN(this,"channels.update",t.params.data,(async e=>n.sign(e))),{handler:(e,t,n)=>jN(this,t,n,(()=>{const e=zs(t.params.data.state,Xr.SignedTx).encodedTx;if(e.tag!==Xr.ChannelOffChainTx)throw new B(`Tag should be ${Xr[Xr.ChannelOffChainTx]}, got ${Xr[e.tag]} instead`);const r="initiator"===this._options.role?"initiatorId":"responderId",a=this._options[r];qN(this,t.params.data.state);const i=ea(a,e.round);return IN(this,"newContract",i),n.resolve({accepted:!0,address:i,signedTx:t.params.data.state}),{handler:QN}})),state:n}),state:{sign:i}})))}async callContract({amount:e,callData:t,contract:n,abiVersion:r},a){return this.enqueueAction((()=>(ON(this,"channels.update.call_contract",{amount:e,call_data:t,contract_id:n,abi_version:r}),{handler:async(e,t,n)=>"channels.sign.update"!==t.method?LN(0,t,n):(await DN(this,"channels.update",t.params.data,(async e=>n.sign(e,{updates:t.params.data.updates}))),{handler:(e,t,n)=>jN(this,t,n,(()=>(qN(this,t.params.data.state),n.resolve({accepted:!0,signedTx:t.params.data.state}),{handler:QN}))),state:n}),state:{sign:a}})))}async forceProgress({amount:e,callData:t,contract:n,abiVersion:r,gasLimit:a=1e6,gasPrice:i=Lr},s,{onOnChainTx:o}={}){return this.enqueueAction((()=>(ON(this,"channels.force_progress",{amount:e,call_data:t,contract_id:n,abi_version:r,gas_price:i,gas:a}),{handler:async(e,t,n)=>"channels.sign.force_progress_tx"!==t.method?LN(0,t,n):(await DN(this,"channels.force_progress_sign",t.params.data,(async e=>n.sign(e,{updates:t.params.data.updates}))),{handler:(e,t,n)=>("channels.on_chain_tx"===t.method&&(n.onOnChainTx?.(t.params.data.tx),IN(this,"onChainTx",t.params.data.tx,{info:t.params.data.info,type:t.params.data.type}),n.resolve({accepted:!0,tx:t.params.data.tx})),LN(0,t,n)),state:n}),state:{sign:s,onOnChainTx:o}})))}async callContractStatic({amount:e,callData:t,contract:n,abiVersion:r}){return uw(await GN(this,"channels.dry_run.call_contract",{amount:e,call_data:t,contract_id:n,abi_version:r}))}async getContractCall({caller:e,contract:t,round:n}){return uw(await GN(this,"channels.get.contract_call",{caller_id:e,contract_id:t,round:n}))}async getContractState(e){const t=await GN(this,"channels.get.contract",{pubkey:e});return uw({...t,contract:uw(t.contract)})}async cleanContractCalls(){return this.enqueueAction((()=>(ON(this,"channels.clean_contract_calls"),{handler(e,t,n){return"channels.calls_pruned.reply"===t.method?(n.resolve(),{handler:QN}):(n.reject(new Ne("Unexpected message received")),{handler:tw})}})))}}var mw=null;"undefined"!=typeof WebSocket?mw=WebSocket:"undefined"!=typeof MozWebSocket?mw=MozWebSocket:void 0!==n.g?mw=n.g.WebSocket||n.g.MozWebSocket:"undefined"!=typeof window?mw=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(mw=self.WebSocket||self.MozWebSocket);var dw=mw;function pw(e,t,n){hw(e,t),t.set(e,n)}function hw(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fw(e,t,n){return n(Nw(e,t))}function yw(e,t,n){return e.set(Nw(e,t),n),n}function gw(e,t){return e.get(Nw(e,t))}function Nw(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var ww=function(e){return e.Middleware="mdw",e.Node="node",e.All="all",e}(ww||{});class vw extends q{constructor(e){super(e),this.name="MiddlewareSubscriberError"}}class bw extends vw{constructor(e){super("Connection closed"),this.closeEvent=e,this.name="MiddlewareSubscriberDisconnected"}}var xw=new WeakMap,_w=new WeakMap,Cw=new WeakMap,Sw=new WeakSet;class Tw{get webSocket(){return gw(Cw,this)}constructor(e){var t;hw(this,t=Sw),t.add(this),pw(this,xw,[]),pw(this,_w,[]),pw(this,Cw,void 0),this.url=e}async reconnect(){Nw(Sw,this,Ew).call(this),yw(Cw,this,await new Promise((e=>{const t=new dw(this.url);Object.assign(t,{onopen:()=>e(t),onerror:e=>{Nw(Sw,this,Iw).call(this,(()=>!0),void 0,e.error)},onmessage:e=>{if("string"!=typeof e.data)throw new ae("Unknown incoming message type: "+typeof e.data);Nw(Sw,this,Mw).call(this,JSON.parse(e.data))},onclose:e=>{Nw(Sw,this,Iw).call(this,(()=>!0),void 0,new bw(e)),Nw(Sw,this,Ew).call(this,!0)}})}))),await Promise.all([...fw(Sw,this,Pw)].map((e=>Nw(Sw,this,zw).call(this,!0,e))))}subscribeKeyBlocks(e){return Nw(Sw,this,qw).call(this,"KeyBlocks",ww.Middleware,e)}subscribeKeyBlocksNode(e){return Nw(Sw,this,qw).call(this,"KeyBlocks",ww.Node,e)}subscribeKeyBlocksAll(e){return Nw(Sw,this,qw).call(this,"KeyBlocks",ww.All,e)}subscribeMicroBlocks(e){return Nw(Sw,this,qw).call(this,"MicroBlocks",ww.Middleware,e)}subscribeMicroBlocksNode(e){return Nw(Sw,this,qw).call(this,"MicroBlocks",ww.Node,e)}subscribeMicroBlocksAll(e){return Nw(Sw,this,qw).call(this,"MicroBlocks",ww.All,e)}subscribeTransactions(e){return Nw(Sw,this,qw).call(this,"Transactions",ww.Middleware,e)}subscribeTransactionsNode(e){return Nw(Sw,this,qw).call(this,"Transactions",ww.Node,e)}subscribeTransactionsAll(e){return Nw(Sw,this,qw).call(this,"Transactions",ww.All,e)}subscribeObject(e,t){return Nw(Sw,this,qw).call(this,e,ww.Middleware,t)}subscribeObjectNode(e,t){return Nw(Sw,this,qw).call(this,e,ww.Node,t)}subscribeObjectAll(e,t){return Nw(Sw,this,qw).call(this,e,ww.All,t)}}function Pw(e){return new Set(gw(xw,e).map((([e])=>e)))}function Aw(e){if(null==gw(Cw,this))throw new ie;gw(Cw,this).send(JSON.stringify(e))}function zw(e,t){if(null==gw(Cw,this))return;const n=["KeyBlocks","MicroBlocks","Transactions"].includes(t)?t:"Object";Nw(Sw,this,Aw).call(this,{op:e?"Subscribe":"Unsubscribe",payload:n,..."Object"===n&&{target:t}}),gw(_w,this).push([e,t])}function Iw(e,t,n){gw(xw,this).filter((([t,n])=>e(t,n))).forEach((([,,e])=>e(t,n)))}function Ew(e=!1){null!=gw(Cw,this)&&(e||gw(Cw,this).close(),Object.assign(gw(Cw,this),{onopen:void 0,onerror:void 0,onmessage:void 0}),yw(Cw,this,void 0))}function Mw(e){if("string"==typeof e||Array.isArray(e)){const t=gw(_w,this).shift();if(null==t)throw new ae("Request queue is empty");const[n,r]=t;let a;return"string"==typeof e&&(a=new vw(e)),e.includes(r)!==n&&(a=new ae(`Expected ${r} to be${n?"":" not"} included into ${e}`)),void(null!=a&&Nw(Sw,this,Iw).call(this,(e=>r===e),void 0,a))}Nw(Sw,this,Iw).call(this,((t,n)=>!(t!==e.subscription&&t!==e.target||n!==e.source&&n!==ww.All)),e.payload)}function qw(e,t,n){const r=[e,t,n];return 0===fw(Sw,this,Pw).size&&this.reconnect(),fw(Sw,this,Pw).has(e)||Nw(Sw,this,zw).call(this,!0,e),gw(xw,this).push(r),()=>{yw(xw,this,gw(xw,this).filter((e=>e!==r))),fw(Sw,this,Pw).has(e)||Nw(Sw,this,zw).call(this,!1,e),0===fw(Sw,this,Pw).size&&Nw(Sw,this,Ew).call(this)}}const Rw={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},Ow={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},kw={parameterPath:"accountId",mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"accountId",required:!0,type:{name:"String"}}},Bw={parameterPath:["options","limit"],mapper:{defaultValue:10,constraints:{InclusiveMaximum:100,InclusiveMinimum:1},serializedName:"limit",type:{name:"Number"}}},Uw={parameterPath:["options","scope"],mapper:{constraints:{Pattern:new RegExp("(gen):\\d+(-\\d+)?")},serializedName:"scope",type:{name:"String"}}},$w={parameterPath:["options","contract"],mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",type:{name:"String"}}},Gw={parameterPath:["options","prefix"],mapper:{serializedName:"prefix",type:{name:"String"}}},Vw={parameterPath:["options","exact"],mapper:{serializedName:"exact",type:{name:"String"}}},Dw={parameterPath:"contractId",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contractId",required:!0,type:{name:"String"}}},Lw={parameterPath:["options","from"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"from",type:{name:"String"}}},jw={parameterPath:["options","to"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"to",type:{name:"String"}}},Fw={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},Hw={parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"String"}}},Jw={parameterPath:["options","blockHash"],mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",type:{name:"String"}}},Ww={parameterPath:["options","hash"],mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"hash",type:{name:"String"}}},Kw={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},Yw={parameterPath:["options","contractId"],mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",type:{name:"String"}}},Qw={parameterPath:"contractId",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}}},Xw={parameterPath:["options","scope"],mapper:{constraints:{Pattern:new RegExp("(epoch):\\d+(-\\d+)?")},serializedName:"scope",type:{name:"String"}}},Zw={parameterPath:"validator",mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"validator",required:!0,type:{name:"String"}}},ev={parameterPath:"hashOrKbi",mapper:{serializedName:"hash_or_kbi",required:!0,type:{name:"String"}}},tv={parameterPath:"hash",mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}}},nv={parameterPath:["options","ownedBy"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owned_by",type:{name:"String"}}},rv={parameterPath:["options","state"],mapper:{serializedName:"state",type:{name:"String"}}},av={parameterPath:"id",mapper:{serializedName:"id",required:!0,type:{name:"String"}}},iv={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},sv={parameterPath:["options","minStartDate"],mapper:{serializedName:"min_start_date",type:{name:"String"}}},ov={parameterPath:["options","maxStartDate"],mapper:{serializedName:"max_start_date",type:{name:"String"}}},cv={parameterPath:["options","txType"],mapper:{serializedName:"tx_type",type:{name:"String"}}},uv={parameterPath:["options","account"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",type:{name:"String"}}},lv={parameterPath:["options","channel"],mapper:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"channel",type:{name:"String"}}},mv={parameterPath:["options","oracle"],mapper:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle",type:{name:"String"}}},dv={parameterPath:["options","senderId"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",type:{name:"String"}}},pv={parameterPath:["options","recipientId"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",type:{name:"String"}}},hv={parameterPath:["options","scope"],mapper:{constraints:{Pattern:new RegExp("(time|gen):\\d+(-\\d+)?")},serializedName:"scope",type:{name:"String"}}},fv={parameterPath:["options","id"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"id",type:{name:"String"}}},yv={parameterPath:"hash",mapper:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}}},gv={type:{name:"Composite",className:"PathsBx0Ya3V3AccountsAccountidActivitiesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Activity"}}}}}}},Nv={type:{name:"Composite",className:"Activity",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["SpendTxEvent","OracleRegisterTxEvent","OracleExtendTxEvent","OracleQueryTxEvent","OracleResponseTxEvent","NamePreclaimTxEvent","NameClaimTxEvent","NameTransferTxEvent","NameUpdateTxEvent","NameRevokeTxEvent","ContractCreateTxEvent","ContractCallTxEvent","GaAttachTxEvent","GaMetaTxEvent","ChannelCreateTxEvent","ChannelDepositTxEvent","ChannelWithdrawTxEvent","ChannelForceProgressTxEvent","ChannelCloseMutualTxEvent","ChannelCloseSoloTxEvent","ChannelSlashTxEvent","ChannelSettleTxEvent","ChannelSnapshotSoloTxEvent","ChannelSetDelegatesTxEvent","ChannelOffchainTxEvent","ChannelClientReconnectTxEvent","PayingForTxEvent"]}},payload:{serializedName:"payload",type:{name:"Composite",className:"ActivityPayload"}}}}},wv={type:{name:"Composite",className:"ActivityPayload",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",type:{name:"String"}},blockHeight:{serializedName:"block_height",type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",type:{name:"String"}},microIndex:{serializedName:"micro_index",type:{name:"Number"}},microTime:{serializedName:"micro_time",type:{name:"UnixTime"}},signatures:{serializedName:"signatures",type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}},amount:{serializedName:"amount",type:{name:"BigInt"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",type:{name:"String"}},logIdx:{serializedName:"log_idx",type:{name:"Number"}},recipientId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",type:{name:"String"}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",type:{name:"String"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",type:{name:"String"}},tokenId:{serializedName:"token_id",type:{name:"Number"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",type:{name:"String"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",type:{name:"String"}},function:{serializedName:"function",type:{name:"String"}},internalTx:{serializedName:"internal_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},height:{serializedName:"height",type:{name:"Number"}},kind:{serializedName:"kind",type:{name:"Enum",allowedValues:["accounts_extra_lima","accounts_fortuna","accounts_genesis","accounts_lima","accounts_minerva","contracts_lima","reward_dev","reward_block","fee_refund_oracle","fee_lock_name","fee_refund_name","fee_spend_name","reward_oracle"]}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",type:{name:"String"}}}}},vv={type:{name:"Composite",className:"Tx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",type:{name:"String"}},initiatorId:{serializedName:"initiator_id",type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",type:{name:"BigInt"}},responderId:{serializedName:"responder_id",type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",type:{name:"Number"}},stateHash:{serializedName:"state_hash",type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}},channelId:{serializedName:"channel_id",type:{name:"String"}},fromId:{serializedName:"from_id",type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",type:{name:"Number"}},toId:{serializedName:"to_id",type:{name:"String"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",type:{name:"Number"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",type:{name:"Number"}},poi:{serializedName:"poi",type:{name:"String"}},initiatorDelegateIds:{serializedName:"initiator_delegate_ids",type:{name:"Sequence",element:{type:{name:"String"}}}},responderDelegateIds:{serializedName:"responder_delegate_ids",type:{name:"Sequence",element:{type:{name:"String"}}}},queryFormat:{serializedName:"query_format",type:{name:"String"}},responseFormat:{serializedName:"response_format",type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},accountId:{serializedName:"account_id",type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",type:{name:"String"}},query:{serializedName:"query",type:{name:"String"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},queryId:{serializedName:"query_id",type:{name:"String"}},response:{serializedName:"response",type:{name:"String"}},commitmentId:{serializedName:"commitment_id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},nameId:{serializedName:"name_id",type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",type:{name:"Number"}},pointers:{serializedName:"pointers",type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",type:{name:"Number"}},ownerId:{serializedName:"owner_id",type:{name:"String"}},code:{serializedName:"code",type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",type:{name:"BigInt"}},callData:{serializedName:"call_data",type:{name:"String"}},callerId:{serializedName:"caller_id",type:{name:"String"}},contractId:{serializedName:"contract_id",type:{name:"String"}},authFun:{constraints:{Pattern:new RegExp("^(0x|0X)?[a-fA-F0-9]+$")},serializedName:"auth_fun",type:{name:"String"}},gaId:{serializedName:"ga_id",type:{name:"String"}},authData:{serializedName:"auth_data",type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}},payerId:{serializedName:"payer_id",type:{name:"String"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["SpendTx","ChannelCreateTx","ChannelDepositTx","ChannelWithdrawTx","ChannelForceProgressTx","ChannelCloseMutualTx","ChannelCloseSoloTx","ChannelSlashTx","ChannelSettleTx","ChannelSnapshotSoloTx","ChannelSetDelegatesTx","OracleRegisterTx","OracleExtendTx","OracleQueryTx","OracleRespondTx","NamePreclaimTx","NameClaimTx","NameUpdateTx","NameTransferTx","NameRevokeTx","ContractCreateTx","ContractCallTx","GAAttachTx","GAMetaTx","PayingForTx"]}}}}},bv={type:{name:"Composite",className:"Delegates",modelProperties:{initiator:{serializedName:"initiator",type:{name:"Sequence",element:{type:{name:"String"}}}},responder:{serializedName:"responder",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},xv={serializedName:"OffChainUpdate",type:{name:"Composite",className:"OffChainUpdate",uberParent:"OffChainUpdate",polymorphicDiscriminator:{serializedName:"op",clientName:"op"},modelProperties:{op:{serializedName:"op",required:!0,type:{name:"String"}}}}},_v={type:{name:"Composite",className:"RelativeTTL",modelProperties:{type:{defaultValue:"delta",isConstant:!0,serializedName:"type",type:{name:"String"}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},Cv={type:{name:"Composite",className:"Ttl",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["delta","block"]}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},Sv={type:{name:"Composite",className:"NamePointer",modelProperties:{key:{serializedName:"key",required:!0,type:{name:"String"}},encodedKey:{serializedName:"encoded_key",type:{name:"String"}},id:{serializedName:"id",required:!0,type:{name:"String"}}}}},Tv={type:{name:"Composite",className:"SignedTx",modelProperties:{tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}},blockHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:-1},serializedName:"block_height",type:{name:"Number"}},blockHash:{serializedName:"block_hash",type:{name:"String"}},hash:{serializedName:"hash",type:{name:"String"}},encodedTx:{serializedName:"encoded_tx",type:{name:"String"}},signatures:{serializedName:"signatures",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Pv={type:{name:"Composite",className:"PaginatedResponse",modelProperties:{next:{serializedName:"next",required:!0,nullable:!0,type:{name:"String"}},prev:{serializedName:"prev",required:!0,nullable:!0,type:{name:"String"}}}}},Av={type:{name:"Composite",className:"ErrorResponse",modelProperties:{error:{serializedName:"error",required:!0,type:{name:"String"}}}}},zv={type:{name:"Composite",className:"Paths1Q9E32FV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TokenResponse"}}}}}}},Iv={type:{name:"Composite",className:"Aex141TokenResponse",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},ownerId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owner_id",type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}}}}},Ev={type:{name:"Composite",className:"PathsZ92TkfV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchemaAllof1",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9BalanceResponse"}}}}}}},Mv={type:{name:"Composite",className:"Aex9BalanceResponse",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},decimals:{serializedName:"decimals",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},tokenName:{serializedName:"token_name",required:!0,type:{name:"String"}},tokenSymbol:{serializedName:"token_symbol",required:!0,type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}},txIndex:{serializedName:"tx_index",required:!0,type:{name:"Number"}},txType:{serializedName:"tx_type",required:!0,type:{name:"String"}}}}},qv={type:{name:"Composite",className:"Paths10R8Q7PV3AccountsAccountidDexSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},Rv={type:{name:"Composite",className:"DexSwap",modelProperties:{amounts:{serializedName:"amounts",type:{name:"Composite",className:"DexSwapAmounts"}},action:{serializedName:"action",required:!0,type:{name:"Enum",allowedValues:["SWAP","BUY","SELL"]}},caller:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"caller",required:!0,type:{name:"String"}},fromToken:{serializedName:"from_token",required:!0,type:{name:"String"}},toToken:{serializedName:"to_token",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},toAccount:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"to_account",required:!0,type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}},fromContract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"from_contract",required:!0,type:{name:"String"}},toContract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"to_contract",required:!0,type:{name:"String"}},fromAmount:{serializedName:"from_amount",required:!0,type:{name:"BigInt"}},toAmount:{serializedName:"to_amount",required:!0,type:{name:"BigInt"}},fromDecimals:{serializedName:"from_decimals",required:!0,type:{name:"Number"}},toDecimals:{serializedName:"to_decimals",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}}}}},Ov={type:{name:"Composite",className:"DexSwapAmounts",modelProperties:{amount0In:{serializedName:"amount0_in",required:!0,type:{name:"BigInt"}},amount1In:{serializedName:"amount1_in",required:!0,type:{name:"BigInt"}},amount0Out:{serializedName:"amount0_out",required:!0,type:{name:"BigInt"}},amount1Out:{serializedName:"amount1_out",required:!0,type:{name:"BigInt"}}}}},kv={type:{name:"Composite",className:"Paths16G4GzrV3AccountsAccountidNamesClaimsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameClaim"}}}}}}},Bv={type:{name:"Composite",className:"NameClaim",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameClaimTx"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}}}}},Uv={type:{name:"Composite",className:"NameClaimTx",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",required:!0,type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},$v={type:{name:"Composite",className:"NotFoundResponse",modelProperties:{error:{serializedName:"error",required:!0,type:{name:"String"}}}}},Gv={type:{name:"Composite",className:"PathsA60QxwV3AccountsAccountidNamesPointeesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Pointee"}}}}}}},Vv={type:{name:"Composite",className:"Pointee",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},key:{serializedName:"key",required:!0,type:{name:"String"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameUpdateTx"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}}}}},Dv={type:{name:"Composite",className:"NameUpdateTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Lv={type:{name:"Composite",className:"PathsXcg812V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchema",modelProperties:{contractCreateTx:{serializedName:"contract_create_tx",type:{name:"Composite",className:"Get200ApplicationJsonProperties"}},contractCallTx:{serializedName:"contract_call_tx",type:{name:"Composite",className:"PathsEvgmfsV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx"}},gaAttachTx:{serializedName:"ga_attach_tx",type:{name:"Composite",className:"Paths1Mat0BzV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx"}},gaMetaTx:{serializedName:"ga_meta_tx",type:{name:"Composite",className:"Paths1Smy8TV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx"}},channelCloseMutualTx:{serializedName:"channel_close_mutual_tx",type:{name:"Composite",className:"PathsTachlnV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseMutualTx"}},channelCloseSoloTx:{serializedName:"channel_close_solo_tx",type:{name:"Composite",className:"Paths1AeqodeV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx"}},channelCreateTx:{serializedName:"channel_create_tx",type:{name:"Composite",className:"PathsGp6EyrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx"}},channelDepositTx:{serializedName:"channel_deposit_tx",type:{name:"Composite",className:"Paths10Z6Jt8V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx"}},channelForceProgressTx:{serializedName:"channel_force_progress_tx",type:{name:"Composite",className:"Paths1Jkl3L3V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx"}},channelSetDelegatesTx:{serializedName:"channel_set_delegates_tx",type:{name:"Composite",className:"PathsN9Iv8YV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx"}},channelSettleTx:{serializedName:"channel_settle_tx",type:{name:"Composite",className:"PathsCsym65V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx"}},channelSlashTx:{serializedName:"channel_slash_tx",type:{name:"Composite",className:"PathsEwav40V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx"}},channelSnapshotSoloTx:{serializedName:"channel_snapshot_solo_tx",type:{name:"Composite",className:"Paths5Ehb0PV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx"}},channelWithdrawTx:{serializedName:"channel_withdraw_tx",type:{name:"Composite",className:"Paths1Qk8BkgV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx"}},nameClaimTx:{serializedName:"name_claim_tx",type:{name:"Composite",className:"PathsC7WhtoV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx"}},namePreclaimTx:{serializedName:"name_preclaim_tx",type:{name:"Composite",className:"Paths1R4Z885V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx"}},nameRevokeTx:{serializedName:"name_revoke_tx",type:{name:"Composite",className:"PathsKrpz02V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx"}},nameTransferTx:{serializedName:"name_transfer_tx",type:{name:"Composite",className:"PathsPs07B4V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx"}},nameUpdateTx:{serializedName:"name_update_tx",type:{name:"Composite",className:"PathsTug6HrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx"}},oracleExtendTx:{serializedName:"oracle_extend_tx",type:{name:"Composite",className:"Paths17Dchb7V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx"}},oracleQueryTx:{serializedName:"oracle_query_tx",type:{name:"Composite",className:"Paths1Ngkd7FV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx"}},oracleRegisterTx:{serializedName:"oracle_register_tx",type:{name:"Composite",className:"PathsMvqgifV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx"}},oracleResponseTx:{serializedName:"oracle_response_tx",type:{name:"Composite",className:"Paths1U2Ve7RV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx"}},payingForTx:{serializedName:"paying_for_tx",type:{name:"Composite",className:"Paths1N757S0V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx"}},spendTx:{serializedName:"spend_tx",type:{name:"Composite",className:"Paths11Bqs5V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx"}},channelOffchainTx:{serializedName:"channel_offchain_tx",type:{name:"Composite",className:"Paths4Pjk8DV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx"}},total:{serializedName:"total",required:!0,type:{name:"Number"}}}}},jv={type:{name:"Composite",className:"Get200ApplicationJsonProperties",modelProperties:{ownerId:{serializedName:"owner_id",type:{name:"Number"}}}}},Fv={type:{name:"Composite",className:"PathsEvgmfsV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx",modelProperties:{contractId:{serializedName:"contract_id",type:{name:"Number"}},callerId:{serializedName:"caller_id",type:{name:"Number"}}}}},Hv={type:{name:"Composite",className:"Paths1Mat0BzV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",type:{name:"Number"}}}}},Jv={type:{name:"Composite",className:"Paths1Smy8TV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx",modelProperties:{gaId:{serializedName:"ga_id",type:{name:"Number"}}}}},Wv={type:{name:"Composite",className:"PathsTachlnV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseMutualTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Kv={type:{name:"Composite",className:"Paths1AeqodeV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Yv={type:{name:"Composite",className:"PathsGp6EyrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",type:{name:"Number"}},responderId:{serializedName:"responder_id",type:{name:"Number"}}}}},Qv={type:{name:"Composite",className:"Paths10Z6Jt8V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Xv={type:{name:"Composite",className:"Paths1Jkl3L3V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Zv={type:{name:"Composite",className:"PathsN9Iv8YV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},eb={type:{name:"Composite",className:"PathsCsym65V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},tb={type:{name:"Composite",className:"PathsEwav40V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},nb={type:{name:"Composite",className:"Paths5Ehb0PV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},rb={type:{name:"Composite",className:"Paths1Qk8BkgV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},toId:{serializedName:"to_id",type:{name:"Number"}}}}},ab={type:{name:"Composite",className:"PathsC7WhtoV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}}}}},ib={type:{name:"Composite",className:"Paths1R4Z885V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},commitmentId:{serializedName:"commitment_id",type:{name:"Number"}}}}},sb={type:{name:"Composite",className:"PathsKrpz02V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}}}}},ob={type:{name:"Composite",className:"PathsPs07B4V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"Number"}},accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}}}}},cb={type:{name:"Composite",className:"PathsTug6HrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}}}}},ub={type:{name:"Composite",className:"Paths17Dchb7V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx",modelProperties:{oracleId:{serializedName:"oracle_id",type:{name:"Number"}}}}},lb={type:{name:"Composite",className:"Paths1Ngkd7FV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx",modelProperties:{senderId:{serializedName:"sender_id",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",type:{name:"Number"}}}}},mb={type:{name:"Composite",className:"PathsMvqgifV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}}}}},db={type:{name:"Composite",className:"Paths1U2Ve7RV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx",modelProperties:{oracleId:{serializedName:"oracle_id",type:{name:"Number"}}}}},pb={type:{name:"Composite",className:"Paths1N757S0V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx",modelProperties:{payerId:{serializedName:"payer_id",type:{name:"Number"}}}}},hb={type:{name:"Composite",className:"Paths11Bqs5V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx",modelProperties:{senderId:{serializedName:"sender_id",type:{name:"Number"}},recipientId:{serializedName:"recipient_id",type:{name:"Number"}}}}},fb={type:{name:"Composite",className:"Paths4Pjk8DV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}}}}},yb={type:{name:"Composite",className:"Paths8I0YgwV3Aex141GetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141Response"}}}}}}},gb={type:{name:"Composite",className:"Aex141Response",modelProperties:{baseUrl:{serializedName:"base_url",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},extensions:{serializedName:"extensions",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},limits:{serializedName:"limits",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},invalid:{serializedName:"invalid",required:!0,type:{name:"Boolean"}},creationTime:{serializedName:"creation_time",required:!0,type:{name:"UnixTime"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}}}}},Nb={type:{name:"Composite",className:"PathsWkpcwaV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TemplatesResponse"}}}}}}},wb={type:{name:"Composite",className:"Aex141TemplatesResponse",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},edition:{serializedName:"edition",type:{name:"Dictionary",value:{type:{name:"any"}}}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},templateId:{serializedName:"template_id",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},vb={type:{name:"Composite",className:"PathsRay4X0V3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TemplateTokensResponse"}}}}}}},bb={type:{name:"Composite",className:"Aex141TemplateTokensResponse",modelProperties:{ownerId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owner_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},xb={type:{name:"Composite",className:"Paths1TkisghV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TokenResponse"}}}}}}},_b={type:{name:"Composite",className:"Aex141TokenDetailResponse",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},ownerId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owner_id",required:!0,type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},metadata:{serializedName:"metadata",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Cb={type:{name:"Composite",className:"Paths1A8Ah39V3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TransferEvent"}}}}}}},Sb={type:{name:"Composite",className:"Aex141TransferEvent",modelProperties:{blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",required:!0,type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",required:!0,type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},Tb={type:{name:"Composite",className:"Paths1Uqqby0V3Aex9GetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9Response"}}}}}}},Pb={type:{name:"Composite",className:"Aex9Response",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},initialSupply:{serializedName:"initial_supply",required:!0,type:{name:"BigInt"}},eventSupply:{serializedName:"event_supply",required:!0,type:{name:"BigInt"}},decimals:{serializedName:"decimals",required:!0,type:{name:"Number"}},extensions:{serializedName:"extensions",type:{name:"Sequence",element:{type:{name:"String"}}}},holders:{serializedName:"holders",required:!0,type:{name:"Number"}},name:{serializedName:"name",required:!0,type:{name:"String"}},symbol:{serializedName:"symbol",required:!0,type:{name:"String"}},invalid:{serializedName:"invalid",required:!0,type:{name:"Boolean"}}}}},Ab={type:{name:"Composite",className:"Paths19IxhsmV3Aex9CountGetResponses200ContentApplicationJsonSchema",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Number"}}}}},zb={type:{name:"Composite",className:"PathsEeiffwV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9ContractBalanceResponse"}}}}}}},Ib={type:{name:"Composite",className:"Aex9ContractBalanceResponse",modelProperties:{accountId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}},lastLogIdx:{serializedName:"last_log_idx",required:!0,type:{name:"Number"}}}}},Eb={type:{name:"Composite",className:"PathsKr825V3Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema",modelProperties:{account:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}}}}},Mb={type:{name:"Composite",className:"Paths108B3VtV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchemaAllof1",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Get200ApplicationJsonAllOfPropertiesItemsItem"}}}}}}},qb={type:{name:"Composite",className:"Get200ApplicationJsonAllOfPropertiesItemsItem",modelProperties:{account:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}}}}},Rb={type:{name:"Composite",className:"PathsQmewnaV3ChannelsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Channel"}}}}}}},Ob={type:{name:"Composite",className:"Channel",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},channel:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"channel",required:!0,type:{name:"String"}},channelReserve:{serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},delegateIds:{serializedName:"delegate_ids",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},initiator:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"initiator",required:!0,type:{name:"String"}},initiatorAmount:{serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},lastUpdatedHeight:{serializedName:"last_updated_height",required:!0,type:{name:"Number"}},lastUpdatedTxType:{serializedName:"last_updated_tx_type",required:!0,type:{name:"String"}},lastUpdatedTime:{serializedName:"last_updated_time",required:!0,type:{name:"UnixTime"}},lastUpdatedTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_updated_tx_hash",required:!0,type:{name:"String"}},lockPeriod:{serializedName:"lock_period",required:!0,type:{name:"Number"}},lockedUntil:{serializedName:"locked_until",required:!0,type:{name:"Number"}},responder:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"responder",required:!0,type:{name:"String"}},responderAmount:{serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},round:{serializedName:"round",required:!0,type:{name:"Number"}},soloRound:{serializedName:"solo_round",required:!0,type:{name:"Number"}},stateHash:{constraints:{Pattern:new RegExp("^st_\\w+$")},serializedName:"state_hash",required:!0,type:{name:"String"}},updatesCount:{serializedName:"updates_count",required:!0,type:{name:"Number"}}}}},kb={type:{name:"Composite",className:"Paths18L84JcV3ContractsCallsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractCall"}}}}}}},Bb={type:{name:"Composite",className:"ContractCall",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},internalTx:{serializedName:"internal_tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},localIdx:{serializedName:"local_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}}}}},Ub={type:{name:"Composite",className:"Paths10Kk1UxV3ContractsLogsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractLog"}}}}}}},$b={type:{name:"Composite",className:"ContractLog",modelProperties:{args:{serializedName:"args",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},data:{serializedName:"data",required:!0,type:{name:"String"}},eventHash:{serializedName:"event_hash",required:!0,type:{name:"String"}},eventName:{serializedName:"event_name",required:!0,nullable:!0,type:{name:"String"}},extCallerContractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"ext_caller_contract_id",required:!0,nullable:!0,type:{name:"String"}},extCallerContractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ext_caller_contract_tx_hash",required:!0,nullable:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},parentContractId:{serializedName:"parent_contract_id",required:!0,nullable:!0,type:{name:"Number"}}}}},Gb={type:{name:"Composite",className:"Contract",modelProperties:{aexnType:{serializedName:"aexn_type",required:!0,nullable:!0,type:{name:"String"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},createTx:{serializedName:"create_tx",type:{name:"Composite",className:"ContractCreateTx"}}}}},Vb={type:{name:"Composite",className:"ContractCreateTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},Db={type:{name:"Composite",className:"Paths9Yfxl2V3DexSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},Lb={type:{name:"Composite",className:"Paths6Vze8ZV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},jb={type:{name:"Composite",className:"Paths1F8GzwrV3HyperchainEpochsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"EpochInfo"}}}}}}},Fb={type:{name:"Composite",className:"EpochInfo",modelProperties:{epoch:{serializedName:"epoch",required:!0,type:{name:"Number"}},first:{serializedName:"first",required:!0,type:{name:"Number"}},last:{serializedName:"last",required:!0,type:{name:"Number"}},length:{serializedName:"length",required:!0,type:{name:"Number"}},seed:{serializedName:"seed",required:!0,type:{name:"String"}},lastPinHeight:{serializedName:"last_pin_height",required:!0,type:{name:"Number"}},parentBlockHash:{serializedName:"parent_block_hash",required:!0,type:{name:"String"}},lastLeader:{serializedName:"last_leader",required:!0,type:{name:"String"}},epochStartTime:{serializedName:"epoch_start_time",required:!0,type:{name:"Number"}},validators:{serializedName:"validators",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"EpochInfoValidatorsItem"}}}}}}},Hb={type:{name:"Composite",className:"EpochInfoValidatorsItem",modelProperties:{validator:{serializedName:"validator",type:{name:"String"}},stake:{serializedName:"stake",type:{name:"Number"}}}}},Jb={type:{name:"Composite",className:"Paths7W5O80V3HyperchainScheduleGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Schedule"}}}}}}},Wb={type:{name:"Composite",className:"Schedule",modelProperties:{height:{serializedName:"height",required:!0,type:{name:"Number"}},leader:{serializedName:"leader",required:!0,type:{name:"String"}}}}},Kb={type:{name:"Composite",className:"Paths1Qg7SclV3HyperchainValidatorsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Validator"}}}}}}},Yb={type:{name:"Composite",className:"Validator",modelProperties:{epoch:{serializedName:"epoch",required:!0,type:{name:"Number"}},validator:{serializedName:"validator",required:!0,type:{name:"String"}},totalStakes:{serializedName:"total_stakes",required:!0,type:{name:"Number"}},delegates:{serializedName:"delegates",required:!0,type:{name:"Number"}},rewardsEarned:{serializedName:"rewards_earned",required:!0,type:{name:"Number"}},pinningHistory:{serializedName:"pinning_history",required:!0,type:{name:"Dictionary",value:{type:{name:"Number"}}}}}}},Qb={type:{name:"Composite",className:"Paths7Ks32NV3HyperchainValidatorsValidatorDelegatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Delegate"}}}}}}},Xb={type:{name:"Composite",className:"Delegate",modelProperties:{epoch:{serializedName:"epoch",required:!0,type:{name:"Number"}},delegate:{serializedName:"delegate",required:!0,type:{name:"String"}},stake:{serializedName:"stake",required:!0,type:{name:"Number"}},validator:{serializedName:"validator",required:!0,type:{name:"String"}}}}},Zb={type:{name:"Composite",className:"PathsDwhnfdV3HyperchainValidatorsValidatorDelegatesTopGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Delegate"}}}}}}},ex={type:{name:"Composite",className:"PathsEue6HzV3KeyBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"KeyBlockExtended"}}}}}}},tx={type:{name:"Composite",className:"KeyBlock",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},miner:{serializedName:"miner",required:!0,type:{name:"String"}},beneficiary:{serializedName:"beneficiary",required:!0,type:{name:"String"}},target:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"target",required:!0,type:{name:"Number"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},type:{name:"Number"}}}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},info:{serializedName:"info",required:!0,type:{name:"String"}}}}},nx={type:{name:"Composite",className:"PathsNn60D7V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"MicroBlockExtended"}}}}}}},rx={type:{name:"Composite",className:"MicroBlockHeader",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},pofHash:{serializedName:"pof_hash",required:!0,type:{name:"String"}},prevHash:{serializedName:"prev_hash",required:!0,type:{name:"String"}},prevKeyHash:{serializedName:"prev_key_hash",required:!0,type:{name:"String"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},txsHash:{serializedName:"txs_hash",required:!0,type:{name:"String"}},signature:{serializedName:"signature",required:!0,type:{name:"String"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}}}}},ax={type:{name:"Composite",className:"PathsXhlqwrV3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transaction"}}}}}}},ix={type:{name:"Composite",className:"Transaction",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}}}}},sx={type:{name:"Composite",className:"Paths181Cs9V3NamesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Name"}}}}}}},ox={type:{name:"Composite",className:"Name",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},hash:{constraints:{Pattern:new RegExp("^nm_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},approximateActivationTime:{serializedName:"approximate_activation_time",required:!0,type:{name:"UnixTime"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},expireHeight:{serializedName:"expire_height",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},auction:{serializedName:"auction",type:{name:"Composite",className:"Auction"}},auctionTimeout:{serializedName:"auction_timeout",required:!0,type:{name:"Number"}},ownership:{serializedName:"ownership",type:{name:"Composite",className:"NameOwnership"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},nameFee:{serializedName:"name_fee",required:!0,type:{name:"BigInt"}},revoke:{serializedName:"revoke",type:{name:"Composite",className:"NameTx"}},claimsCount:{serializedName:"claims_count",type:{name:"Number"}}}}},cx={type:{name:"Composite",className:"Auction",modelProperties:{auctionEnd:{serializedName:"auction_end",required:!0,type:{name:"Number"}},activationTime:{serializedName:"activation_time",required:!0,type:{name:"UnixTime"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},lastBid:{serializedName:"last_bid",type:{name:"Composite",className:"AuctionLastBid"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},nameFee:{serializedName:"name_fee",required:!0,type:{name:"BigInt"}},claimsCount:{serializedName:"claims_count",required:!0,type:{name:"Number"}}}}},ux={type:{name:"Composite",className:"AuctionLastBid",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"AuctionLastBidTx"}}}}},lx={type:{name:"Composite",className:"Components17W16A5SchemasAuctionPropertiesLastBidPropertiesTxAllof1",modelProperties:{nameId:{constraints:{Pattern:new RegExp("^nm_\\w{38,50}$")},serializedName:"name_id",required:!0,type:{name:"String"}},type:{serializedName:"type",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}}}}},mx={type:{name:"Composite",className:"NameOwnership",modelProperties:{current:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"current",type:{name:"String"}},original:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"original",type:{name:"String"}}}}},dx={type:{name:"Composite",className:"NameTx",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameTxTx"}}}}},px={type:{name:"Composite",className:"NameRevokeTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},hx={type:{name:"Composite",className:"Components171VsjiSchemasNametxPropertiesTxAllof1",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}}}}},fx={type:{name:"Composite",className:"Paths1R08F8HV3NamesAuctionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Auction"}}}}}}},yx={type:{name:"Composite",className:"PathsCrb9BgV3NamesAuctionsIdClaimsGetResponses200ContentApplicationJsonSchema",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameClaim"}}}}}}},gx={type:{name:"Composite",className:"PathsMyl4W2V3NamesIdClaimsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameClaim"}}}}}}},Nx={type:{name:"Composite",className:"Paths1Ukwk06V3NamesIdTransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameTransfer"}}}}}}},wx={type:{name:"Composite",className:"NameTransfer",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameTransferTx"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}}}}},vx={type:{name:"Composite",className:"NameTransferTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},bx={type:{name:"Composite",className:"PathsRcnvllV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameUpdate"}}}}}}},xx={type:{name:"Composite",className:"NameUpdate",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameUpdateTx"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}}}}},_x={type:{name:"Composite",className:"PathsGcr9MrV3OraclesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Oracle"}}}}}}},Cx={type:{name:"Composite",className:"Oracle",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},expireHeight:{serializedName:"expire_height",required:!0,type:{name:"Number"}},registerTime:{serializedName:"register_time",required:!0,type:{name:"UnixTime"}},registerTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"register_tx_hash",required:!0,type:{name:"String"}},format:{serializedName:"format",type:{name:"Composite",className:"OracleFormat"}},oracle:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"BigInt"}},register:{serializedName:"register",type:{name:"Composite",className:"OracleTx"}}}}},Sx={type:{name:"Composite",className:"OracleFormat",modelProperties:{query:{serializedName:"query",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}}}}},Tx={type:{name:"Composite",className:"OracleTx",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"OracleTxTx"}}}}},Px={type:{name:"Composite",className:"OracleRegisterTx",modelProperties:{queryFormat:{serializedName:"query_format",required:!0,type:{name:"String"}},responseFormat:{serializedName:"response_format",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"Ttl"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}}}}},Ax={type:{name:"Composite",className:"Components1Viuqa3SchemasOracletxPropertiesTxAllof1",modelProperties:{oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},type:{serializedName:"type",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},zx={type:{name:"Composite",className:"PathsZ4L2QlV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleExtend"}}}}}}},Ix={type:{name:"Composite",className:"OracleExtend",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"OracleExtendTx"}}}}},Ex={type:{name:"Composite",className:"OracleExtendTx",modelProperties:{fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}}}}},Mx={type:{name:"Composite",className:"Paths1Uni7AtV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleQuery"}}}}}}},qx={type:{name:"Composite",className:"OracleQuery",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},queryId:{constraints:{Pattern:new RegExp("^oq_\\w{38,50}$")},serializedName:"query_id",required:!0,type:{name:"String"}},response:{serializedName:"response",type:{name:"Composite",className:"OracleResponse"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryTtl:{serializedName:"query_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},responseTtl:{serializedName:"response_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",required:!0,type:{name:"Number"}}}}},Rx={type:{name:"Composite",className:"OracleResponse",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},queryId:{constraints:{Pattern:new RegExp("^oq_\\w{38,50}$")},serializedName:"query_id",required:!0,type:{name:"String"}},query:{serializedName:"query",type:{name:"Composite",className:"OracleQuery"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},responseTtl:{serializedName:"response_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},ttl:{serializedName:"ttl",required:!0,type:{name:"Number"}}}}},Ox={type:{name:"Composite",className:"Paths1Tcj5A9V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleResponse"}}}}}}},kx={type:{name:"Composite",className:"Stats",modelProperties:{minersCount:{serializedName:"miners_count",type:{name:"Number"}},feesTrend:{serializedName:"fees_trend",type:{name:"Number"}},last24HsAverageTransactionFees:{serializedName:"last_24hs_average_transaction_fees",type:{name:"Number"}},last24HsTransactions:{serializedName:"last_24hs_transactions",type:{name:"Number"}},maxTransactionsPerSecond:{serializedName:"max_transactions_per_second",type:{name:"Number"}},maxTransactionsPerSecondBlockHash:{constraints:{Pattern:new RegExp("^kh_\\w{38,50}$")},serializedName:"max_transactions_per_second_block_hash",type:{name:"String"}},transactionsTrend:{serializedName:"transactions_trend",type:{name:"Number"}}}}},Bx={type:{name:"Composite",className:"PathsFso5IiV3StatsActiveAccountsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Ux={type:{name:"Composite",className:"Stat",modelProperties:{count:{serializedName:"count",required:!0,type:{name:"Number"}},startDate:{serializedName:"start_date",required:!0,type:{name:"String"}},endDate:{serializedName:"end_date",required:!0,type:{name:"String"}}}}},$x={type:{name:"Composite",className:"Paths1Fl1Lh2V3StatsAex9TransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Gx={type:{name:"Composite",className:"Paths1A27TirV3StatsBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Vx={type:{name:"Composite",className:"Paths72Dp44V3StatsContractsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Dx={type:{name:"Composite",className:"Paths1J83O75V3StatsDeltaGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DeltaStat"}}}}}}},Lx={type:{name:"Composite",className:"DeltaStat",modelProperties:{height:{serializedName:"height",required:!0,type:{name:"Number"}},auctionsStarted:{serializedName:"auctions_started",required:!0,type:{name:"Number"}},blockReward:{serializedName:"block_reward",required:!0,type:{name:"BigInt"}},burnedInAuctions:{serializedName:"burned_in_auctions",required:!0,type:{name:"BigInt"}},channelsClosed:{serializedName:"channels_closed",required:!0,type:{name:"Number"}},channelsOpened:{serializedName:"channels_opened",required:!0,type:{name:"Number"}},contractsCreated:{serializedName:"contracts_created",required:!0,type:{name:"Number"}},devReward:{serializedName:"dev_reward",required:!0,type:{name:"BigInt"}},namesActivated:{serializedName:"names_activated",required:!0,type:{name:"Number"}},namesExpired:{serializedName:"names_expired",required:!0,type:{name:"Number"}},namesRevoked:{serializedName:"names_revoked",required:!0,type:{name:"Number"}},oraclesExpired:{serializedName:"oracles_expired",required:!0,type:{name:"Number"}},oraclesRegistered:{serializedName:"oracles_registered",required:!0,type:{name:"Number"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}},lockedInAuctions:{serializedName:"locked_in_auctions",required:!0,type:{name:"BigInt"}},lockedInChannels:{serializedName:"locked_in_channels",required:!0,type:{name:"BigInt"}}}}},jx={type:{name:"Composite",className:"Paths1Qw6KhfV3StatsDifficultyGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Fx={type:{name:"Composite",className:"Paths1IskjkV3StatsHashrateGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Hx={type:{name:"Composite",className:"Paths50Qhc7V3StatsMinersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Miner"}}}}}}},Jx={type:{name:"Composite",className:"Miner",modelProperties:{miner:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"miner",required:!0,type:{name:"String"}},totalReward:{serializedName:"total_reward",required:!0,type:{name:"BigInt"}}}}},Wx={type:{name:"Composite",className:"PathsD92Xl6V3StatsNamesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Kx={type:{name:"Composite",className:"Paths1K55ZdgV3StatsTotalGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"TotalStat"}}}}}}},Yx={type:{name:"Composite",className:"TotalStat",modelProperties:{height:{serializedName:"height",required:!0,type:{name:"Number"}},contracts:{serializedName:"contracts",required:!0,type:{name:"Number"}},lockedInAuctions:{serializedName:"locked_in_auctions",required:!0,type:{name:"BigInt"}},burnedInAuctions:{serializedName:"burned_in_auctions",required:!0,type:{name:"BigInt"}},lockedInChannels:{serializedName:"locked_in_channels",required:!0,type:{name:"BigInt"}},activeAuctions:{serializedName:"active_auctions",required:!0,type:{name:"Number"}},activeNames:{serializedName:"active_names",required:!0,type:{name:"Number"}},inactiveNames:{serializedName:"inactive_names",required:!0,type:{name:"Number"}},activeOracles:{serializedName:"active_oracles",required:!0,type:{name:"Number"}},inactiveOracles:{serializedName:"inactive_oracles",required:!0,type:{name:"Number"}},openChannels:{serializedName:"open_channels",required:!0,type:{name:"Number"}},sumBlockReward:{serializedName:"sum_block_reward",required:!0,type:{name:"BigInt"}},sumDevReward:{serializedName:"sum_dev_reward",required:!0,type:{name:"BigInt"}},totalTokenSupply:{serializedName:"total_token_supply",required:!0,type:{name:"BigInt"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}}}}},Qx={type:{name:"Composite",className:"Paths3Bfys0V3StatsTotalAccountsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Xx={type:{name:"Composite",className:"Paths6PaqluV3StatsTransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Zx={type:{name:"Composite",className:"Status",modelProperties:{mdwAsyncTasks:{serializedName:"mdw_async_tasks",type:{name:"Composite",className:"StatusMdwAsyncTasks"}},mdwGensPerMinute:{serializedName:"mdw_gens_per_minute",required:!0,type:{name:"Number"}},mdwHeight:{serializedName:"mdw_height",required:!0,type:{name:"Number"}},mdwLastMigration:{serializedName:"mdw_last_migration",required:!0,type:{name:"Number"}},mdwRevision:{serializedName:"mdw_revision",required:!0,type:{name:"String"}},mdwSynced:{serializedName:"mdw_synced",required:!0,type:{name:"Boolean"}},mdwSyncing:{serializedName:"mdw_syncing",required:!0,type:{name:"Boolean"}},mdwTxIndex:{serializedName:"mdw_tx_index",required:!0,type:{name:"Number"}},mdwVersion:{serializedName:"mdw_version",required:!0,type:{name:"String"}},nodeHeight:{serializedName:"node_height",required:!0,type:{name:"Number"}},nodeProgress:{serializedName:"node_progress",required:!0,type:{name:"Number"}},nodeRevision:{serializedName:"node_revision",required:!0,type:{name:"String"}},nodeSyncing:{serializedName:"node_syncing",required:!0,type:{name:"Boolean"}},nodeVersion:{serializedName:"node_version",required:!0,type:{name:"String"}}}}},e_={type:{name:"Composite",className:"StatusMdwAsyncTasks",modelProperties:{longTasks:{serializedName:"long_tasks",required:!0,type:{name:"Number"}},producerBuffer:{serializedName:"producer_buffer",required:!0,type:{name:"Number"}},totalPending:{serializedName:"total_pending",required:!0,type:{name:"Number"}}}}},t_={type:{name:"Composite",className:"PathsHa9C78V3TransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transaction"}}}}}}},n_={type:{name:"Composite",className:"PathsI72FylV3TransactionsPendingGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"PendingTransaction"}}}}}}},r_={type:{name:"Composite",className:"PendingTransaction",modelProperties:{blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},failures:{serializedName:"failures",required:!0,type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}}}}},a_={type:{name:"Composite",className:"PathsVdg67V3TransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transfer"}}}}}}},i_={type:{name:"Composite",className:"Transfer",modelProperties:{accountId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},kind:{serializedName:"kind",required:!0,type:{name:"Enum",allowedValues:["reward_dev","reward_block"]}},refBlockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"ref_block_hash",required:!0,nullable:!0,type:{name:"String"}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",required:!0,nullable:!0,type:{name:"String"}},refTxType:{serializedName:"ref_tx_type",required:!0,nullable:!0,type:{name:"String"}}}}},s_={type:{name:"Composite",className:"Aex9TransferEvent",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},recipientId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",required:!0,type:{name:"String"}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",required:!0,type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},o_={type:{name:"Composite",className:"Aex9TransferResponse",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},callTxi:{serializedName:"call_txi",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",required:!0,type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",required:!0,type:{name:"String"}}}}},c_={type:{name:"Composite",className:"InternalContractCallEvent",modelProperties:{contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},internalTx:{serializedName:"internal_tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},height:{serializedName:"height",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}}}}},u_={type:{name:"Composite",className:"InternalTransferEvent",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},kind:{serializedName:"kind",required:!0,type:{name:"Enum",allowedValues:["accounts_extra_lima","accounts_fortuna","accounts_genesis","accounts_lima","accounts_minerva","contracts_lima","reward_dev","reward_block","fee_refund_oracle","fee_lock_name","fee_refund_name","fee_spend_name","reward_oracle"]}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",required:!0,type:{name:"String"}}}}},l_={type:{name:"Composite",className:"NameClaimEvent",modelProperties:{txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}},tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},m_={type:{name:"Composite",className:"SpendTx",modelProperties:{recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}}}}},d_={type:{name:"Composite",className:"ChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}}}}},p_={type:{name:"Composite",className:"ChannelDepositTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},h_={type:{name:"Composite",className:"ChannelWithdrawTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},toId:{serializedName:"to_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},f_={type:{name:"Composite",className:"ChannelForceProgressTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}}}}},y_={type:{name:"Composite",className:"ChannelCloseMutualTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"Number"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},g_={type:{name:"Composite",className:"ChannelCloseSoloTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},N_={type:{name:"Composite",className:"ChannelSlashTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},w_={type:{name:"Composite",className:"ChannelSettleTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"Number"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},v_={type:{name:"Composite",className:"ChannelSnapshotSoloTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},b_={type:{name:"Composite",className:"ChannelSetDelegatesTx",modelProperties:{channelId:{serializedName:"channel_id",required:!0,type:{name:"String"}},fromId:{serializedName:"from_id",required:!0,type:{name:"String"}},initiatorDelegateIds:{serializedName:"initiator_delegate_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},responderDelegateIds:{serializedName:"responder_delegate_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},x_={type:{name:"Composite",className:"OracleQueryTx",modelProperties:{oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},__={type:{name:"Composite",className:"OracleRespondTx",modelProperties:{queryId:{serializedName:"query_id",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},C_={type:{name:"Composite",className:"NamePreclaimTx",modelProperties:{commitmentId:{serializedName:"commitment_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},S_={type:{name:"Composite",className:"ContractCallTx",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},T_={type:{name:"Composite",className:"GAAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}},authFun:{constraints:{Pattern:new RegExp("^(0x|0X)?[a-fA-F0-9]+$")},serializedName:"auth_fun",required:!0,type:{name:"String"}}}}},P_={type:{name:"Composite",className:"GAMetaTx",modelProperties:{gaId:{serializedName:"ga_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},authData:{serializedName:"auth_data",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},A_={type:{name:"Composite",className:"PayingForTx",modelProperties:{payerId:{serializedName:"payer_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},z_={type:{name:"Composite",className:"Paths1EfdbjrV3AccountsAccountidActivitiesGetResponses200ContentApplicationJsonSchema",modelProperties:{...gv.type.modelProperties,...Pv.type.modelProperties}}},I_={type:{name:"Composite",className:"Paths3Hsv3GV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...zv.type.modelProperties,...Pv.type.modelProperties}}},E_={type:{name:"Composite",className:"PathsKm52GqV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Pv.type.modelProperties,...Ev.type.modelProperties}}},M_={type:{name:"Composite",className:"PathsZpy8S9V3AccountsAccountidDexSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...qv.type.modelProperties,...Pv.type.modelProperties}}},q_={type:{name:"Composite",className:"Paths16Cyh9EV3AccountsAccountidNamesClaimsGetResponses200ContentApplicationJsonSchema",modelProperties:{...kv.type.modelProperties,...Pv.type.modelProperties}}},R_={type:{name:"Composite",className:"Paths1Mheci5V3AccountsAccountidNamesPointeesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Gv.type.modelProperties,...Pv.type.modelProperties}}},O_={type:{name:"Composite",className:"Paths1XwlyjtV3Aex141GetResponses200ContentApplicationJsonSchema",modelProperties:{...yb.type.modelProperties,...Pv.type.modelProperties}}},k_={type:{name:"Composite",className:"Paths181AjwxV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Nb.type.modelProperties,...Pv.type.modelProperties}}},B_={type:{name:"Composite",className:"Paths15Mi2TaV3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...vb.type.modelProperties,...Pv.type.modelProperties}}},U_={type:{name:"Composite",className:"PathsWl652MV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...xb.type.modelProperties,...Pv.type.modelProperties}}},$_={type:{name:"Composite",className:"Paths1O7Q6IhV3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...Cb.type.modelProperties,...Pv.type.modelProperties}}},G_={type:{name:"Composite",className:"Paths1Vr3Y2EV3Aex9GetResponses200ContentApplicationJsonSchema",modelProperties:{...Tb.type.modelProperties,...Pv.type.modelProperties}}},V_={type:{name:"Composite",className:"Paths1N61UurV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchema",modelProperties:{...zb.type.modelProperties,...Pv.type.modelProperties}}},D_={type:{name:"Composite",className:"Paths1Uybd4PV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchema",modelProperties:{...Pv.type.modelProperties,...Mb.type.modelProperties}}},L_={type:{name:"Composite",className:"Paths3EzhapV3ChannelsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Rb.type.modelProperties,...Pv.type.modelProperties}}},j_={type:{name:"Composite",className:"Paths1Txblx8V3ContractsCallsGetResponses200ContentApplicationJsonSchema",modelProperties:{...kb.type.modelProperties,...Pv.type.modelProperties}}},F_={type:{name:"Composite",className:"Paths7A1M6RV3ContractsLogsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Ub.type.modelProperties,...Pv.type.modelProperties}}},H_={type:{name:"Composite",className:"Paths1Di8FnjV3DexSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Db.type.modelProperties,...Pv.type.modelProperties}}},J_={type:{name:"Composite",className:"PathsKwxlzlV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Lb.type.modelProperties,...Pv.type.modelProperties}}},W_={type:{name:"Composite",className:"Paths194Lg3IV3HyperchainEpochsGetResponses200ContentApplicationJsonSchema",modelProperties:{...jb.type.modelProperties,...Pv.type.modelProperties}}},K_={type:{name:"Composite",className:"Paths1S5Zlt1V3HyperchainScheduleGetResponses200ContentApplicationJsonSchema",modelProperties:{...Jb.type.modelProperties,...Pv.type.modelProperties}}},Y_={type:{name:"Composite",className:"Paths1Ibn686V3HyperchainValidatorsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Kb.type.modelProperties,...Pv.type.modelProperties}}},Q_={type:{name:"Composite",className:"Paths1I4U8D5V3HyperchainValidatorsValidatorDelegatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Qb.type.modelProperties,...Pv.type.modelProperties}}},X_={type:{name:"Composite",className:"Paths15K0AlgV3HyperchainValidatorsValidatorDelegatesTopGetResponses200ContentApplicationJsonSchema",modelProperties:{...Zb.type.modelProperties,...Pv.type.modelProperties}}},Z_={type:{name:"Composite",className:"Paths277OngV3KeyBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...ex.type.modelProperties,...Pv.type.modelProperties}}},eC={type:{name:"Composite",className:"Paths1159W94V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...nx.type.modelProperties,...Pv.type.modelProperties}}},tC={type:{name:"Composite",className:"Paths15Bkk50V3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...ax.type.modelProperties,...Pv.type.modelProperties}}},nC={type:{name:"Composite",className:"Paths12S1Nd4V3NamesGetResponses200ContentApplicationJsonSchema",modelProperties:{...sx.type.modelProperties,...Pv.type.modelProperties}}},rC={type:{name:"Composite",className:"PathsKjq4D4V3NamesAuctionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...fx.type.modelProperties,...Pv.type.modelProperties}}},aC={type:{name:"Composite",className:"Paths1F98AqgV3NamesIdClaimsGetResponses200ContentApplicationJsonSchema",modelProperties:{...gx.type.modelProperties,...Pv.type.modelProperties}}},iC={type:{name:"Composite",className:"Paths1Raw8PV3NamesIdTransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...Nx.type.modelProperties,...Pv.type.modelProperties}}},sC={type:{name:"Composite",className:"Paths1Ec8CltV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...bx.type.modelProperties,...Pv.type.modelProperties}}},oC={type:{name:"Composite",className:"Paths1E14NekV3OraclesGetResponses200ContentApplicationJsonSchema",modelProperties:{..._x.type.modelProperties,...Pv.type.modelProperties}}},cC={type:{name:"Composite",className:"Paths1L5C64RV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchema",modelProperties:{...zx.type.modelProperties,...Pv.type.modelProperties}}},uC={type:{name:"Composite",className:"Paths8722JhV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Mx.type.modelProperties,...Pv.type.modelProperties}}},lC={type:{name:"Composite",className:"PathsVron83V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Ox.type.modelProperties,...Pv.type.modelProperties}}},mC={type:{name:"Composite",className:"PathsCgzmimV3StatsActiveAccountsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Bx.type.modelProperties,...Pv.type.modelProperties}}},dC={type:{name:"Composite",className:"Paths1UxyhelV3StatsAex9TransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...$x.type.modelProperties,...Pv.type.modelProperties}}},pC={type:{name:"Composite",className:"Paths1Sxjoy0V3StatsBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...Gx.type.modelProperties,...Pv.type.modelProperties}}},hC={type:{name:"Composite",className:"PathsWbrhqnV3StatsContractsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Vx.type.modelProperties,...Pv.type.modelProperties}}},fC={type:{name:"Composite",className:"Paths5Xf9ScV3StatsDeltaGetResponses200ContentApplicationJsonSchema",modelProperties:{...Dx.type.modelProperties,...Pv.type.modelProperties}}},yC={type:{name:"Composite",className:"Paths1D7Up0DV3StatsDifficultyGetResponses200ContentApplicationJsonSchema",modelProperties:{...jx.type.modelProperties,...Pv.type.modelProperties}}},gC={type:{name:"Composite",className:"PathsR51VshV3StatsHashrateGetResponses200ContentApplicationJsonSchema",modelProperties:{...Fx.type.modelProperties,...Pv.type.modelProperties}}},NC={type:{name:"Composite",className:"PathsA8Q6T7V3StatsMinersGetResponses200ContentApplicationJsonSchema",modelProperties:{...Hx.type.modelProperties,...Pv.type.modelProperties}}},wC={type:{name:"Composite",className:"PathsCeyhpaV3StatsNamesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Wx.type.modelProperties,...Pv.type.modelProperties}}},vC={type:{name:"Composite",className:"PathsJoz7P5V3StatsTotalGetResponses200ContentApplicationJsonSchema",modelProperties:{...Kx.type.modelProperties,...Pv.type.modelProperties}}},bC={type:{name:"Composite",className:"Paths15F3FfuV3StatsTotalAccountsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Qx.type.modelProperties,...Pv.type.modelProperties}}},xC={type:{name:"Composite",className:"Paths1IfhshmV3StatsTransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Xx.type.modelProperties,...Pv.type.modelProperties}}},_C={type:{name:"Composite",className:"Paths1Pymq07V3TransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...t_.type.modelProperties,...Pv.type.modelProperties}}},CC={type:{name:"Composite",className:"PathsUq0T7JV3TransactionsPendingGetResponses200ContentApplicationJsonSchema",modelProperties:{...n_.type.modelProperties,...Pv.type.modelProperties}}},SC={type:{name:"Composite",className:"PathsA7P0KiV3TransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...a_.type.modelProperties,...Pv.type.modelProperties}}},TC={type:{name:"Composite",className:"AuctionLastBidTx",modelProperties:{...Uv.type.modelProperties,...lx.type.modelProperties}}},PC={type:{name:"Composite",className:"KeyBlockExtended",modelProperties:{...tx.type.modelProperties,beneficiaryReward:{serializedName:"beneficiary_reward",required:!0,type:{name:"Number"}},flags:{constraints:{Pattern:new RegExp("^ba_\\w+$")},serializedName:"flags",required:!0,type:{name:"String"}},microBlocksCount:{serializedName:"micro_blocks_count",required:!0,type:{name:"Number"}},transactionsCount:{serializedName:"transactions_count",required:!0,type:{name:"Number"}}}}},AC={type:{name:"Composite",className:"MicroBlockExtended",modelProperties:{...rx.type.modelProperties,microBlockIndex:{serializedName:"micro_block_index",required:!0,type:{name:"Number"}},transactionsCount:{serializedName:"transactions_count",required:!0,type:{name:"Number"}},gas:{serializedName:"gas",required:!0,type:{name:"Number"}},flags:{constraints:{Pattern:new RegExp("^ba_\\w+$")},serializedName:"flags",required:!0,type:{name:"String"}}}}},zC={type:{name:"Composite",className:"NameTxTx",modelProperties:{...px.type.modelProperties,...hx.type.modelProperties}}},IC={type:{name:"Composite",className:"OracleTxTx",modelProperties:{...Px.type.modelProperties,...Ax.type.modelProperties}}};let EC={"OffChainUpdate.OffChainUpdate":xv};class MC extends mo{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const a="azsdk-js-middleware/1.0.0-beta.1",i=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${a}`:`${a}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:i},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}getAccountActivities(e,t){return this.sendOperationRequest({accountId:e,options:t},RC)}getAex141OwnedTokens(e,t){return this.sendOperationRequest({accountId:e,options:t},OC)}getAex9AccountBalances(e,t){return this.sendOperationRequest({accountId:e,options:t},kC)}getAccountDexSwaps(e,t){return this.sendOperationRequest({accountId:e,options:t},BC)}getAccountNameClaims(e,t){return this.sendOperationRequest({accountId:e,options:t},UC)}getAccountPointees(e,t){return this.sendOperationRequest({accountId:e,options:t},$C)}getAccountTransactionsCount(e,t){return this.sendOperationRequest({accountId:e,options:t},GC)}getSortedAex141Contracts(e){return this.sendOperationRequest({options:e},VC)}getAex141ContractTemplates(e,t){return this.sendOperationRequest({contractId:e,options:t},DC)}getAex141TemplateTokens(e,t,n){return this.sendOperationRequest({contractId:e,templateId:t,options:n},LC)}getAex141ContractTokens(e,t){return this.sendOperationRequest({contractId:e,options:t},jC)}getAex141TokenOwner(e,t,n){return this.sendOperationRequest({contractId:e,tokenId:t,options:n},FC)}getAex141ContractTransfers(e,t){return this.sendOperationRequest({contractId:e,options:t},HC)}getAex141ByContract(e,t){return this.sendOperationRequest({id:e,options:t},JC)}getSortedAex9Tokens(e){return this.sendOperationRequest({options:e},WC)}getAex9TokensCount(e){return this.sendOperationRequest({options:e},KC)}getAex9ContractBalances(e,t){return this.sendOperationRequest({contractId:e,options:t},YC)}getAex9ContractAccountBalance(e,t,n){return this.sendOperationRequest({contractId:e,accountId:t,options:n},QC)}getAex9ContractAccountBalanceHistory(e,t,n){return this.sendOperationRequest({contractId:e,accountId:t,options:n},XC)}getAex9ByContract(e,t){return this.sendOperationRequest({id:e,options:t},ZC)}getChannels(e){return this.sendOperationRequest({options:e},eS)}getChannel(e,t){return this.sendOperationRequest({id:e,options:t},tS)}getContractCalls(e){return this.sendOperationRequest({options:e},nS)}getContractLogs(e){return this.sendOperationRequest({options:e},rS)}getContract(e,t){return this.sendOperationRequest({id:e,options:t},aS)}getDexSwaps(e){return this.sendOperationRequest({options:e},iS)}getDexSwapsByContractId(e,t){return this.sendOperationRequest({contractId:e,options:t},sS)}getEpochs(e){return this.sendOperationRequest({options:e},oS)}getEpochTop(e){return this.sendOperationRequest({options:e},cS)}getSchedules(e){return this.sendOperationRequest({options:e},uS)}getSchedule(e,t){return this.sendOperationRequest({height:e,options:t},lS)}getValidators(e){return this.sendOperationRequest({options:e},mS)}getValidator(e,t){return this.sendOperationRequest({validator:e,options:t},dS)}getValidatorDelegates(e,t){return this.sendOperationRequest({validator:e,options:t},pS)}getTopValidatorDelegates(e,t){return this.sendOperationRequest({validator:e,options:t},hS)}getKeyBlocks(e){return this.sendOperationRequest({options:e},fS)}getKeyBlock(e,t){return this.sendOperationRequest({hashOrKbi:e,options:t},yS)}getKeyBlockMicroBlocks(e,t){return this.sendOperationRequest({hashOrKbi:e,options:t},gS)}getMicroBlock(e,t){return this.sendOperationRequest({hash:e,options:t},NS)}getMicroBlockTransactions(e,t){return this.sendOperationRequest({hash:e,options:t},wS)}getNames(e){return this.sendOperationRequest({options:e},vS)}getNamesAuctions(e){return this.sendOperationRequest({options:e},bS)}getNameAuction(e,t){return this.sendOperationRequest({id:e,options:t},xS)}getNameAuctionClaims(e,t){return this.sendOperationRequest({id:e,options:t},_S)}getNamesCount(e){return this.sendOperationRequest({options:e},CS)}getName(e,t){return this.sendOperationRequest({id:e,options:t},SS)}getNameClaims(e,t){return this.sendOperationRequest({id:e,options:t},TS)}getNameTransfers(e,t){return this.sendOperationRequest({id:e,options:t},PS)}getNameUpdates(e,t){return this.sendOperationRequest({id:e,options:t},AS)}getOracles(e){return this.sendOperationRequest({options:e},zS)}getOracle(e,t){return this.sendOperationRequest({id:e,options:t},IS)}getOracleExtends(e,t){return this.sendOperationRequest({id:e,options:t},ES)}getOracleQueries(e,t){return this.sendOperationRequest({id:e,options:t},MS)}getOracleResponses(e,t){return this.sendOperationRequest({id:e,options:t},qS)}getStats(e){return this.sendOperationRequest({options:e},RS)}getActiveAccountsStats(e){return this.sendOperationRequest({options:e},OS)}getAex9TransfersStats(e){return this.sendOperationRequest({options:e},kS)}getBlocksStats(e){return this.sendOperationRequest({options:e},BS)}getContractsStats(e){return this.sendOperationRequest({options:e},US)}getDeltaStats(e){return this.sendOperationRequest({options:e},$S)}getDifficultyStats(e){return this.sendOperationRequest({options:e},GS)}getHashrateStats(e){return this.sendOperationRequest({options:e},VS)}getMinerStats(e){return this.sendOperationRequest({options:e},DS)}getNamesStats(e){return this.sendOperationRequest({options:e},LS)}getTotalStats(e){return this.sendOperationRequest({options:e},jS)}getTotalAccountsStats(e){return this.sendOperationRequest({options:e},FS)}getTransactionsStats(e){return this.sendOperationRequest({options:e},HS)}getStatus(e){return this.sendOperationRequest({options:e},JS)}getTransactions(e){return this.sendOperationRequest({options:e},WS)}getTransactionsCount(e){return this.sendOperationRequest({options:e},KS)}getPendingTransactions(e){return this.sendOperationRequest({options:e},YS)}getPendingTransactionsCount(e){return this.sendOperationRequest({options:e},QS)}getTransaction(e,t){return this.sendOperationRequest({hash:e,options:t},XS)}getTransfers(e){return this.sendOperationRequest({options:e},ZS)}}const qC=yo(m,!1),RC={path:"/v3/accounts/{accountId}/activities",httpMethod:"GET",responses:{200:{bodyMapper:z_},400:{bodyMapper:Av,isError:!0}},queryParameters:[{parameterPath:["options","ownedOnly"],mapper:{serializedName:"owned_only",type:{name:"Boolean"}}},{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"Enum",allowedValues:["transactions","aexn","aex9","aex141","contract","transfers","claims","swaps"]}}},Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qC},OC={path:"/v3/accounts/{accountId}/aex141/tokens",httpMethod:"GET",responses:{200:{bodyMapper:I_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},$w],urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qC},kC={path:"/v3/accounts/{accountId}/aex9/balances",httpMethod:"GET",responses:{200:{bodyMapper:E_},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qC},BC={path:"/v3/accounts/{accountId}/dex/swaps",httpMethod:"GET",responses:{200:{bodyMapper:M_},400:{bodyMapper:Av,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qC},UC={path:"/v3/accounts/{accountId}/names/claims",httpMethod:"GET",responses:{200:{bodyMapper:q_},404:{bodyMapper:$v,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qC},$C={path:"/v3/accounts/{accountId}/names/pointees",httpMethod:"GET",responses:{200:{bodyMapper:R_},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qC},GC={path:"/v3/accounts/{accountId}/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:Lv},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qC},VC={path:"/v3/aex141",httpMethod:"GET",responses:{200:{bodyMapper:O_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},{parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"Enum",allowedValues:["creation","name","symbol"]}}},Gw,Vw],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},DC={path:"/v3/aex141/{contractId}/templates",httpMethod:"GET",responses:{200:{bodyMapper:k_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,Dw],headerParameters:[Rw],serializer:qC},LC={path:"/v3/aex141/{contractId}/templates/{templateId}/tokens",httpMethod:"GET",responses:{200:{bodyMapper:B_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,Dw,{parameterPath:"templateId",mapper:{serializedName:"templateId",required:!0,type:{name:"Number"}}}],headerParameters:[Rw],serializer:qC},jC={path:"/v3/aex141/{contractId}/tokens",httpMethod:"GET",responses:{200:{bodyMapper:U_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,Dw],headerParameters:[Rw],serializer:qC},FC={path:"/v3/aex141/{contractId}/tokens/{tokenId}",httpMethod:"GET",responses:{200:{bodyMapper:_b},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow,Dw,{parameterPath:"tokenId",mapper:{serializedName:"tokenId",required:!0,type:{name:"Number"}}}],headerParameters:[Rw],serializer:qC},HC={path:"/v3/aex141/{contractId}/transfers",httpMethod:"GET",responses:{200:{bodyMapper:$_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},Lw,jw],urlParameters:[Ow,Dw],headerParameters:[Rw],serializer:qC},JC={path:"/v3/aex141/{id}",httpMethod:"GET",responses:{200:{bodyMapper:gb},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow,Fw],headerParameters:[Rw],serializer:qC},WC={path:"/v3/aex9",httpMethod:"GET",responses:{200:{bodyMapper:G_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Gw,Vw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},{parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"Enum",allowedValues:["creation","name","symbol"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},KC={path:"/v3/aex9/count",httpMethod:"GET",responses:{200:{bodyMapper:Ab}},urlParameters:[Ow],headerParameters:[Rw],serializer:qC},YC={path:"/v3/aex9/{contractId}/balances",httpMethod:"GET",responses:{200:{bodyMapper:V_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},Hw,Jw],urlParameters:[Ow,Dw],headerParameters:[Rw],serializer:qC},QC={path:"/v3/aex9/{contractId}/balances/{accountId}",httpMethod:"GET",responses:{200:{bodyMapper:Eb},400:{bodyMapper:Av,isError:!0}},queryParameters:[Ww],urlParameters:[Ow,kw,Dw],headerParameters:[Rw],serializer:qC},XC={path:"/v3/aex9/{contractId}/balances/{accountId}/history",httpMethod:"GET",responses:{200:{bodyMapper:D_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,kw,Dw],headerParameters:[Rw],serializer:qC},ZC={path:"/v3/aex9/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Pb},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow,Fw],headerParameters:[Rw],serializer:qC},eS={path:"/v3/channels",httpMethod:"GET",responses:{200:{bodyMapper:L_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},{parameterPath:["options","state"],mapper:{serializedName:"state",type:{name:"Enum",allowedValues:["active","inactive"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},tS={path:"/v3/channels/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Ob},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,Kw],headerParameters:[Rw],serializer:qC},nS={path:"/v3/contracts/calls",httpMethod:"GET",responses:{200:{bodyMapper:j_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},rS={path:"/v3/contracts/logs",httpMethod:"GET",responses:{200:{bodyMapper:F_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,Yw,{parameterPath:["options","event"],mapper:{serializedName:"event",type:{name:"String"}}},{parameterPath:["options","function"],mapper:{serializedName:"function",type:{name:"String"}}},{parameterPath:["options","functionPrefix"],mapper:{serializedName:"function_prefix",type:{name:"String"}}},{parameterPath:["options","data"],mapper:{serializedName:"data",type:{name:"String"}}},{parameterPath:["options","aexnArgs"],mapper:{serializedName:"aexn-args",type:{name:"Boolean"}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},aS={path:"/v3/contracts/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Gb},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,Fw],headerParameters:[Rw],serializer:qC},iS={path:"/v3/dex/swaps",httpMethod:"GET",responses:{200:{bodyMapper:H_},400:{bodyMapper:Av,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},sS={path:"/v3/dex/{contract_id}/swaps",httpMethod:"GET",responses:{200:{bodyMapper:J_},400:{bodyMapper:Av,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,Qw],headerParameters:[Rw],serializer:qC},oS={path:"/v3/hyperchain/epochs",httpMethod:"GET",responses:{200:{bodyMapper:W_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},Xw],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},cS={path:"/v3/hyperchain/epochs/top",httpMethod:"GET",responses:{200:{bodyMapper:Fb},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow],headerParameters:[Rw],serializer:qC},uS={path:"/v3/hyperchain/schedule",httpMethod:"GET",responses:{200:{bodyMapper:K_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Xw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},lS={path:"/v3/hyperchain/schedule/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:Wb},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow,{parameterPath:"height",mapper:{serializedName:"height",required:!0,type:{name:"Number"}}}],headerParameters:[Rw],serializer:qC},mS={path:"/v3/hyperchain/validators",httpMethod:"GET",responses:{200:{bodyMapper:Y_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Xw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},dS={path:"/v3/hyperchain/validators/{validator}",httpMethod:"GET",responses:{200:{bodyMapper:Yb},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow,Zw],headerParameters:[Rw],serializer:qC},pS={path:"/v3/hyperchain/validators/{validator}/delegates",httpMethod:"GET",responses:{200:{bodyMapper:Q_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Xw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,Zw],headerParameters:[Rw],serializer:qC},hS={path:"/v3/hyperchain/validators/{validator}/delegates/top",httpMethod:"GET",responses:{200:{bodyMapper:X_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Xw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,Zw],headerParameters:[Rw],serializer:qC},fS={path:"/v3/key-blocks",httpMethod:"GET",responses:{200:{bodyMapper:Z_},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},yS={path:"/v3/key-blocks/{hash_or_kbi}",httpMethod:"GET",responses:{200:{bodyMapper:PC},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,ev],headerParameters:[Rw],serializer:qC},gS={path:"/v3/key-blocks/{hash_or_kbi}/micro-blocks",httpMethod:"GET",responses:{200:{bodyMapper:eC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,ev],headerParameters:[Rw],serializer:qC},NS={path:"/v3/micro-blocks/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:AC},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,tv],headerParameters:[Rw],serializer:qC},wS={path:"/v3/micro-blocks/{hash}/transactions",httpMethod:"GET",responses:{200:{bodyMapper:tC},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow,tv],headerParameters:[Rw],serializer:qC},vS={path:"/v3/names",httpMethod:"GET",responses:{200:{bodyMapper:nC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Gw,Hw,nv,rv,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},bS={path:"/v3/names/auctions",httpMethod:"GET",responses:{200:{bodyMapper:rC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},xS={path:"/v3/names/auctions/{id}",httpMethod:"GET",responses:{200:{bodyMapper:cx},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,av],headerParameters:[Rw],serializer:qC},_S={path:"/v3/names/auctions/{id}/claims",httpMethod:"GET",responses:{200:{bodyMapper:yx},404:{bodyMapper:$v,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,av],headerParameters:[Rw],serializer:qC},CS={path:"/v3/names/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}},400:{bodyMapper:Av,isError:!0}},queryParameters:[nv],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},SS={path:"/v3/names/{id}",httpMethod:"GET",responses:{200:{bodyMapper:ox},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,av],headerParameters:[Rw],serializer:qC},TS={path:"/v3/names/{id}/claims",httpMethod:"GET",responses:{200:{bodyMapper:aC},404:{bodyMapper:$v,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,av],headerParameters:[Rw],serializer:qC},PS={path:"/v3/names/{id}/transfers",httpMethod:"GET",responses:{200:{bodyMapper:iC},404:{bodyMapper:$v,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,av],headerParameters:[Rw],serializer:qC},AS={path:"/v3/names/{id}/updates",httpMethod:"GET",responses:{200:{bodyMapper:sC},404:{bodyMapper:$v,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,av],headerParameters:[Rw],serializer:qC},zS={path:"/v3/oracles",httpMethod:"GET",responses:{200:{bodyMapper:oC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,rv,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},IS={path:"/v3/oracles/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Cx},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,iv],headerParameters:[Rw],serializer:qC},ES={path:"/v3/oracles/{id}/extends",httpMethod:"GET",responses:{200:{bodyMapper:cC},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,iv],headerParameters:[Rw],serializer:qC},MS={path:"/v3/oracles/{id}/queries",httpMethod:"GET",responses:{200:{bodyMapper:uC},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,iv],headerParameters:[Rw],serializer:qC},qS={path:"/v3/oracles/{id}/responses",httpMethod:"GET",responses:{200:{bodyMapper:lC},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,iv],headerParameters:[Rw],serializer:qC},RS={path:"/v3/stats",httpMethod:"GET",responses:{200:{bodyMapper:kx},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow],headerParameters:[Rw],serializer:qC},OS={path:"/v3/stats/active-accounts",httpMethod:"GET",responses:{200:{bodyMapper:mC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},kS={path:"/v3/stats/aex9-transfers",httpMethod:"GET",responses:{200:{bodyMapper:dC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},sv,ov,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},BS={path:"/v3/stats/blocks",httpMethod:"GET",responses:{200:{bodyMapper:pC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,sv,ov,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"Enum",allowedValues:["key","micro"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},US={path:"/v3/stats/contracts",httpMethod:"GET",responses:{200:{bodyMapper:hC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,sv,ov,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},$S={path:"/v3/stats/delta",httpMethod:"GET",responses:{200:{bodyMapper:fC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},GS={path:"/v3/stats/difficulty",httpMethod:"GET",responses:{200:{bodyMapper:yC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,sv,ov,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},VS={path:"/v3/stats/hashrate",httpMethod:"GET",responses:{200:{bodyMapper:gC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,sv,ov,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},DS={path:"/v3/stats/miners",httpMethod:"GET",responses:{200:{bodyMapper:NC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},LS={path:"/v3/stats/names",httpMethod:"GET",responses:{200:{bodyMapper:wC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,sv,ov,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},jS={path:"/v3/stats/total",httpMethod:"GET",responses:{200:{bodyMapper:vC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},FS={path:"/v3/stats/total-accounts",httpMethod:"GET",responses:{200:{bodyMapper:bC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},HS={path:"/v3/stats/transactions",httpMethod:"GET",responses:{200:{bodyMapper:xC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,sv,ov,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},cv,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},JS={path:"/v3/status",httpMethod:"GET",responses:{200:{bodyMapper:Zx}},urlParameters:[Ow],headerParameters:[Rw],serializer:qC},WS={path:"/v3/transactions",httpMethod:"GET",responses:{200:{bodyMapper:_C},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,$w,{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["channel_close_mutual","channel_close_solo","channel_create","channel_deposit","channel_force_progress","channel_offchain","channel_settle","channel_slash","channel_snapshot_solo","channel_withdraw","contract_call","contract_create","ga_attach","ga_meta","name_claim","name_preclaim","name_revoke","name_transfer","name_update","oracle_extend","oracle_query","oracle_register","oracle_response","paying_for","spend"]}}}},collectionFormat:"Multi"},{parameterPath:["options","typeGroup"],mapper:{serializedName:"type_group",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["channel","contract","ga","name","oracle","paying_for","spend"]}}}},collectionFormat:"Multi"},uv,lv,mv,dv,pv,{parameterPath:["options","entrypoint"],mapper:{serializedName:"entrypoint",type:{name:"String"}}},hv,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},KS={path:"/v3/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}}},queryParameters:[Uw,cv,fv],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},YS={path:"/v3/transactions/pending",httpMethod:"GET",responses:{200:{bodyMapper:CC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},QS={path:"/v3/transactions/pending/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}},400:{bodyMapper:Av,isError:!0}},urlParameters:[Ow],headerParameters:[Rw],serializer:qC},XS={path:"/v3/transactions/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:ix},400:{bodyMapper:Av,isError:!0},404:{bodyMapper:$v,isError:!0}},urlParameters:[Ow,yv],headerParameters:[Rw],serializer:qC},ZS={path:"/v3/transfers",httpMethod:"GET",responses:{200:{bodyMapper:SC},400:{bodyMapper:Av,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qC},eT=[RC,OC,kC,BC,UC,$C,GC,VC,DC,LC,jC,FC,HC,JC,WC,KC,YC,QC,ZC,eS,tS,nS,rS,aS,iS,sS,oS,cS,uS,lS,mS,dS,pS,hS,fS,yS,gS,NS,wS,vS,bS,xS,_S,CS,SS,TS,PS,AS,zS,IS,ES,MS,qS,RS,OS,kS,BS,US,$S,GS,VS,DS,LS,jS,FS,HS,JS,WS,KS,YS,QS,XS,ZS];function tT(e,t){return e.get(nT(e,t))}function nT(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}class rT extends q{constructor(e){super(`There is no ${e?"next":"previous"} page`),this.name="MiddlewarePageMissed"}}var aT=new WeakMap;class iT{constructor(e,t){var n,r;(function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)})(this,aT,void 0),this.data=e.data,this.nextPath=e.next,this.prevPath=e.prev,r=t,(n=aT).set(nT(n,this),r)}async next(){if(null==this.nextPath)throw new rT(!0);return tT(aT,this).requestByPath(this.nextPath)}async prev(){if(null==this.prevPath)throw new rT(!1);return tT(aT,this).requestByPath(this.prevPath)}}class sT extends MC{constructor(e,{ignoreVersion:t=!1,retryCount:n=3,retryOverallDelay:r=800,...a}={}){let i;super(e,{allowInsecureConnection:!0,additionalPolicies:[So("middleware",(async e=>(null!=i||(i=(await this.getStatus(e)).mdwVersion),i)),"1.81.0","2.0.0",t),bo(),xo(),To(n,r),Co((e=>` ${e.error}`))],...a}),this.pipeline.addPolicy(vo,{phase:"Deserialize"}),this.pipeline.removePolicy({name:cn}),this.pipeline.removePolicy({name:In}),this.pipeline.removePolicy({name:"defaultRetryPolicy"})}async requestByPath(e){const t=e.indexOf("?"),n=e.slice(0,-1===t?e.length:t),r=e.slice(-1===t?e.length:t+1),a=eT.find((e=>{let t=n;if(null==e.path)return!1;const r=e.path.replace(/{\w+}/g,"{param}").split("{param}");for(;r.length>0;){const n=r.shift();if(null==n)throw new ae(`Unexpected operation spec path: ${e.path}`);if(!t.startsWith(n))return!1;t=t.replace(n,""),r.length>0&&(t=t.replace(/^[\w.]+/,""))}return""===t}));if(null==a)throw new F(`Can't find operation spec corresponding to ${n}`);return this.sendOperationRequest({},{...a,path:n,urlParameters:a.urlParameters?.filter((({parameterPath:e})=>"$host"===e)),queryParameters:Array.from(new URLSearchParams(r)).map((([e,t])=>({parameterPath:["options",e],mapper:{defaultValue:t.toString(),serializedName:e,type:{name:"String"}}})))})}async sendOperationRequest(e,t){const n=await super.sendOperationRequest(e,t);return function(e){const t=e;return null!=t?.data&&Array.isArray(t.data)&&"next"in t&&"prev"in t}(n)?new iT(n,this):n}}var oT=(e,t)=>(e.connect((e=>t.sendMessage(e)),(()=>t.disconnect())),t.connect((t=>e.sendMessage(t)),(()=>e.disconnect())),()=>{e.disconnect(),t.disconnect()});class cT{constructor({debug:e=!1}){this.debug=e}connect(e,t){if(this.isConnected())throw new Ye("You already connected")}disconnect(){if(!this.isConnected())throw new Qe("You dont have connection. Please connect before")}receiveMessage(e){this.debug&&console.log("Receive message:",e)}sendMessage(e){this.debug&&console.log("Send message:",e)}}function uT(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function lT(e,t){return e.get(dT(e,t))}function mT(e,t,n){return e.set(dT(e,t),n),n}function dT(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var pT=new WeakMap,hT=new WeakMap,fT=new WeakMap;class yT extends cT{constructor({target:e,self:t=window,origin:n,sendDirection:r,receiveDirection:a=Bh.to_aepp,...i}={}){super(i),uT(this,pT,void 0),uT(this,hT,void 0),uT(this,fT,void 0),mT(hT,this,e),mT(fT,this,t),this.origin=n,this.sendDirection=r,this.receiveDirection=a}isConnected(){return null!=this.listener}connect(e,t){super.connect(e,t),this.listener=t=>{var n;if("object"!=typeof t.data||"2.0"!==(null!==(n=t.data.jsonrpc)&&void 0!==n?n:t.data.data?.jsonrpc))return;if(null!=this.origin&&this.origin!==t.origin)return;if(null!=lT(hT,this)&&lT(hT,this)!==t.source)return;this.receiveMessage(t);let{data:r}=t;if(null!=r.type){if(t.data.type!==this.receiveDirection)return;r=r.data}e(r,t.origin,t.source)},lT(fT,this).addEventListener("message",this.listener),mT(pT,this,t)}disconnect(){if(super.disconnect(),null==this.listener||null==lT(pT,this))throw new ae("Expected to not happen, required for TS");lT(fT,this).removeEventListener("message",this.listener),delete this.listener,lT(pT,this).call(this),mT(pT,this,void 0)}sendMessage(e){var t;if(null==lT(hT,this))throw new Xe("Can't send messages without target");const n=null!=this.sendDirection?{type:this.sendDirection,data:e}:e;super.sendMessage(n),lT(hT,this).postMessage(n,null!==(t=this.origin)&&void 0!==t?t:"*")}}var gT=(e,t)=>{if(null==window)throw new Z("Window object not found, you can run wallet detector only in browser");const n={};return e.connect((({method:e,params:r},a,i)=>{if(e!==Gh.readyToConnect||null!=n[r.id])return;const s={info:r,getConnection(){return new yT({target:i,..."extension"===r.type?{sendDirection:Bh.to_waellet,receiveDirection:Bh.to_aepp,..."null"!==window.origin&&{origin:window.origin}}:{origin:r.origin}})}};n[s.info.id]=s,t({wallets:n,newWallet:s})}),(()=>{})),()=>e.disconnect()};function NT(e,t,n){return e.set(vT(e,t),n),n}function wT(e,t){return e.get(vT(e,t))}function vT(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var bT=new WeakMap;class xT extends cT{constructor({port:e,...t}){var n,r,a;super(t),a=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=bT),r.set(n,a),this.port=e}disconnect(){if(super.disconnect(),this.port.disconnect(),null==wT(bT,this))throw new ie;this.port.onMessage.removeListener(wT(bT,this)[0]),this.port.onDisconnect.removeListener(wT(bT,this)[1]),NT(bT,this,void 0)}connect(e,t){super.connect(e,t),NT(bT,this,[(t,n)=>{var r;this.receiveMessage(t),e(t,null!==(r=n.sender?.url)&&void 0!==r?r:"",n)},t]),this.port.onMessage.addListener(wT(bT,this)[0]),this.port.onDisconnect.addListener(wT(bT,this)[1])}sendMessage(e){super.sendMessage(e),this.port.postMessage(e)}isConnected(){return null!=wT(bT,this)}}}(),r}()}));
3
3
  //# sourceMappingURL=aepp-sdk.browser-script.cjs.map