@sentio/sdk-bundle 2.54.0-rc.8 → 2.54.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 (73) hide show
  1. package/lib/aptos/builtin/0x1.js +1 -1
  2. package/lib/aptos/builtin/0x3.js +1 -1
  3. package/lib/aptos/builtin/0x4.js +1 -1
  4. package/lib/aptos/builtin/index.js +1 -1
  5. package/lib/aptos/ext/index.js +1 -1
  6. package/lib/aptos/index.js +1 -1
  7. package/lib/btc/index.js +1 -1
  8. package/lib/{chunk-542NJB43.js → chunk-2AZ3DDYW.js} +2 -2
  9. package/lib/{chunk-CXGSRLW3.js → chunk-2SDXZNMS.js} +2 -2
  10. package/lib/{chunk-OW7PNQXI.js → chunk-4EPXEM2C.js} +2 -2
  11. package/lib/{chunk-WL2T4PIX.js → chunk-4R3P3DNX.js} +2 -2
  12. package/lib/{chunk-3KEEWCG3.js → chunk-C2Q4CM5A.js} +2 -2
  13. package/lib/{chunk-M6HSLAJ4.js → chunk-D4BGG4V2.js} +2 -2
  14. package/lib/{chunk-RFZC5JYC.js → chunk-DSXBXRSC.js} +2 -2
  15. package/lib/{chunk-4GQKFZWS.js → chunk-HYNPEPEK.js} +2 -2
  16. package/lib/{chunk-OVKYD5BL.js → chunk-ISDMCYZJ.js} +2 -2
  17. package/lib/{chunk-2JVSMCLK.js → chunk-JIW4UTB3.js} +2 -2
  18. package/lib/{chunk-GU4TPSPR.js → chunk-KBR5XLLQ.js} +2 -2
  19. package/lib/{chunk-65MPQCTW.js → chunk-M4IWP4I2.js} +184 -184
  20. package/lib/{chunk-65MPQCTW.js.map → chunk-M4IWP4I2.js.map} +1 -1
  21. package/lib/{chunk-XA5HI7QM.js → chunk-MWNHHNKW.js} +2 -2
  22. package/lib/{chunk-L4QQFA2V.js → chunk-NM2HNEFL.js} +2 -2
  23. package/lib/{chunk-5UWWL2KX.js → chunk-Q6B5XHC2.js} +2 -2
  24. package/lib/{chunk-5UWWL2KX.js.map → chunk-Q6B5XHC2.js.map} +1 -1
  25. package/lib/{chunk-6X3RJ7PD.js → chunk-TWWTSJR3.js} +2 -2
  26. package/lib/{chunk-VZY2WFNQ.js → chunk-V55TBLKA.js} +2 -2
  27. package/lib/{chunk-KMM5CTDH.js → chunk-VYQNLOTQ.js} +2 -2
  28. package/lib/{chunk-3A663CBX.js → chunk-WG3B6X5H.js} +2 -2
  29. package/lib/{chunk-FWJ7PQT3.js → chunk-YSEOUYZV.js} +2 -2
  30. package/lib/core/index.js +1 -1
  31. package/lib/eth/builtin/eacaggregatorproxy.js +1 -1
  32. package/lib/eth/builtin/erc1155.js +1 -1
  33. package/lib/eth/builtin/erc20.js +1 -1
  34. package/lib/eth/builtin/erc721.js +1 -1
  35. package/lib/eth/builtin/index.js +1 -1
  36. package/lib/eth/builtin/weth9.js +1 -1
  37. package/lib/eth/index.js +1 -1
  38. package/lib/fuel/index.js +1 -1
  39. package/lib/index.js +1 -1
  40. package/lib/move/index.js +1 -1
  41. package/lib/solana/builtin/index.js +1 -1
  42. package/lib/solana/index.js +1 -1
  43. package/lib/stark/index.js +1 -1
  44. package/lib/store/index.js +1 -1
  45. package/lib/store/index.js.map +1 -1
  46. package/lib/sui/builtin/0x1.js +1 -1
  47. package/lib/sui/builtin/0x2.js +1 -1
  48. package/lib/sui/builtin/0x3.js +1 -1
  49. package/lib/sui/builtin/index.js +1 -1
  50. package/lib/sui/ext/index.js +1 -1
  51. package/lib/sui/index.js +1 -1
  52. package/lib/testing/index.js +144 -1
  53. package/lib/testing/index.js.map +1 -1
  54. package/lib/utils/index.js +1 -1
  55. package/package.json +2 -2
  56. /package/lib/{chunk-542NJB43.js.map → chunk-2AZ3DDYW.js.map} +0 -0
  57. /package/lib/{chunk-CXGSRLW3.js.map → chunk-2SDXZNMS.js.map} +0 -0
  58. /package/lib/{chunk-OW7PNQXI.js.map → chunk-4EPXEM2C.js.map} +0 -0
  59. /package/lib/{chunk-WL2T4PIX.js.map → chunk-4R3P3DNX.js.map} +0 -0
  60. /package/lib/{chunk-3KEEWCG3.js.map → chunk-C2Q4CM5A.js.map} +0 -0
  61. /package/lib/{chunk-M6HSLAJ4.js.map → chunk-D4BGG4V2.js.map} +0 -0
  62. /package/lib/{chunk-RFZC5JYC.js.map → chunk-DSXBXRSC.js.map} +0 -0
  63. /package/lib/{chunk-4GQKFZWS.js.map → chunk-HYNPEPEK.js.map} +0 -0
  64. /package/lib/{chunk-OVKYD5BL.js.map → chunk-ISDMCYZJ.js.map} +0 -0
  65. /package/lib/{chunk-2JVSMCLK.js.map → chunk-JIW4UTB3.js.map} +0 -0
  66. /package/lib/{chunk-GU4TPSPR.js.map → chunk-KBR5XLLQ.js.map} +0 -0
  67. /package/lib/{chunk-XA5HI7QM.js.map → chunk-MWNHHNKW.js.map} +0 -0
  68. /package/lib/{chunk-L4QQFA2V.js.map → chunk-NM2HNEFL.js.map} +0 -0
  69. /package/lib/{chunk-6X3RJ7PD.js.map → chunk-TWWTSJR3.js.map} +0 -0
  70. /package/lib/{chunk-VZY2WFNQ.js.map → chunk-V55TBLKA.js.map} +0 -0
  71. /package/lib/{chunk-KMM5CTDH.js.map → chunk-VYQNLOTQ.js.map} +0 -0
  72. /package/lib/{chunk-3A663CBX.js.map → chunk-WG3B6X5H.js.map} +0 -0
  73. /package/lib/{chunk-FWJ7PQT3.js.map → chunk-YSEOUYZV.js.map} +0 -0
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{B,F as u,U as O,V as R,W as v,e as y,f as b,i as l,o as i,t as T,w as g,x as m,y as w,z as P}from"./chunk-5UWWL2KX.js";import{a as o,e as S}from"./chunk-G5BIPHMS.js";var C=u.connect("0x0",R),x=class extends y{static{o(this,"ERC20BytesContractView")}constructor(t){super(t),this.callStatic.contract=t}async name(t,e,r){try{return await this.contract.getFunction("name()")(t||{})}catch(a){let s=new Error().stack;throw l(a,void 0,s)}}async totalSupply(t,e,r){try{return await this.contract.getFunction("totalSupply()")(t||{})}catch(a){let s=new Error().stack;throw l(a,void 0,s)}}async decimals(t,e,r){try{return await this.contract.getFunction("decimals()")(t||{})}catch(a){let s=new Error().stack;throw l(a,void 0,s)}}async balanceOf(t,e,r,a){try{return await this.contract.getFunction("balanceOf(address)")(t,e||{})}catch(s){let c=new Error().stack;throw l(s,void 0,c)}}async symbol(t,e,r){try{return await this.contract.getFunction("symbol()")(t||{})}catch(a){let s=new Error().stack;throw l(a,void 0,s)}}async allowance(t,e,r,a,s){try{return await this.contract.getFunction("allowance(address,address)")(t,e,r||{})}catch(c){let d=new Error().stack;throw l(c,void 0,d)}}callStatic={contract:this.contract,async approve(t,e,r,a,s){try{return await this.contract.getFunction("approve(address,uint256)").staticCall(t,e,r||{})}catch(c){let d=new Error().stack;throw l(c,void 0,d)}},async transferFrom(t,e,r,a,s,c){try{return await this.contract.getFunction("transferFrom(address,address,uint256)").staticCall(t,e,r,a||{})}catch(d){let F=new Error().stack;throw l(d,void 0,F)}},async transfer(t,e,r,a,s){try{return await this.contract.getFunction("transfer(address,uint256)").staticCall(t,e,r||{})}catch(c){let d=new Error().stack;throw l(c,void 0,d)}}};encodeCall={name(t){return i(t,"name","function name()",[])},approve(t,e,r){return i(r,"approve","function approve(address,uint256)",[t,e])},totalSupply(t){return i(t,"totalSupply","function totalSupply()",[])},transferFrom(t,e,r,a){return i(a,"transferFrom","function transferFrom(address,address,uint256)",[t,e,r])},decimals(t){return i(t,"decimals","function decimals()",[])},balanceOf(t,e){return i(e,"balanceOf","function balanceOf(address)",[t])},symbol(t){return i(t,"symbol","function symbol()",[])},transfer(t,e,r){return i(r,"transfer","function transfer(address,uint256)",[t,e])},allowance(t,e,r){return i(r,"allowance","function allowance(address,address)",[t,e])}}},h=class extends b{static{o(this,"ERC20BytesBoundContractView")}async name(t){return await this.view.name({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async totalSupply(t){return await this.view.totalSupply({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async decimals(t){return await this.view.decimals({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async balanceOf(t,e){return await this.view.balanceOf(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())}async symbol(t){return await this.view.symbol({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async allowance(t,e,r){return await this.view.allowance(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,this.context.getEthCallContext())}callStatic={view:this.view,context:this.context,async approve(t,e,r){return await this.view.callStatic.approve(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,this.context.getEthCallContext())},async transferFrom(t,e,r,a){return await this.view.callStatic.transferFrom(t,e,r,{blockTag:this.context.blockNumber,...a},this.context.preparedData,this.context.getEthCallContext())},async transfer(t,e,r){return await this.view.callStatic.transfer(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,this.context.getEthCallContext())}};encodeCall={view:this.view,context:this.context,name(t){return this.view.encodeCall.name({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},approve(t,e,r){return this.view.encodeCall.approve(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(r)})},totalSupply(t){return this.view.encodeCall.totalSupply({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},transferFrom(t,e,r,a){return this.view.encodeCall.transferFrom(t,e,r,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(a)})},decimals(t){return this.view.encodeCall.decimals({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},balanceOf(t,e){return this.view.encodeCall.balanceOf(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},symbol(t){return this.view.encodeCall.symbol({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},transfer(t,e,r){return this.view.encodeCall.transfer(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(r)})},allowance(t,e,r){return this.view.encodeCall.allowance(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(r)})}}},E=class n extends T{static{o(this,"ERC20BytesProcessor")}onEventApproval(t,e,r,a){return e||(e=C.filters["Approval(address,address,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onEventTransfer(t,e,r,a){return e||(e=C.filters["Transfer(address,address,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onCallName(t,e,r){return super.onEthTrace("0x06fdde03",t,e,r)}onCallApprove(t,e,r){return super.onEthTrace("0x095ea7b3",t,e,r)}onCallTotalSupply(t,e,r){return super.onEthTrace("0x18160ddd",t,e,r)}onCallTransferFrom(t,e,r){return super.onEthTrace("0x23b872dd",t,e,r)}onCallDecimals(t,e,r){return super.onEthTrace("0x313ce567",t,e,r)}onCallBalanceOf(t,e,r){return super.onEthTrace("0x70a08231",t,e,r)}onCallSymbol(t,e,r){return super.onEthTrace("0x95d89b41",t,e,r)}onCallTransfer(t,e,r){return super.onEthTrace("0xa9059cbb",t,e,r)}onCallAllowance(t,e,r){return super.onEthTrace("0xdd62ed3e",t,e,r)}static filters={Approval(t,e,r){return C.filters["Approval(address,address,uint256)"](t,e,r)},Transfer(t,e,r){return C.filters["Transfer(address,address,uint256)"](t,e,r)}};CreateBoundContractView(){let t=p(this.config.network,this.config.address);return new h(this.config.address,t)}static bind(t){t.name||(t.name="ERC20Bytes");let e=g(t);return e||(e=new n(t),m(t,e)),e}},f=class extends B{static{o(this,"ERC20BytesProcessorTemplate")}bindInternal(t){t.name||(t.name="ERC20Bytes");let e=g(t);return e||(e=new E(t),m(t,e)),e}onEventApproval(t,e,r,a){return e||(e=C.filters["Approval(address,address,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onEventTransfer(t,e,r,a){return e||(e=C.filters["Transfer(address,address,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}};function p(n,t){let e=w("ERC20Bytes",t,n);if(!e){let r=u.connect(t,O(n));e=new x(r),P("ERC20Bytes",t,n,e)}return e}o(p,"getERC20BytesContract");function A(n,t){let e=p(n.getChainId(),t),r=new h(t,e);return r.context=n,r.callStatic&&(r.callStatic.context=n),r}o(A,"getERC20BytesContractOnContext");import("node:process").then(n=>n.stdout.write(""));var N={};S(N,{ERC20BytesBoundContractView:()=>h,ERC20BytesContractView:()=>x,ERC20BytesProcessor:()=>E,ERC20BytesProcessorTemplate:()=>f,ERC20Bytes__factory:()=>u,getERC20BytesContract:()=>p,getERC20BytesContractOnContext:()=>A,mockApprovalLog:()=>D,mockTransferLog:()=>I});var k={blockHash:"0x0000000000000000000000000000000000000000000000000000000000000000",blockNumber:0,logIndex:0,removed:!1,transactionHash:"0x0000000000000000000000000000000000000000000000000000000000000000",transactionIndex:0};function D(n,t){let r=p(v.EthChainId.ETHEREUM,n).rawContract.interface.encodeEventLog("Approval(address,address,uint256)",[t.owner,t.spender,t.value]);return{...k,index:0,address:n,data:r.data,topics:r.topics}}o(D,"mockApprovalLog");function I(n,t){let r=p(v.EthChainId.ETHEREUM,n).rawContract.interface.encodeEventLog("Transfer(address,address,uint256)",[t.from,t.to,t.value]);return{...k,index:0,address:n,data:r.data,topics:r.topics}}o(I,"mockTransferLog");import("node:process").then(n=>n.stdout.write(""));import("node:process").then(n=>n.stdout.write(""));import("node:process").then(n=>n.stdout.write(""));export{E as a,f as b,p as c,N as d};
3
- //# sourceMappingURL=chunk-OW7PNQXI.js.map
2
+ import{B,F as u,U as O,V as R,W as v,e as y,f as b,i as l,o as i,t as T,w as g,x as m,y as w,z as P}from"./chunk-Q6B5XHC2.js";import{a as o,e as S}from"./chunk-G5BIPHMS.js";var C=u.connect("0x0",R),x=class extends y{static{o(this,"ERC20BytesContractView")}constructor(t){super(t),this.callStatic.contract=t}async name(t,e,r){try{return await this.contract.getFunction("name()")(t||{})}catch(a){let s=new Error().stack;throw l(a,void 0,s)}}async totalSupply(t,e,r){try{return await this.contract.getFunction("totalSupply()")(t||{})}catch(a){let s=new Error().stack;throw l(a,void 0,s)}}async decimals(t,e,r){try{return await this.contract.getFunction("decimals()")(t||{})}catch(a){let s=new Error().stack;throw l(a,void 0,s)}}async balanceOf(t,e,r,a){try{return await this.contract.getFunction("balanceOf(address)")(t,e||{})}catch(s){let c=new Error().stack;throw l(s,void 0,c)}}async symbol(t,e,r){try{return await this.contract.getFunction("symbol()")(t||{})}catch(a){let s=new Error().stack;throw l(a,void 0,s)}}async allowance(t,e,r,a,s){try{return await this.contract.getFunction("allowance(address,address)")(t,e,r||{})}catch(c){let d=new Error().stack;throw l(c,void 0,d)}}callStatic={contract:this.contract,async approve(t,e,r,a,s){try{return await this.contract.getFunction("approve(address,uint256)").staticCall(t,e,r||{})}catch(c){let d=new Error().stack;throw l(c,void 0,d)}},async transferFrom(t,e,r,a,s,c){try{return await this.contract.getFunction("transferFrom(address,address,uint256)").staticCall(t,e,r,a||{})}catch(d){let F=new Error().stack;throw l(d,void 0,F)}},async transfer(t,e,r,a,s){try{return await this.contract.getFunction("transfer(address,uint256)").staticCall(t,e,r||{})}catch(c){let d=new Error().stack;throw l(c,void 0,d)}}};encodeCall={name(t){return i(t,"name","function name()",[])},approve(t,e,r){return i(r,"approve","function approve(address,uint256)",[t,e])},totalSupply(t){return i(t,"totalSupply","function totalSupply()",[])},transferFrom(t,e,r,a){return i(a,"transferFrom","function transferFrom(address,address,uint256)",[t,e,r])},decimals(t){return i(t,"decimals","function decimals()",[])},balanceOf(t,e){return i(e,"balanceOf","function balanceOf(address)",[t])},symbol(t){return i(t,"symbol","function symbol()",[])},transfer(t,e,r){return i(r,"transfer","function transfer(address,uint256)",[t,e])},allowance(t,e,r){return i(r,"allowance","function allowance(address,address)",[t,e])}}},h=class extends b{static{o(this,"ERC20BytesBoundContractView")}async name(t){return await this.view.name({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async totalSupply(t){return await this.view.totalSupply({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async decimals(t){return await this.view.decimals({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async balanceOf(t,e){return await this.view.balanceOf(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())}async symbol(t){return await this.view.symbol({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async allowance(t,e,r){return await this.view.allowance(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,this.context.getEthCallContext())}callStatic={view:this.view,context:this.context,async approve(t,e,r){return await this.view.callStatic.approve(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,this.context.getEthCallContext())},async transferFrom(t,e,r,a){return await this.view.callStatic.transferFrom(t,e,r,{blockTag:this.context.blockNumber,...a},this.context.preparedData,this.context.getEthCallContext())},async transfer(t,e,r){return await this.view.callStatic.transfer(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,this.context.getEthCallContext())}};encodeCall={view:this.view,context:this.context,name(t){return this.view.encodeCall.name({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},approve(t,e,r){return this.view.encodeCall.approve(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(r)})},totalSupply(t){return this.view.encodeCall.totalSupply({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},transferFrom(t,e,r,a){return this.view.encodeCall.transferFrom(t,e,r,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(a)})},decimals(t){return this.view.encodeCall.decimals({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},balanceOf(t,e){return this.view.encodeCall.balanceOf(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},symbol(t){return this.view.encodeCall.symbol({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},transfer(t,e,r){return this.view.encodeCall.transfer(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(r)})},allowance(t,e,r){return this.view.encodeCall.allowance(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(r)})}}},E=class n extends T{static{o(this,"ERC20BytesProcessor")}onEventApproval(t,e,r,a){return e||(e=C.filters["Approval(address,address,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onEventTransfer(t,e,r,a){return e||(e=C.filters["Transfer(address,address,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onCallName(t,e,r){return super.onEthTrace("0x06fdde03",t,e,r)}onCallApprove(t,e,r){return super.onEthTrace("0x095ea7b3",t,e,r)}onCallTotalSupply(t,e,r){return super.onEthTrace("0x18160ddd",t,e,r)}onCallTransferFrom(t,e,r){return super.onEthTrace("0x23b872dd",t,e,r)}onCallDecimals(t,e,r){return super.onEthTrace("0x313ce567",t,e,r)}onCallBalanceOf(t,e,r){return super.onEthTrace("0x70a08231",t,e,r)}onCallSymbol(t,e,r){return super.onEthTrace("0x95d89b41",t,e,r)}onCallTransfer(t,e,r){return super.onEthTrace("0xa9059cbb",t,e,r)}onCallAllowance(t,e,r){return super.onEthTrace("0xdd62ed3e",t,e,r)}static filters={Approval(t,e,r){return C.filters["Approval(address,address,uint256)"](t,e,r)},Transfer(t,e,r){return C.filters["Transfer(address,address,uint256)"](t,e,r)}};CreateBoundContractView(){let t=p(this.config.network,this.config.address);return new h(this.config.address,t)}static bind(t){t.name||(t.name="ERC20Bytes");let e=g(t);return e||(e=new n(t),m(t,e)),e}},f=class extends B{static{o(this,"ERC20BytesProcessorTemplate")}bindInternal(t){t.name||(t.name="ERC20Bytes");let e=g(t);return e||(e=new E(t),m(t,e)),e}onEventApproval(t,e,r,a){return e||(e=C.filters["Approval(address,address,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onEventTransfer(t,e,r,a){return e||(e=C.filters["Transfer(address,address,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}};function p(n,t){let e=w("ERC20Bytes",t,n);if(!e){let r=u.connect(t,O(n));e=new x(r),P("ERC20Bytes",t,n,e)}return e}o(p,"getERC20BytesContract");function A(n,t){let e=p(n.getChainId(),t),r=new h(t,e);return r.context=n,r.callStatic&&(r.callStatic.context=n),r}o(A,"getERC20BytesContractOnContext");import("node:process").then(n=>n.stdout.write(""));var N={};S(N,{ERC20BytesBoundContractView:()=>h,ERC20BytesContractView:()=>x,ERC20BytesProcessor:()=>E,ERC20BytesProcessorTemplate:()=>f,ERC20Bytes__factory:()=>u,getERC20BytesContract:()=>p,getERC20BytesContractOnContext:()=>A,mockApprovalLog:()=>D,mockTransferLog:()=>I});var k={blockHash:"0x0000000000000000000000000000000000000000000000000000000000000000",blockNumber:0,logIndex:0,removed:!1,transactionHash:"0x0000000000000000000000000000000000000000000000000000000000000000",transactionIndex:0};function D(n,t){let r=p(v.EthChainId.ETHEREUM,n).rawContract.interface.encodeEventLog("Approval(address,address,uint256)",[t.owner,t.spender,t.value]);return{...k,index:0,address:n,data:r.data,topics:r.topics}}o(D,"mockApprovalLog");function I(n,t){let r=p(v.EthChainId.ETHEREUM,n).rawContract.interface.encodeEventLog("Transfer(address,address,uint256)",[t.from,t.to,t.value]);return{...k,index:0,address:n,data:r.data,topics:r.topics}}o(I,"mockTransferLog");import("node:process").then(n=>n.stdout.write(""));import("node:process").then(n=>n.stdout.write(""));import("node:process").then(n=>n.stdout.write(""));export{E as a,f as b,p as c,N as d};
3
+ //# sourceMappingURL=chunk-4EPXEM2C.js.map
@@ -1,5 +1,5 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{b as Il}from"./chunk-FMZDKD72.js";import{c as Sr,d as Nm,e as kl,g as Cm}from"./chunk-2JVSMCLK.js";import{a as Al}from"./chunk-IVMOWPFA.js";import{B as ia,Kc as Rl,Mc as Im,Nc as vm,Oc as Gs,Pd as Sl,Sb as Er,U as wl,Yc as Ys,Zc as Tm,ed as El,lc as aa,mc as Am,sc as ca,tc as km,td as Om}from"./chunk-65MPQCTW.js";import{a,b as ae,c as Pe,d as ce,e as Cn,f as le,g as xn}from"./chunk-G5BIPHMS.js";var Pl=ce((la,Ll)=>{"use strict";var Js=ae("buffer"),Ot=Js.Buffer;function xl(n,e){for(var t in n)e[t]=n[t]}a(xl,"copyProps");Ot.from&&Ot.alloc&&Ot.allocUnsafe&&Ot.allocUnsafeSlow?Ll.exports=Js:(xl(Js,la),la.Buffer=Ar);function Ar(n,e,t){return Ot(n,e,t)}a(Ar,"SafeBuffer");Ar.prototype=Object.create(Ot.prototype);xl(Ot,Ar);Ar.from=function(n,e,t){if(typeof n=="number")throw new TypeError("Argument must not be a number");return Ot(n,e,t)};Ar.alloc=function(n,e,t){if(typeof n!="number")throw new TypeError("Argument must be a number");var r=Ot(n);return e!==void 0?typeof t=="string"?r.fill(e,t):r.fill(e):r.fill(0),r};Ar.allocUnsafe=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return Ot(n)};Ar.allocUnsafeSlow=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return Js.SlowBuffer(n)}});var Ul=ce((tE,Bl)=>{"use strict";var Zs=Pl().Buffer;function Dm(n){if(n.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),t=0;t<e.length;t++)e[t]=255;for(var r=0;r<n.length;r++){var o=n.charAt(r),s=o.charCodeAt(0);if(e[s]!==255)throw new TypeError(o+" is ambiguous");e[s]=r}var i=n.length,u=n.charAt(0),f=Math.log(i)/Math.log(256),y=Math.log(256)/Math.log(i);function d(R){if((Array.isArray(R)||R instanceof Uint8Array)&&(R=Zs.from(R)),!Zs.isBuffer(R))throw new TypeError("Expected Buffer");if(R.length===0)return"";for(var S=0,A=0,C=0,x=R.length;C!==x&&R[C]===0;)C++,S++;for(var w=(x-C)*y+1>>>0,L=new Uint8Array(w);C!==x;){for(var z=R[C],Y=0,ne=w-1;(z!==0||Y<A)&&ne!==-1;ne--,Y++)z+=256*L[ne]>>>0,L[ne]=z%i>>>0,z=z/i>>>0;if(z!==0)throw new Error("Non-zero carry");A=Y,C++}for(var re=w-A;re!==w&&L[re]===0;)re++;for(var Se=u.repeat(S);re<w;++re)Se+=n.charAt(L[re]);return Se}a(d,"encode");function _(R){if(typeof R!="string")throw new TypeError("Expected String");if(R.length===0)return Zs.alloc(0);for(var S=0,A=0,C=0;R[S]===u;)A++,S++;for(var x=(R.length-S)*f+1>>>0,w=new Uint8Array(x);R[S];){var L=e[R.charCodeAt(S)];if(L===255)return;for(var z=0,Y=x-1;(L!==0||z<C)&&Y!==-1;Y--,z++)L+=i*w[Y]>>>0,w[Y]=L%256>>>0,L=L/256>>>0;if(L!==0)throw new Error("Non-zero carry");C=z,S++}for(var ne=x-C;ne!==x&&w[ne]===0;)ne++;var re=Zs.allocUnsafe(A+(x-ne));re.fill(0,0,A);for(var Se=A;ne!==x;)re[Se++]=w[ne++];return re}a(_,"decodeUnsafe");function E(R){var S=_(R);if(S)return S;throw new Error("Non-base"+i+" character")}return a(E,"decode"),{encode:d,decodeUnsafe:_,decode:E}}a(Dm,"base");Bl.exports=Dm});var Gr=ce((nE,Dl)=>{"use strict";var Mm=Ul(),$m="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";Dl.exports=Mm($m)});var Ml=ce(ha=>{"use strict";function Ft(n,e,t){return e<=n&&n<=t}a(Ft,"inRange");function no(n){if(n===void 0)return{};if(n===Object(n))return n;throw TypeError("Could not convert argument to dictionary")}a(no,"ToDictionary");function Hm(n){for(var e=String(n),t=e.length,r=0,o=[];r<t;){var s=e.charCodeAt(r);if(s<55296||s>57343)o.push(s);else if(56320<=s&&s<=57343)o.push(65533);else if(55296<=s&&s<=56319)if(r===t-1)o.push(65533);else{var i=n.charCodeAt(r+1);if(56320<=i&&i<=57343){var u=s&1023,f=i&1023;o.push(65536+(u<<10)+f),r+=1}else o.push(65533)}r+=1}return o}a(Hm,"stringToCodePoints");function zm(n){for(var e="",t=0;t<n.length;++t){var r=n[t];r<=65535?e+=String.fromCharCode(r):(r-=65536,e+=String.fromCharCode((r>>10)+55296,(r&1023)+56320))}return e}a(zm,"codePointsToString");var Qs=-1;function da(n){this.tokens=[].slice.call(n)}a(da,"Stream");da.prototype={endOfStream:a(function(){return!this.tokens.length},"endOfStream"),read:a(function(){return this.tokens.length?this.tokens.shift():Qs},"read"),prepend:a(function(n){if(Array.isArray(n))for(var e=n;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(n)},"prepend"),push:a(function(n){if(Array.isArray(n))for(var e=n;e.length;)this.tokens.push(e.shift());else this.tokens.push(n)},"push")};var Yr=-1;function fa(n,e){if(n)throw TypeError("Decoder error");return e||65533}a(fa,"decoderError");var eo="utf-8";function to(n,e){if(!(this instanceof to))return new to(n,e);if(n=n!==void 0?String(n).toLowerCase():eo,n!==eo)throw new Error("Encoding not supported. Only utf-8 is supported");e=no(e),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!e.fatal,this._ignoreBOM=!!e.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}a(to,"TextDecoder");to.prototype={decode:a(function(e,t){var r;typeof e=="object"&&e instanceof ArrayBuffer?r=new Uint8Array(e):typeof e=="object"&&"buffer"in e&&e.buffer instanceof ArrayBuffer?r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):r=new Uint8Array(0),t=no(t),this._streaming||(this._decoder=new Fm({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!t.stream;for(var o=new da(r),s=[],i;!o.endOfStream()&&(i=this._decoder.handler(o,o.read()),i!==Yr);)i!==null&&(Array.isArray(i)?s.push.apply(s,i):s.push(i));if(!this._streaming){do{if(i=this._decoder.handler(o,o.read()),i===Yr)break;i!==null&&(Array.isArray(i)?s.push.apply(s,i):s.push(i))}while(!o.endOfStream());this._decoder=null}return s.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(s[0]===65279?(this._BOMseen=!0,s.shift()):this._BOMseen=!0),zm(s)},"decode")};function ro(n,e){if(!(this instanceof ro))return new ro(n,e);if(n=n!==void 0?String(n).toLowerCase():eo,n!==eo)throw new Error("Encoding not supported. Only utf-8 is supported");e=no(e),this._streaming=!1,this._encoder=null,this._options={fatal:!!e.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}a(ro,"TextEncoder");ro.prototype={encode:a(function(e,t){e=e?String(e):"",t=no(t),this._streaming||(this._encoder=new Wm(this._options)),this._streaming=!!t.stream;for(var r=[],o=new da(Hm(e)),s;!o.endOfStream()&&(s=this._encoder.handler(o,o.read()),s!==Yr);)Array.isArray(s)?r.push.apply(r,s):r.push(s);if(!this._streaming){for(;s=this._encoder.handler(o,o.read()),s!==Yr;)Array.isArray(s)?r.push.apply(r,s):r.push(s);this._encoder=null}return new Uint8Array(r)},"encode")};function Fm(n){var e=n.fatal,t=0,r=0,o=0,s=128,i=191;this.handler=function(u,f){if(f===Qs&&o!==0)return o=0,fa(e);if(f===Qs)return Yr;if(o===0){if(Ft(f,0,127))return f;if(Ft(f,194,223))o=1,t=f-192;else if(Ft(f,224,239))f===224&&(s=160),f===237&&(i=159),o=2,t=f-224;else if(Ft(f,240,244))f===240&&(s=144),f===244&&(i=143),o=3,t=f-240;else return fa(e);return t=t<<6*o,null}if(!Ft(f,s,i))return t=o=r=0,s=128,i=191,u.prepend(f),fa(e);if(s=128,i=191,r+=1,t+=f-128<<6*(o-r),r!==o)return null;var y=t;return t=o=r=0,y}}a(Fm,"UTF8Decoder");function Wm(n){var e=n.fatal;this.handler=function(t,r){if(r===Qs)return Yr;if(Ft(r,0,127))return r;var o,s;Ft(r,128,2047)?(o=1,s=192):Ft(r,2048,65535)?(o=2,s=224):Ft(r,65536,1114111)&&(o=3,s=240);for(var i=[(r>>6*o)+s];o>0;){var u=r>>6*(o-1);i.push(128|u&63),o-=1}return i}}a(Wm,"UTF8Encoder");ha.TextEncoder=ro;ha.TextDecoder=to});var Wl=ce(Ee=>{"use strict";var Km=Ee&&Ee.__createBinding||(Object.create?function(n,e,t,r){r===void 0&&(r=t),Object.defineProperty(n,r,{enumerable:!0,get:a(function(){return e[t]},"get")})}:function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]}),qm=Ee&&Ee.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),Nt=Ee&&Ee.__decorate||function(n,e,t,r){var o=arguments.length,s=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var u=n.length-1;u>=0;u--)(i=n[u])&&(s=(o<3?i(s):o>3?i(e,t,s):i(e,t))||s);return o>3&&s&&Object.defineProperty(e,t,s),s},jm=Ee&&Ee.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)t!=="default"&&Object.hasOwnProperty.call(n,t)&&Km(e,n,t);return qm(e,n),e},$l=Ee&&Ee.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ee,"__esModule",{value:!0});Ee.deserializeUnchecked=Ee.deserialize=Ee.serialize=Ee.BinaryReader=Ee.BinaryWriter=Ee.BorshError=Ee.baseDecode=Ee.baseEncode=void 0;var nr=$l(Er()),Hl=$l(Gr()),Vm=jm(Ml()),Gm=typeof TextDecoder!="function"?Vm.TextDecoder:TextDecoder,Ym=new Gm("utf-8",{fatal:!0});function Xm(n){return typeof n=="string"&&(n=Buffer.from(n,"utf8")),Hl.default.encode(Buffer.from(n))}a(Xm,"baseEncode");Ee.baseEncode=Xm;function Jm(n){return Buffer.from(Hl.default.decode(n))}a(Jm,"baseDecode");Ee.baseDecode=Jm;var pa=1024,Ke=class extends Error{static{a(this,"BorshError")}constructor(e){super(e),this.fieldPath=[],this.originalMessage=e}addToFieldPath(e){this.fieldPath.splice(0,0,e),this.message=this.originalMessage+": "+this.fieldPath.join(".")}};Ee.BorshError=Ke;var so=class{static{a(this,"BinaryWriter")}constructor(){this.buf=Buffer.alloc(pa),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(pa)]))}writeU8(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}writeU16(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}writeU32(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}writeU64(e){this.maybeResize(),this.writeBuffer(Buffer.from(new nr.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(Buffer.from(new nr.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(Buffer.from(new nr.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(Buffer.from(new nr.default(e).toArray("le",64)))}writeBuffer(e){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),e,Buffer.alloc(pa)]),this.length+=e.length}writeString(e){this.maybeResize();let t=Buffer.from(e,"utf8");this.writeU32(t.length),this.writeBuffer(t)}writeFixedArray(e){this.writeBuffer(Buffer.from(e))}writeArray(e,t){this.maybeResize(),this.writeU32(e.length);for(let r of e)this.maybeResize(),t(r)}toArray(){return this.buf.subarray(0,this.length)}};Ee.BinaryWriter=so;function Ct(n,e,t){let r=t.value;t.value=function(...o){try{return r.apply(this,o)}catch(s){if(s instanceof RangeError){let i=s.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(i)>=0)throw new Ke("Reached the end of buffer when deserializing")}throw s}}}a(Ct,"handlingRangeError");var Qe=class{static{a(this,"BinaryReader")}constructor(e){this.buf=e,this.offset=0}readU8(){let e=this.buf.readUInt8(this.offset);return this.offset+=1,e}readU16(){let e=this.buf.readUInt16LE(this.offset);return this.offset+=2,e}readU32(){let e=this.buf.readUInt32LE(this.offset);return this.offset+=4,e}readU64(){let e=this.readBuffer(8);return new nr.default(e,"le")}readU128(){let e=this.readBuffer(16);return new nr.default(e,"le")}readU256(){let e=this.readBuffer(32);return new nr.default(e,"le")}readU512(){let e=this.readBuffer(64);return new nr.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new Ke(`Expected buffer length ${e} isn't within bounds`);let t=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,t}readString(){let e=this.readU32(),t=this.readBuffer(e);try{return Ym.decode(t)}catch(r){throw new Ke(`Error decoding UTF-8 string: ${r}`)}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){let t=this.readU32(),r=Array();for(let o=0;o<t;++o)r.push(e());return r}};Nt([Ct],Qe.prototype,"readU8",null);Nt([Ct],Qe.prototype,"readU16",null);Nt([Ct],Qe.prototype,"readU32",null);Nt([Ct],Qe.prototype,"readU64",null);Nt([Ct],Qe.prototype,"readU128",null);Nt([Ct],Qe.prototype,"readU256",null);Nt([Ct],Qe.prototype,"readU512",null);Nt([Ct],Qe.prototype,"readString",null);Nt([Ct],Qe.prototype,"readFixedArray",null);Nt([Ct],Qe.prototype,"readArray",null);Ee.BinaryReader=Qe;function zl(n){return n.charAt(0).toUpperCase()+n.slice(1)}a(zl,"capitalizeFirstLetter");function kr(n,e,t,r,o){try{if(typeof r=="string")o[`write${zl(r)}`](t);else if(r instanceof Array)if(typeof r[0]=="number"){if(t.length!==r[0])throw new Ke(`Expecting byte array of length ${r[0]}, but got ${t.length} bytes`);o.writeFixedArray(t)}else if(r.length===2&&typeof r[1]=="number"){if(t.length!==r[1])throw new Ke(`Expecting byte array of length ${r[1]}, but got ${t.length} bytes`);for(let s=0;s<r[1];s++)kr(n,null,t[s],r[0],o)}else o.writeArray(t,s=>{kr(n,e,s,r[0],o)});else if(r.kind!==void 0)switch(r.kind){case"option":{t==null?o.writeU8(0):(o.writeU8(1),kr(n,e,t,r.type,o));break}case"map":{o.writeU32(t.size),t.forEach((s,i)=>{kr(n,e,i,r.key,o),kr(n,e,s,r.value,o)});break}default:throw new Ke(`FieldType ${r} unrecognized`)}else Fl(n,t,o)}catch(s){throw s instanceof Ke&&s.addToFieldPath(e),s}}a(kr,"serializeField");function Fl(n,e,t){if(typeof e.borshSerialize=="function"){e.borshSerialize(t);return}let r=n.get(e.constructor);if(!r)throw new Ke(`Class ${e.constructor.name} is missing in schema`);if(r.kind==="struct")r.fields.map(([o,s])=>{kr(n,o,e[o],s,t)});else if(r.kind==="enum"){let o=e[r.field];for(let s=0;s<r.values.length;++s){let[i,u]=r.values[s];if(i===o){t.writeU8(s),kr(n,i,e[i],u,t);break}}}else throw new Ke(`Unexpected schema kind: ${r.kind} for ${e.constructor.name}`)}a(Fl,"serializeStruct");function Zm(n,e,t=so){let r=new t;return Fl(n,e,r),r.toArray()}a(Zm,"serialize");Ee.serialize=Zm;function Ir(n,e,t,r){try{if(typeof t=="string")return r[`read${zl(t)}`]();if(t instanceof Array){if(typeof t[0]=="number")return r.readFixedArray(t[0]);if(typeof t[1]=="number"){let o=[];for(let s=0;s<t[1];s++)o.push(Ir(n,null,t[0],r));return o}else return r.readArray(()=>Ir(n,e,t[0],r))}if(t.kind==="option")return r.readU8()?Ir(n,e,t.type,r):void 0;if(t.kind==="map"){let o=new Map,s=r.readU32();for(let i=0;i<s;i++){let u=Ir(n,e,t.key,r),f=Ir(n,e,t.value,r);o.set(u,f)}return o}return ya(n,t,r)}catch(o){throw o instanceof Ke&&o.addToFieldPath(e),o}}a(Ir,"deserializeField");function ya(n,e,t){if(typeof e.borshDeserialize=="function")return e.borshDeserialize(t);let r=n.get(e);if(!r)throw new Ke(`Class ${e.name} is missing in schema`);if(r.kind==="struct"){let o={};for(let[s,i]of n.get(e).fields)o[s]=Ir(n,s,i,t);return new e(o)}if(r.kind==="enum"){let o=t.readU8();if(o>=r.values.length)throw new Ke(`Enum index: ${o} is out of range`);let[s,i]=r.values[o],u=Ir(n,s,i,t);return new e({[s]:u})}throw new Ke(`Unexpected schema kind: ${r.kind} for ${e.constructor.name}`)}a(ya,"deserializeStruct");function Qm(n,e,t,r=Qe){let o=new r(t),s=ya(n,e,o);if(o.offset<t.length)throw new Ke(`Unexpected ${t.length-o.offset} bytes after deserialized data`);return s}a(Qm,"deserialize");Ee.deserialize=Qm;function eg(n,e,t,r=Qe){let o=new r(t);return ya(n,e,o)}a(eg,"deserializeUnchecked");Ee.deserializeUnchecked=eg});var ba=ce(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.s16=O.s8=O.nu64be=O.u48be=O.u40be=O.u32be=O.u24be=O.u16be=O.nu64=O.u48=O.u40=O.u32=O.u24=O.u16=O.u8=O.offset=O.greedy=O.Constant=O.UTF8=O.CString=O.Blob=O.Boolean=O.BitField=O.BitStructure=O.VariantLayout=O.Union=O.UnionLayoutDiscriminator=O.UnionDiscriminator=O.Structure=O.Sequence=O.DoubleBE=O.Double=O.FloatBE=O.Float=O.NearInt64BE=O.NearInt64=O.NearUInt64BE=O.NearUInt64=O.IntBE=O.Int=O.UIntBE=O.UInt=O.OffsetLayout=O.GreedyCount=O.ExternalLayout=O.bindConstructorLayout=O.nameWithProperty=O.Layout=O.uint8ArrayToBuffer=O.checkUint8Array=void 0;O.constant=O.utf8=O.cstr=O.blob=O.unionLayoutDiscriminator=O.union=O.seq=O.bits=O.struct=O.f64be=O.f64=O.f32be=O.f32=O.ns64be=O.s48be=O.s40be=O.s32be=O.s24be=O.s16be=O.ns64=O.s48=O.s40=O.s32=O.s24=void 0;var ga=ae("buffer");function Zr(n){if(!(n instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}a(Zr,"checkUint8Array");O.checkUint8Array=Zr;function pe(n){return Zr(n),ga.Buffer.from(n.buffer,n.byteOffset,n.length)}a(pe,"uint8ArrayToBuffer");O.uint8ArrayToBuffer=pe;var ge=class{static{a(this,"Layout")}constructor(e,t){if(!Number.isInteger(e))throw new TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}getSpan(e,t){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(e){let t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}};O.Layout=ge;function _a(n,e){return e.property?n+"["+e.property+"]":n}a(_a,"nameWithProperty");O.nameWithProperty=_a;function tg(n,e){if(typeof n!="function")throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(n,"layout_"))throw new Error("Class is already bound to a layout");if(!(e&&e instanceof ge))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(e,"boundConstructor_"))throw new Error("layout is already bound to a constructor");n.layout_=e,e.boundConstructor_=n,e.makeDestinationObject=()=>new n,Object.defineProperty(n.prototype,"encode",{value(t,r){return e.encode(this,t,r)},writable:!0}),Object.defineProperty(n,"decode",{value(t,r){return e.decode(t,r)},writable:!0})}a(tg,"bindConstructorLayout");O.bindConstructorLayout=tg;var Ve=class extends ge{static{a(this,"ExternalLayout")}isCount(){throw new Error("ExternalLayout is abstract")}};O.ExternalLayout=Ve;var oo=class extends Ve{static{a(this,"GreedyCount")}constructor(e=1,t){if(!Number.isInteger(e)||0>=e)throw new TypeError("elementSpan must be a (positive) integer");super(-1,t),this.elementSpan=e}isCount(){return!0}decode(e,t=0){Zr(e);let r=e.length-t;return Math.floor(r/this.elementSpan)}encode(e,t,r){return 0}};O.GreedyCount=oo;var Ln=class extends Ve{static{a(this,"OffsetLayout")}constructor(e,t=0,r){if(!(e instanceof ge))throw new TypeError("layout must be a Layout");if(!Number.isInteger(t))throw new TypeError("offset must be integer or undefined");super(e.span,r||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof tt||this.layout instanceof ct}decode(e,t=0){return this.layout.decode(e,t+this.offset)}encode(e,t,r=0){return this.layout.encode(e,t,r+this.offset)}};O.OffsetLayout=Ln;var tt=class extends ge{static{a(this,"UInt")}constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return pe(e).readUIntLE(t,this.span)}encode(e,t,r=0){return pe(t).writeUIntLE(e,r,this.span),this.span}};O.UInt=tt;var ct=class extends ge{static{a(this,"UIntBE")}constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return pe(e).readUIntBE(t,this.span)}encode(e,t,r=0){return pe(t).writeUIntBE(e,r,this.span),this.span}};O.UIntBE=ct;var Wt=class extends ge{static{a(this,"Int")}constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return pe(e).readIntLE(t,this.span)}encode(e,t,r=0){return pe(t).writeIntLE(e,r,this.span),this.span}};O.Int=Wt;var sr=class extends ge{static{a(this,"IntBE")}constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return pe(e).readIntBE(t,this.span)}encode(e,t,r=0){return pe(t).writeIntBE(e,r,this.span),this.span}};O.IntBE=sr;var ma=Math.pow(2,32);function So(n){let e=Math.floor(n/ma),t=n-e*ma;return{hi32:e,lo32:t}}a(So,"divmodInt64");function Ao(n,e){return n*ma+e}a(Ao,"roundedInt64");var io=class extends ge{static{a(this,"NearUInt64")}constructor(e){super(8,e)}decode(e,t=0){let r=pe(e),o=r.readUInt32LE(t),s=r.readUInt32LE(t+4);return Ao(s,o)}encode(e,t,r=0){let o=So(e),s=pe(t);return s.writeUInt32LE(o.lo32,r),s.writeUInt32LE(o.hi32,r+4),8}};O.NearUInt64=io;var ao=class extends ge{static{a(this,"NearUInt64BE")}constructor(e){super(8,e)}decode(e,t=0){let r=pe(e),o=r.readUInt32BE(t),s=r.readUInt32BE(t+4);return Ao(o,s)}encode(e,t,r=0){let o=So(e),s=pe(t);return s.writeUInt32BE(o.hi32,r),s.writeUInt32BE(o.lo32,r+4),8}};O.NearUInt64BE=ao;var co=class extends ge{static{a(this,"NearInt64")}constructor(e){super(8,e)}decode(e,t=0){let r=pe(e),o=r.readUInt32LE(t),s=r.readInt32LE(t+4);return Ao(s,o)}encode(e,t,r=0){let o=So(e),s=pe(t);return s.writeUInt32LE(o.lo32,r),s.writeInt32LE(o.hi32,r+4),8}};O.NearInt64=co;var uo=class extends ge{static{a(this,"NearInt64BE")}constructor(e){super(8,e)}decode(e,t=0){let r=pe(e),o=r.readInt32BE(t),s=r.readUInt32BE(t+4);return Ao(o,s)}encode(e,t,r=0){let o=So(e),s=pe(t);return s.writeInt32BE(o.hi32,r),s.writeUInt32BE(o.lo32,r+4),8}};O.NearInt64BE=uo;var lo=class extends ge{static{a(this,"Float")}constructor(e){super(4,e)}decode(e,t=0){return pe(e).readFloatLE(t)}encode(e,t,r=0){return pe(t).writeFloatLE(e,r),4}};O.Float=lo;var fo=class extends ge{static{a(this,"FloatBE")}constructor(e){super(4,e)}decode(e,t=0){return pe(e).readFloatBE(t)}encode(e,t,r=0){return pe(t).writeFloatBE(e,r),4}};O.FloatBE=fo;var ho=class extends ge{static{a(this,"Double")}constructor(e){super(8,e)}decode(e,t=0){return pe(e).readDoubleLE(t)}encode(e,t,r=0){return pe(t).writeDoubleLE(e,r),8}};O.Double=ho;var po=class extends ge{static{a(this,"DoubleBE")}constructor(e){super(8,e)}decode(e,t=0){return pe(e).readDoubleBE(t)}encode(e,t,r=0){return pe(t).writeDoubleBE(e,r),8}};O.DoubleBE=po;var yo=class extends ge{static{a(this,"Sequence")}constructor(e,t,r){if(!(e instanceof ge))throw new TypeError("elementLayout must be a Layout");if(!(t instanceof Ve&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let o=-1;!(t instanceof Ve)&&0<e.span&&(o=t*e.span),super(o,r),this.elementLayout=e,this.count=t}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0,o=this.count;if(o instanceof Ve&&(o=o.decode(e,t)),0<this.elementLayout.span)r=o*this.elementLayout.span;else{let s=0;for(;s<o;)r+=this.elementLayout.getSpan(e,t+r),++s}return r}decode(e,t=0){let r=[],o=0,s=this.count;for(s instanceof Ve&&(s=s.decode(e,t));o<s;)r.push(this.elementLayout.decode(e,t)),t+=this.elementLayout.getSpan(e,t),o+=1;return r}encode(e,t,r=0){let o=this.elementLayout,s=e.reduce((i,u)=>i+o.encode(u,t,r+i),0);return this.count instanceof Ve&&this.count.encode(e.length,t,r),s}};O.Sequence=yo;var mo=class extends ge{static{a(this,"Structure")}constructor(e,t,r){if(!(Array.isArray(e)&&e.reduce((s,i)=>s&&i instanceof ge,!0)))throw new TypeError("fields must be array of Layout instances");typeof t=="boolean"&&r===void 0&&(r=t,t=void 0);for(let s of e)if(0>s.span&&s.property===void 0)throw new Error("fields cannot contain unnamed variable-length layout");let o=-1;try{o=e.reduce((s,i)=>s+i.getSpan(),0)}catch{}super(o,t),this.fields=e,this.decodePrefixes=!!r}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0;try{r=this.fields.reduce((o,s)=>{let i=s.getSpan(e,t);return t+=i,o+i},0)}catch{throw new RangeError("indeterminate span")}return r}decode(e,t=0){Zr(e);let r=this.makeDestinationObject();for(let o of this.fields)if(o.property!==void 0&&(r[o.property]=o.decode(e,t)),t+=o.getSpan(e,t),this.decodePrefixes&&e.length===t)break;return r}encode(e,t,r=0){let o=r,s=0,i=0;for(let u of this.fields){let f=u.span;if(i=0<f?f:0,u.property!==void 0){let y=e[u.property];y!==void 0&&(i=u.encode(y,t,r),0>f&&(f=u.getSpan(t,r)))}s=r,r+=f}return s+i-o}fromArray(e){let t=this.makeDestinationObject();for(let r of this.fields)r.property!==void 0&&0<e.length&&(t[r.property]=e.shift());return t}layoutFor(e){if(typeof e!="string")throw new TypeError("property must be string");for(let t of this.fields)if(t.property===e)return t}offsetOf(e){if(typeof e!="string")throw new TypeError("property must be string");let t=0;for(let r of this.fields){if(r.property===e)return t;0>r.span?t=-1:0<=t&&(t+=r.span)}}};O.Structure=mo;var Pn=class{static{a(this,"UnionDiscriminator")}constructor(e){this.property=e}decode(e,t){throw new Error("UnionDiscriminator is abstract")}encode(e,t,r){throw new Error("UnionDiscriminator is abstract")}};O.UnionDiscriminator=Pn;var Jr=class extends Pn{static{a(this,"UnionLayoutDiscriminator")}constructor(e,t){if(!(e instanceof Ve&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(t||e.property||"variant"),this.layout=e}decode(e,t){return this.layout.decode(e,t)}encode(e,t,r){return this.layout.encode(e,t,r)}};O.UnionLayoutDiscriminator=Jr;var Bn=class extends ge{static{a(this,"Union")}constructor(e,t,r){let o;if(e instanceof tt||e instanceof ct)o=new Jr(new Ln(e));else if(e instanceof Ve&&e.isCount())o=new Jr(e);else if(e instanceof Pn)o=e;else throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(t===void 0&&(t=null),!(t===null||t instanceof ge))throw new TypeError("defaultLayout must be null or a Layout");if(t!==null){if(0>t.span)throw new Error("defaultLayout must have constant span");t.property===void 0&&(t=t.replicate("content"))}let s=-1;t&&(s=t.span,0<=s&&(e instanceof tt||e instanceof ct)&&(s+=o.layout.span)),super(s,r),this.discriminator=o,this.usesPrefixDiscriminator=e instanceof tt||e instanceof ct,this.defaultLayout=t,this.registry={};let i=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(u){return i(u)},this.configGetSourceVariant=function(u){i=u.bind(this)}}getSpan(e,t=0){if(0<=this.span)return this.span;let r=this.getVariant(e,t);if(!r)throw new Error("unable to determine span for unrecognized variant");return r.getSpan(e,t)}defaultGetSourceVariant(e){if(Object.prototype.hasOwnProperty.call(e,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(e,this.defaultLayout.property))return;let t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||t.property&&Object.prototype.hasOwnProperty.call(e,t.property)))return t}else for(let t in this.registry){let r=this.registry[t];if(r.property&&Object.prototype.hasOwnProperty.call(e,r.property))return r}throw new Error("unable to infer src variant")}decode(e,t=0){let r,o=this.discriminator,s=o.decode(e,t),i=this.registry[s];if(i===void 0){let u=this.defaultLayout,f=0;this.usesPrefixDiscriminator&&(f=o.layout.span),r=this.makeDestinationObject(),r[o.property]=s,r[u.property]=u.decode(e,t+f)}else r=i.decode(e,t);return r}encode(e,t,r=0){let o=this.getSourceVariant(e);if(o===void 0){let s=this.discriminator,i=this.defaultLayout,u=0;return this.usesPrefixDiscriminator&&(u=s.layout.span),s.encode(e[s.property],t,r),u+i.encode(e[i.property],t,r+u)}return o.encode(e,t,r)}addVariant(e,t,r){let o=new go(this,e,t,r);return this.registry[e]=o,o}getVariant(e,t=0){let r;return e instanceof Uint8Array?r=this.discriminator.decode(e,t):r=e,this.registry[r]}};O.Union=Bn;var go=class extends ge{static{a(this,"VariantLayout")}constructor(e,t,r,o){if(!(e instanceof Bn))throw new TypeError("union must be a Union");if(!Number.isInteger(t)||0>t)throw new TypeError("variant must be a (non-negative) integer");if(typeof r=="string"&&o===void 0&&(o=r,r=null),r){if(!(r instanceof ge))throw new TypeError("layout must be a Layout");if(e.defaultLayout!==null&&0<=r.span&&r.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if(typeof o!="string")throw new TypeError("variant must have a String property")}let s=e.span;0>e.span&&(s=r?r.span:0,0<=s&&e.usesPrefixDiscriminator&&(s+=e.discriminator.layout.span)),super(s,o),this.union=e,this.variant=t,this.layout=r||null}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0;this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span);let o=0;return this.layout&&(o=this.layout.getSpan(e,t+r)),r+o}decode(e,t=0){let r=this.makeDestinationObject();if(this!==this.union.getVariant(e,t))throw new Error("variant mismatch");let o=0;return this.union.usesPrefixDiscriminator&&(o=this.union.discriminator.layout.span),this.layout?r[this.property]=this.layout.decode(e,t+o):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}encode(e,t,r=0){let o=0;if(this.union.usesPrefixDiscriminator&&(o=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(e,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,r);let s=o;if(this.layout&&(this.layout.encode(e[this.property],t,r+o),s+=this.layout.getSpan(t,r+o),0<=this.union.span&&s>this.union.span))throw new Error("encoded variant overruns containing union");return s}fromArray(e){if(this.layout)return this.layout.fromArray(e)}};O.VariantLayout=go;function Xr(n){return 0>n&&(n+=4294967296),n}a(Xr,"fixBitwiseResult");var Un=class extends ge{static{a(this,"BitStructure")}constructor(e,t,r){if(!(e instanceof tt||e instanceof ct))throw new TypeError("word must be a UInt or UIntBE layout");if(typeof t=="string"&&r===void 0&&(r=t,t=!1),4<e.span)throw new RangeError("word cannot exceed 32 bits");super(e.span,r),this.word=e,this.msb=!!t,this.fields=[];let o=0;this._packedSetValue=function(s){return o=Xr(s),this},this._packedGetValue=function(){return o}}decode(e,t=0){let r=this.makeDestinationObject(),o=this.word.decode(e,t);this._packedSetValue(o);for(let s of this.fields)s.property!==void 0&&(r[s.property]=s.decode(e));return r}encode(e,t,r=0){let o=this.word.decode(t,r);this._packedSetValue(o);for(let s of this.fields)if(s.property!==void 0){let i=e[s.property];i!==void 0&&s.encode(i)}return this.word.encode(this._packedGetValue(),t,r)}addField(e,t){let r=new Dn(this,e,t);return this.fields.push(r),r}addBoolean(e){let t=new _o(this,e);return this.fields.push(t),t}fieldFor(e){if(typeof e!="string")throw new TypeError("property must be string");for(let t of this.fields)if(t.property===e)return t}};O.BitStructure=Un;var Dn=class{static{a(this,"BitField")}constructor(e,t,r){if(!(e instanceof Un))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(t)||0>=t)throw new TypeError("bits must be positive integer");let o=8*e.span,s=e.fields.reduce((i,u)=>i+u.bits,0);if(t+s>o)throw new Error("bits too long for span remainder ("+(o-s)+" of "+o+" remain)");this.container=e,this.bits=t,this.valueMask=(1<<t)-1,t===32&&(this.valueMask=4294967295),this.start=s,this.container.msb&&(this.start=o-s-t),this.wordMask=Xr(this.valueMask<<this.start),this.property=r}decode(e,t){let r=this.container._packedGetValue();return Xr(r&this.wordMask)>>>this.start}encode(e){if(typeof e!="number"||!Number.isInteger(e)||e!==Xr(e&this.valueMask))throw new TypeError(_a("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let t=this.container._packedGetValue(),r=Xr(e<<this.start);this.container._packedSetValue(Xr(t&~this.wordMask)|r)}};O.BitField=Dn;var _o=class extends Dn{static{a(this,"Boolean")}constructor(e,t){super(e,1,t)}decode(e,t){return!!super.decode(e,t)}encode(e){typeof e=="boolean"&&(e=+e),super.encode(e)}};O.Boolean=_o;var bo=class extends ge{static{a(this,"Blob")}constructor(e,t){if(!(e instanceof Ve&&e.isCount()||Number.isInteger(e)&&0<=e))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let r=-1;e instanceof Ve||(r=e),super(r,t),this.length=e}getSpan(e,t){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),r}decode(e,t=0){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),pe(e).slice(t,t+r)}encode(e,t,r){let o=this.length;if(this.length instanceof Ve&&(o=e.length),!(e instanceof Uint8Array&&o===e.length))throw new TypeError(_a("Blob.encode",this)+" requires (length "+o+") Uint8Array as src");if(r+o>t.length)throw new RangeError("encoding overruns Uint8Array");let s=pe(e);return pe(t).write(s.toString("hex"),r,o,"hex"),this.length instanceof Ve&&this.length.encode(o,t,r),o}};O.Blob=bo;var wo=class extends ge{static{a(this,"CString")}constructor(e){super(-1,e)}getSpan(e,t=0){Zr(e);let r=t;for(;r<e.length&&e[r]!==0;)r+=1;return 1+r-t}decode(e,t=0){let r=this.getSpan(e,t);return pe(e).slice(t,t+r-1).toString("utf-8")}encode(e,t,r=0){typeof e!="string"&&(e=String(e));let o=ga.Buffer.from(e,"utf8"),s=o.length;if(r+s>t.length)throw new RangeError("encoding overruns Buffer");let i=pe(t);return o.copy(i,r),i[r+s]=0,s+1}};O.CString=wo;var Ro=class extends ge{static{a(this,"UTF8")}constructor(e,t){if(typeof e=="string"&&t===void 0&&(t=e,e=void 0),e===void 0)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");super(-1,t),this.maxSpan=e}getSpan(e,t=0){return Zr(e),e.length-t}decode(e,t=0){let r=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpan<r)throw new RangeError("text length exceeds maxSpan");return pe(e).slice(t,t+r).toString("utf-8")}encode(e,t,r=0){typeof e!="string"&&(e=String(e));let o=ga.Buffer.from(e,"utf8"),s=o.length;if(0<=this.maxSpan&&this.maxSpan<s)throw new RangeError("text length exceeds maxSpan");if(r+s>t.length)throw new RangeError("encoding overruns Buffer");return o.copy(pe(t),r),s}};O.UTF8=Ro;var Eo=class extends ge{static{a(this,"Constant")}constructor(e,t){super(0,t),this.value=e}decode(e,t){return this.value}encode(e,t,r){return 0}};O.Constant=Eo;O.greedy=(n,e)=>new oo(n,e);O.offset=(n,e,t)=>new Ln(n,e,t);O.u8=n=>new tt(1,n);O.u16=n=>new tt(2,n);O.u24=n=>new tt(3,n);O.u32=n=>new tt(4,n);O.u40=n=>new tt(5,n);O.u48=n=>new tt(6,n);O.nu64=n=>new io(n);O.u16be=n=>new ct(2,n);O.u24be=n=>new ct(3,n);O.u32be=n=>new ct(4,n);O.u40be=n=>new ct(5,n);O.u48be=n=>new ct(6,n);O.nu64be=n=>new ao(n);O.s8=n=>new Wt(1,n);O.s16=n=>new Wt(2,n);O.s24=n=>new Wt(3,n);O.s32=n=>new Wt(4,n);O.s40=n=>new Wt(5,n);O.s48=n=>new Wt(6,n);O.ns64=n=>new co(n);O.s16be=n=>new sr(2,n);O.s24be=n=>new sr(3,n);O.s32be=n=>new sr(4,n);O.s40be=n=>new sr(5,n);O.s48be=n=>new sr(6,n);O.ns64be=n=>new uo(n);O.f32=n=>new lo(n);O.f32be=n=>new fo(n);O.f64=n=>new ho(n);O.f64be=n=>new po(n);O.struct=(n,e,t)=>new mo(n,e,t);O.bits=(n,e,t)=>new Un(n,e,t);O.seq=(n,e,t)=>new yo(n,e,t);O.union=(n,e,t)=>new Bn(n,e,t);O.unionLayoutDiscriminator=(n,e)=>new Jr(n,e);O.blob=(n,e)=>new bo(n,e);O.cstr=n=>new wo(n);O.utf8=(n,e)=>new Ro(n,e);O.constant=(n,e)=>new Eo(n,e)});var ql=ce((lE,Kl)=>{"use strict";var ko=ae("path").sep||"/";Kl.exports=rg;function rg(n){if(typeof n!="string"||n.length<=7||n.substring(0,7)!="file://")throw new TypeError("must pass in a file:// URI to convert to a file path");var e=decodeURI(n.substring(7)),t=e.indexOf("/"),r=e.substring(0,t),o=e.substring(t+1);return r=="localhost"&&(r=""),r&&(r=ko+ko+r),o=o.replace(/^(.+)\|/,"$1:"),ko=="\\"&&(o=o.replace(/\//g,"\\")),/^.+\:/.test(o)||(o=ko+o),r+o}a(rg,"fileUriToPath")});var Yl=ce((Qr,Gl)=>{"use strict";var wa=ae("fs"),vo=ae("path"),ng=ql(),Io=vo.join,sg=vo.dirname,jl=wa.accessSync&&function(n){try{wa.accessSync(n)}catch{return!1}return!0}||wa.existsSync||vo.existsSync,Vl={arrow:process.env.NODE_BINDINGS_ARROW||" \u2192 ",compiled:process.env.NODE_BINDINGS_COMPILED_DIR||"compiled",platform:process.platform,arch:process.arch,nodePreGyp:"node-v"+process.versions.modules+"-"+process.platform+"-"+process.arch,version:process.versions.node,bindings:"bindings.node",try:[["module_root","build","bindings"],["module_root","build","Debug","bindings"],["module_root","build","Release","bindings"],["module_root","out","Debug","bindings"],["module_root","Debug","bindings"],["module_root","out","Release","bindings"],["module_root","Release","bindings"],["module_root","build","default","bindings"],["module_root","compiled","version","platform","arch","bindings"],["module_root","addon-build","release","install-root","bindings"],["module_root","addon-build","debug","install-root","bindings"],["module_root","addon-build","default","install-root","bindings"],["module_root","lib","binding","nodePreGyp","bindings"]]};function og(n){typeof n=="string"?n={bindings:n}:n||(n={}),Object.keys(Vl).map(function(f){f in n||(n[f]=Vl[f])}),n.module_root||(n.module_root=Qr.getRoot(Qr.getFileName())),vo.extname(n.bindings)!=".node"&&(n.bindings+=".node");for(var e=typeof __webpack_require__=="function"?__non_webpack_require__:ae,t=[],r=0,o=n.try.length,s,i,u;r<o;r++){s=Io.apply(null,n.try[r].map(function(f){return n[f]||f})),t.push(s);try{return i=n.path?e.resolve(s):e(s),n.path||(i.path=s),i}catch(f){if(f.code!=="MODULE_NOT_FOUND"&&f.code!=="QUALIFIED_PATH_RESOLUTION_FAILED"&&!/not find/i.test(f.message))throw f}}throw u=new Error(`Could not locate the bindings file. Tried:
2
+ import{b as Il}from"./chunk-FMZDKD72.js";import{c as Sr,d as Nm,e as kl,g as Cm}from"./chunk-JIW4UTB3.js";import{a as Al}from"./chunk-IVMOWPFA.js";import{B as ia,Dd as El,Kc as Rl,Mc as Im,Nc as vm,Sb as Er,Td as Om,U as wl,gd as Gs,lc as aa,mc as Am,ne as Sl,sc as ca,tc as km,vd as Ys,wd as Tm}from"./chunk-M4IWP4I2.js";import{a,b as ae,c as Pe,d as ce,e as Cn,f as le,g as xn}from"./chunk-G5BIPHMS.js";var Pl=ce((la,Ll)=>{"use strict";var Js=ae("buffer"),Ot=Js.Buffer;function xl(n,e){for(var t in n)e[t]=n[t]}a(xl,"copyProps");Ot.from&&Ot.alloc&&Ot.allocUnsafe&&Ot.allocUnsafeSlow?Ll.exports=Js:(xl(Js,la),la.Buffer=Ar);function Ar(n,e,t){return Ot(n,e,t)}a(Ar,"SafeBuffer");Ar.prototype=Object.create(Ot.prototype);xl(Ot,Ar);Ar.from=function(n,e,t){if(typeof n=="number")throw new TypeError("Argument must not be a number");return Ot(n,e,t)};Ar.alloc=function(n,e,t){if(typeof n!="number")throw new TypeError("Argument must be a number");var r=Ot(n);return e!==void 0?typeof t=="string"?r.fill(e,t):r.fill(e):r.fill(0),r};Ar.allocUnsafe=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return Ot(n)};Ar.allocUnsafeSlow=function(n){if(typeof n!="number")throw new TypeError("Argument must be a number");return Js.SlowBuffer(n)}});var Ul=ce((tE,Bl)=>{"use strict";var Zs=Pl().Buffer;function Dm(n){if(n.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),t=0;t<e.length;t++)e[t]=255;for(var r=0;r<n.length;r++){var o=n.charAt(r),s=o.charCodeAt(0);if(e[s]!==255)throw new TypeError(o+" is ambiguous");e[s]=r}var i=n.length,u=n.charAt(0),f=Math.log(i)/Math.log(256),y=Math.log(256)/Math.log(i);function d(R){if((Array.isArray(R)||R instanceof Uint8Array)&&(R=Zs.from(R)),!Zs.isBuffer(R))throw new TypeError("Expected Buffer");if(R.length===0)return"";for(var S=0,A=0,C=0,x=R.length;C!==x&&R[C]===0;)C++,S++;for(var w=(x-C)*y+1>>>0,L=new Uint8Array(w);C!==x;){for(var z=R[C],Y=0,ne=w-1;(z!==0||Y<A)&&ne!==-1;ne--,Y++)z+=256*L[ne]>>>0,L[ne]=z%i>>>0,z=z/i>>>0;if(z!==0)throw new Error("Non-zero carry");A=Y,C++}for(var re=w-A;re!==w&&L[re]===0;)re++;for(var Se=u.repeat(S);re<w;++re)Se+=n.charAt(L[re]);return Se}a(d,"encode");function _(R){if(typeof R!="string")throw new TypeError("Expected String");if(R.length===0)return Zs.alloc(0);for(var S=0,A=0,C=0;R[S]===u;)A++,S++;for(var x=(R.length-S)*f+1>>>0,w=new Uint8Array(x);R[S];){var L=e[R.charCodeAt(S)];if(L===255)return;for(var z=0,Y=x-1;(L!==0||z<C)&&Y!==-1;Y--,z++)L+=i*w[Y]>>>0,w[Y]=L%256>>>0,L=L/256>>>0;if(L!==0)throw new Error("Non-zero carry");C=z,S++}for(var ne=x-C;ne!==x&&w[ne]===0;)ne++;var re=Zs.allocUnsafe(A+(x-ne));re.fill(0,0,A);for(var Se=A;ne!==x;)re[Se++]=w[ne++];return re}a(_,"decodeUnsafe");function E(R){var S=_(R);if(S)return S;throw new Error("Non-base"+i+" character")}return a(E,"decode"),{encode:d,decodeUnsafe:_,decode:E}}a(Dm,"base");Bl.exports=Dm});var Gr=ce((nE,Dl)=>{"use strict";var Mm=Ul(),$m="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";Dl.exports=Mm($m)});var Ml=ce(ha=>{"use strict";function Ft(n,e,t){return e<=n&&n<=t}a(Ft,"inRange");function no(n){if(n===void 0)return{};if(n===Object(n))return n;throw TypeError("Could not convert argument to dictionary")}a(no,"ToDictionary");function Hm(n){for(var e=String(n),t=e.length,r=0,o=[];r<t;){var s=e.charCodeAt(r);if(s<55296||s>57343)o.push(s);else if(56320<=s&&s<=57343)o.push(65533);else if(55296<=s&&s<=56319)if(r===t-1)o.push(65533);else{var i=n.charCodeAt(r+1);if(56320<=i&&i<=57343){var u=s&1023,f=i&1023;o.push(65536+(u<<10)+f),r+=1}else o.push(65533)}r+=1}return o}a(Hm,"stringToCodePoints");function zm(n){for(var e="",t=0;t<n.length;++t){var r=n[t];r<=65535?e+=String.fromCharCode(r):(r-=65536,e+=String.fromCharCode((r>>10)+55296,(r&1023)+56320))}return e}a(zm,"codePointsToString");var Qs=-1;function da(n){this.tokens=[].slice.call(n)}a(da,"Stream");da.prototype={endOfStream:a(function(){return!this.tokens.length},"endOfStream"),read:a(function(){return this.tokens.length?this.tokens.shift():Qs},"read"),prepend:a(function(n){if(Array.isArray(n))for(var e=n;e.length;)this.tokens.unshift(e.pop());else this.tokens.unshift(n)},"prepend"),push:a(function(n){if(Array.isArray(n))for(var e=n;e.length;)this.tokens.push(e.shift());else this.tokens.push(n)},"push")};var Yr=-1;function fa(n,e){if(n)throw TypeError("Decoder error");return e||65533}a(fa,"decoderError");var eo="utf-8";function to(n,e){if(!(this instanceof to))return new to(n,e);if(n=n!==void 0?String(n).toLowerCase():eo,n!==eo)throw new Error("Encoding not supported. Only utf-8 is supported");e=no(e),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=!!e.fatal,this._ignoreBOM=!!e.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}a(to,"TextDecoder");to.prototype={decode:a(function(e,t){var r;typeof e=="object"&&e instanceof ArrayBuffer?r=new Uint8Array(e):typeof e=="object"&&"buffer"in e&&e.buffer instanceof ArrayBuffer?r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):r=new Uint8Array(0),t=no(t),this._streaming||(this._decoder=new Fm({fatal:this._fatal}),this._BOMseen=!1),this._streaming=!!t.stream;for(var o=new da(r),s=[],i;!o.endOfStream()&&(i=this._decoder.handler(o,o.read()),i!==Yr);)i!==null&&(Array.isArray(i)?s.push.apply(s,i):s.push(i));if(!this._streaming){do{if(i=this._decoder.handler(o,o.read()),i===Yr)break;i!==null&&(Array.isArray(i)?s.push.apply(s,i):s.push(i))}while(!o.endOfStream());this._decoder=null}return s.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(s[0]===65279?(this._BOMseen=!0,s.shift()):this._BOMseen=!0),zm(s)},"decode")};function ro(n,e){if(!(this instanceof ro))return new ro(n,e);if(n=n!==void 0?String(n).toLowerCase():eo,n!==eo)throw new Error("Encoding not supported. Only utf-8 is supported");e=no(e),this._streaming=!1,this._encoder=null,this._options={fatal:!!e.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}a(ro,"TextEncoder");ro.prototype={encode:a(function(e,t){e=e?String(e):"",t=no(t),this._streaming||(this._encoder=new Wm(this._options)),this._streaming=!!t.stream;for(var r=[],o=new da(Hm(e)),s;!o.endOfStream()&&(s=this._encoder.handler(o,o.read()),s!==Yr);)Array.isArray(s)?r.push.apply(r,s):r.push(s);if(!this._streaming){for(;s=this._encoder.handler(o,o.read()),s!==Yr;)Array.isArray(s)?r.push.apply(r,s):r.push(s);this._encoder=null}return new Uint8Array(r)},"encode")};function Fm(n){var e=n.fatal,t=0,r=0,o=0,s=128,i=191;this.handler=function(u,f){if(f===Qs&&o!==0)return o=0,fa(e);if(f===Qs)return Yr;if(o===0){if(Ft(f,0,127))return f;if(Ft(f,194,223))o=1,t=f-192;else if(Ft(f,224,239))f===224&&(s=160),f===237&&(i=159),o=2,t=f-224;else if(Ft(f,240,244))f===240&&(s=144),f===244&&(i=143),o=3,t=f-240;else return fa(e);return t=t<<6*o,null}if(!Ft(f,s,i))return t=o=r=0,s=128,i=191,u.prepend(f),fa(e);if(s=128,i=191,r+=1,t+=f-128<<6*(o-r),r!==o)return null;var y=t;return t=o=r=0,y}}a(Fm,"UTF8Decoder");function Wm(n){var e=n.fatal;this.handler=function(t,r){if(r===Qs)return Yr;if(Ft(r,0,127))return r;var o,s;Ft(r,128,2047)?(o=1,s=192):Ft(r,2048,65535)?(o=2,s=224):Ft(r,65536,1114111)&&(o=3,s=240);for(var i=[(r>>6*o)+s];o>0;){var u=r>>6*(o-1);i.push(128|u&63),o-=1}return i}}a(Wm,"UTF8Encoder");ha.TextEncoder=ro;ha.TextDecoder=to});var Wl=ce(Ee=>{"use strict";var Km=Ee&&Ee.__createBinding||(Object.create?function(n,e,t,r){r===void 0&&(r=t),Object.defineProperty(n,r,{enumerable:!0,get:a(function(){return e[t]},"get")})}:function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]}),qm=Ee&&Ee.__setModuleDefault||(Object.create?function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}:function(n,e){n.default=e}),Nt=Ee&&Ee.__decorate||function(n,e,t,r){var o=arguments.length,s=o<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var u=n.length-1;u>=0;u--)(i=n[u])&&(s=(o<3?i(s):o>3?i(e,t,s):i(e,t))||s);return o>3&&s&&Object.defineProperty(e,t,s),s},jm=Ee&&Ee.__importStar||function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)t!=="default"&&Object.hasOwnProperty.call(n,t)&&Km(e,n,t);return qm(e,n),e},$l=Ee&&Ee.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Ee,"__esModule",{value:!0});Ee.deserializeUnchecked=Ee.deserialize=Ee.serialize=Ee.BinaryReader=Ee.BinaryWriter=Ee.BorshError=Ee.baseDecode=Ee.baseEncode=void 0;var nr=$l(Er()),Hl=$l(Gr()),Vm=jm(Ml()),Gm=typeof TextDecoder!="function"?Vm.TextDecoder:TextDecoder,Ym=new Gm("utf-8",{fatal:!0});function Xm(n){return typeof n=="string"&&(n=Buffer.from(n,"utf8")),Hl.default.encode(Buffer.from(n))}a(Xm,"baseEncode");Ee.baseEncode=Xm;function Jm(n){return Buffer.from(Hl.default.decode(n))}a(Jm,"baseDecode");Ee.baseDecode=Jm;var pa=1024,Ke=class extends Error{static{a(this,"BorshError")}constructor(e){super(e),this.fieldPath=[],this.originalMessage=e}addToFieldPath(e){this.fieldPath.splice(0,0,e),this.message=this.originalMessage+": "+this.fieldPath.join(".")}};Ee.BorshError=Ke;var so=class{static{a(this,"BinaryWriter")}constructor(){this.buf=Buffer.alloc(pa),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(pa)]))}writeU8(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}writeU16(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}writeU32(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}writeU64(e){this.maybeResize(),this.writeBuffer(Buffer.from(new nr.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(Buffer.from(new nr.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(Buffer.from(new nr.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(Buffer.from(new nr.default(e).toArray("le",64)))}writeBuffer(e){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),e,Buffer.alloc(pa)]),this.length+=e.length}writeString(e){this.maybeResize();let t=Buffer.from(e,"utf8");this.writeU32(t.length),this.writeBuffer(t)}writeFixedArray(e){this.writeBuffer(Buffer.from(e))}writeArray(e,t){this.maybeResize(),this.writeU32(e.length);for(let r of e)this.maybeResize(),t(r)}toArray(){return this.buf.subarray(0,this.length)}};Ee.BinaryWriter=so;function Ct(n,e,t){let r=t.value;t.value=function(...o){try{return r.apply(this,o)}catch(s){if(s instanceof RangeError){let i=s.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(i)>=0)throw new Ke("Reached the end of buffer when deserializing")}throw s}}}a(Ct,"handlingRangeError");var Qe=class{static{a(this,"BinaryReader")}constructor(e){this.buf=e,this.offset=0}readU8(){let e=this.buf.readUInt8(this.offset);return this.offset+=1,e}readU16(){let e=this.buf.readUInt16LE(this.offset);return this.offset+=2,e}readU32(){let e=this.buf.readUInt32LE(this.offset);return this.offset+=4,e}readU64(){let e=this.readBuffer(8);return new nr.default(e,"le")}readU128(){let e=this.readBuffer(16);return new nr.default(e,"le")}readU256(){let e=this.readBuffer(32);return new nr.default(e,"le")}readU512(){let e=this.readBuffer(64);return new nr.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new Ke(`Expected buffer length ${e} isn't within bounds`);let t=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,t}readString(){let e=this.readU32(),t=this.readBuffer(e);try{return Ym.decode(t)}catch(r){throw new Ke(`Error decoding UTF-8 string: ${r}`)}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){let t=this.readU32(),r=Array();for(let o=0;o<t;++o)r.push(e());return r}};Nt([Ct],Qe.prototype,"readU8",null);Nt([Ct],Qe.prototype,"readU16",null);Nt([Ct],Qe.prototype,"readU32",null);Nt([Ct],Qe.prototype,"readU64",null);Nt([Ct],Qe.prototype,"readU128",null);Nt([Ct],Qe.prototype,"readU256",null);Nt([Ct],Qe.prototype,"readU512",null);Nt([Ct],Qe.prototype,"readString",null);Nt([Ct],Qe.prototype,"readFixedArray",null);Nt([Ct],Qe.prototype,"readArray",null);Ee.BinaryReader=Qe;function zl(n){return n.charAt(0).toUpperCase()+n.slice(1)}a(zl,"capitalizeFirstLetter");function kr(n,e,t,r,o){try{if(typeof r=="string")o[`write${zl(r)}`](t);else if(r instanceof Array)if(typeof r[0]=="number"){if(t.length!==r[0])throw new Ke(`Expecting byte array of length ${r[0]}, but got ${t.length} bytes`);o.writeFixedArray(t)}else if(r.length===2&&typeof r[1]=="number"){if(t.length!==r[1])throw new Ke(`Expecting byte array of length ${r[1]}, but got ${t.length} bytes`);for(let s=0;s<r[1];s++)kr(n,null,t[s],r[0],o)}else o.writeArray(t,s=>{kr(n,e,s,r[0],o)});else if(r.kind!==void 0)switch(r.kind){case"option":{t==null?o.writeU8(0):(o.writeU8(1),kr(n,e,t,r.type,o));break}case"map":{o.writeU32(t.size),t.forEach((s,i)=>{kr(n,e,i,r.key,o),kr(n,e,s,r.value,o)});break}default:throw new Ke(`FieldType ${r} unrecognized`)}else Fl(n,t,o)}catch(s){throw s instanceof Ke&&s.addToFieldPath(e),s}}a(kr,"serializeField");function Fl(n,e,t){if(typeof e.borshSerialize=="function"){e.borshSerialize(t);return}let r=n.get(e.constructor);if(!r)throw new Ke(`Class ${e.constructor.name} is missing in schema`);if(r.kind==="struct")r.fields.map(([o,s])=>{kr(n,o,e[o],s,t)});else if(r.kind==="enum"){let o=e[r.field];for(let s=0;s<r.values.length;++s){let[i,u]=r.values[s];if(i===o){t.writeU8(s),kr(n,i,e[i],u,t);break}}}else throw new Ke(`Unexpected schema kind: ${r.kind} for ${e.constructor.name}`)}a(Fl,"serializeStruct");function Zm(n,e,t=so){let r=new t;return Fl(n,e,r),r.toArray()}a(Zm,"serialize");Ee.serialize=Zm;function Ir(n,e,t,r){try{if(typeof t=="string")return r[`read${zl(t)}`]();if(t instanceof Array){if(typeof t[0]=="number")return r.readFixedArray(t[0]);if(typeof t[1]=="number"){let o=[];for(let s=0;s<t[1];s++)o.push(Ir(n,null,t[0],r));return o}else return r.readArray(()=>Ir(n,e,t[0],r))}if(t.kind==="option")return r.readU8()?Ir(n,e,t.type,r):void 0;if(t.kind==="map"){let o=new Map,s=r.readU32();for(let i=0;i<s;i++){let u=Ir(n,e,t.key,r),f=Ir(n,e,t.value,r);o.set(u,f)}return o}return ya(n,t,r)}catch(o){throw o instanceof Ke&&o.addToFieldPath(e),o}}a(Ir,"deserializeField");function ya(n,e,t){if(typeof e.borshDeserialize=="function")return e.borshDeserialize(t);let r=n.get(e);if(!r)throw new Ke(`Class ${e.name} is missing in schema`);if(r.kind==="struct"){let o={};for(let[s,i]of n.get(e).fields)o[s]=Ir(n,s,i,t);return new e(o)}if(r.kind==="enum"){let o=t.readU8();if(o>=r.values.length)throw new Ke(`Enum index: ${o} is out of range`);let[s,i]=r.values[o],u=Ir(n,s,i,t);return new e({[s]:u})}throw new Ke(`Unexpected schema kind: ${r.kind} for ${e.constructor.name}`)}a(ya,"deserializeStruct");function Qm(n,e,t,r=Qe){let o=new r(t),s=ya(n,e,o);if(o.offset<t.length)throw new Ke(`Unexpected ${t.length-o.offset} bytes after deserialized data`);return s}a(Qm,"deserialize");Ee.deserialize=Qm;function eg(n,e,t,r=Qe){let o=new r(t);return ya(n,e,o)}a(eg,"deserializeUnchecked");Ee.deserializeUnchecked=eg});var ba=ce(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.s16=O.s8=O.nu64be=O.u48be=O.u40be=O.u32be=O.u24be=O.u16be=O.nu64=O.u48=O.u40=O.u32=O.u24=O.u16=O.u8=O.offset=O.greedy=O.Constant=O.UTF8=O.CString=O.Blob=O.Boolean=O.BitField=O.BitStructure=O.VariantLayout=O.Union=O.UnionLayoutDiscriminator=O.UnionDiscriminator=O.Structure=O.Sequence=O.DoubleBE=O.Double=O.FloatBE=O.Float=O.NearInt64BE=O.NearInt64=O.NearUInt64BE=O.NearUInt64=O.IntBE=O.Int=O.UIntBE=O.UInt=O.OffsetLayout=O.GreedyCount=O.ExternalLayout=O.bindConstructorLayout=O.nameWithProperty=O.Layout=O.uint8ArrayToBuffer=O.checkUint8Array=void 0;O.constant=O.utf8=O.cstr=O.blob=O.unionLayoutDiscriminator=O.union=O.seq=O.bits=O.struct=O.f64be=O.f64=O.f32be=O.f32=O.ns64be=O.s48be=O.s40be=O.s32be=O.s24be=O.s16be=O.ns64=O.s48=O.s40=O.s32=O.s24=void 0;var ga=ae("buffer");function Zr(n){if(!(n instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}a(Zr,"checkUint8Array");O.checkUint8Array=Zr;function pe(n){return Zr(n),ga.Buffer.from(n.buffer,n.byteOffset,n.length)}a(pe,"uint8ArrayToBuffer");O.uint8ArrayToBuffer=pe;var ge=class{static{a(this,"Layout")}constructor(e,t){if(!Number.isInteger(e))throw new TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}getSpan(e,t){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(e){let t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}};O.Layout=ge;function _a(n,e){return e.property?n+"["+e.property+"]":n}a(_a,"nameWithProperty");O.nameWithProperty=_a;function tg(n,e){if(typeof n!="function")throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(n,"layout_"))throw new Error("Class is already bound to a layout");if(!(e&&e instanceof ge))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(e,"boundConstructor_"))throw new Error("layout is already bound to a constructor");n.layout_=e,e.boundConstructor_=n,e.makeDestinationObject=()=>new n,Object.defineProperty(n.prototype,"encode",{value(t,r){return e.encode(this,t,r)},writable:!0}),Object.defineProperty(n,"decode",{value(t,r){return e.decode(t,r)},writable:!0})}a(tg,"bindConstructorLayout");O.bindConstructorLayout=tg;var Ve=class extends ge{static{a(this,"ExternalLayout")}isCount(){throw new Error("ExternalLayout is abstract")}};O.ExternalLayout=Ve;var oo=class extends Ve{static{a(this,"GreedyCount")}constructor(e=1,t){if(!Number.isInteger(e)||0>=e)throw new TypeError("elementSpan must be a (positive) integer");super(-1,t),this.elementSpan=e}isCount(){return!0}decode(e,t=0){Zr(e);let r=e.length-t;return Math.floor(r/this.elementSpan)}encode(e,t,r){return 0}};O.GreedyCount=oo;var Ln=class extends Ve{static{a(this,"OffsetLayout")}constructor(e,t=0,r){if(!(e instanceof ge))throw new TypeError("layout must be a Layout");if(!Number.isInteger(t))throw new TypeError("offset must be integer or undefined");super(e.span,r||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof tt||this.layout instanceof ct}decode(e,t=0){return this.layout.decode(e,t+this.offset)}encode(e,t,r=0){return this.layout.encode(e,t,r+this.offset)}};O.OffsetLayout=Ln;var tt=class extends ge{static{a(this,"UInt")}constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return pe(e).readUIntLE(t,this.span)}encode(e,t,r=0){return pe(t).writeUIntLE(e,r,this.span),this.span}};O.UInt=tt;var ct=class extends ge{static{a(this,"UIntBE")}constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return pe(e).readUIntBE(t,this.span)}encode(e,t,r=0){return pe(t).writeUIntBE(e,r,this.span),this.span}};O.UIntBE=ct;var Wt=class extends ge{static{a(this,"Int")}constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return pe(e).readIntLE(t,this.span)}encode(e,t,r=0){return pe(t).writeIntLE(e,r,this.span),this.span}};O.Int=Wt;var sr=class extends ge{static{a(this,"IntBE")}constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e,t=0){return pe(e).readIntBE(t,this.span)}encode(e,t,r=0){return pe(t).writeIntBE(e,r,this.span),this.span}};O.IntBE=sr;var ma=Math.pow(2,32);function So(n){let e=Math.floor(n/ma),t=n-e*ma;return{hi32:e,lo32:t}}a(So,"divmodInt64");function Ao(n,e){return n*ma+e}a(Ao,"roundedInt64");var io=class extends ge{static{a(this,"NearUInt64")}constructor(e){super(8,e)}decode(e,t=0){let r=pe(e),o=r.readUInt32LE(t),s=r.readUInt32LE(t+4);return Ao(s,o)}encode(e,t,r=0){let o=So(e),s=pe(t);return s.writeUInt32LE(o.lo32,r),s.writeUInt32LE(o.hi32,r+4),8}};O.NearUInt64=io;var ao=class extends ge{static{a(this,"NearUInt64BE")}constructor(e){super(8,e)}decode(e,t=0){let r=pe(e),o=r.readUInt32BE(t),s=r.readUInt32BE(t+4);return Ao(o,s)}encode(e,t,r=0){let o=So(e),s=pe(t);return s.writeUInt32BE(o.hi32,r),s.writeUInt32BE(o.lo32,r+4),8}};O.NearUInt64BE=ao;var co=class extends ge{static{a(this,"NearInt64")}constructor(e){super(8,e)}decode(e,t=0){let r=pe(e),o=r.readUInt32LE(t),s=r.readInt32LE(t+4);return Ao(s,o)}encode(e,t,r=0){let o=So(e),s=pe(t);return s.writeUInt32LE(o.lo32,r),s.writeInt32LE(o.hi32,r+4),8}};O.NearInt64=co;var uo=class extends ge{static{a(this,"NearInt64BE")}constructor(e){super(8,e)}decode(e,t=0){let r=pe(e),o=r.readInt32BE(t),s=r.readUInt32BE(t+4);return Ao(o,s)}encode(e,t,r=0){let o=So(e),s=pe(t);return s.writeInt32BE(o.hi32,r),s.writeUInt32BE(o.lo32,r+4),8}};O.NearInt64BE=uo;var lo=class extends ge{static{a(this,"Float")}constructor(e){super(4,e)}decode(e,t=0){return pe(e).readFloatLE(t)}encode(e,t,r=0){return pe(t).writeFloatLE(e,r),4}};O.Float=lo;var fo=class extends ge{static{a(this,"FloatBE")}constructor(e){super(4,e)}decode(e,t=0){return pe(e).readFloatBE(t)}encode(e,t,r=0){return pe(t).writeFloatBE(e,r),4}};O.FloatBE=fo;var ho=class extends ge{static{a(this,"Double")}constructor(e){super(8,e)}decode(e,t=0){return pe(e).readDoubleLE(t)}encode(e,t,r=0){return pe(t).writeDoubleLE(e,r),8}};O.Double=ho;var po=class extends ge{static{a(this,"DoubleBE")}constructor(e){super(8,e)}decode(e,t=0){return pe(e).readDoubleBE(t)}encode(e,t,r=0){return pe(t).writeDoubleBE(e,r),8}};O.DoubleBE=po;var yo=class extends ge{static{a(this,"Sequence")}constructor(e,t,r){if(!(e instanceof ge))throw new TypeError("elementLayout must be a Layout");if(!(t instanceof Ve&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let o=-1;!(t instanceof Ve)&&0<e.span&&(o=t*e.span),super(o,r),this.elementLayout=e,this.count=t}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0,o=this.count;if(o instanceof Ve&&(o=o.decode(e,t)),0<this.elementLayout.span)r=o*this.elementLayout.span;else{let s=0;for(;s<o;)r+=this.elementLayout.getSpan(e,t+r),++s}return r}decode(e,t=0){let r=[],o=0,s=this.count;for(s instanceof Ve&&(s=s.decode(e,t));o<s;)r.push(this.elementLayout.decode(e,t)),t+=this.elementLayout.getSpan(e,t),o+=1;return r}encode(e,t,r=0){let o=this.elementLayout,s=e.reduce((i,u)=>i+o.encode(u,t,r+i),0);return this.count instanceof Ve&&this.count.encode(e.length,t,r),s}};O.Sequence=yo;var mo=class extends ge{static{a(this,"Structure")}constructor(e,t,r){if(!(Array.isArray(e)&&e.reduce((s,i)=>s&&i instanceof ge,!0)))throw new TypeError("fields must be array of Layout instances");typeof t=="boolean"&&r===void 0&&(r=t,t=void 0);for(let s of e)if(0>s.span&&s.property===void 0)throw new Error("fields cannot contain unnamed variable-length layout");let o=-1;try{o=e.reduce((s,i)=>s+i.getSpan(),0)}catch{}super(o,t),this.fields=e,this.decodePrefixes=!!r}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0;try{r=this.fields.reduce((o,s)=>{let i=s.getSpan(e,t);return t+=i,o+i},0)}catch{throw new RangeError("indeterminate span")}return r}decode(e,t=0){Zr(e);let r=this.makeDestinationObject();for(let o of this.fields)if(o.property!==void 0&&(r[o.property]=o.decode(e,t)),t+=o.getSpan(e,t),this.decodePrefixes&&e.length===t)break;return r}encode(e,t,r=0){let o=r,s=0,i=0;for(let u of this.fields){let f=u.span;if(i=0<f?f:0,u.property!==void 0){let y=e[u.property];y!==void 0&&(i=u.encode(y,t,r),0>f&&(f=u.getSpan(t,r)))}s=r,r+=f}return s+i-o}fromArray(e){let t=this.makeDestinationObject();for(let r of this.fields)r.property!==void 0&&0<e.length&&(t[r.property]=e.shift());return t}layoutFor(e){if(typeof e!="string")throw new TypeError("property must be string");for(let t of this.fields)if(t.property===e)return t}offsetOf(e){if(typeof e!="string")throw new TypeError("property must be string");let t=0;for(let r of this.fields){if(r.property===e)return t;0>r.span?t=-1:0<=t&&(t+=r.span)}}};O.Structure=mo;var Pn=class{static{a(this,"UnionDiscriminator")}constructor(e){this.property=e}decode(e,t){throw new Error("UnionDiscriminator is abstract")}encode(e,t,r){throw new Error("UnionDiscriminator is abstract")}};O.UnionDiscriminator=Pn;var Jr=class extends Pn{static{a(this,"UnionLayoutDiscriminator")}constructor(e,t){if(!(e instanceof Ve&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(t||e.property||"variant"),this.layout=e}decode(e,t){return this.layout.decode(e,t)}encode(e,t,r){return this.layout.encode(e,t,r)}};O.UnionLayoutDiscriminator=Jr;var Bn=class extends ge{static{a(this,"Union")}constructor(e,t,r){let o;if(e instanceof tt||e instanceof ct)o=new Jr(new Ln(e));else if(e instanceof Ve&&e.isCount())o=new Jr(e);else if(e instanceof Pn)o=e;else throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(t===void 0&&(t=null),!(t===null||t instanceof ge))throw new TypeError("defaultLayout must be null or a Layout");if(t!==null){if(0>t.span)throw new Error("defaultLayout must have constant span");t.property===void 0&&(t=t.replicate("content"))}let s=-1;t&&(s=t.span,0<=s&&(e instanceof tt||e instanceof ct)&&(s+=o.layout.span)),super(s,r),this.discriminator=o,this.usesPrefixDiscriminator=e instanceof tt||e instanceof ct,this.defaultLayout=t,this.registry={};let i=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(u){return i(u)},this.configGetSourceVariant=function(u){i=u.bind(this)}}getSpan(e,t=0){if(0<=this.span)return this.span;let r=this.getVariant(e,t);if(!r)throw new Error("unable to determine span for unrecognized variant");return r.getSpan(e,t)}defaultGetSourceVariant(e){if(Object.prototype.hasOwnProperty.call(e,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(e,this.defaultLayout.property))return;let t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||t.property&&Object.prototype.hasOwnProperty.call(e,t.property)))return t}else for(let t in this.registry){let r=this.registry[t];if(r.property&&Object.prototype.hasOwnProperty.call(e,r.property))return r}throw new Error("unable to infer src variant")}decode(e,t=0){let r,o=this.discriminator,s=o.decode(e,t),i=this.registry[s];if(i===void 0){let u=this.defaultLayout,f=0;this.usesPrefixDiscriminator&&(f=o.layout.span),r=this.makeDestinationObject(),r[o.property]=s,r[u.property]=u.decode(e,t+f)}else r=i.decode(e,t);return r}encode(e,t,r=0){let o=this.getSourceVariant(e);if(o===void 0){let s=this.discriminator,i=this.defaultLayout,u=0;return this.usesPrefixDiscriminator&&(u=s.layout.span),s.encode(e[s.property],t,r),u+i.encode(e[i.property],t,r+u)}return o.encode(e,t,r)}addVariant(e,t,r){let o=new go(this,e,t,r);return this.registry[e]=o,o}getVariant(e,t=0){let r;return e instanceof Uint8Array?r=this.discriminator.decode(e,t):r=e,this.registry[r]}};O.Union=Bn;var go=class extends ge{static{a(this,"VariantLayout")}constructor(e,t,r,o){if(!(e instanceof Bn))throw new TypeError("union must be a Union");if(!Number.isInteger(t)||0>t)throw new TypeError("variant must be a (non-negative) integer");if(typeof r=="string"&&o===void 0&&(o=r,r=null),r){if(!(r instanceof ge))throw new TypeError("layout must be a Layout");if(e.defaultLayout!==null&&0<=r.span&&r.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if(typeof o!="string")throw new TypeError("variant must have a String property")}let s=e.span;0>e.span&&(s=r?r.span:0,0<=s&&e.usesPrefixDiscriminator&&(s+=e.discriminator.layout.span)),super(s,o),this.union=e,this.variant=t,this.layout=r||null}getSpan(e,t=0){if(0<=this.span)return this.span;let r=0;this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span);let o=0;return this.layout&&(o=this.layout.getSpan(e,t+r)),r+o}decode(e,t=0){let r=this.makeDestinationObject();if(this!==this.union.getVariant(e,t))throw new Error("variant mismatch");let o=0;return this.union.usesPrefixDiscriminator&&(o=this.union.discriminator.layout.span),this.layout?r[this.property]=this.layout.decode(e,t+o):this.property?r[this.property]=!0:this.union.usesPrefixDiscriminator&&(r[this.union.discriminator.property]=this.variant),r}encode(e,t,r=0){let o=0;if(this.union.usesPrefixDiscriminator&&(o=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(e,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,r);let s=o;if(this.layout&&(this.layout.encode(e[this.property],t,r+o),s+=this.layout.getSpan(t,r+o),0<=this.union.span&&s>this.union.span))throw new Error("encoded variant overruns containing union");return s}fromArray(e){if(this.layout)return this.layout.fromArray(e)}};O.VariantLayout=go;function Xr(n){return 0>n&&(n+=4294967296),n}a(Xr,"fixBitwiseResult");var Un=class extends ge{static{a(this,"BitStructure")}constructor(e,t,r){if(!(e instanceof tt||e instanceof ct))throw new TypeError("word must be a UInt or UIntBE layout");if(typeof t=="string"&&r===void 0&&(r=t,t=!1),4<e.span)throw new RangeError("word cannot exceed 32 bits");super(e.span,r),this.word=e,this.msb=!!t,this.fields=[];let o=0;this._packedSetValue=function(s){return o=Xr(s),this},this._packedGetValue=function(){return o}}decode(e,t=0){let r=this.makeDestinationObject(),o=this.word.decode(e,t);this._packedSetValue(o);for(let s of this.fields)s.property!==void 0&&(r[s.property]=s.decode(e));return r}encode(e,t,r=0){let o=this.word.decode(t,r);this._packedSetValue(o);for(let s of this.fields)if(s.property!==void 0){let i=e[s.property];i!==void 0&&s.encode(i)}return this.word.encode(this._packedGetValue(),t,r)}addField(e,t){let r=new Dn(this,e,t);return this.fields.push(r),r}addBoolean(e){let t=new _o(this,e);return this.fields.push(t),t}fieldFor(e){if(typeof e!="string")throw new TypeError("property must be string");for(let t of this.fields)if(t.property===e)return t}};O.BitStructure=Un;var Dn=class{static{a(this,"BitField")}constructor(e,t,r){if(!(e instanceof Un))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(t)||0>=t)throw new TypeError("bits must be positive integer");let o=8*e.span,s=e.fields.reduce((i,u)=>i+u.bits,0);if(t+s>o)throw new Error("bits too long for span remainder ("+(o-s)+" of "+o+" remain)");this.container=e,this.bits=t,this.valueMask=(1<<t)-1,t===32&&(this.valueMask=4294967295),this.start=s,this.container.msb&&(this.start=o-s-t),this.wordMask=Xr(this.valueMask<<this.start),this.property=r}decode(e,t){let r=this.container._packedGetValue();return Xr(r&this.wordMask)>>>this.start}encode(e){if(typeof e!="number"||!Number.isInteger(e)||e!==Xr(e&this.valueMask))throw new TypeError(_a("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let t=this.container._packedGetValue(),r=Xr(e<<this.start);this.container._packedSetValue(Xr(t&~this.wordMask)|r)}};O.BitField=Dn;var _o=class extends Dn{static{a(this,"Boolean")}constructor(e,t){super(e,1,t)}decode(e,t){return!!super.decode(e,t)}encode(e){typeof e=="boolean"&&(e=+e),super.encode(e)}};O.Boolean=_o;var bo=class extends ge{static{a(this,"Blob")}constructor(e,t){if(!(e instanceof Ve&&e.isCount()||Number.isInteger(e)&&0<=e))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let r=-1;e instanceof Ve||(r=e),super(r,t),this.length=e}getSpan(e,t){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),r}decode(e,t=0){let r=this.span;return 0>r&&(r=this.length.decode(e,t)),pe(e).slice(t,t+r)}encode(e,t,r){let o=this.length;if(this.length instanceof Ve&&(o=e.length),!(e instanceof Uint8Array&&o===e.length))throw new TypeError(_a("Blob.encode",this)+" requires (length "+o+") Uint8Array as src");if(r+o>t.length)throw new RangeError("encoding overruns Uint8Array");let s=pe(e);return pe(t).write(s.toString("hex"),r,o,"hex"),this.length instanceof Ve&&this.length.encode(o,t,r),o}};O.Blob=bo;var wo=class extends ge{static{a(this,"CString")}constructor(e){super(-1,e)}getSpan(e,t=0){Zr(e);let r=t;for(;r<e.length&&e[r]!==0;)r+=1;return 1+r-t}decode(e,t=0){let r=this.getSpan(e,t);return pe(e).slice(t,t+r-1).toString("utf-8")}encode(e,t,r=0){typeof e!="string"&&(e=String(e));let o=ga.Buffer.from(e,"utf8"),s=o.length;if(r+s>t.length)throw new RangeError("encoding overruns Buffer");let i=pe(t);return o.copy(i,r),i[r+s]=0,s+1}};O.CString=wo;var Ro=class extends ge{static{a(this,"UTF8")}constructor(e,t){if(typeof e=="string"&&t===void 0&&(t=e,e=void 0),e===void 0)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");super(-1,t),this.maxSpan=e}getSpan(e,t=0){return Zr(e),e.length-t}decode(e,t=0){let r=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpan<r)throw new RangeError("text length exceeds maxSpan");return pe(e).slice(t,t+r).toString("utf-8")}encode(e,t,r=0){typeof e!="string"&&(e=String(e));let o=ga.Buffer.from(e,"utf8"),s=o.length;if(0<=this.maxSpan&&this.maxSpan<s)throw new RangeError("text length exceeds maxSpan");if(r+s>t.length)throw new RangeError("encoding overruns Buffer");return o.copy(pe(t),r),s}};O.UTF8=Ro;var Eo=class extends ge{static{a(this,"Constant")}constructor(e,t){super(0,t),this.value=e}decode(e,t){return this.value}encode(e,t,r){return 0}};O.Constant=Eo;O.greedy=(n,e)=>new oo(n,e);O.offset=(n,e,t)=>new Ln(n,e,t);O.u8=n=>new tt(1,n);O.u16=n=>new tt(2,n);O.u24=n=>new tt(3,n);O.u32=n=>new tt(4,n);O.u40=n=>new tt(5,n);O.u48=n=>new tt(6,n);O.nu64=n=>new io(n);O.u16be=n=>new ct(2,n);O.u24be=n=>new ct(3,n);O.u32be=n=>new ct(4,n);O.u40be=n=>new ct(5,n);O.u48be=n=>new ct(6,n);O.nu64be=n=>new ao(n);O.s8=n=>new Wt(1,n);O.s16=n=>new Wt(2,n);O.s24=n=>new Wt(3,n);O.s32=n=>new Wt(4,n);O.s40=n=>new Wt(5,n);O.s48=n=>new Wt(6,n);O.ns64=n=>new co(n);O.s16be=n=>new sr(2,n);O.s24be=n=>new sr(3,n);O.s32be=n=>new sr(4,n);O.s40be=n=>new sr(5,n);O.s48be=n=>new sr(6,n);O.ns64be=n=>new uo(n);O.f32=n=>new lo(n);O.f32be=n=>new fo(n);O.f64=n=>new ho(n);O.f64be=n=>new po(n);O.struct=(n,e,t)=>new mo(n,e,t);O.bits=(n,e,t)=>new Un(n,e,t);O.seq=(n,e,t)=>new yo(n,e,t);O.union=(n,e,t)=>new Bn(n,e,t);O.unionLayoutDiscriminator=(n,e)=>new Jr(n,e);O.blob=(n,e)=>new bo(n,e);O.cstr=n=>new wo(n);O.utf8=(n,e)=>new Ro(n,e);O.constant=(n,e)=>new Eo(n,e)});var ql=ce((lE,Kl)=>{"use strict";var ko=ae("path").sep||"/";Kl.exports=rg;function rg(n){if(typeof n!="string"||n.length<=7||n.substring(0,7)!="file://")throw new TypeError("must pass in a file:// URI to convert to a file path");var e=decodeURI(n.substring(7)),t=e.indexOf("/"),r=e.substring(0,t),o=e.substring(t+1);return r=="localhost"&&(r=""),r&&(r=ko+ko+r),o=o.replace(/^(.+)\|/,"$1:"),ko=="\\"&&(o=o.replace(/\//g,"\\")),/^.+\:/.test(o)||(o=ko+o),r+o}a(rg,"fileUriToPath")});var Yl=ce((Qr,Gl)=>{"use strict";var wa=ae("fs"),vo=ae("path"),ng=ql(),Io=vo.join,sg=vo.dirname,jl=wa.accessSync&&function(n){try{wa.accessSync(n)}catch{return!1}return!0}||wa.existsSync||vo.existsSync,Vl={arrow:process.env.NODE_BINDINGS_ARROW||" \u2192 ",compiled:process.env.NODE_BINDINGS_COMPILED_DIR||"compiled",platform:process.platform,arch:process.arch,nodePreGyp:"node-v"+process.versions.modules+"-"+process.platform+"-"+process.arch,version:process.versions.node,bindings:"bindings.node",try:[["module_root","build","bindings"],["module_root","build","Debug","bindings"],["module_root","build","Release","bindings"],["module_root","out","Debug","bindings"],["module_root","Debug","bindings"],["module_root","out","Release","bindings"],["module_root","Release","bindings"],["module_root","build","default","bindings"],["module_root","compiled","version","platform","arch","bindings"],["module_root","addon-build","release","install-root","bindings"],["module_root","addon-build","debug","install-root","bindings"],["module_root","addon-build","default","install-root","bindings"],["module_root","lib","binding","nodePreGyp","bindings"]]};function og(n){typeof n=="string"?n={bindings:n}:n||(n={}),Object.keys(Vl).map(function(f){f in n||(n[f]=Vl[f])}),n.module_root||(n.module_root=Qr.getRoot(Qr.getFileName())),vo.extname(n.bindings)!=".node"&&(n.bindings+=".node");for(var e=typeof __webpack_require__=="function"?__non_webpack_require__:ae,t=[],r=0,o=n.try.length,s,i,u;r<o;r++){s=Io.apply(null,n.try[r].map(function(f){return n[f]||f})),t.push(s);try{return i=n.path?e.resolve(s):e(s),n.path||(i.path=s),i}catch(f){if(f.code!=="MODULE_NOT_FOUND"&&f.code!=="QUALIFIED_PATH_RESOLUTION_FAILED"&&!/not find/i.test(f.message))throw f}}throw u=new Error(`Could not locate the bindings file. Tried:
3
3
  `+t.map(function(f){return n.arrow+f}).join(`
4
4
  `)),u.tries=t,u}a(og,"bindings");Gl.exports=Qr=og;Qr.getFileName=a(function(e){var t=Error.prepareStackTrace,r=Error.stackTraceLimit,o={},s;Error.stackTraceLimit=10,Error.prepareStackTrace=function(u,f){for(var y=0,d=f.length;y<d;y++)if(s=f[y].getFileName(),s!==__filename)if(e){if(s!==e)return}else return},Error.captureStackTrace(o),o.stack,Error.prepareStackTrace=t,Error.stackTraceLimit=r;var i="file://";return s.indexOf(i)===0&&(s=ng(s)),s},"getFileName");Qr.getRoot=a(function(e){for(var t=sg(e),r;;){if(t==="."&&(t=process.cwd()),jl(Io(t,"package.json"))||jl(Io(t,"node_modules")))return t;if(r===t)throw new Error('Could not find module root given file: "'+e+'". Do you have a `package.json` file? ');r=t,t=Io(t,"..")}},"getRoot")});var Xl=ce(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});var Kt;try{Kt=Yl()("bigint_buffer")}catch{console.warn("bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)")}function ig(n){if(Kt===void 0){let e=Buffer.from(n);e.reverse();let t=e.toString("hex");return t.length===0?BigInt(0):BigInt(`0x${t}`)}return Kt.toBigInt(n,!1)}a(ig,"toBigIntLE");en.toBigIntLE=ig;function ag(n){if(Kt===void 0){let e=n.toString("hex");return e.length===0?BigInt(0):BigInt(`0x${e}`)}return Kt.toBigInt(n,!0)}a(ag,"toBigIntBE");en.toBigIntBE=ag;function cg(n,e){if(Kt===void 0){let t=n.toString(16),r=Buffer.from(t.padStart(e*2,"0").slice(0,e*2),"hex");return r.reverse(),r}return Kt.fromBigInt(n,Buffer.allocUnsafe(e),!1)}a(cg,"toBufferLE");en.toBufferLE=cg;function ug(n,e){if(Kt===void 0){let t=n.toString(16);return Buffer.from(t.padStart(e*2,"0").slice(0,e*2),"hex")}return Kt.fromBigInt(n,Buffer.allocUnsafe(e),!0)}a(ug,"toBufferBE");en.toBufferBE=ug});function lg(n){return Mn(n)&&typeof n[Symbol.iterator]=="function"}function Mn(n){return typeof n=="object"&&n!=null}function To(n){return Mn(n)&&!Array.isArray(n)}function At(n){return typeof n=="symbol"?n.toString():typeof n=="string"?JSON.stringify(n):`${n}`}function fg(n){let{done:e,value:t}=n.next();return e?void 0:t}function dg(n,e,t,r){if(n===!0)return;n===!1?n={}:typeof n=="string"&&(n={message:n});let{path:o,branch:s}=e,{type:i}=t,{refinement:u,message:f=`Expected a value of type \`${i}\`${u?` with refinement \`${u}\``:""}, but received: \`${At(r)}\``}=n;return{value:r,type:i,refinement:u,key:o[o.length-1],path:o,branch:s,...n,message:f}}function*Jl(n,e,t,r){lg(n)||(n=[n]);for(let o of n){let s=dg(o,e,t,r);s&&(yield s)}}function*Ea(n,e,t={}){let{path:r=[],branch:o=[n],coerce:s=!1,mask:i=!1}=t,u={path:r,branch:o,mask:i};s&&(n=e.coercer(n,u));let f="valid";for(let y of e.validator(n,u))y.explanation=t.message,f="not_valid",yield[y,void 0];for(let[y,d,_]of e.entries(n,u)){let E=Ea(d,_,{path:y===void 0?r:[...r,y],branch:y===void 0?o:[...o,d],coerce:s,mask:i,message:t.message});for(let R of E)R[0]?(f=R[0].refinement!=null?"not_refined":"not_valid",yield[R[0],void 0]):s&&(d=R[1],y===void 0?n=d:n instanceof Map?n.set(y,d):n instanceof Set?n.add(d):Mn(n)&&(d!==void 0||y in n)&&(n[y]=d))}if(f!=="not_valid")for(let y of e.refiner(n,u))y.explanation=t.message,f="not_refined",yield[y,void 0];f==="valid"&&(yield[void 0,n])}function Sa(n,e,t){let r=$n(n,e,{message:t});if(r[0])throw r[0]}function H(n,e,t){let r=$n(n,e,{coerce:!0,message:t});if(r[0])throw r[0];return r[1]}function hg(n,e,t){let r=$n(n,e,{coerce:!0,mask:!0,message:t});if(r[0])throw r[0];return r[1]}function Zl(n,e){return!$n(n,e)[0]}function $n(n,e,t={}){let r=Ea(n,e,t),o=fg(r);return o[0]?[new Ra(o[0],function*(){for(let i of r)i[0]&&(yield i[0])}),void 0]:[void 0,o[1]]}function vr(n,e){return new mt({type:n,schema:null,validator:e})}function Ql(){return vr("any",()=>!0)}function W(n){return new mt({type:"array",schema:n,*entries(e){if(n&&Array.isArray(e))for(let[t,r]of e.entries())yield[t,r,n]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${At(e)}`}})}function kt(){return vr("boolean",n=>typeof n=="boolean")}function Oo(n){return vr("instance",e=>e instanceof n||`Expected a \`${n.name}\` instance, but received: ${At(e)}`)}function Te(n){let e=At(n),t=typeof n;return new mt({type:"literal",schema:t==="string"||t==="number"||t==="boolean"?n:null,validator(r){return r===n||`Expected the literal \`${e}\`, but received: ${At(r)}`}})}function pg(){return vr("never",()=>!1)}function K(n){return new mt({...n,validator:a((e,t)=>e===null||n.validator(e,t),"validator"),refiner:a((e,t)=>e===null||n.refiner(e,t),"refiner")})}function k(){return vr("number",n=>typeof n=="number"&&!isNaN(n)||`Expected a number, but received: ${At(n)}`)}function Z(n){return new mt({...n,validator:a((e,t)=>e===void 0||n.validator(e,t),"validator"),refiner:a((e,t)=>e===void 0||n.refiner(e,t),"refiner")})}function Aa(n,e){return new mt({type:"record",schema:null,*entries(t){if(Mn(t))for(let r in t){let o=t[r];yield[r,r,n],yield[r,o,e]}},validator(t){return To(t)||`Expected an object, but received: ${At(t)}`},coercer(t){return To(t)?{...t}:t}})}function $(){return vr("string",n=>typeof n=="string"||`Expected a string, but received: ${At(n)}`)}function No(n){let e=pg();return new mt({type:"tuple",schema:null,*entries(t){if(Array.isArray(t)){let r=Math.max(n.length,t.length);for(let o=0;o<r;o++)yield[o,t[o],n[o]||e]}},validator(t){return Array.isArray(t)||`Expected an array, but received: ${At(t)}`},coercer(t){return Array.isArray(t)?t.slice():t}})}function B(n){let e=Object.keys(n);return new mt({type:"type",schema:n,*entries(t){if(Mn(t))for(let r of e)yield[r,t[r],n[r]]},validator(t){return To(t)||`Expected an object, but received: ${At(t)}`},coercer(t){return To(t)?{...t}:t}})}function Ge(n){let e=n.map(t=>t.type).join(" | ");return new mt({type:"union",schema:null,coercer(t,r){for(let o of n){let[s,i]=o.validate(t,{coerce:!0,mask:r.mask});if(!s)return i}return t},validator(t,r){let o=[];for(let s of n){let[...i]=Ea(t,s,r),[u]=i;if(u[0])for(let[f]of i)f&&o.push(f);else return[]}return[`Expected the value to satisfy a union of \`${e}\`, but received: ${At(t)}`,...o]}})}function Tr(){return vr("unknown",()=>!0)}function tn(n,e,t){return new mt({...n,coercer:a((r,o)=>Zl(r,e)?n.coercer(t(r,o),o):n.coercer(r,o),"coercer")})}var Ra,mt,ef=Pe(()=>{"use strict";Ra=class extends TypeError{static{a(this,"StructError")}constructor(e,t){let r,{message:o,explanation:s,...i}=e,{path:u}=e,f=u.length===0?o:`At path: ${u.join(".")} -- ${o}`;super(s??f),s!=null&&(this.cause=f),Object.assign(this,i),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}};a(lg,"isIterable");a(Mn,"isObject");a(To,"isNonArrayObject");a(At,"print");a(fg,"shiftIterator");a(dg,"toFailure");a(Jl,"toFailures");a(Ea,"run");mt=class{static{a(this,"Struct")}constructor(e){let{type:t,schema:r,validator:o,refiner:s,coercer:i=a(f=>f,"coercer"),entries:u=a(function*(){},"entries")}=e;this.type=t,this.schema=r,this.entries=u,this.coercer=i,o?this.validator=(f,y)=>{let d=o(f,y);return Jl(d,y,this,f)}:this.validator=()=>[],s?this.refiner=(f,y)=>{let d=s(f,y);return Jl(d,y,this,f)}:this.refiner=()=>[]}assert(e,t){return Sa(e,this,t)}create(e,t){return H(e,this,t)}is(e){return Zl(e,this)}mask(e,t){return hg(e,this,t)}validate(e,t={}){return $n(e,this,t)}};a(Sa,"assert");a(H,"create");a(hg,"mask");a(Zl,"is");a($n,"validate");a(vr,"define");a(Ql,"any");a(W,"array");a(kt,"boolean");a(Oo,"instance");a(Te,"literal");a(pg,"never");a(K,"nullable");a(k,"number");a(Z,"optional");a(Aa,"record");a($,"string");a(No,"tuple");a(B,"type");a(Ge,"union");a(Tr,"unknown");a(tn,"coerce")});import yg from"crypto";function Hn(){return Co>xo.length-16&&(yg.randomFillSync(xo),Co=0),xo.slice(Co,Co+=16)}var xo,Co,ka=Pe(()=>{"use strict";xo=new Uint8Array(256),Co=xo.length;a(Hn,"rng")});var tf,rf=Pe(()=>{"use strict";tf=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function mg(n){return typeof n=="string"&&tf.test(n)}var or,zn=Pe(()=>{"use strict";rf();a(mg,"validate");or=mg});function gg(n,e=0){let t=(qe[n[e+0]]+qe[n[e+1]]+qe[n[e+2]]+qe[n[e+3]]+"-"+qe[n[e+4]]+qe[n[e+5]]+"-"+qe[n[e+6]]+qe[n[e+7]]+"-"+qe[n[e+8]]+qe[n[e+9]]+"-"+qe[n[e+10]]+qe[n[e+11]]+qe[n[e+12]]+qe[n[e+13]]+qe[n[e+14]]+qe[n[e+15]]).toLowerCase();if(!or(t))throw TypeError("Stringified UUID is invalid");return t}var qe,ir,Fn=Pe(()=>{"use strict";zn();qe=[];for(let n=0;n<256;++n)qe.push((n+256).toString(16).substr(1));a(gg,"stringify");ir=gg});function _g(n,e,t){let r=e&&t||0,o=e||new Array(16);n=n||{};let s=n.node||nf,i=n.clockseq!==void 0?n.clockseq:Ia;if(s==null||i==null){let E=n.random||(n.rng||Hn)();s==null&&(s=nf=[E[0]|1,E[1],E[2],E[3],E[4],E[5]]),i==null&&(i=Ia=(E[6]<<8|E[7])&16383)}let u=n.msecs!==void 0?n.msecs:Date.now(),f=n.nsecs!==void 0?n.nsecs:Ta+1,y=u-va+(f-Ta)/1e4;if(y<0&&n.clockseq===void 0&&(i=i+1&16383),(y<0||u>va)&&n.nsecs===void 0&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");va=u,Ta=f,Ia=i,u+=122192928e5;let d=((u&268435455)*1e4+f)%4294967296;o[r++]=d>>>24&255,o[r++]=d>>>16&255,o[r++]=d>>>8&255,o[r++]=d&255;let _=u/4294967296*1e4&268435455;o[r++]=_>>>8&255,o[r++]=_&255,o[r++]=_>>>24&15|16,o[r++]=_>>>16&255,o[r++]=i>>>8|128,o[r++]=i&255;for(let E=0;E<6;++E)o[r+E]=s[E];return e||ir(o)}var nf,Ia,va,Ta,sf,of=Pe(()=>{"use strict";ka();Fn();va=0,Ta=0;a(_g,"v1");sf=_g});function bg(n){if(!or(n))throw TypeError("Invalid UUID");let e,t=new Uint8Array(16);return t[0]=(e=parseInt(n.slice(0,8),16))>>>24,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=e&255,t[4]=(e=parseInt(n.slice(9,13),16))>>>8,t[5]=e&255,t[6]=(e=parseInt(n.slice(14,18),16))>>>8,t[7]=e&255,t[8]=(e=parseInt(n.slice(19,23),16))>>>8,t[9]=e&255,t[10]=(e=parseInt(n.slice(24,36),16))/1099511627776&255,t[11]=e/4294967296&255,t[12]=e>>>24&255,t[13]=e>>>16&255,t[14]=e>>>8&255,t[15]=e&255,t}var Lo,Oa=Pe(()=>{"use strict";zn();a(bg,"parse");Lo=bg});function wg(n){n=unescape(encodeURIComponent(n));let e=[];for(let t=0;t<n.length;++t)e.push(n.charCodeAt(t));return e}function Wn(n,e,t){function r(o,s,i,u){if(typeof o=="string"&&(o=wg(o)),typeof s=="string"&&(s=Lo(s)),s.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let f=new Uint8Array(16+o.length);if(f.set(s),f.set(o,s.length),f=t(f),f[6]=f[6]&15|e,f[8]=f[8]&63|128,i){u=u||0;for(let y=0;y<16;++y)i[u+y]=f[y];return i}return ir(f)}a(r,"generateUUID");try{r.name=n}catch{}return r.DNS=Rg,r.URL=Eg,r}var Rg,Eg,Na=Pe(()=>{"use strict";Fn();Oa();a(wg,"stringToBytes");Rg="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Eg="6ba7b811-9dad-11d1-80b4-00c04fd430c8";a(Wn,"default")});import Sg from"crypto";function Ag(n){return Array.isArray(n)?n=Buffer.from(n):typeof n=="string"&&(n=Buffer.from(n,"utf8")),Sg.createHash("md5").update(n).digest()}var af,cf=Pe(()=>{"use strict";a(Ag,"md5");af=Ag});var kg,uf,lf=Pe(()=>{"use strict";Na();cf();kg=Wn("v3",48,af),uf=kg});function Ig(n,e,t){n=n||{};let r=n.random||(n.rng||Hn)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){t=t||0;for(let o=0;o<16;++o)e[t+o]=r[o];return e}return ir(r)}var ff,df=Pe(()=>{"use strict";ka();Fn();a(Ig,"v4");ff=Ig});import vg from"crypto";function Tg(n){return Array.isArray(n)?n=Buffer.from(n):typeof n=="string"&&(n=Buffer.from(n,"utf8")),vg.createHash("sha1").update(n).digest()}var hf,pf=Pe(()=>{"use strict";a(Tg,"sha1");hf=Tg});var Og,yf,mf=Pe(()=>{"use strict";Na();pf();Og=Wn("v5",80,hf),yf=Og});var gf,_f=Pe(()=>{"use strict";gf="00000000-0000-0000-0000-000000000000"});function Ng(n){if(!or(n))throw TypeError("Invalid UUID");return parseInt(n.substr(14,1),16)}var bf,wf=Pe(()=>{"use strict";zn();a(Ng,"version");bf=Ng});var Ca={};Cn(Ca,{NIL:()=>gf,parse:()=>Lo,stringify:()=>ir,v1:()=>sf,v3:()=>uf,v4:()=>ff,v5:()=>yf,validate:()=>or,version:()=>bf});var xa=Pe(()=>{"use strict";of();lf();df();mf();_f();wf();zn();Fn();Oa()});var Ef=ce((hS,Rf)=>{"use strict";var Cg=(xa(),xn(Ca)).v4,xg=a(function(n,e,t,r){if(typeof n!="string")throw new TypeError(n+" must be a string");r=r||{};let o=typeof r.version=="number"?r.version:2;if(o!==1&&o!==2)throw new TypeError(o+" must be 1 or 2");let s={method:n};if(o===2&&(s.jsonrpc="2.0"),e){if(typeof e!="object"&&!Array.isArray(e))throw new TypeError(e+" must be an object, array or omitted");s.params=e}if(typeof t>"u"){let i=typeof r.generator=="function"?r.generator:function(){return Cg()};s.id=i(s,r)}else o===2&&t===null?r.notificationIdNull&&(s.id=null):s.id=t;return s},"generateRequest");Rf.exports=xg});var Af=ce((yS,Sf)=>{"use strict";var Lg=(xa(),xn(Ca)).v4,Pg=Ef(),Kn=a(function(n,e){if(!(this instanceof Kn))return new Kn(n,e);e||(e={}),this.options={reviver:typeof e.reviver<"u"?e.reviver:null,replacer:typeof e.replacer<"u"?e.replacer:null,generator:typeof e.generator<"u"?e.generator:function(){return Lg()},version:typeof e.version<"u"?e.version:2,notificationIdNull:typeof e.notificationIdNull=="boolean"?e.notificationIdNull:!1},this.callServer=n},"ClientBrowser");Sf.exports=Kn;Kn.prototype.request=function(n,e,t,r){let o=this,s=null,i=Array.isArray(n)&&typeof e=="function";if(this.options.version===1&&i)throw new TypeError("JSON-RPC 1.0 does not support batching");if(i||!i&&n&&typeof n=="object"&&typeof e=="function")r=e,s=n;else{typeof t=="function"&&(r=t,t=void 0);let y=typeof r=="function";try{s=Pg(n,e,t,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(d){if(y)return r(d);throw d}if(!y)return s}let f;try{f=JSON.stringify(s,this.options.replacer)}catch(y){return r(y)}return this.callServer(f,function(y,d){o._parseResponse(y,d,r)}),s};Kn.prototype._parseResponse=function(n,e,t){if(n){t(n);return}if(!e)return t();let r;try{r=JSON.parse(e,this.options.reviver)}catch(o){return t(o)}if(t.length===3)if(Array.isArray(r)){let o=a(function(i){return typeof i.error<"u"},"isError"),s=a(function(i){return!o(i)},"isNotError");return t(null,r.filter(o),r.filter(s))}else return t(null,r.error,r.result);t(null,r)}});var Tf=ce((gS,vf)=>{"use strict";var{Duplex:Bg}=ae("stream");function kf(n){n.emit("close")}a(kf,"emitClose");function Ug(){!this.destroyed&&this._writableState.finished&&this.destroy()}a(Ug,"duplexOnEnd");function If(n){this.removeListener("error",If),this.destroy(),this.listenerCount("error")===0&&this.emit("error",n)}a(If,"duplexOnError");function Dg(n,e){let t=!0,r=new Bg({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return n.on("message",a(function(s,i){let u=!i&&r._readableState.objectMode?s.toString():s;r.push(u)||n.pause()},"message")),n.once("error",a(function(s){r.destroyed||(t=!1,r.destroy(s))},"error")),n.once("close",a(function(){r.destroyed||r.push(null)},"close")),r._destroy=function(o,s){if(n.readyState===n.CLOSED){s(o),process.nextTick(kf,r);return}let i=!1;n.once("error",a(function(f){i=!0,s(f)},"error")),n.once("close",a(function(){i||s(o),process.nextTick(kf,r)},"close")),t&&n.terminate()},r._final=function(o){if(n.readyState===n.CONNECTING){n.once("open",a(function(){r._final(o)},"open"));return}n._socket!==null&&(n._socket._writableState.finished?(o(),r._readableState.endEmitted&&r.destroy()):(n._socket.once("finish",a(function(){o()},"finish")),n.close()))},r._read=function(){n.isPaused&&n.resume()},r._write=function(o,s,i){if(n.readyState===n.CONNECTING){n.once("open",a(function(){r._write(o,s,i)},"open"));return}n.send(o,i)},r.on("end",Ug),r.on("error",If),r}a(Dg,"createWebSocketStream");vf.exports=Dg});var ar=ce((bS,Of)=>{"use strict";Of.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:a(()=>{},"NOOP")}});var qf=ce((RS,Kf)=>{"use strict";var Lf=ae("fs"),qt=ae("path"),Pf=ae("os"),Bf=typeof __webpack_require__=="function"?__non_webpack_require__:ae,Mg=process.config&&process.config.variables||{},$g=!!process.env.PREBUILDS_ONLY,Nf=process.versions.modules,La=Fg()?"electron":zg()?"node-webkit":"node",Pa=process.env.npm_config_arch||Pf.arch(),Ba=process.env.npm_config_platform||Pf.platform(),Uf=process.env.LIBC||(Wg(Ba)?"musl":"glibc"),Ua=process.env.ARM_VERSION||(Pa==="arm64"?"8":Mg.arm_version)||"",Df=(process.versions.uv||"").split(".")[0];Kf.exports=xt;function xt(n){return Bf(xt.resolve(n))}a(xt,"load");xt.resolve=xt.path=function(n){n=qt.resolve(n||".");try{var e=Bf(qt.join(n,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[e+"_PREBUILD"]&&(n=process.env[e+"_PREBUILD"])}catch{}if(!$g){var t=Cf(qt.join(n,"build/Release"),xf);if(t)return t;var r=Cf(qt.join(n,"build/Debug"),xf);if(r)return r}var o=u(n);if(o)return o;var s=u(qt.dirname(process.execPath));if(s)return s;var i=["platform="+Ba,"arch="+Pa,"runtime="+La,"abi="+Nf,"uv="+Df,Ua?"armv="+Ua:"","libc="+Uf,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"",typeof __webpack_require__=="function"?"webpack=true":""].filter(Boolean).join(" ");throw new Error("No native build was found for "+i+`
5
5
  loaded from: `+n+`
@@ -256,4 +256,4 @@ buffer-layout/lib/Layout.js:
256
256
  * @see {@link https://github.com/pabigot/buffer-layout|buffer-layout on GitHub}
257
257
  *)
258
258
  */
259
- //# sourceMappingURL=chunk-WL2T4PIX.js.map
259
+ //# sourceMappingURL=chunk-4R3P3DNX.js.map