@sentio/sdk-bundle 2.41.5 → 2.41.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/aptos/builtin/0x1.js +1 -1
- package/lib/aptos/builtin/0x3.js +1 -1
- package/lib/aptos/builtin/index.js +1 -1
- package/lib/aptos/ext/index.js +1 -1
- package/lib/aptos/index.js +1 -1
- package/lib/btc/index.js +1 -1
- package/lib/{chunk-XYISSQEU.js → chunk-BX4KG2ZR.js} +2 -2
- package/lib/{chunk-LCUGDGMN.js → chunk-CCQHM2XD.js} +2 -2
- package/lib/{chunk-KY5AFKV5.js → chunk-DZVTAQNC.js} +2 -2
- package/lib/{chunk-MGIOFRXM.js → chunk-FFA6VNQP.js} +2 -2
- package/lib/{chunk-X7K74U6O.js → chunk-HITSEVEI.js} +2 -2
- package/lib/{chunk-3C4YSA42.js → chunk-HR3CXVT4.js} +2 -2
- package/lib/{chunk-4ACVSPIF.js → chunk-JDW2L37R.js} +2 -2
- package/lib/{chunk-RDBX2EIJ.js → chunk-L2WN35BE.js} +2 -2
- package/lib/{chunk-CJVPUD6U.js → chunk-LL6GKXEO.js} +2 -2
- package/lib/{chunk-BVDLKPY7.js → chunk-OU2BCESY.js} +2 -2
- package/lib/{chunk-PSYYSAEX.js → chunk-QC6KHXJD.js} +2 -2
- package/lib/{chunk-XZRRBRMQ.js → chunk-RSGRT2DV.js} +2 -2
- package/lib/{chunk-VEVTWG5S.js → chunk-RT6IFBHE.js} +2 -2
- package/lib/{chunk-CSVBDVD7.js → chunk-RWX5CV5W.js} +2 -2
- package/lib/{chunk-TW3ZXDJC.js → chunk-SBU7XQ42.js} +4 -4
- package/lib/{chunk-TW3ZXDJC.js.map → chunk-SBU7XQ42.js.map} +1 -1
- package/lib/{chunk-3KK6D6YO.js → chunk-WWVBF7HH.js} +2 -2
- package/lib/{chunk-VM5J6G66.js → chunk-YCDDNR5A.js} +2 -2
- package/lib/{chunk-4QS3NUUW.js → chunk-ZFXV2FHI.js} +2 -2
- package/lib/{chunk-JTQMVYTS.js → chunk-ZMRHWH7D.js} +11 -11
- package/lib/{chunk-JTQMVYTS.js.map → chunk-ZMRHWH7D.js.map} +1 -1
- package/lib/core/index.js +1 -1
- package/lib/eth/builtin/eacaggregatorproxy.js +1 -1
- package/lib/eth/builtin/erc1155.js +1 -1
- package/lib/eth/builtin/erc20.js +1 -1
- package/lib/eth/builtin/erc721.js +1 -1
- package/lib/eth/builtin/index.js +1 -1
- package/lib/eth/builtin/weth9.js +1 -1
- package/lib/eth/codegen/index.js +1 -1
- package/lib/eth/index.js +1 -1
- package/lib/fuel/codegen/index.js +1 -1
- package/lib/fuel/codegen/index.js.map +1 -1
- package/lib/fuel/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/move/index.js +1 -1
- package/lib/solana/builtin/index.js +1 -1
- package/lib/solana/index.js +1 -1
- package/lib/stark/index.js +1 -1
- package/lib/store/index.js +1 -1
- package/lib/sui/builtin/0x1.js +1 -1
- package/lib/sui/builtin/0x2.js +1 -1
- package/lib/sui/builtin/0x3.js +1 -1
- package/lib/sui/builtin/index.js +1 -1
- package/lib/sui/ext/index.js +1 -1
- package/lib/sui/index.js +1 -1
- package/lib/testing/index.js +1 -1
- package/lib/utils/index.js +1 -1
- package/package.json +2 -2
- /package/lib/{chunk-XYISSQEU.js.map → chunk-BX4KG2ZR.js.map} +0 -0
- /package/lib/{chunk-LCUGDGMN.js.map → chunk-CCQHM2XD.js.map} +0 -0
- /package/lib/{chunk-KY5AFKV5.js.map → chunk-DZVTAQNC.js.map} +0 -0
- /package/lib/{chunk-MGIOFRXM.js.map → chunk-FFA6VNQP.js.map} +0 -0
- /package/lib/{chunk-X7K74U6O.js.map → chunk-HITSEVEI.js.map} +0 -0
- /package/lib/{chunk-3C4YSA42.js.map → chunk-HR3CXVT4.js.map} +0 -0
- /package/lib/{chunk-4ACVSPIF.js.map → chunk-JDW2L37R.js.map} +0 -0
- /package/lib/{chunk-RDBX2EIJ.js.map → chunk-L2WN35BE.js.map} +0 -0
- /package/lib/{chunk-CJVPUD6U.js.map → chunk-LL6GKXEO.js.map} +0 -0
- /package/lib/{chunk-BVDLKPY7.js.map → chunk-OU2BCESY.js.map} +0 -0
- /package/lib/{chunk-PSYYSAEX.js.map → chunk-QC6KHXJD.js.map} +0 -0
- /package/lib/{chunk-XZRRBRMQ.js.map → chunk-RSGRT2DV.js.map} +0 -0
- /package/lib/{chunk-VEVTWG5S.js.map → chunk-RT6IFBHE.js.map} +0 -0
- /package/lib/{chunk-CSVBDVD7.js.map → chunk-RWX5CV5W.js.map} +0 -0
- /package/lib/{chunk-3KK6D6YO.js.map → chunk-WWVBF7HH.js.map} +0 -0
- /package/lib/{chunk-VM5J6G66.js.map → chunk-YCDDNR5A.js.map} +0 -0
- /package/lib/{chunk-4QS3NUUW.js.map → chunk-ZFXV2FHI.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 as m,S as L,T as D,U as E,V as g,b as f,g as P,h as O,j as d,r as S,u as B,v as A,w as I,x as N,z as U}from"./chunk-4QS3NUUW.js";import{d as j,g as w}from"./chunk-LLHU72AA.js";var _={};j(_,{ERC1155BoundContractView:()=>T,ERC1155ContractView:()=>F,ERC1155Processor:()=>v,ERC1155ProcessorTemplate:()=>R,ERC1155__factory:()=>m,getERC1155Contract:()=>p,getERC1155ContractOnContext:()=>V,mockApprovalForAllLog:()=>K,mockTransferBatchLog:()=>W,mockTransferSingleLog:()=>H,mockURILog:()=>M});var h=m.connect("0x0",D),u=new f(["function balanceOf(address account, uint256 id) view returns (uint256)","function balanceOfBatch(address[] accounts, uint256[] ids) view returns (uint256[])","function isApprovedForAll(address account, address operator) view returns (bool)","function safeBatchTransferFrom(address from, address to, uint256[] ids, uint256[] amounts, bytes data) returns ()","function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes data) returns ()","function setApprovalForAll(address operator, bool approved) returns ()","function supportsInterface(bytes4 interfaceId) view returns (bool)","function uri(uint256 id) view returns (string)"]),F=class extends P{constructor(t){super(t),this.callStatic.contract=t}async balanceOf(t,e,r,n,a){try{if(n?.ethCallResults&&a){let s=u.encodeFunctionData("balanceOf",[t,e]),o=g({context:a,calldata:s}),c=n.ethCallResults[o];if(c){let l=u.decodeFunctionResult("balanceOf",c).toArray();return l.length==1?l[0]:l}}return await this.contract.getFunction("balanceOf(address,uint256)")(t,e,r||{})}catch(s){let o=new Error().stack;throw d(s,void 0,o)}}async balanceOfBatch(t,e,r,n,a){try{if(n?.ethCallResults&&a){let s=u.encodeFunctionData("balanceOfBatch",[t,e]),o=g({context:a,calldata:s}),c=n.ethCallResults[o];if(c){let l=u.decodeFunctionResult("balanceOfBatch",c).toArray();return l.length==1?l[0]:l}}return await this.contract.getFunction("balanceOfBatch(address[],uint256[])")(t,e,r||{})}catch(s){let o=new Error().stack;throw d(s,void 0,o)}}async isApprovedForAll(t,e,r,n,a){try{if(n?.ethCallResults&&a){let s=u.encodeFunctionData("isApprovedForAll",[t,e]),o=g({context:a,calldata:s}),c=n.ethCallResults[o];if(c){let l=u.decodeFunctionResult("isApprovedForAll",c).toArray();return l.length==1?l[0]:l}}return await this.contract.getFunction("isApprovedForAll(address,address)")(t,e,r||{})}catch(s){let o=new Error().stack;throw d(s,void 0,o)}}async supportsInterface(t,e,r,n){try{if(r?.ethCallResults&&n){let a=u.encodeFunctionData("supportsInterface",[t]),s=g({context:n,calldata:a}),o=r.ethCallResults[s];if(o){let c=u.decodeFunctionResult("supportsInterface",o).toArray();return c.length==1?c[0]:c}}return await this.contract.getFunction("supportsInterface(bytes4)")(t,e||{})}catch(a){let s=new Error().stack;throw d(a,void 0,s)}}async uri(t,e,r,n){try{if(r?.ethCallResults&&n){let a=u.encodeFunctionData("uri",[t]),s=g({context:n,calldata:a}),o=r.ethCallResults[s];if(o){let c=u.decodeFunctionResult("uri",o).toArray();return c.length==1?c[0]:c}}return await this.contract.getFunction("uri(uint256)")(t,e||{})}catch(a){let s=new Error().stack;throw d(a,void 0,s)}}callStatic={contract:this.contract,async safeBatchTransferFrom(t,e,r,n,a,s,o,c){try{if(o?.ethCallResults&&c){let l=u.encodeFunctionData("safeBatchTransferFrom",[t,e,r,n,a]),C=g({context:c,calldata:l}),b=o.ethCallResults[C];if(b){let x=u.decodeFunctionResult("safeBatchTransferFrom",b).toArray();return x.length==1?x[0]:x}}return await this.contract.getFunction("safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)").staticCall(t,e,r,n,a,s||{})}catch(l){let C=new Error().stack;throw d(l,void 0,C)}},async safeTransferFrom(t,e,r,n,a,s,o,c){try{if(o?.ethCallResults&&c){let l=u.encodeFunctionData("safeTransferFrom",[t,e,r,n,a]),C=g({context:c,calldata:l}),b=o.ethCallResults[C];if(b){let x=u.decodeFunctionResult("safeTransferFrom",b).toArray();return x.length==1?x[0]:x}}return await this.contract.getFunction("safeTransferFrom(address,address,uint256,uint256,bytes)").staticCall(t,e,r,n,a,s||{})}catch(l){let C=new Error().stack;throw d(l,void 0,C)}},async setApprovalForAll(t,e,r,n,a){try{if(n?.ethCallResults&&a){let s=u.encodeFunctionData("setApprovalForAll",[t,e]),o=g({context:a,calldata:s}),c=n.ethCallResults[o];if(c){let l=u.decodeFunctionResult("setApprovalForAll",c).toArray();return l.length==1?l[0]:l}}return await this.contract.getFunction("setApprovalForAll(address,bool)").staticCall(t,e,r||{})}catch(s){let o=new Error().stack;throw d(s,void 0,o)}}};encodeCall={balanceOf(t,e,r){try{let a=new f(["function balanceOf(address,uint256)"]).encodeFunctionData("balanceOf",[t,e]);return{context:r,calldata:a}}catch(n){let a=new Error().stack;throw d(n,void 0,a)}},balanceOfBatch(t,e,r){try{let a=new f(["function balanceOfBatch(address[],uint256[])"]).encodeFunctionData("balanceOfBatch",[t,e]);return{context:r,calldata:a}}catch(n){let a=new Error().stack;throw d(n,void 0,a)}},isApprovedForAll(t,e,r){try{let a=new f(["function isApprovedForAll(address,address)"]).encodeFunctionData("isApprovedForAll",[t,e]);return{context:r,calldata:a}}catch(n){let a=new Error().stack;throw d(n,void 0,a)}},safeBatchTransferFrom(t,e,r,n,a,s){try{let c=new f(["function safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)"]).encodeFunctionData("safeBatchTransferFrom",[t,e,r,n,a]);return{context:s,calldata:c}}catch(o){let c=new Error().stack;throw d(o,void 0,c)}},safeTransferFrom(t,e,r,n,a,s){try{let c=new f(["function safeTransferFrom(address,address,uint256,uint256,bytes)"]).encodeFunctionData("safeTransferFrom",[t,e,r,n,a]);return{context:s,calldata:c}}catch(o){let c=new Error().stack;throw d(o,void 0,c)}},setApprovalForAll(t,e,r){try{let a=new f(["function setApprovalForAll(address,bool)"]).encodeFunctionData("setApprovalForAll",[t,e]);return{context:r,calldata:a}}catch(n){let a=new Error().stack;throw d(n,void 0,a)}},supportsInterface(t,e){try{let n=new f(["function supportsInterface(bytes4)"]).encodeFunctionData("supportsInterface",[t]);return{context:e,calldata:n}}catch(r){let n=new Error().stack;throw d(r,void 0,n)}},uri(t,e){try{let n=new f(["function uri(uint256)"]).encodeFunctionData("uri",[t]);return{context:e,calldata:n}}catch(r){let n=new Error().stack;throw d(r,void 0,n)}}}},T=class extends O{async balanceOf(t,e,r){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.balanceOf(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,n)}async balanceOfBatch(t,e,r){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.balanceOfBatch(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,n)}async isApprovedForAll(t,e,r){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.isApprovedForAll(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,n)}async supportsInterface(t,e){let r={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.supportsInterface(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,r)}async uri(t,e){let r={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.uri(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,r)}callStatic={view:this.view,context:this.context,async safeBatchTransferFrom(t,e,r,n,a,s){let o={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.safeBatchTransferFrom(t,e,r,n,a,{blockTag:this.context.blockNumber,...s},this.context.preparedData,o)},async safeTransferFrom(t,e,r,n,a,s){let o={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.safeTransferFrom(t,e,r,n,a,{blockTag:this.context.blockNumber,...s},this.context.preparedData,o)},async setApprovalForAll(t,e,r){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.setApprovalForAll(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,n)}};encodeCall={view:this.view,context:this.context,balanceOf(t,e,r){let n="0x"+this.context.blockNumber.toString(16);return r?.blockTag&&(n=typeof r.blockTag=="string"?r.blockTag:"0x"+r.blockTag.toString(16)),this.view.encodeCall.balanceOf(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})},balanceOfBatch(t,e,r){let n="0x"+this.context.blockNumber.toString(16);return r?.blockTag&&(n=typeof r.blockTag=="string"?r.blockTag:"0x"+r.blockTag.toString(16)),this.view.encodeCall.balanceOfBatch(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})},isApprovedForAll(t,e,r){let n="0x"+this.context.blockNumber.toString(16);return r?.blockTag&&(n=typeof r.blockTag=="string"?r.blockTag:"0x"+r.blockTag.toString(16)),this.view.encodeCall.isApprovedForAll(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})},safeBatchTransferFrom(t,e,r,n,a,s){let o="0x"+this.context.blockNumber.toString(16);return s?.blockTag&&(o=typeof s.blockTag=="string"?s.blockTag:"0x"+s.blockTag.toString(16)),this.view.encodeCall.safeBatchTransferFrom(t,e,r,n,a,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:o})},safeTransferFrom(t,e,r,n,a,s){let o="0x"+this.context.blockNumber.toString(16);return s?.blockTag&&(o=typeof s.blockTag=="string"?s.blockTag:"0x"+s.blockTag.toString(16)),this.view.encodeCall.safeTransferFrom(t,e,r,n,a,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:o})},setApprovalForAll(t,e,r){let n="0x"+this.context.blockNumber.toString(16);return r?.blockTag&&(n=typeof r.blockTag=="string"?r.blockTag:"0x"+r.blockTag.toString(16)),this.view.encodeCall.setApprovalForAll(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})},supportsInterface(t,e){let r="0x"+this.context.blockNumber.toString(16);return e?.blockTag&&(r=typeof e.blockTag=="string"?e.blockTag:"0x"+e.blockTag.toString(16)),this.view.encodeCall.supportsInterface(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:r})},uri(t,e){let r="0x"+this.context.blockNumber.toString(16);return e?.blockTag&&(r=typeof e.blockTag=="string"?e.blockTag:"0x"+e.blockTag.toString(16)),this.view.encodeCall.uri(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:r})}}},y=class extends S{onEventApprovalForAll(t,e,r,n){return e||(e=h.filters["ApprovalForAll(address,address,bool)"](null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferBatch(t,e,r,n){return e||(e=h.filters["TransferBatch(address,address,address,uint256[],uint256[])"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferSingle(t,e,r,n){return e||(e=h.filters["TransferSingle(address,address,address,uint256,uint256)"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventURI(t,e,r,n){return e||(e=h.filters["URI(string,uint256)"](null,null)),super.onEthEvent(t,e,r,n)}onCallBalanceOf(t,e,r){return super.onEthTrace("0x00fdd58e",t,e,r)}onCallBalanceOfBatch(t,e,r){return super.onEthTrace("0x4e1273f4",t,e,r)}onCallIsApprovedForAll(t,e,r){return super.onEthTrace("0xe985e9c5",t,e,r)}onCallSafeBatchTransferFrom(t,e,r){return super.onEthTrace("0x2eb2c2d6",t,e,r)}onCallSafeTransferFrom(t,e,r){return super.onEthTrace("0xf242432a",t,e,r)}onCallSetApprovalForAll(t,e,r){return super.onEthTrace("0xa22cb465",t,e,r)}onCallSupportsInterface(t,e,r){return super.onEthTrace("0x01ffc9a7",t,e,r)}onCallUri(t,e,r){return super.onEthTrace("0x0e89341c",t,e,r)}CreateBoundContractView(){let t=p(this.config.network,this.config.address);return new T(this.config.address,t)}static bind(t){t.name||(t.name="ERC1155");let e=B(t);return e||(e=new y(t),A(t,e)),e}},v=y;w(v,"filters",{ApprovalForAll(t,e,r){return h.filters["ApprovalForAll(address,address,bool)"](t,e,r)},TransferBatch(t,e,r,n,a){return h.filters["TransferBatch(address,address,address,uint256[],uint256[])"](t,e,r,n,a)},TransferSingle(t,e,r,n,a){return h.filters["TransferSingle(address,address,address,uint256,uint256)"](t,e,r,n,a)},URI(t,e){return h.filters["URI(string,uint256)"](t,e)}});var R=class extends U{bindInternal(t){t.name||(t.name="ERC1155");let e=B(t);return e||(e=new v(t),A(t,e)),e}onEventApprovalForAll(t,e,r,n){return e||(e=h.filters["ApprovalForAll(address,address,bool)"](null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferBatch(t,e,r,n){return e||(e=h.filters["TransferBatch(address,address,address,uint256[],uint256[])"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferSingle(t,e,r,n){return e||(e=h.filters["TransferSingle(address,address,address,uint256,uint256)"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventURI(t,e,r,n){return e||(e=h.filters["URI(string,uint256)"](null,null)),super.onEthEvent(t,e,r,n)}};function p(i,t){let e=I("ERC1155",t,i);if(!e){let r=m.connect(t,L(i));e=new F(r),N("ERC1155",t,i,e)}return e}function V(i,t){let e=p(i.getChainId(),t),r=new T(t,e);return r.context=i,r.callStatic&&(r.callStatic.context=i),r}var k={blockHash:"0x0000000000000000000000000000000000000000000000000000000000000000",blockNumber:0,logIndex:0,removed:!1,transactionHash:"0x0000000000000000000000000000000000000000000000000000000000000000",transactionIndex:0};function K(i,t){let r=p(E.EthChainId.ETHEREUM,i).rawContract.interface.encodeEventLog("ApprovalForAll(address,address,bool)",[t.account,t.operator,t.approved]);return{...k,index:0,address:i,data:r.data,topics:r.topics}}function W(i,t){let r=p(E.EthChainId.ETHEREUM,i).rawContract.interface.encodeEventLog("TransferBatch(address,address,address,uint256[],uint256[])",[t.operator,t.from,t.to,t.ids,t.values]);return{...k,index:0,address:i,data:r.data,topics:r.topics}}function H(i,t){let r=p(E.EthChainId.ETHEREUM,i).rawContract.interface.encodeEventLog("TransferSingle(address,address,address,uint256,uint256)",[t.operator,t.from,t.to,t.id,t.value]);return{...k,index:0,address:i,data:r.data,topics:r.topics}}function M(i,t){let r=p(E.EthChainId.ETHEREUM,i).rawContract.interface.encodeEventLog("URI(string,uint256)",[t.value,t.id]);return{...k,index:0,address:i,data:r.data,topics:r.topics}}export{F as a,T as b,v as c,R as d,p as e,V as f,K as g,W as h,H as i,M as j,_ as k};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{B as m,S as L,T as D,U as E,V as g,b as f,g as P,h as O,j as d,r as S,u as B,v as A,w as I,x as N,z as U}from"./chunk-ZFXV2FHI.js";import{d as j,g as w}from"./chunk-LLHU72AA.js";var _={};j(_,{ERC1155BoundContractView:()=>T,ERC1155ContractView:()=>F,ERC1155Processor:()=>v,ERC1155ProcessorTemplate:()=>R,ERC1155__factory:()=>m,getERC1155Contract:()=>p,getERC1155ContractOnContext:()=>V,mockApprovalForAllLog:()=>K,mockTransferBatchLog:()=>W,mockTransferSingleLog:()=>H,mockURILog:()=>M});var h=m.connect("0x0",D),u=new f(["function balanceOf(address account, uint256 id) view returns (uint256)","function balanceOfBatch(address[] accounts, uint256[] ids) view returns (uint256[])","function isApprovedForAll(address account, address operator) view returns (bool)","function safeBatchTransferFrom(address from, address to, uint256[] ids, uint256[] amounts, bytes data) returns ()","function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes data) returns ()","function setApprovalForAll(address operator, bool approved) returns ()","function supportsInterface(bytes4 interfaceId) view returns (bool)","function uri(uint256 id) view returns (string)"]),F=class extends P{constructor(t){super(t),this.callStatic.contract=t}async balanceOf(t,e,r,n,a){try{if(n?.ethCallResults&&a){let s=u.encodeFunctionData("balanceOf",[t,e]),o=g({context:a,calldata:s}),c=n.ethCallResults[o];if(c){let l=u.decodeFunctionResult("balanceOf",c).toArray();return l.length==1?l[0]:l}}return await this.contract.getFunction("balanceOf(address,uint256)")(t,e,r||{})}catch(s){let o=new Error().stack;throw d(s,void 0,o)}}async balanceOfBatch(t,e,r,n,a){try{if(n?.ethCallResults&&a){let s=u.encodeFunctionData("balanceOfBatch",[t,e]),o=g({context:a,calldata:s}),c=n.ethCallResults[o];if(c){let l=u.decodeFunctionResult("balanceOfBatch",c).toArray();return l.length==1?l[0]:l}}return await this.contract.getFunction("balanceOfBatch(address[],uint256[])")(t,e,r||{})}catch(s){let o=new Error().stack;throw d(s,void 0,o)}}async isApprovedForAll(t,e,r,n,a){try{if(n?.ethCallResults&&a){let s=u.encodeFunctionData("isApprovedForAll",[t,e]),o=g({context:a,calldata:s}),c=n.ethCallResults[o];if(c){let l=u.decodeFunctionResult("isApprovedForAll",c).toArray();return l.length==1?l[0]:l}}return await this.contract.getFunction("isApprovedForAll(address,address)")(t,e,r||{})}catch(s){let o=new Error().stack;throw d(s,void 0,o)}}async supportsInterface(t,e,r,n){try{if(r?.ethCallResults&&n){let a=u.encodeFunctionData("supportsInterface",[t]),s=g({context:n,calldata:a}),o=r.ethCallResults[s];if(o){let c=u.decodeFunctionResult("supportsInterface",o).toArray();return c.length==1?c[0]:c}}return await this.contract.getFunction("supportsInterface(bytes4)")(t,e||{})}catch(a){let s=new Error().stack;throw d(a,void 0,s)}}async uri(t,e,r,n){try{if(r?.ethCallResults&&n){let a=u.encodeFunctionData("uri",[t]),s=g({context:n,calldata:a}),o=r.ethCallResults[s];if(o){let c=u.decodeFunctionResult("uri",o).toArray();return c.length==1?c[0]:c}}return await this.contract.getFunction("uri(uint256)")(t,e||{})}catch(a){let s=new Error().stack;throw d(a,void 0,s)}}callStatic={contract:this.contract,async safeBatchTransferFrom(t,e,r,n,a,s,o,c){try{if(o?.ethCallResults&&c){let l=u.encodeFunctionData("safeBatchTransferFrom",[t,e,r,n,a]),C=g({context:c,calldata:l}),b=o.ethCallResults[C];if(b){let x=u.decodeFunctionResult("safeBatchTransferFrom",b).toArray();return x.length==1?x[0]:x}}return await this.contract.getFunction("safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)").staticCall(t,e,r,n,a,s||{})}catch(l){let C=new Error().stack;throw d(l,void 0,C)}},async safeTransferFrom(t,e,r,n,a,s,o,c){try{if(o?.ethCallResults&&c){let l=u.encodeFunctionData("safeTransferFrom",[t,e,r,n,a]),C=g({context:c,calldata:l}),b=o.ethCallResults[C];if(b){let x=u.decodeFunctionResult("safeTransferFrom",b).toArray();return x.length==1?x[0]:x}}return await this.contract.getFunction("safeTransferFrom(address,address,uint256,uint256,bytes)").staticCall(t,e,r,n,a,s||{})}catch(l){let C=new Error().stack;throw d(l,void 0,C)}},async setApprovalForAll(t,e,r,n,a){try{if(n?.ethCallResults&&a){let s=u.encodeFunctionData("setApprovalForAll",[t,e]),o=g({context:a,calldata:s}),c=n.ethCallResults[o];if(c){let l=u.decodeFunctionResult("setApprovalForAll",c).toArray();return l.length==1?l[0]:l}}return await this.contract.getFunction("setApprovalForAll(address,bool)").staticCall(t,e,r||{})}catch(s){let o=new Error().stack;throw d(s,void 0,o)}}};encodeCall={balanceOf(t,e,r){try{let a=new f(["function balanceOf(address,uint256)"]).encodeFunctionData("balanceOf",[t,e]);return{context:r,calldata:a}}catch(n){let a=new Error().stack;throw d(n,void 0,a)}},balanceOfBatch(t,e,r){try{let a=new f(["function balanceOfBatch(address[],uint256[])"]).encodeFunctionData("balanceOfBatch",[t,e]);return{context:r,calldata:a}}catch(n){let a=new Error().stack;throw d(n,void 0,a)}},isApprovedForAll(t,e,r){try{let a=new f(["function isApprovedForAll(address,address)"]).encodeFunctionData("isApprovedForAll",[t,e]);return{context:r,calldata:a}}catch(n){let a=new Error().stack;throw d(n,void 0,a)}},safeBatchTransferFrom(t,e,r,n,a,s){try{let c=new f(["function safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)"]).encodeFunctionData("safeBatchTransferFrom",[t,e,r,n,a]);return{context:s,calldata:c}}catch(o){let c=new Error().stack;throw d(o,void 0,c)}},safeTransferFrom(t,e,r,n,a,s){try{let c=new f(["function safeTransferFrom(address,address,uint256,uint256,bytes)"]).encodeFunctionData("safeTransferFrom",[t,e,r,n,a]);return{context:s,calldata:c}}catch(o){let c=new Error().stack;throw d(o,void 0,c)}},setApprovalForAll(t,e,r){try{let a=new f(["function setApprovalForAll(address,bool)"]).encodeFunctionData("setApprovalForAll",[t,e]);return{context:r,calldata:a}}catch(n){let a=new Error().stack;throw d(n,void 0,a)}},supportsInterface(t,e){try{let n=new f(["function supportsInterface(bytes4)"]).encodeFunctionData("supportsInterface",[t]);return{context:e,calldata:n}}catch(r){let n=new Error().stack;throw d(r,void 0,n)}},uri(t,e){try{let n=new f(["function uri(uint256)"]).encodeFunctionData("uri",[t]);return{context:e,calldata:n}}catch(r){let n=new Error().stack;throw d(r,void 0,n)}}}},T=class extends O{async balanceOf(t,e,r){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.balanceOf(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,n)}async balanceOfBatch(t,e,r){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.balanceOfBatch(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,n)}async isApprovedForAll(t,e,r){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.isApprovedForAll(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,n)}async supportsInterface(t,e){let r={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.supportsInterface(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,r)}async uri(t,e){let r={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.uri(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,r)}callStatic={view:this.view,context:this.context,async safeBatchTransferFrom(t,e,r,n,a,s){let o={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.safeBatchTransferFrom(t,e,r,n,a,{blockTag:this.context.blockNumber,...s},this.context.preparedData,o)},async safeTransferFrom(t,e,r,n,a,s){let o={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.safeTransferFrom(t,e,r,n,a,{blockTag:this.context.blockNumber,...s},this.context.preparedData,o)},async setApprovalForAll(t,e,r){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.setApprovalForAll(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,n)}};encodeCall={view:this.view,context:this.context,balanceOf(t,e,r){let n="0x"+this.context.blockNumber.toString(16);return r?.blockTag&&(n=typeof r.blockTag=="string"?r.blockTag:"0x"+r.blockTag.toString(16)),this.view.encodeCall.balanceOf(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})},balanceOfBatch(t,e,r){let n="0x"+this.context.blockNumber.toString(16);return r?.blockTag&&(n=typeof r.blockTag=="string"?r.blockTag:"0x"+r.blockTag.toString(16)),this.view.encodeCall.balanceOfBatch(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})},isApprovedForAll(t,e,r){let n="0x"+this.context.blockNumber.toString(16);return r?.blockTag&&(n=typeof r.blockTag=="string"?r.blockTag:"0x"+r.blockTag.toString(16)),this.view.encodeCall.isApprovedForAll(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})},safeBatchTransferFrom(t,e,r,n,a,s){let o="0x"+this.context.blockNumber.toString(16);return s?.blockTag&&(o=typeof s.blockTag=="string"?s.blockTag:"0x"+s.blockTag.toString(16)),this.view.encodeCall.safeBatchTransferFrom(t,e,r,n,a,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:o})},safeTransferFrom(t,e,r,n,a,s){let o="0x"+this.context.blockNumber.toString(16);return s?.blockTag&&(o=typeof s.blockTag=="string"?s.blockTag:"0x"+s.blockTag.toString(16)),this.view.encodeCall.safeTransferFrom(t,e,r,n,a,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:o})},setApprovalForAll(t,e,r){let n="0x"+this.context.blockNumber.toString(16);return r?.blockTag&&(n=typeof r.blockTag=="string"?r.blockTag:"0x"+r.blockTag.toString(16)),this.view.encodeCall.setApprovalForAll(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})},supportsInterface(t,e){let r="0x"+this.context.blockNumber.toString(16);return e?.blockTag&&(r=typeof e.blockTag=="string"?e.blockTag:"0x"+e.blockTag.toString(16)),this.view.encodeCall.supportsInterface(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:r})},uri(t,e){let r="0x"+this.context.blockNumber.toString(16);return e?.blockTag&&(r=typeof e.blockTag=="string"?e.blockTag:"0x"+e.blockTag.toString(16)),this.view.encodeCall.uri(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:r})}}},y=class extends S{onEventApprovalForAll(t,e,r,n){return e||(e=h.filters["ApprovalForAll(address,address,bool)"](null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferBatch(t,e,r,n){return e||(e=h.filters["TransferBatch(address,address,address,uint256[],uint256[])"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferSingle(t,e,r,n){return e||(e=h.filters["TransferSingle(address,address,address,uint256,uint256)"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventURI(t,e,r,n){return e||(e=h.filters["URI(string,uint256)"](null,null)),super.onEthEvent(t,e,r,n)}onCallBalanceOf(t,e,r){return super.onEthTrace("0x00fdd58e",t,e,r)}onCallBalanceOfBatch(t,e,r){return super.onEthTrace("0x4e1273f4",t,e,r)}onCallIsApprovedForAll(t,e,r){return super.onEthTrace("0xe985e9c5",t,e,r)}onCallSafeBatchTransferFrom(t,e,r){return super.onEthTrace("0x2eb2c2d6",t,e,r)}onCallSafeTransferFrom(t,e,r){return super.onEthTrace("0xf242432a",t,e,r)}onCallSetApprovalForAll(t,e,r){return super.onEthTrace("0xa22cb465",t,e,r)}onCallSupportsInterface(t,e,r){return super.onEthTrace("0x01ffc9a7",t,e,r)}onCallUri(t,e,r){return super.onEthTrace("0x0e89341c",t,e,r)}CreateBoundContractView(){let t=p(this.config.network,this.config.address);return new T(this.config.address,t)}static bind(t){t.name||(t.name="ERC1155");let e=B(t);return e||(e=new y(t),A(t,e)),e}},v=y;w(v,"filters",{ApprovalForAll(t,e,r){return h.filters["ApprovalForAll(address,address,bool)"](t,e,r)},TransferBatch(t,e,r,n,a){return h.filters["TransferBatch(address,address,address,uint256[],uint256[])"](t,e,r,n,a)},TransferSingle(t,e,r,n,a){return h.filters["TransferSingle(address,address,address,uint256,uint256)"](t,e,r,n,a)},URI(t,e){return h.filters["URI(string,uint256)"](t,e)}});var R=class extends U{bindInternal(t){t.name||(t.name="ERC1155");let e=B(t);return e||(e=new v(t),A(t,e)),e}onEventApprovalForAll(t,e,r,n){return e||(e=h.filters["ApprovalForAll(address,address,bool)"](null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferBatch(t,e,r,n){return e||(e=h.filters["TransferBatch(address,address,address,uint256[],uint256[])"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferSingle(t,e,r,n){return e||(e=h.filters["TransferSingle(address,address,address,uint256,uint256)"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventURI(t,e,r,n){return e||(e=h.filters["URI(string,uint256)"](null,null)),super.onEthEvent(t,e,r,n)}};function p(i,t){let e=I("ERC1155",t,i);if(!e){let r=m.connect(t,L(i));e=new F(r),N("ERC1155",t,i,e)}return e}function V(i,t){let e=p(i.getChainId(),t),r=new T(t,e);return r.context=i,r.callStatic&&(r.callStatic.context=i),r}var k={blockHash:"0x0000000000000000000000000000000000000000000000000000000000000000",blockNumber:0,logIndex:0,removed:!1,transactionHash:"0x0000000000000000000000000000000000000000000000000000000000000000",transactionIndex:0};function K(i,t){let r=p(E.EthChainId.ETHEREUM,i).rawContract.interface.encodeEventLog("ApprovalForAll(address,address,bool)",[t.account,t.operator,t.approved]);return{...k,index:0,address:i,data:r.data,topics:r.topics}}function W(i,t){let r=p(E.EthChainId.ETHEREUM,i).rawContract.interface.encodeEventLog("TransferBatch(address,address,address,uint256[],uint256[])",[t.operator,t.from,t.to,t.ids,t.values]);return{...k,index:0,address:i,data:r.data,topics:r.topics}}function H(i,t){let r=p(E.EthChainId.ETHEREUM,i).rawContract.interface.encodeEventLog("TransferSingle(address,address,address,uint256,uint256)",[t.operator,t.from,t.to,t.id,t.value]);return{...k,index:0,address:i,data:r.data,topics:r.topics}}function M(i,t){let r=p(E.EthChainId.ETHEREUM,i).rawContract.interface.encodeEventLog("URI(string,uint256)",[t.value,t.id]);return{...k,index:0,address:i,data:r.data,topics:r.topics}}export{F as a,T as b,v as c,R as d,p as e,V as f,K as g,W as h,H as i,M as j,_ as k};
|
|
3
|
+
//# sourceMappingURL=chunk-RSGRT2DV.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{a as _}from"./chunk-LBLFXPCY.js";import{D as u,Hc as I,W as f,Zc as T,bd as b,gd as C,pc as h}from"./chunk-
|
|
2
|
+
import{a as _}from"./chunk-LBLFXPCY.js";import{D as u,Hc as I,W as f,Zc as T,bd as b,gd as C,pc as h}from"./chunk-ZMRHWH7D.js";import{e as y,g}from"./chunk-LLHU72AA.js";var l=class extends b{constructor(e,s,r,n){super({});this.chainId=e;this.name=s;this.tx=r;this.address=n}getMetaDataInternal(e,s){return{address:this.address,contractName:this.name,blockNumber:BigInt(this.tx.status?.block_time??0),transactionIndex:0,transactionHash:this.tx.txid,chainId:this.getChainId(),name:e,logIndex:0,labels:h(s)}}getChainId(){return this.chainId}};import{ListStateStorage as x}from"@sentio/runtime";var m=class extends x{},c=m;g(c,"INSTANCE",new m);var d=class{constructor(t){this.config=t}callHandlers=[];static bind(t){let e=new d(t);return c.INSTANCE.addValue(e),e}onTransaction(t,e){let s={handler:async r=>{let n=r.transaction,o=new l(this.config.chainId,this.config.name??this.config.address??"",n,this.config.address??n.vout[0].scriptpubkey_address);return await t(n,o),o.stopAndGetResult()},filter:e};return this.callHandlers.push(s),this}};import{errorString as k,GLOBAL_CONFIG as R,mergeProcessResults as B,Plugin as N,PluginManager as P,USER_PROCESSOR as v}from"@sentio/runtime";var a=y(I(),1);var p=class extends N{name="BTCPlugin";handlers={txHandlers:[]};async configure(t){let e={txHandlers:[]};for(let s of c.INSTANCE.getValues()){let r=f.fromPartial({processorType:v,contract:{name:s.config.name,chainId:s.config.chainId.toString(),address:s.config.address||"*",abi:""},startBlock:s.config.startBlock,endBlock:s.config.endBlock});for(let n of s.callHandlers){let o=e.txHandlers.push(n.handler)-1;n.filter?r.btcTransactionConfigs.push({filters:[{fieldFilters:F(n.filter)}],handlerId:o}):r.btcTransactionConfigs.push({filters:[{address:r.contract?.address||"*"}],handlerId:o})}t.contractConfigs.push(r)}this.handlers=e}supportedHandlers=[u.BTC_TRANSACTION];processBinding(t){switch(t.handlerType){case u.BTC_TRANSACTION:return this.processTransaction(t);default:throw new a.ServerError(a.Status.INVALID_ARGUMENT,"No handle type registered "+t.handlerType)}}async start(t){}stateDiff(t){return C.INSTANCE.getValues().length!==t.templateInstances.length}async processTransaction(t){if(!t.data?.btcTransaction)throw new a.ServerError(a.Status.INVALID_ARGUMENT,"BTCEvents can't be null");let e=[],s=t.data?.btcTransaction;for(let r of t.handlerIds){let n=this.handlers.txHandlers[r](t.data?.btcTransaction).catch(o=>{throw new a.ServerError(a.Status.INTERNAL,"error processing transaction: "+JSON.stringify(s)+`
|
|
3
3
|
`+k(o))});R.execution.sequential&&await n,e.push(n)}return B(await Promise.all(e))}};P.INSTANCE.register(new p);function F(i){return{filters:(_(i)?i:[i]).map(e=>{let{field:s,...r}=e;return{field:s,...S(r)}})}}function S(i){return Object.entries(i).reduce((t,[e,s])=>(s!==void 0&&(t[e]=T(s)),t),{})}export{l as a,c as b,d as c,p as d};
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
4
|
+
//# sourceMappingURL=chunk-RT6IFBHE.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{F as E,S as R,T as I,U as C,V as x,b as u,g as W,h as O,j as s,r as S,u as v,v as k,w as D,x as H,z as N}from"./chunk-4QS3NUUW.js";import{d as A,g as F}from"./chunk-LLHU72AA.js";var M={};A(M,{WETH9BoundContractView:()=>f,WETH9ContractView:()=>T,WETH9Processor:()=>b,WETH9ProcessorTemplate:()=>y,WETH9__factory:()=>E,getWETH9Contract:()=>g,getWETH9ContractOnContext:()=>B,mockApprovalLog:()=>j,mockDepositLog:()=>K,mockTransferLog:()=>L,mockWithdrawalLog:()=>V});var p=E.connect("0x0",I),i=new u(["function name() view returns (string)","function approve(address guy, uint256 wad) returns (bool)","function totalSupply() view returns (uint256)","function transferFrom(address src, address dst, uint256 wad) returns (bool)","function withdraw(uint256 wad) returns ()","function decimals() view returns (uint8)","function balanceOf(address) view returns (uint256)","function symbol() view returns (string)","function transfer(address dst, uint256 wad) returns (bool)","function deposit() payable returns ()","function allowance(address, address) view returns (uint256)"]),T=class extends W{constructor(e){super(e),this.callStatic.contract=e}async name(e,t,a){try{if(t?.ethCallResults&&a){let n=i.encodeFunctionData("name",[]),r=x({context:a,calldata:n}),o=t.ethCallResults[r];if(o){let c=i.decodeFunctionResult("name",o).toArray();return c.length==1?c[0]:c}}return await this.contract.getFunction("name()")(e||{})}catch(n){let r=new Error().stack;throw s(n,void 0,r)}}async totalSupply(e,t,a){try{if(t?.ethCallResults&&a){let n=i.encodeFunctionData("totalSupply",[]),r=x({context:a,calldata:n}),o=t.ethCallResults[r];if(o){let c=i.decodeFunctionResult("totalSupply",o).toArray();return c.length==1?c[0]:c}}return await this.contract.getFunction("totalSupply()")(e||{})}catch(n){let r=new Error().stack;throw s(n,void 0,r)}}async decimals(e,t,a){try{if(t?.ethCallResults&&a){let n=i.encodeFunctionData("decimals",[]),r=x({context:a,calldata:n}),o=t.ethCallResults[r];if(o){let c=i.decodeFunctionResult("decimals",o).toArray();return c.length==1?c[0]:c}}return await this.contract.getFunction("decimals()")(e||{})}catch(n){let r=new Error().stack;throw s(n,void 0,r)}}async balanceOf(e,t,a,n){try{if(a?.ethCallResults&&n){let r=i.encodeFunctionData("balanceOf",[e]),o=x({context:n,calldata:r}),c=a.ethCallResults[o];if(c){let d=i.decodeFunctionResult("balanceOf",c).toArray();return d.length==1?d[0]:d}}return await this.contract.getFunction("balanceOf(address)")(e,t||{})}catch(r){let o=new Error().stack;throw s(r,void 0,o)}}async symbol(e,t,a){try{if(t?.ethCallResults&&a){let n=i.encodeFunctionData("symbol",[]),r=x({context:a,calldata:n}),o=t.ethCallResults[r];if(o){let c=i.decodeFunctionResult("symbol",o).toArray();return c.length==1?c[0]:c}}return await this.contract.getFunction("symbol()")(e||{})}catch(n){let r=new Error().stack;throw s(n,void 0,r)}}async allowance(e,t,a,n,r){try{if(n?.ethCallResults&&r){let o=i.encodeFunctionData("allowance",[e,t]),c=x({context:r,calldata:o}),d=n.ethCallResults[c];if(d){let h=i.decodeFunctionResult("allowance",d).toArray();return h.length==1?h[0]:h}}return await this.contract.getFunction("allowance(address,address)")(e,t,a||{})}catch(o){let c=new Error().stack;throw s(o,void 0,c)}}callStatic={contract:this.contract,async approve(e,t,a,n,r){try{if(n?.ethCallResults&&r){let o=i.encodeFunctionData("approve",[e,t]),c=x({context:r,calldata:o}),d=n.ethCallResults[c];if(d){let h=i.decodeFunctionResult("approve",d).toArray();return h.length==1?h[0]:h}}return await this.contract.getFunction("approve(address,uint256)").staticCall(e,t,a||{})}catch(o){let c=new Error().stack;throw s(o,void 0,c)}},async transferFrom(e,t,a,n,r,o){try{if(r?.ethCallResults&&o){let c=i.encodeFunctionData("transferFrom",[e,t,a]),d=x({context:o,calldata:c}),h=r.ethCallResults[d];if(h){let w=i.decodeFunctionResult("transferFrom",h).toArray();return w.length==1?w[0]:w}}return await this.contract.getFunction("transferFrom(address,address,uint256)").staticCall(e,t,a,n||{})}catch(c){let d=new Error().stack;throw s(c,void 0,d)}},async withdraw(e,t,a,n){try{if(a?.ethCallResults&&n){let r=i.encodeFunctionData("withdraw",[e]),o=x({context:n,calldata:r}),c=a.ethCallResults[o];if(c){let d=i.decodeFunctionResult("withdraw",c).toArray();return d.length==1?d[0]:d}}return await this.contract.getFunction("withdraw(uint256)").staticCall(e,t||{})}catch(r){let o=new Error().stack;throw s(r,void 0,o)}},async transfer(e,t,a,n,r){try{if(n?.ethCallResults&&r){let o=i.encodeFunctionData("transfer",[e,t]),c=x({context:r,calldata:o}),d=n.ethCallResults[c];if(d){let h=i.decodeFunctionResult("transfer",d).toArray();return h.length==1?h[0]:h}}return await this.contract.getFunction("transfer(address,uint256)").staticCall(e,t,a||{})}catch(o){let c=new Error().stack;throw s(o,void 0,c)}},async deposit(e,t,a){try{if(t?.ethCallResults&&a){let n=i.encodeFunctionData("deposit",[]),r=x({context:a,calldata:n}),o=t.ethCallResults[r];if(o){let c=i.decodeFunctionResult("deposit",o).toArray();return c.length==1?c[0]:c}}return await this.contract.getFunction("deposit()").staticCall(e||{})}catch(n){let r=new Error().stack;throw s(n,void 0,r)}}};encodeCall={name(e){try{let a=new u(["function name()"]).encodeFunctionData("name",[]);return{context:e,calldata:a}}catch(t){let a=new Error().stack;throw s(t,void 0,a)}},approve(e,t,a){try{let r=new u(["function approve(address,uint256)"]).encodeFunctionData("approve",[e,t]);return{context:a,calldata:r}}catch(n){let r=new Error().stack;throw s(n,void 0,r)}},totalSupply(e){try{let a=new u(["function totalSupply()"]).encodeFunctionData("totalSupply",[]);return{context:e,calldata:a}}catch(t){let a=new Error().stack;throw s(t,void 0,a)}},transferFrom(e,t,a,n){try{let o=new u(["function transferFrom(address,address,uint256)"]).encodeFunctionData("transferFrom",[e,t,a]);return{context:n,calldata:o}}catch(r){let o=new Error().stack;throw s(r,void 0,o)}},withdraw(e,t){try{let n=new u(["function withdraw(uint256)"]).encodeFunctionData("withdraw",[e]);return{context:t,calldata:n}}catch(a){let n=new Error().stack;throw s(a,void 0,n)}},decimals(e){try{let a=new u(["function decimals()"]).encodeFunctionData("decimals",[]);return{context:e,calldata:a}}catch(t){let a=new Error().stack;throw s(t,void 0,a)}},balanceOf(e,t){try{let n=new u(["function balanceOf(address)"]).encodeFunctionData("balanceOf",[e]);return{context:t,calldata:n}}catch(a){let n=new Error().stack;throw s(a,void 0,n)}},symbol(e){try{let a=new u(["function symbol()"]).encodeFunctionData("symbol",[]);return{context:e,calldata:a}}catch(t){let a=new Error().stack;throw s(t,void 0,a)}},transfer(e,t,a){try{let r=new u(["function transfer(address,uint256)"]).encodeFunctionData("transfer",[e,t]);return{context:a,calldata:r}}catch(n){let r=new Error().stack;throw s(n,void 0,r)}},deposit(e){try{let a=new u(["function deposit()"]).encodeFunctionData("deposit",[]);return{context:e,calldata:a}}catch(t){let a=new Error().stack;throw s(t,void 0,a)}},allowance(e,t,a){try{let r=new u(["function allowance(address,address)"]).encodeFunctionData("allowance",[e,t]);return{context:a,calldata:r}}catch(n){let r=new Error().stack;throw s(n,void 0,r)}}}},f=class extends O{async name(e){let t={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.name({blockTag:this.context.blockNumber,...e},this.context.preparedData,t)}async totalSupply(e){let t={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.totalSupply({blockTag:this.context.blockNumber,...e},this.context.preparedData,t)}async decimals(e){let t={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.decimals({blockTag:this.context.blockNumber,...e},this.context.preparedData,t)}async balanceOf(e,t){let a={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.balanceOf(e,{blockTag:this.context.blockNumber,...t},this.context.preparedData,a)}async symbol(e){let t={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.symbol({blockTag:this.context.blockNumber,...e},this.context.preparedData,t)}async allowance(e,t,a){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.allowance(e,t,{blockTag:this.context.blockNumber,...a},this.context.preparedData,n)}callStatic={view:this.view,context:this.context,async approve(e,t,a){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.approve(e,t,{blockTag:this.context.blockNumber,...a},this.context.preparedData,n)},async transferFrom(e,t,a,n){let r={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.transferFrom(e,t,a,{blockTag:this.context.blockNumber,...n},this.context.preparedData,r)},async withdraw(e,t){let a={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.withdraw(e,{blockTag:this.context.blockNumber,...t},this.context.preparedData,a)},async transfer(e,t,a){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.transfer(e,t,{blockTag:this.context.blockNumber,...a},this.context.preparedData,n)},async deposit(e){let t={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.deposit({blockTag:this.context.blockNumber,...e},this.context.preparedData,t)}};encodeCall={view:this.view,context:this.context,name(e){let t="0x"+this.context.blockNumber.toString(16);return e?.blockTag&&(t=typeof e.blockTag=="string"?e.blockTag:"0x"+e.blockTag.toString(16)),this.view.encodeCall.name({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:t})},approve(e,t,a){let n="0x"+this.context.blockNumber.toString(16);return a?.blockTag&&(n=typeof a.blockTag=="string"?a.blockTag:"0x"+a.blockTag.toString(16)),this.view.encodeCall.approve(e,t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})},totalSupply(e){let t="0x"+this.context.blockNumber.toString(16);return e?.blockTag&&(t=typeof e.blockTag=="string"?e.blockTag:"0x"+e.blockTag.toString(16)),this.view.encodeCall.totalSupply({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:t})},transferFrom(e,t,a,n){let r="0x"+this.context.blockNumber.toString(16);return n?.blockTag&&(r=typeof n.blockTag=="string"?n.blockTag:"0x"+n.blockTag.toString(16)),this.view.encodeCall.transferFrom(e,t,a,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:r})},withdraw(e,t){let a="0x"+this.context.blockNumber.toString(16);return t?.blockTag&&(a=typeof t.blockTag=="string"?t.blockTag:"0x"+t.blockTag.toString(16)),this.view.encodeCall.withdraw(e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:a})},decimals(e){let t="0x"+this.context.blockNumber.toString(16);return e?.blockTag&&(t=typeof e.blockTag=="string"?e.blockTag:"0x"+e.blockTag.toString(16)),this.view.encodeCall.decimals({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:t})},balanceOf(e,t){let a="0x"+this.context.blockNumber.toString(16);return t?.blockTag&&(a=typeof t.blockTag=="string"?t.blockTag:"0x"+t.blockTag.toString(16)),this.view.encodeCall.balanceOf(e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:a})},symbol(e){let t="0x"+this.context.blockNumber.toString(16);return e?.blockTag&&(t=typeof e.blockTag=="string"?e.blockTag:"0x"+e.blockTag.toString(16)),this.view.encodeCall.symbol({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:t})},transfer(e,t,a){let n="0x"+this.context.blockNumber.toString(16);return a?.blockTag&&(n=typeof a.blockTag=="string"?a.blockTag:"0x"+a.blockTag.toString(16)),this.view.encodeCall.transfer(e,t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})},deposit(e){let t="0x"+this.context.blockNumber.toString(16);return e?.blockTag&&(t=typeof e.blockTag=="string"?e.blockTag:"0x"+e.blockTag.toString(16)),this.view.encodeCall.deposit({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:t})},allowance(e,t,a){let n="0x"+this.context.blockNumber.toString(16);return a?.blockTag&&(n=typeof a.blockTag=="string"?a.blockTag:"0x"+a.blockTag.toString(16)),this.view.encodeCall.allowance(e,t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})}}},P=class extends S{onEventApproval(e,t,a,n){return t||(t=p.filters["Approval(address,address,uint256)"](null,null,null)),super.onEthEvent(e,t,a,n)}onEventTransfer(e,t,a,n){return t||(t=p.filters["Transfer(address,address,uint256)"](null,null,null)),super.onEthEvent(e,t,a,n)}onEventDeposit(e,t,a,n){return t||(t=p.filters["Deposit(address,uint256)"](null,null)),super.onEthEvent(e,t,a,n)}onEventWithdrawal(e,t,a,n){return t||(t=p.filters["Withdrawal(address,uint256)"](null,null)),super.onEthEvent(e,t,a,n)}onCallName(e,t,a){return super.onEthTrace("0x06fdde03",e,t,a)}onCallApprove(e,t,a){return super.onEthTrace("0x095ea7b3",e,t,a)}onCallTotalSupply(e,t,a){return super.onEthTrace("0x18160ddd",e,t,a)}onCallTransferFrom(e,t,a){return super.onEthTrace("0x23b872dd",e,t,a)}onCallWithdraw(e,t,a){return super.onEthTrace("0x2e1a7d4d",e,t,a)}onCallDecimals(e,t,a){return super.onEthTrace("0x313ce567",e,t,a)}onCallBalanceOf(e,t,a){return super.onEthTrace("0x70a08231",e,t,a)}onCallSymbol(e,t,a){return super.onEthTrace("0x95d89b41",e,t,a)}onCallTransfer(e,t,a){return super.onEthTrace("0xa9059cbb",e,t,a)}onCallDeposit(e,t,a){return super.onEthTrace("0xd0e30db0",e,t,a)}onCallAllowance(e,t,a){return super.onEthTrace("0xdd62ed3e",e,t,a)}CreateBoundContractView(){let e=g(this.config.network,this.config.address);return new f(this.config.address,e)}static bind(e){e.name||(e.name="WETH9");let t=v(e);return t||(t=new P(e),k(e,t)),t}},b=P;F(b,"filters",{Approval(e,t,a){return p.filters["Approval(address,address,uint256)"](e,t,a)},Transfer(e,t,a){return p.filters["Transfer(address,address,uint256)"](e,t,a)},Deposit(e,t){return p.filters["Deposit(address,uint256)"](e,t)},Withdrawal(e,t){return p.filters["Withdrawal(address,uint256)"](e,t)}});var y=class extends N{bindInternal(e){e.name||(e.name="WETH9");let t=v(e);return t||(t=new b(e),k(e,t)),t}onEventApproval(e,t,a,n){return t||(t=p.filters["Approval(address,address,uint256)"](null,null,null)),super.onEthEvent(e,t,a,n)}onEventTransfer(e,t,a,n){return t||(t=p.filters["Transfer(address,address,uint256)"](null,null,null)),super.onEthEvent(e,t,a,n)}onEventDeposit(e,t,a,n){return t||(t=p.filters["Deposit(address,uint256)"](null,null)),super.onEthEvent(e,t,a,n)}onEventWithdrawal(e,t,a,n){return t||(t=p.filters["Withdrawal(address,uint256)"](null,null)),super.onEthEvent(e,t,a,n)}};function g(l,e){let t=D("WETH9",e,l);if(!t){let a=E.connect(e,R(l));t=new T(a),H("WETH9",e,l,t)}return t}function B(l,e){let t=g(l.getChainId(),e),a=new f(e,t);return a.context=l,a.callStatic&&(a.callStatic.context=l),a}var m={blockHash:"0x0000000000000000000000000000000000000000000000000000000000000000",blockNumber:0,logIndex:0,removed:!1,transactionHash:"0x0000000000000000000000000000000000000000000000000000000000000000",transactionIndex:0};function j(l,e){let a=g(C.EthChainId.ETHEREUM,l).rawContract.interface.encodeEventLog("Approval(address,address,uint256)",[e.src,e.guy,e.wad]);return{...m,index:0,address:l,data:a.data,topics:a.topics}}function L(l,e){let a=g(C.EthChainId.ETHEREUM,l).rawContract.interface.encodeEventLog("Transfer(address,address,uint256)",[e.src,e.dst,e.wad]);return{...m,index:0,address:l,data:a.data,topics:a.topics}}function K(l,e){let a=g(C.EthChainId.ETHEREUM,l).rawContract.interface.encodeEventLog("Deposit(address,uint256)",[e.dst,e.wad]);return{...m,index:0,address:l,data:a.data,topics:a.topics}}function V(l,e){let a=g(C.EthChainId.ETHEREUM,l).rawContract.interface.encodeEventLog("Withdrawal(address,uint256)",[e.src,e.wad]);return{...m,index:0,address:l,data:a.data,topics:a.topics}}export{T as a,f as b,b as c,y as d,g as e,B as f,j as g,L as h,K as i,V as j,M as k};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{F as E,S as R,T as I,U as C,V as x,b as u,g as W,h as O,j as s,r as S,u as v,v as k,w as D,x as H,z as N}from"./chunk-ZFXV2FHI.js";import{d as A,g as F}from"./chunk-LLHU72AA.js";var M={};A(M,{WETH9BoundContractView:()=>f,WETH9ContractView:()=>T,WETH9Processor:()=>b,WETH9ProcessorTemplate:()=>y,WETH9__factory:()=>E,getWETH9Contract:()=>g,getWETH9ContractOnContext:()=>B,mockApprovalLog:()=>j,mockDepositLog:()=>K,mockTransferLog:()=>L,mockWithdrawalLog:()=>V});var p=E.connect("0x0",I),i=new u(["function name() view returns (string)","function approve(address guy, uint256 wad) returns (bool)","function totalSupply() view returns (uint256)","function transferFrom(address src, address dst, uint256 wad) returns (bool)","function withdraw(uint256 wad) returns ()","function decimals() view returns (uint8)","function balanceOf(address) view returns (uint256)","function symbol() view returns (string)","function transfer(address dst, uint256 wad) returns (bool)","function deposit() payable returns ()","function allowance(address, address) view returns (uint256)"]),T=class extends W{constructor(e){super(e),this.callStatic.contract=e}async name(e,t,a){try{if(t?.ethCallResults&&a){let n=i.encodeFunctionData("name",[]),r=x({context:a,calldata:n}),o=t.ethCallResults[r];if(o){let c=i.decodeFunctionResult("name",o).toArray();return c.length==1?c[0]:c}}return await this.contract.getFunction("name()")(e||{})}catch(n){let r=new Error().stack;throw s(n,void 0,r)}}async totalSupply(e,t,a){try{if(t?.ethCallResults&&a){let n=i.encodeFunctionData("totalSupply",[]),r=x({context:a,calldata:n}),o=t.ethCallResults[r];if(o){let c=i.decodeFunctionResult("totalSupply",o).toArray();return c.length==1?c[0]:c}}return await this.contract.getFunction("totalSupply()")(e||{})}catch(n){let r=new Error().stack;throw s(n,void 0,r)}}async decimals(e,t,a){try{if(t?.ethCallResults&&a){let n=i.encodeFunctionData("decimals",[]),r=x({context:a,calldata:n}),o=t.ethCallResults[r];if(o){let c=i.decodeFunctionResult("decimals",o).toArray();return c.length==1?c[0]:c}}return await this.contract.getFunction("decimals()")(e||{})}catch(n){let r=new Error().stack;throw s(n,void 0,r)}}async balanceOf(e,t,a,n){try{if(a?.ethCallResults&&n){let r=i.encodeFunctionData("balanceOf",[e]),o=x({context:n,calldata:r}),c=a.ethCallResults[o];if(c){let d=i.decodeFunctionResult("balanceOf",c).toArray();return d.length==1?d[0]:d}}return await this.contract.getFunction("balanceOf(address)")(e,t||{})}catch(r){let o=new Error().stack;throw s(r,void 0,o)}}async symbol(e,t,a){try{if(t?.ethCallResults&&a){let n=i.encodeFunctionData("symbol",[]),r=x({context:a,calldata:n}),o=t.ethCallResults[r];if(o){let c=i.decodeFunctionResult("symbol",o).toArray();return c.length==1?c[0]:c}}return await this.contract.getFunction("symbol()")(e||{})}catch(n){let r=new Error().stack;throw s(n,void 0,r)}}async allowance(e,t,a,n,r){try{if(n?.ethCallResults&&r){let o=i.encodeFunctionData("allowance",[e,t]),c=x({context:r,calldata:o}),d=n.ethCallResults[c];if(d){let h=i.decodeFunctionResult("allowance",d).toArray();return h.length==1?h[0]:h}}return await this.contract.getFunction("allowance(address,address)")(e,t,a||{})}catch(o){let c=new Error().stack;throw s(o,void 0,c)}}callStatic={contract:this.contract,async approve(e,t,a,n,r){try{if(n?.ethCallResults&&r){let o=i.encodeFunctionData("approve",[e,t]),c=x({context:r,calldata:o}),d=n.ethCallResults[c];if(d){let h=i.decodeFunctionResult("approve",d).toArray();return h.length==1?h[0]:h}}return await this.contract.getFunction("approve(address,uint256)").staticCall(e,t,a||{})}catch(o){let c=new Error().stack;throw s(o,void 0,c)}},async transferFrom(e,t,a,n,r,o){try{if(r?.ethCallResults&&o){let c=i.encodeFunctionData("transferFrom",[e,t,a]),d=x({context:o,calldata:c}),h=r.ethCallResults[d];if(h){let w=i.decodeFunctionResult("transferFrom",h).toArray();return w.length==1?w[0]:w}}return await this.contract.getFunction("transferFrom(address,address,uint256)").staticCall(e,t,a,n||{})}catch(c){let d=new Error().stack;throw s(c,void 0,d)}},async withdraw(e,t,a,n){try{if(a?.ethCallResults&&n){let r=i.encodeFunctionData("withdraw",[e]),o=x({context:n,calldata:r}),c=a.ethCallResults[o];if(c){let d=i.decodeFunctionResult("withdraw",c).toArray();return d.length==1?d[0]:d}}return await this.contract.getFunction("withdraw(uint256)").staticCall(e,t||{})}catch(r){let o=new Error().stack;throw s(r,void 0,o)}},async transfer(e,t,a,n,r){try{if(n?.ethCallResults&&r){let o=i.encodeFunctionData("transfer",[e,t]),c=x({context:r,calldata:o}),d=n.ethCallResults[c];if(d){let h=i.decodeFunctionResult("transfer",d).toArray();return h.length==1?h[0]:h}}return await this.contract.getFunction("transfer(address,uint256)").staticCall(e,t,a||{})}catch(o){let c=new Error().stack;throw s(o,void 0,c)}},async deposit(e,t,a){try{if(t?.ethCallResults&&a){let n=i.encodeFunctionData("deposit",[]),r=x({context:a,calldata:n}),o=t.ethCallResults[r];if(o){let c=i.decodeFunctionResult("deposit",o).toArray();return c.length==1?c[0]:c}}return await this.contract.getFunction("deposit()").staticCall(e||{})}catch(n){let r=new Error().stack;throw s(n,void 0,r)}}};encodeCall={name(e){try{let a=new u(["function name()"]).encodeFunctionData("name",[]);return{context:e,calldata:a}}catch(t){let a=new Error().stack;throw s(t,void 0,a)}},approve(e,t,a){try{let r=new u(["function approve(address,uint256)"]).encodeFunctionData("approve",[e,t]);return{context:a,calldata:r}}catch(n){let r=new Error().stack;throw s(n,void 0,r)}},totalSupply(e){try{let a=new u(["function totalSupply()"]).encodeFunctionData("totalSupply",[]);return{context:e,calldata:a}}catch(t){let a=new Error().stack;throw s(t,void 0,a)}},transferFrom(e,t,a,n){try{let o=new u(["function transferFrom(address,address,uint256)"]).encodeFunctionData("transferFrom",[e,t,a]);return{context:n,calldata:o}}catch(r){let o=new Error().stack;throw s(r,void 0,o)}},withdraw(e,t){try{let n=new u(["function withdraw(uint256)"]).encodeFunctionData("withdraw",[e]);return{context:t,calldata:n}}catch(a){let n=new Error().stack;throw s(a,void 0,n)}},decimals(e){try{let a=new u(["function decimals()"]).encodeFunctionData("decimals",[]);return{context:e,calldata:a}}catch(t){let a=new Error().stack;throw s(t,void 0,a)}},balanceOf(e,t){try{let n=new u(["function balanceOf(address)"]).encodeFunctionData("balanceOf",[e]);return{context:t,calldata:n}}catch(a){let n=new Error().stack;throw s(a,void 0,n)}},symbol(e){try{let a=new u(["function symbol()"]).encodeFunctionData("symbol",[]);return{context:e,calldata:a}}catch(t){let a=new Error().stack;throw s(t,void 0,a)}},transfer(e,t,a){try{let r=new u(["function transfer(address,uint256)"]).encodeFunctionData("transfer",[e,t]);return{context:a,calldata:r}}catch(n){let r=new Error().stack;throw s(n,void 0,r)}},deposit(e){try{let a=new u(["function deposit()"]).encodeFunctionData("deposit",[]);return{context:e,calldata:a}}catch(t){let a=new Error().stack;throw s(t,void 0,a)}},allowance(e,t,a){try{let r=new u(["function allowance(address,address)"]).encodeFunctionData("allowance",[e,t]);return{context:a,calldata:r}}catch(n){let r=new Error().stack;throw s(n,void 0,r)}}}},f=class extends O{async name(e){let t={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.name({blockTag:this.context.blockNumber,...e},this.context.preparedData,t)}async totalSupply(e){let t={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.totalSupply({blockTag:this.context.blockNumber,...e},this.context.preparedData,t)}async decimals(e){let t={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.decimals({blockTag:this.context.blockNumber,...e},this.context.preparedData,t)}async balanceOf(e,t){let a={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.balanceOf(e,{blockTag:this.context.blockNumber,...t},this.context.preparedData,a)}async symbol(e){let t={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.symbol({blockTag:this.context.blockNumber,...e},this.context.preparedData,t)}async allowance(e,t,a){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.allowance(e,t,{blockTag:this.context.blockNumber,...a},this.context.preparedData,n)}callStatic={view:this.view,context:this.context,async approve(e,t,a){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.approve(e,t,{blockTag:this.context.blockNumber,...a},this.context.preparedData,n)},async transferFrom(e,t,a,n){let r={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.transferFrom(e,t,a,{blockTag:this.context.blockNumber,...n},this.context.preparedData,r)},async withdraw(e,t){let a={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.withdraw(e,{blockTag:this.context.blockNumber,...t},this.context.preparedData,a)},async transfer(e,t,a){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.transfer(e,t,{blockTag:this.context.blockNumber,...a},this.context.preparedData,n)},async deposit(e){let t={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.deposit({blockTag:this.context.blockNumber,...e},this.context.preparedData,t)}};encodeCall={view:this.view,context:this.context,name(e){let t="0x"+this.context.blockNumber.toString(16);return e?.blockTag&&(t=typeof e.blockTag=="string"?e.blockTag:"0x"+e.blockTag.toString(16)),this.view.encodeCall.name({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:t})},approve(e,t,a){let n="0x"+this.context.blockNumber.toString(16);return a?.blockTag&&(n=typeof a.blockTag=="string"?a.blockTag:"0x"+a.blockTag.toString(16)),this.view.encodeCall.approve(e,t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})},totalSupply(e){let t="0x"+this.context.blockNumber.toString(16);return e?.blockTag&&(t=typeof e.blockTag=="string"?e.blockTag:"0x"+e.blockTag.toString(16)),this.view.encodeCall.totalSupply({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:t})},transferFrom(e,t,a,n){let r="0x"+this.context.blockNumber.toString(16);return n?.blockTag&&(r=typeof n.blockTag=="string"?n.blockTag:"0x"+n.blockTag.toString(16)),this.view.encodeCall.transferFrom(e,t,a,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:r})},withdraw(e,t){let a="0x"+this.context.blockNumber.toString(16);return t?.blockTag&&(a=typeof t.blockTag=="string"?t.blockTag:"0x"+t.blockTag.toString(16)),this.view.encodeCall.withdraw(e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:a})},decimals(e){let t="0x"+this.context.blockNumber.toString(16);return e?.blockTag&&(t=typeof e.blockTag=="string"?e.blockTag:"0x"+e.blockTag.toString(16)),this.view.encodeCall.decimals({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:t})},balanceOf(e,t){let a="0x"+this.context.blockNumber.toString(16);return t?.blockTag&&(a=typeof t.blockTag=="string"?t.blockTag:"0x"+t.blockTag.toString(16)),this.view.encodeCall.balanceOf(e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:a})},symbol(e){let t="0x"+this.context.blockNumber.toString(16);return e?.blockTag&&(t=typeof e.blockTag=="string"?e.blockTag:"0x"+e.blockTag.toString(16)),this.view.encodeCall.symbol({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:t})},transfer(e,t,a){let n="0x"+this.context.blockNumber.toString(16);return a?.blockTag&&(n=typeof a.blockTag=="string"?a.blockTag:"0x"+a.blockTag.toString(16)),this.view.encodeCall.transfer(e,t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})},deposit(e){let t="0x"+this.context.blockNumber.toString(16);return e?.blockTag&&(t=typeof e.blockTag=="string"?e.blockTag:"0x"+e.blockTag.toString(16)),this.view.encodeCall.deposit({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:t})},allowance(e,t,a){let n="0x"+this.context.blockNumber.toString(16);return a?.blockTag&&(n=typeof a.blockTag=="string"?a.blockTag:"0x"+a.blockTag.toString(16)),this.view.encodeCall.allowance(e,t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})}}},P=class extends S{onEventApproval(e,t,a,n){return t||(t=p.filters["Approval(address,address,uint256)"](null,null,null)),super.onEthEvent(e,t,a,n)}onEventTransfer(e,t,a,n){return t||(t=p.filters["Transfer(address,address,uint256)"](null,null,null)),super.onEthEvent(e,t,a,n)}onEventDeposit(e,t,a,n){return t||(t=p.filters["Deposit(address,uint256)"](null,null)),super.onEthEvent(e,t,a,n)}onEventWithdrawal(e,t,a,n){return t||(t=p.filters["Withdrawal(address,uint256)"](null,null)),super.onEthEvent(e,t,a,n)}onCallName(e,t,a){return super.onEthTrace("0x06fdde03",e,t,a)}onCallApprove(e,t,a){return super.onEthTrace("0x095ea7b3",e,t,a)}onCallTotalSupply(e,t,a){return super.onEthTrace("0x18160ddd",e,t,a)}onCallTransferFrom(e,t,a){return super.onEthTrace("0x23b872dd",e,t,a)}onCallWithdraw(e,t,a){return super.onEthTrace("0x2e1a7d4d",e,t,a)}onCallDecimals(e,t,a){return super.onEthTrace("0x313ce567",e,t,a)}onCallBalanceOf(e,t,a){return super.onEthTrace("0x70a08231",e,t,a)}onCallSymbol(e,t,a){return super.onEthTrace("0x95d89b41",e,t,a)}onCallTransfer(e,t,a){return super.onEthTrace("0xa9059cbb",e,t,a)}onCallDeposit(e,t,a){return super.onEthTrace("0xd0e30db0",e,t,a)}onCallAllowance(e,t,a){return super.onEthTrace("0xdd62ed3e",e,t,a)}CreateBoundContractView(){let e=g(this.config.network,this.config.address);return new f(this.config.address,e)}static bind(e){e.name||(e.name="WETH9");let t=v(e);return t||(t=new P(e),k(e,t)),t}},b=P;F(b,"filters",{Approval(e,t,a){return p.filters["Approval(address,address,uint256)"](e,t,a)},Transfer(e,t,a){return p.filters["Transfer(address,address,uint256)"](e,t,a)},Deposit(e,t){return p.filters["Deposit(address,uint256)"](e,t)},Withdrawal(e,t){return p.filters["Withdrawal(address,uint256)"](e,t)}});var y=class extends N{bindInternal(e){e.name||(e.name="WETH9");let t=v(e);return t||(t=new b(e),k(e,t)),t}onEventApproval(e,t,a,n){return t||(t=p.filters["Approval(address,address,uint256)"](null,null,null)),super.onEthEvent(e,t,a,n)}onEventTransfer(e,t,a,n){return t||(t=p.filters["Transfer(address,address,uint256)"](null,null,null)),super.onEthEvent(e,t,a,n)}onEventDeposit(e,t,a,n){return t||(t=p.filters["Deposit(address,uint256)"](null,null)),super.onEthEvent(e,t,a,n)}onEventWithdrawal(e,t,a,n){return t||(t=p.filters["Withdrawal(address,uint256)"](null,null)),super.onEthEvent(e,t,a,n)}};function g(l,e){let t=D("WETH9",e,l);if(!t){let a=E.connect(e,R(l));t=new T(a),H("WETH9",e,l,t)}return t}function B(l,e){let t=g(l.getChainId(),e),a=new f(e,t);return a.context=l,a.callStatic&&(a.callStatic.context=l),a}var m={blockHash:"0x0000000000000000000000000000000000000000000000000000000000000000",blockNumber:0,logIndex:0,removed:!1,transactionHash:"0x0000000000000000000000000000000000000000000000000000000000000000",transactionIndex:0};function j(l,e){let a=g(C.EthChainId.ETHEREUM,l).rawContract.interface.encodeEventLog("Approval(address,address,uint256)",[e.src,e.guy,e.wad]);return{...m,index:0,address:l,data:a.data,topics:a.topics}}function L(l,e){let a=g(C.EthChainId.ETHEREUM,l).rawContract.interface.encodeEventLog("Transfer(address,address,uint256)",[e.src,e.dst,e.wad]);return{...m,index:0,address:l,data:a.data,topics:a.topics}}function K(l,e){let a=g(C.EthChainId.ETHEREUM,l).rawContract.interface.encodeEventLog("Deposit(address,uint256)",[e.dst,e.wad]);return{...m,index:0,address:l,data:a.data,topics:a.topics}}function V(l,e){let a=g(C.EthChainId.ETHEREUM,l).rawContract.interface.encodeEventLog("Withdrawal(address,uint256)",[e.src,e.wad]);return{...m,index:0,address:l,data:a.data,topics:a.topics}}export{T as a,f as b,b as c,y as d,g as e,B as f,j as g,L as h,K as i,V as j,M as k};
|
|
3
|
+
//# sourceMappingURL=chunk-RWX5CV5W.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{a as Ze,c as We,e as Ge}from"./chunk-LLHU72AA.js";var me=We((de,Tt)=>{(function(e,a){"use strict";function n(p,t){if(!p)throw new Error(t||"Assertion failed")}function h(p,t){p.super_=t;var i=function(){};i.prototype=t.prototype,p.prototype=new i,p.prototype.constructor=p}function o(p,t,i){if(o.isBN(p))return p;this.negative=0,this.words=null,this.length=0,this.red=null,p!==null&&((t==="le"||t==="be")&&(i=t,t=10),this._init(p||0,t||10,i||"be"))}typeof e=="object"?e.exports=o:a.BN=o,o.BN=o,o.wordSize=26;var v;try{typeof window<"u"&&typeof window.Buffer<"u"?v=window.Buffer:v=Ze("buffer").Buffer}catch{}o.isBN=function(t){return t instanceof o?!0:t!==null&&typeof t=="object"&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,i){return t.cmp(i)>0?t:i},o.min=function(t,i){return t.cmp(i)<0?t:i},o.prototype._init=function(t,i,f){if(typeof t=="number")return this._initNumber(t,i,f);if(typeof t=="object")return this._initArray(t,i,f);i==="hex"&&(i=16),n(i===(i|0)&&i>=2&&i<=36),t=t.toString().replace(/\s+/g,"");var s=0;t[0]==="-"&&(s++,this.negative=1),s<t.length&&(i===16?this._parseHex(t,s,f):(this._parseBase(t,i,s),f==="le"&&this._initArray(this.toArray(),i,f)))},o.prototype._initNumber=function(t,i,f){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[t&67108863],this.length=1):t<4503599627370496?(this.words=[t&67108863,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[t&67108863,t/67108864&67108863,1],this.length=3),f==="le"&&this._initArray(this.toArray(),i,f)},o.prototype._initArray=function(t,i,f){if(n(typeof t.length=="number"),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var s=0;s<this.length;s++)this.words[s]=0;var l,d,m=0;if(f==="be")for(s=t.length-1,l=0;s>=0;s-=3)d=t[s]|t[s-1]<<8|t[s-2]<<16,this.words[l]|=d<<m&67108863,this.words[l+1]=d>>>26-m&67108863,m+=24,m>=26&&(m-=26,l++);else if(f==="le")for(s=0,l=0;s<t.length;s+=3)d=t[s]|t[s+1]<<8|t[s+2]<<16,this.words[l]|=d<<m&67108863,this.words[l+1]=d>>>26-m&67108863,m+=24,m>=26&&(m-=26,l++);return this._strip()};function x(p,t){var i=p.charCodeAt(t);if(i>=48&&i<=57)return i-48;if(i>=65&&i<=70)return i-55;if(i>=97&&i<=102)return i-87;n(!1,"Invalid character in "+p)}function _(p,t,i){var f=x(p,i);return i-1>=t&&(f|=x(p,i-1)<<4),f}o.prototype._parseHex=function(t,i,f){this.length=Math.ceil((t.length-i)/6),this.words=new Array(this.length);for(var s=0;s<this.length;s++)this.words[s]=0;var l=0,d=0,m;if(f==="be")for(s=t.length-1;s>=i;s-=2)m=_(t,i,s)<<l,this.words[d]|=m&67108863,l>=18?(l-=18,d+=1,this.words[d]|=m>>>26):l+=8;else{var u=t.length-i;for(s=u%2===0?i+1:i;s<t.length;s+=2)m=_(t,i,s)<<l,this.words[d]|=m&67108863,l>=18?(l-=18,d+=1,this.words[d]|=m>>>26):l+=8}this._strip()};function A(p,t,i,f){for(var s=0,l=0,d=Math.min(p.length,i),m=t;m<d;m++){var u=p.charCodeAt(m)-48;s*=f,u>=49?l=u-49+10:u>=17?l=u-17+10:l=u,n(u>=0&&l<f,"Invalid character"),s+=l}return s}o.prototype._parseBase=function(t,i,f){this.words=[0],this.length=1;for(var s=0,l=1;l<=67108863;l*=i)s++;s--,l=l/i|0;for(var d=t.length-f,m=d%s,u=Math.min(d,d-m)+f,r=0,c=f;c<u;c+=s)r=A(t,c,c+s,i),this.imuln(l),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(m!==0){var y=1;for(r=A(t,c,t.length,i),c=0;c<m;c++)y*=i;this.imuln(y),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this._strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var i=0;i<this.length;i++)t.words[i]=this.words[i];t.length=this.length,t.negative=this.negative,t.red=this.red};function E(p,t){p.words=t.words,p.length=t.length,p.negative=t.negative,p.red=t.red}if(o.prototype._move=function(t){E(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=w}catch{o.prototype.inspect=w}else o.prototype.inspect=w;function w(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var B=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],A0=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],w0=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,i){t=t||10,i=i|0||1;var f;if(t===16||t==="hex"){f="";for(var s=0,l=0,d=0;d<this.length;d++){var m=this.words[d],u=((m<<s|l)&16777215).toString(16);l=m>>>24-s&16777215,s+=2,s>=26&&(s-=26,d--),l!==0||d!==this.length-1?f=B[6-u.length]+u+f:f=u+f}for(l!==0&&(f=l.toString(16)+f);f.length%i!==0;)f="0"+f;return this.negative!==0&&(f="-"+f),f}if(t===(t|0)&&t>=2&&t<=36){var r=A0[t],c=w0[t];f="";var y=this.clone();for(y.negative=0;!y.isZero();){var g=y.modrn(c).toString(t);y=y.idivn(c),y.isZero()?f=g+f:f=B[r-g.length]+g+f}for(this.isZero()&&(f="0"+f);f.length%i!==0;)f="0"+f;return this.negative!==0&&(f="-"+f),f}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return this.length===2?t+=this.words[1]*67108864:this.length===3&&this.words[2]===1?t+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},v&&(o.prototype.toBuffer=function(t,i){return this.toArrayLike(v,t,i)}),o.prototype.toArray=function(t,i){return this.toArrayLike(Array,t,i)};var N0=function(t,i){return t.allocUnsafe?t.allocUnsafe(i):new t(i)};o.prototype.toArrayLike=function(t,i,f){this._strip();var s=this.byteLength(),l=f||Math.max(1,s);n(s<=l,"byte array longer than desired length"),n(l>0,"Requested array length <= 0");var d=N0(t,l),m=i==="le"?"LE":"BE";return this["_toArrayLike"+m](d,s),d},o.prototype._toArrayLikeLE=function(t,i){for(var f=0,s=0,l=0,d=0;l<this.length;l++){var m=this.words[l]<<d|s;t[f++]=m&255,f<t.length&&(t[f++]=m>>8&255),f<t.length&&(t[f++]=m>>16&255),d===6?(f<t.length&&(t[f++]=m>>24&255),s=0,d=0):(s=m>>>24,d+=2)}if(f<t.length)for(t[f++]=s;f<t.length;)t[f++]=0},o.prototype._toArrayLikeBE=function(t,i){for(var f=t.length-1,s=0,l=0,d=0;l<this.length;l++){var m=this.words[l]<<d|s;t[f--]=m&255,f>=0&&(t[f--]=m>>8&255),f>=0&&(t[f--]=m>>16&255),d===6?(f>=0&&(t[f--]=m>>24&255),s=0,d=0):(s=m>>>24,d+=2)}if(f>=0)for(t[f--]=s;f>=0;)t[f--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var i=t,f=0;return i>=4096&&(f+=13,i>>>=13),i>=64&&(f+=7,i>>>=7),i>=8&&(f+=4,i>>>=4),i>=2&&(f+=2,i>>>=2),f+i},o.prototype._zeroBits=function(t){if(t===0)return 26;var i=t,f=0;return i&8191||(f+=13,i>>>=13),i&127||(f+=7,i>>>=7),i&15||(f+=4,i>>>=4),i&3||(f+=2,i>>>=2),i&1||f++,f},o.prototype.bitLength=function(){var t=this.words[this.length-1],i=this._countBits(t);return(this.length-1)*26+i};function y0(p){for(var t=new Array(p.bitLength()),i=0;i<t.length;i++){var f=i/26|0,s=i%26;t[i]=p.words[f]>>>s&1}return t}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,i=0;i<this.length;i++){var f=this._zeroBits(this.words[i]);if(t+=f,f!==26)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return this.negative!==0?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return this.negative!==0},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]|t.words[i];return this._strip()},o.prototype.ior=function(t){return n((this.negative|t.negative)===0),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var i;this.length>t.length?i=t:i=this;for(var f=0;f<i.length;f++)this.words[f]=this.words[f]&t.words[f];return this.length=i.length,this._strip()},o.prototype.iand=function(t){return n((this.negative|t.negative)===0),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var i,f;this.length>t.length?(i=this,f=t):(i=t,f=this);for(var s=0;s<f.length;s++)this.words[s]=i.words[s]^f.words[s];if(this!==i)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=i.length,this._strip()},o.prototype.ixor=function(t){return n((this.negative|t.negative)===0),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n(typeof t=="number"&&t>=0);var i=Math.ceil(t/26)|0,f=t%26;this._expand(i),f>0&&i--;for(var s=0;s<i;s++)this.words[s]=~this.words[s]&67108863;return f>0&&(this.words[s]=~this.words[s]&67108863>>26-f),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,i){n(typeof t=="number"&&t>=0);var f=t/26|0,s=t%26;return this._expand(f+1),i?this.words[f]=this.words[f]|1<<s:this.words[f]=this.words[f]&~(1<<s),this._strip()},o.prototype.iadd=function(t){var i;if(this.negative!==0&&t.negative===0)return this.negative=0,i=this.isub(t),this.negative^=1,this._normSign();if(this.negative===0&&t.negative!==0)return t.negative=0,i=this.isub(t),t.negative=1,i._normSign();var f,s;this.length>t.length?(f=this,s=t):(f=t,s=this);for(var l=0,d=0;d<s.length;d++)i=(f.words[d]|0)+(s.words[d]|0)+l,this.words[d]=i&67108863,l=i>>>26;for(;l!==0&&d<f.length;d++)i=(f.words[d]|0)+l,this.words[d]=i&67108863,l=i>>>26;if(this.length=f.length,l!==0)this.words[this.length]=l,this.length++;else if(f!==this)for(;d<f.length;d++)this.words[d]=f.words[d];return this},o.prototype.add=function(t){var i;return t.negative!==0&&this.negative===0?(t.negative=0,i=this.sub(t),t.negative^=1,i):t.negative===0&&this.negative!==0?(this.negative=0,i=t.sub(this),this.negative=1,i):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(t.negative!==0){t.negative=0;var i=this.iadd(t);return t.negative=1,i._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var f=this.cmp(t);if(f===0)return this.negative=0,this.length=1,this.words[0]=0,this;var s,l;f>0?(s=this,l=t):(s=t,l=this);for(var d=0,m=0;m<l.length;m++)i=(s.words[m]|0)-(l.words[m]|0)+d,d=i>>26,this.words[m]=i&67108863;for(;d!==0&&m<s.length;m++)i=(s.words[m]|0)+d,d=i>>26,this.words[m]=i&67108863;if(d===0&&m<s.length&&s!==this)for(;m<s.length;m++)this.words[m]=s.words[m];return this.length=Math.max(this.length,m),s!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};function D0(p,t,i){i.negative=t.negative^p.negative;var f=p.length+t.length|0;i.length=f,f=f-1|0;var s=p.words[0]|0,l=t.words[0]|0,d=s*l,m=d&67108863,u=d/67108864|0;i.words[0]=m;for(var r=1;r<f;r++){for(var c=u>>>26,y=u&67108863,g=Math.min(r,t.length-1),b=Math.max(0,r-p.length+1);b<=g;b++){var M=r-b|0;s=p.words[M]|0,l=t.words[b]|0,d=s*l+y,c+=d/67108864|0,y=d&67108863}i.words[r]=y|0,u=c|0}return u!==0?i.words[r]=u|0:i.length--,i._strip()}var z0=function(t,i,f){var s=t.words,l=i.words,d=f.words,m=0,u,r,c,y=s[0]|0,g=y&8191,b=y>>>13,M=s[1]|0,O=M&8191,R=M>>>13,R0=s[2]|0,T=R0&8191,L=R0>>>13,Z0=s[3]|0,z=Z0&8191,q=Z0>>>13,Kt=s[4]|0,P=Kt&8191,C=Kt>>>13,Yt=s[5]|0,V=Yt&8191,Z=Yt>>>13,Xt=s[6]|0,W=Xt&8191,G=Xt>>>13,Jt=s[7]|0,H=Jt&8191,j=Jt>>>13,Qt=s[8]|0,$=Qt&8191,K=Qt>>>13,te=s[9]|0,Y=te&8191,X=te>>>13,ee=l[0]|0,J=ee&8191,Q=ee>>>13,re=l[1]|0,t0=re&8191,e0=re>>>13,ie=l[2]|0,r0=ie&8191,i0=ie>>>13,ne=l[3]|0,n0=ne&8191,a0=ne>>>13,ae=l[4]|0,o0=ae&8191,f0=ae>>>13,oe=l[5]|0,s0=oe&8191,u0=oe>>>13,fe=l[6]|0,l0=fe&8191,h0=fe>>>13,se=l[7]|0,c0=se&8191,p0=se>>>13,ue=l[8]|0,d0=ue&8191,m0=ue>>>13,le=l[9]|0,v0=le&8191,x0=le>>>13;f.negative=t.negative^i.negative,f.length=19,u=Math.imul(g,J),r=Math.imul(g,Q),r=r+Math.imul(b,J)|0,c=Math.imul(b,Q);var ut=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(ut>>>26)|0,ut&=67108863,u=Math.imul(O,J),r=Math.imul(O,Q),r=r+Math.imul(R,J)|0,c=Math.imul(R,Q),u=u+Math.imul(g,t0)|0,r=r+Math.imul(g,e0)|0,r=r+Math.imul(b,t0)|0,c=c+Math.imul(b,e0)|0;var lt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(lt>>>26)|0,lt&=67108863,u=Math.imul(T,J),r=Math.imul(T,Q),r=r+Math.imul(L,J)|0,c=Math.imul(L,Q),u=u+Math.imul(O,t0)|0,r=r+Math.imul(O,e0)|0,r=r+Math.imul(R,t0)|0,c=c+Math.imul(R,e0)|0,u=u+Math.imul(g,r0)|0,r=r+Math.imul(g,i0)|0,r=r+Math.imul(b,r0)|0,c=c+Math.imul(b,i0)|0;var ht=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(ht>>>26)|0,ht&=67108863,u=Math.imul(z,J),r=Math.imul(z,Q),r=r+Math.imul(q,J)|0,c=Math.imul(q,Q),u=u+Math.imul(T,t0)|0,r=r+Math.imul(T,e0)|0,r=r+Math.imul(L,t0)|0,c=c+Math.imul(L,e0)|0,u=u+Math.imul(O,r0)|0,r=r+Math.imul(O,i0)|0,r=r+Math.imul(R,r0)|0,c=c+Math.imul(R,i0)|0,u=u+Math.imul(g,n0)|0,r=r+Math.imul(g,a0)|0,r=r+Math.imul(b,n0)|0,c=c+Math.imul(b,a0)|0;var ct=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(ct>>>26)|0,ct&=67108863,u=Math.imul(P,J),r=Math.imul(P,Q),r=r+Math.imul(C,J)|0,c=Math.imul(C,Q),u=u+Math.imul(z,t0)|0,r=r+Math.imul(z,e0)|0,r=r+Math.imul(q,t0)|0,c=c+Math.imul(q,e0)|0,u=u+Math.imul(T,r0)|0,r=r+Math.imul(T,i0)|0,r=r+Math.imul(L,r0)|0,c=c+Math.imul(L,i0)|0,u=u+Math.imul(O,n0)|0,r=r+Math.imul(O,a0)|0,r=r+Math.imul(R,n0)|0,c=c+Math.imul(R,a0)|0,u=u+Math.imul(g,o0)|0,r=r+Math.imul(g,f0)|0,r=r+Math.imul(b,o0)|0,c=c+Math.imul(b,f0)|0;var pt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(pt>>>26)|0,pt&=67108863,u=Math.imul(V,J),r=Math.imul(V,Q),r=r+Math.imul(Z,J)|0,c=Math.imul(Z,Q),u=u+Math.imul(P,t0)|0,r=r+Math.imul(P,e0)|0,r=r+Math.imul(C,t0)|0,c=c+Math.imul(C,e0)|0,u=u+Math.imul(z,r0)|0,r=r+Math.imul(z,i0)|0,r=r+Math.imul(q,r0)|0,c=c+Math.imul(q,i0)|0,u=u+Math.imul(T,n0)|0,r=r+Math.imul(T,a0)|0,r=r+Math.imul(L,n0)|0,c=c+Math.imul(L,a0)|0,u=u+Math.imul(O,o0)|0,r=r+Math.imul(O,f0)|0,r=r+Math.imul(R,o0)|0,c=c+Math.imul(R,f0)|0,u=u+Math.imul(g,s0)|0,r=r+Math.imul(g,u0)|0,r=r+Math.imul(b,s0)|0,c=c+Math.imul(b,u0)|0;var dt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(dt>>>26)|0,dt&=67108863,u=Math.imul(W,J),r=Math.imul(W,Q),r=r+Math.imul(G,J)|0,c=Math.imul(G,Q),u=u+Math.imul(V,t0)|0,r=r+Math.imul(V,e0)|0,r=r+Math.imul(Z,t0)|0,c=c+Math.imul(Z,e0)|0,u=u+Math.imul(P,r0)|0,r=r+Math.imul(P,i0)|0,r=r+Math.imul(C,r0)|0,c=c+Math.imul(C,i0)|0,u=u+Math.imul(z,n0)|0,r=r+Math.imul(z,a0)|0,r=r+Math.imul(q,n0)|0,c=c+Math.imul(q,a0)|0,u=u+Math.imul(T,o0)|0,r=r+Math.imul(T,f0)|0,r=r+Math.imul(L,o0)|0,c=c+Math.imul(L,f0)|0,u=u+Math.imul(O,s0)|0,r=r+Math.imul(O,u0)|0,r=r+Math.imul(R,s0)|0,c=c+Math.imul(R,u0)|0,u=u+Math.imul(g,l0)|0,r=r+Math.imul(g,h0)|0,r=r+Math.imul(b,l0)|0,c=c+Math.imul(b,h0)|0;var mt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(mt>>>26)|0,mt&=67108863,u=Math.imul(H,J),r=Math.imul(H,Q),r=r+Math.imul(j,J)|0,c=Math.imul(j,Q),u=u+Math.imul(W,t0)|0,r=r+Math.imul(W,e0)|0,r=r+Math.imul(G,t0)|0,c=c+Math.imul(G,e0)|0,u=u+Math.imul(V,r0)|0,r=r+Math.imul(V,i0)|0,r=r+Math.imul(Z,r0)|0,c=c+Math.imul(Z,i0)|0,u=u+Math.imul(P,n0)|0,r=r+Math.imul(P,a0)|0,r=r+Math.imul(C,n0)|0,c=c+Math.imul(C,a0)|0,u=u+Math.imul(z,o0)|0,r=r+Math.imul(z,f0)|0,r=r+Math.imul(q,o0)|0,c=c+Math.imul(q,f0)|0,u=u+Math.imul(T,s0)|0,r=r+Math.imul(T,u0)|0,r=r+Math.imul(L,s0)|0,c=c+Math.imul(L,u0)|0,u=u+Math.imul(O,l0)|0,r=r+Math.imul(O,h0)|0,r=r+Math.imul(R,l0)|0,c=c+Math.imul(R,h0)|0,u=u+Math.imul(g,c0)|0,r=r+Math.imul(g,p0)|0,r=r+Math.imul(b,c0)|0,c=c+Math.imul(b,p0)|0;var vt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,u=Math.imul($,J),r=Math.imul($,Q),r=r+Math.imul(K,J)|0,c=Math.imul(K,Q),u=u+Math.imul(H,t0)|0,r=r+Math.imul(H,e0)|0,r=r+Math.imul(j,t0)|0,c=c+Math.imul(j,e0)|0,u=u+Math.imul(W,r0)|0,r=r+Math.imul(W,i0)|0,r=r+Math.imul(G,r0)|0,c=c+Math.imul(G,i0)|0,u=u+Math.imul(V,n0)|0,r=r+Math.imul(V,a0)|0,r=r+Math.imul(Z,n0)|0,c=c+Math.imul(Z,a0)|0,u=u+Math.imul(P,o0)|0,r=r+Math.imul(P,f0)|0,r=r+Math.imul(C,o0)|0,c=c+Math.imul(C,f0)|0,u=u+Math.imul(z,s0)|0,r=r+Math.imul(z,u0)|0,r=r+Math.imul(q,s0)|0,c=c+Math.imul(q,u0)|0,u=u+Math.imul(T,l0)|0,r=r+Math.imul(T,h0)|0,r=r+Math.imul(L,l0)|0,c=c+Math.imul(L,h0)|0,u=u+Math.imul(O,c0)|0,r=r+Math.imul(O,p0)|0,r=r+Math.imul(R,c0)|0,c=c+Math.imul(R,p0)|0,u=u+Math.imul(g,d0)|0,r=r+Math.imul(g,m0)|0,r=r+Math.imul(b,d0)|0,c=c+Math.imul(b,m0)|0;var xt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(xt>>>26)|0,xt&=67108863,u=Math.imul(Y,J),r=Math.imul(Y,Q),r=r+Math.imul(X,J)|0,c=Math.imul(X,Q),u=u+Math.imul($,t0)|0,r=r+Math.imul($,e0)|0,r=r+Math.imul(K,t0)|0,c=c+Math.imul(K,e0)|0,u=u+Math.imul(H,r0)|0,r=r+Math.imul(H,i0)|0,r=r+Math.imul(j,r0)|0,c=c+Math.imul(j,i0)|0,u=u+Math.imul(W,n0)|0,r=r+Math.imul(W,a0)|0,r=r+Math.imul(G,n0)|0,c=c+Math.imul(G,a0)|0,u=u+Math.imul(V,o0)|0,r=r+Math.imul(V,f0)|0,r=r+Math.imul(Z,o0)|0,c=c+Math.imul(Z,f0)|0,u=u+Math.imul(P,s0)|0,r=r+Math.imul(P,u0)|0,r=r+Math.imul(C,s0)|0,c=c+Math.imul(C,u0)|0,u=u+Math.imul(z,l0)|0,r=r+Math.imul(z,h0)|0,r=r+Math.imul(q,l0)|0,c=c+Math.imul(q,h0)|0,u=u+Math.imul(T,c0)|0,r=r+Math.imul(T,p0)|0,r=r+Math.imul(L,c0)|0,c=c+Math.imul(L,p0)|0,u=u+Math.imul(O,d0)|0,r=r+Math.imul(O,m0)|0,r=r+Math.imul(R,d0)|0,c=c+Math.imul(R,m0)|0,u=u+Math.imul(g,v0)|0,r=r+Math.imul(g,x0)|0,r=r+Math.imul(b,v0)|0,c=c+Math.imul(b,x0)|0;var gt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,u=Math.imul(Y,t0),r=Math.imul(Y,e0),r=r+Math.imul(X,t0)|0,c=Math.imul(X,e0),u=u+Math.imul($,r0)|0,r=r+Math.imul($,i0)|0,r=r+Math.imul(K,r0)|0,c=c+Math.imul(K,i0)|0,u=u+Math.imul(H,n0)|0,r=r+Math.imul(H,a0)|0,r=r+Math.imul(j,n0)|0,c=c+Math.imul(j,a0)|0,u=u+Math.imul(W,o0)|0,r=r+Math.imul(W,f0)|0,r=r+Math.imul(G,o0)|0,c=c+Math.imul(G,f0)|0,u=u+Math.imul(V,s0)|0,r=r+Math.imul(V,u0)|0,r=r+Math.imul(Z,s0)|0,c=c+Math.imul(Z,u0)|0,u=u+Math.imul(P,l0)|0,r=r+Math.imul(P,h0)|0,r=r+Math.imul(C,l0)|0,c=c+Math.imul(C,h0)|0,u=u+Math.imul(z,c0)|0,r=r+Math.imul(z,p0)|0,r=r+Math.imul(q,c0)|0,c=c+Math.imul(q,p0)|0,u=u+Math.imul(T,d0)|0,r=r+Math.imul(T,m0)|0,r=r+Math.imul(L,d0)|0,c=c+Math.imul(L,m0)|0,u=u+Math.imul(O,v0)|0,r=r+Math.imul(O,x0)|0,r=r+Math.imul(R,v0)|0,c=c+Math.imul(R,x0)|0;var _t=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(_t>>>26)|0,_t&=67108863,u=Math.imul(Y,r0),r=Math.imul(Y,i0),r=r+Math.imul(X,r0)|0,c=Math.imul(X,i0),u=u+Math.imul($,n0)|0,r=r+Math.imul($,a0)|0,r=r+Math.imul(K,n0)|0,c=c+Math.imul(K,a0)|0,u=u+Math.imul(H,o0)|0,r=r+Math.imul(H,f0)|0,r=r+Math.imul(j,o0)|0,c=c+Math.imul(j,f0)|0,u=u+Math.imul(W,s0)|0,r=r+Math.imul(W,u0)|0,r=r+Math.imul(G,s0)|0,c=c+Math.imul(G,u0)|0,u=u+Math.imul(V,l0)|0,r=r+Math.imul(V,h0)|0,r=r+Math.imul(Z,l0)|0,c=c+Math.imul(Z,h0)|0,u=u+Math.imul(P,c0)|0,r=r+Math.imul(P,p0)|0,r=r+Math.imul(C,c0)|0,c=c+Math.imul(C,p0)|0,u=u+Math.imul(z,d0)|0,r=r+Math.imul(z,m0)|0,r=r+Math.imul(q,d0)|0,c=c+Math.imul(q,m0)|0,u=u+Math.imul(T,v0)|0,r=r+Math.imul(T,x0)|0,r=r+Math.imul(L,v0)|0,c=c+Math.imul(L,x0)|0;var yt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,u=Math.imul(Y,n0),r=Math.imul(Y,a0),r=r+Math.imul(X,n0)|0,c=Math.imul(X,a0),u=u+Math.imul($,o0)|0,r=r+Math.imul($,f0)|0,r=r+Math.imul(K,o0)|0,c=c+Math.imul(K,f0)|0,u=u+Math.imul(H,s0)|0,r=r+Math.imul(H,u0)|0,r=r+Math.imul(j,s0)|0,c=c+Math.imul(j,u0)|0,u=u+Math.imul(W,l0)|0,r=r+Math.imul(W,h0)|0,r=r+Math.imul(G,l0)|0,c=c+Math.imul(G,h0)|0,u=u+Math.imul(V,c0)|0,r=r+Math.imul(V,p0)|0,r=r+Math.imul(Z,c0)|0,c=c+Math.imul(Z,p0)|0,u=u+Math.imul(P,d0)|0,r=r+Math.imul(P,m0)|0,r=r+Math.imul(C,d0)|0,c=c+Math.imul(C,m0)|0,u=u+Math.imul(z,v0)|0,r=r+Math.imul(z,x0)|0,r=r+Math.imul(q,v0)|0,c=c+Math.imul(q,x0)|0;var bt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,u=Math.imul(Y,o0),r=Math.imul(Y,f0),r=r+Math.imul(X,o0)|0,c=Math.imul(X,f0),u=u+Math.imul($,s0)|0,r=r+Math.imul($,u0)|0,r=r+Math.imul(K,s0)|0,c=c+Math.imul(K,u0)|0,u=u+Math.imul(H,l0)|0,r=r+Math.imul(H,h0)|0,r=r+Math.imul(j,l0)|0,c=c+Math.imul(j,h0)|0,u=u+Math.imul(W,c0)|0,r=r+Math.imul(W,p0)|0,r=r+Math.imul(G,c0)|0,c=c+Math.imul(G,p0)|0,u=u+Math.imul(V,d0)|0,r=r+Math.imul(V,m0)|0,r=r+Math.imul(Z,d0)|0,c=c+Math.imul(Z,m0)|0,u=u+Math.imul(P,v0)|0,r=r+Math.imul(P,x0)|0,r=r+Math.imul(C,v0)|0,c=c+Math.imul(C,x0)|0;var wt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,u=Math.imul(Y,s0),r=Math.imul(Y,u0),r=r+Math.imul(X,s0)|0,c=Math.imul(X,u0),u=u+Math.imul($,l0)|0,r=r+Math.imul($,h0)|0,r=r+Math.imul(K,l0)|0,c=c+Math.imul(K,h0)|0,u=u+Math.imul(H,c0)|0,r=r+Math.imul(H,p0)|0,r=r+Math.imul(j,c0)|0,c=c+Math.imul(j,p0)|0,u=u+Math.imul(W,d0)|0,r=r+Math.imul(W,m0)|0,r=r+Math.imul(G,d0)|0,c=c+Math.imul(G,m0)|0,u=u+Math.imul(V,v0)|0,r=r+Math.imul(V,x0)|0,r=r+Math.imul(Z,v0)|0,c=c+Math.imul(Z,x0)|0;var Mt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,u=Math.imul(Y,l0),r=Math.imul(Y,h0),r=r+Math.imul(X,l0)|0,c=Math.imul(X,h0),u=u+Math.imul($,c0)|0,r=r+Math.imul($,p0)|0,r=r+Math.imul(K,c0)|0,c=c+Math.imul(K,p0)|0,u=u+Math.imul(H,d0)|0,r=r+Math.imul(H,m0)|0,r=r+Math.imul(j,d0)|0,c=c+Math.imul(j,m0)|0,u=u+Math.imul(W,v0)|0,r=r+Math.imul(W,x0)|0,r=r+Math.imul(G,v0)|0,c=c+Math.imul(G,x0)|0;var At=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(At>>>26)|0,At&=67108863,u=Math.imul(Y,c0),r=Math.imul(Y,p0),r=r+Math.imul(X,c0)|0,c=Math.imul(X,p0),u=u+Math.imul($,d0)|0,r=r+Math.imul($,m0)|0,r=r+Math.imul(K,d0)|0,c=c+Math.imul(K,m0)|0,u=u+Math.imul(H,v0)|0,r=r+Math.imul(H,x0)|0,r=r+Math.imul(j,v0)|0,c=c+Math.imul(j,x0)|0;var It=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(It>>>26)|0,It&=67108863,u=Math.imul(Y,d0),r=Math.imul(Y,m0),r=r+Math.imul(X,d0)|0,c=Math.imul(X,m0),u=u+Math.imul($,v0)|0,r=r+Math.imul($,x0)|0,r=r+Math.imul(K,v0)|0,c=c+Math.imul(K,x0)|0;var Ot=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u=Math.imul(Y,v0),r=Math.imul(Y,x0),r=r+Math.imul(X,v0)|0,c=Math.imul(X,x0);var St=(m+u|0)+((r&8191)<<13)|0;return m=(c+(r>>>13)|0)+(St>>>26)|0,St&=67108863,d[0]=ut,d[1]=lt,d[2]=ht,d[3]=ct,d[4]=pt,d[5]=dt,d[6]=mt,d[7]=vt,d[8]=xt,d[9]=gt,d[10]=_t,d[11]=yt,d[12]=bt,d[13]=wt,d[14]=Mt,d[15]=At,d[16]=It,d[17]=Ot,d[18]=St,m!==0&&(d[19]=m,f.length++),f};Math.imul||(z0=D0);function E0(p,t,i){i.negative=t.negative^p.negative,i.length=p.length+t.length;for(var f=0,s=0,l=0;l<i.length-1;l++){var d=s;s=0;for(var m=f&67108863,u=Math.min(l,t.length-1),r=Math.max(0,l-p.length+1);r<=u;r++){var c=l-r,y=p.words[c]|0,g=t.words[r]|0,b=y*g,M=b&67108863;d=d+(b/67108864|0)|0,M=M+m|0,m=M&67108863,d=d+(M>>>26)|0,s+=d>>>26,d&=67108863}i.words[l]=m,f=d,d=s}return f!==0?i.words[l]=f:i.length--,i._strip()}function k0(p,t,i){return E0(p,t,i)}o.prototype.mulTo=function(t,i){var f,s=this.length+t.length;return this.length===10&&t.length===10?f=z0(this,t,i):s<63?f=D0(this,t,i):s<1024?f=E0(this,t,i):f=k0(this,t,i),f};function k(p,t){this.x=p,this.y=t}k.prototype.makeRBT=function(t){for(var i=new Array(t),f=o.prototype._countBits(t)-1,s=0;s<t;s++)i[s]=this.revBin(s,f,t);return i},k.prototype.revBin=function(t,i,f){if(t===0||t===f-1)return t;for(var s=0,l=0;l<i;l++)s|=(t&1)<<i-l-1,t>>=1;return s},k.prototype.permute=function(t,i,f,s,l,d){for(var m=0;m<d;m++)s[m]=i[t[m]],l[m]=f[t[m]]},k.prototype.transform=function(t,i,f,s,l,d){this.permute(d,t,i,f,s,l);for(var m=1;m<l;m<<=1)for(var u=m<<1,r=Math.cos(2*Math.PI/u),c=Math.sin(2*Math.PI/u),y=0;y<l;y+=u)for(var g=r,b=c,M=0;M<m;M++){var O=f[y+M],R=s[y+M],R0=f[y+M+m],T=s[y+M+m],L=g*R0-b*T;T=g*T+b*R0,R0=L,f[y+M]=O+R0,s[y+M]=R+T,f[y+M+m]=O-R0,s[y+M+m]=R-T,M!==u&&(L=r*g-c*b,b=r*b+c*g,g=L)}},k.prototype.guessLen13b=function(t,i){var f=Math.max(i,t)|1,s=f&1,l=0;for(f=f/2|0;f;f=f>>>1)l++;return 1<<l+1+s},k.prototype.conjugate=function(t,i,f){if(!(f<=1))for(var s=0;s<f/2;s++){var l=t[s];t[s]=t[f-s-1],t[f-s-1]=l,l=i[s],i[s]=-i[f-s-1],i[f-s-1]=-l}},k.prototype.normalize13b=function(t,i){for(var f=0,s=0;s<i/2;s++){var l=Math.round(t[2*s+1]/i)*8192+Math.round(t[2*s]/i)+f;t[s]=l&67108863,l<67108864?f=0:f=l/67108864|0}return t},k.prototype.convert13b=function(t,i,f,s){for(var l=0,d=0;d<i;d++)l=l+(t[d]|0),f[2*d]=l&8191,l=l>>>13,f[2*d+1]=l&8191,l=l>>>13;for(d=2*i;d<s;++d)f[d]=0;n(l===0),n((l&-8192)===0)},k.prototype.stub=function(t){for(var i=new Array(t),f=0;f<t;f++)i[f]=0;return i},k.prototype.mulp=function(t,i,f){var s=2*this.guessLen13b(t.length,i.length),l=this.makeRBT(s),d=this.stub(s),m=new Array(s),u=new Array(s),r=new Array(s),c=new Array(s),y=new Array(s),g=new Array(s),b=f.words;b.length=s,this.convert13b(t.words,t.length,m,s),this.convert13b(i.words,i.length,c,s),this.transform(m,d,u,r,s,l),this.transform(c,d,y,g,s,l);for(var M=0;M<s;M++){var O=u[M]*y[M]-r[M]*g[M];r[M]=u[M]*g[M]+r[M]*y[M],u[M]=O}return this.conjugate(u,r,s),this.transform(u,r,b,d,s,l),this.conjugate(b,d,s),this.normalize13b(b,s),f.negative=t.negative^i.negative,f.length=t.length+i.length,f._strip()},o.prototype.mul=function(t){var i=new o(null);return i.words=new Array(this.length+t.length),this.mulTo(t,i)},o.prototype.mulf=function(t){var i=new o(null);return i.words=new Array(this.length+t.length),k0(this,t,i)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var i=t<0;i&&(t=-t),n(typeof t=="number"),n(t<67108864);for(var f=0,s=0;s<this.length;s++){var l=(this.words[s]|0)*t,d=(l&67108863)+(f&67108863);f>>=26,f+=l/67108864|0,f+=d>>>26,this.words[s]=d&67108863}return f!==0&&(this.words[s]=f,this.length++),i?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var i=y0(t);if(i.length===0)return new o(1);for(var f=this,s=0;s<i.length&&i[s]===0;s++,f=f.sqr());if(++s<i.length)for(var l=f.sqr();s<i.length;s++,l=l.sqr())i[s]!==0&&(f=f.mul(l));return f},o.prototype.iushln=function(t){n(typeof t=="number"&&t>=0);var i=t%26,f=(t-i)/26,s=67108863>>>26-i<<26-i,l;if(i!==0){var d=0;for(l=0;l<this.length;l++){var m=this.words[l]&s,u=(this.words[l]|0)-m<<i;this.words[l]=u|d,d=m>>>26-i}d&&(this.words[l]=d,this.length++)}if(f!==0){for(l=this.length-1;l>=0;l--)this.words[l+f]=this.words[l];for(l=0;l<f;l++)this.words[l]=0;this.length+=f}return this._strip()},o.prototype.ishln=function(t){return n(this.negative===0),this.iushln(t)},o.prototype.iushrn=function(t,i,f){n(typeof t=="number"&&t>=0);var s;i?s=(i-i%26)/26:s=0;var l=t%26,d=Math.min((t-l)/26,this.length),m=67108863^67108863>>>l<<l,u=f;if(s-=d,s=Math.max(0,s),u){for(var r=0;r<d;r++)u.words[r]=this.words[r];u.length=d}if(d!==0)if(this.length>d)for(this.length-=d,r=0;r<this.length;r++)this.words[r]=this.words[r+d];else this.words[0]=0,this.length=1;var c=0;for(r=this.length-1;r>=0&&(c!==0||r>=s);r--){var y=this.words[r]|0;this.words[r]=c<<26-l|y>>>l,c=y&m}return u&&c!==0&&(u.words[u.length++]=c),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,i,f){return n(this.negative===0),this.iushrn(t,i,f)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n(typeof t=="number"&&t>=0);var i=t%26,f=(t-i)/26,s=1<<i;if(this.length<=f)return!1;var l=this.words[f];return!!(l&s)},o.prototype.imaskn=function(t){n(typeof t=="number"&&t>=0);var i=t%26,f=(t-i)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=f)return this;if(i!==0&&f++,this.length=Math.min(f,this.length),i!==0){var s=67108863^67108863>>>i<<i;this.words[this.length-1]&=s}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n(typeof t=="number"),n(t<67108864),t<0?this.isubn(-t):this.negative!==0?this.length===1&&(this.words[0]|0)<=t?(this.words[0]=t-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},o.prototype.isubn=function(t){if(n(typeof t=="number"),n(t<67108864),t<0)return this.iaddn(-t);if(this.negative!==0)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,i,f){var s=t.length+f,l;this._expand(s);var d,m=0;for(l=0;l<t.length;l++){d=(this.words[l+f]|0)+m;var u=(t.words[l]|0)*i;d-=u&67108863,m=(d>>26)-(u/67108864|0),this.words[l+f]=d&67108863}for(;l<this.length-f;l++)d=(this.words[l+f]|0)+m,m=d>>26,this.words[l+f]=d&67108863;if(m===0)return this._strip();for(n(m===-1),m=0,l=0;l<this.length;l++)d=-(this.words[l]|0)+m,m=d>>26,this.words[l]=d&67108863;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,i){var f=this.length-t.length,s=this.clone(),l=t,d=l.words[l.length-1]|0,m=this._countBits(d);f=26-m,f!==0&&(l=l.ushln(f),s.iushln(f),d=l.words[l.length-1]|0);var u=s.length-l.length,r;if(i!=="mod"){r=new o(null),r.length=u+1,r.words=new Array(r.length);for(var c=0;c<r.length;c++)r.words[c]=0}var y=s.clone()._ishlnsubmul(l,1,u);y.negative===0&&(s=y,r&&(r.words[u]=1));for(var g=u-1;g>=0;g--){var b=(s.words[l.length+g]|0)*67108864+(s.words[l.length+g-1]|0);for(b=Math.min(b/d|0,67108863),s._ishlnsubmul(l,b,g);s.negative!==0;)b--,s.negative=0,s._ishlnsubmul(l,1,g),s.isZero()||(s.negative^=1);r&&(r.words[g]=b)}return r&&r._strip(),s._strip(),i!=="div"&&f!==0&&s.iushrn(f),{div:r||null,mod:s}},o.prototype.divmod=function(t,i,f){if(n(!t.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var s,l,d;return this.negative!==0&&t.negative===0?(d=this.neg().divmod(t,i),i!=="mod"&&(s=d.div.neg()),i!=="div"&&(l=d.mod.neg(),f&&l.negative!==0&&l.iadd(t)),{div:s,mod:l}):this.negative===0&&t.negative!==0?(d=this.divmod(t.neg(),i),i!=="mod"&&(s=d.div.neg()),{div:s,mod:d.mod}):this.negative&t.negative?(d=this.neg().divmod(t.neg(),i),i!=="div"&&(l=d.mod.neg(),f&&l.negative!==0&&l.isub(t)),{div:d.div,mod:l}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:t.length===1?i==="div"?{div:this.divn(t.words[0]),mod:null}:i==="mod"?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,i)},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var i=this.divmod(t);if(i.mod.isZero())return i.div;var f=i.div.negative!==0?i.mod.isub(t):i.mod,s=t.ushrn(1),l=t.andln(1),d=f.cmp(s);return d<0||l===1&&d===0?i.div:i.div.negative!==0?i.div.isubn(1):i.div.iaddn(1)},o.prototype.modrn=function(t){var i=t<0;i&&(t=-t),n(t<=67108863);for(var f=(1<<26)%t,s=0,l=this.length-1;l>=0;l--)s=(f*s+(this.words[l]|0))%t;return i?-s:s},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var i=t<0;i&&(t=-t),n(t<=67108863);for(var f=0,s=this.length-1;s>=0;s--){var l=(this.words[s]|0)+f*67108864;this.words[s]=l/t|0,f=l%t}return this._strip(),i?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(t.negative===0),n(!t.isZero());var i=this,f=t.clone();i.negative!==0?i=i.umod(t):i=i.clone();for(var s=new o(1),l=new o(0),d=new o(0),m=new o(1),u=0;i.isEven()&&f.isEven();)i.iushrn(1),f.iushrn(1),++u;for(var r=f.clone(),c=i.clone();!i.isZero();){for(var y=0,g=1;!(i.words[0]&g)&&y<26;++y,g<<=1);if(y>0)for(i.iushrn(y);y-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(r),l.isub(c)),s.iushrn(1),l.iushrn(1);for(var b=0,M=1;!(f.words[0]&M)&&b<26;++b,M<<=1);if(b>0)for(f.iushrn(b);b-- >0;)(d.isOdd()||m.isOdd())&&(d.iadd(r),m.isub(c)),d.iushrn(1),m.iushrn(1);i.cmp(f)>=0?(i.isub(f),s.isub(d),l.isub(m)):(f.isub(i),d.isub(s),m.isub(l))}return{a:d,b:m,gcd:f.iushln(u)}},o.prototype._invmp=function(t){n(t.negative===0),n(!t.isZero());var i=this,f=t.clone();i.negative!==0?i=i.umod(t):i=i.clone();for(var s=new o(1),l=new o(0),d=f.clone();i.cmpn(1)>0&&f.cmpn(1)>0;){for(var m=0,u=1;!(i.words[0]&u)&&m<26;++m,u<<=1);if(m>0)for(i.iushrn(m);m-- >0;)s.isOdd()&&s.iadd(d),s.iushrn(1);for(var r=0,c=1;!(f.words[0]&c)&&r<26;++r,c<<=1);if(r>0)for(f.iushrn(r);r-- >0;)l.isOdd()&&l.iadd(d),l.iushrn(1);i.cmp(f)>=0?(i.isub(f),s.isub(l)):(f.isub(i),l.isub(s))}var y;return i.cmpn(1)===0?y=s:y=l,y.cmpn(0)<0&&y.iadd(t),y},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var i=this.clone(),f=t.clone();i.negative=0,f.negative=0;for(var s=0;i.isEven()&&f.isEven();s++)i.iushrn(1),f.iushrn(1);do{for(;i.isEven();)i.iushrn(1);for(;f.isEven();)f.iushrn(1);var l=i.cmp(f);if(l<0){var d=i;i=f,f=d}else if(l===0||f.cmpn(1)===0)break;i.isub(f)}while(!0);return f.iushln(s)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n(typeof t=="number");var i=t%26,f=(t-i)/26,s=1<<i;if(this.length<=f)return this._expand(f+1),this.words[f]|=s,this;for(var l=s,d=f;l!==0&&d<this.length;d++){var m=this.words[d]|0;m+=l,l=m>>>26,m&=67108863,this.words[d]=m}return l!==0&&(this.words[d]=l,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(t){var i=t<0;if(this.negative!==0&&!i)return-1;if(this.negative===0&&i)return 1;this._strip();var f;if(this.length>1)f=1;else{i&&(t=-t),n(t<=67108863,"Number is too big");var s=this.words[0]|0;f=s===t?0:s<t?-1:1}return this.negative!==0?-f|0:f},o.prototype.cmp=function(t){if(this.negative!==0&&t.negative===0)return-1;if(this.negative===0&&t.negative!==0)return 1;var i=this.ucmp(t);return this.negative!==0?-i|0:i},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var i=0,f=this.length-1;f>=0;f--){var s=this.words[f]|0,l=t.words[f]|0;if(s!==l){s<l?i=-1:s>l&&(i=1);break}}return i},o.prototype.gtn=function(t){return this.cmpn(t)===1},o.prototype.gt=function(t){return this.cmp(t)===1},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return this.cmpn(t)===-1},o.prototype.lt=function(t){return this.cmp(t)===-1},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return this.cmpn(t)===0},o.prototype.eq=function(t){return this.cmp(t)===0},o.red=function(t){return new D(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var I0={k256:null,p224:null,p192:null,p25519:null};function U(p,t){this.name=p,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}U.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},U.prototype.ireduce=function(t){var i=t,f;do this.split(i,this.tmp),i=this.imulK(i),i=i.iadd(this.tmp),f=i.bitLength();while(f>this.n);var s=f<this.n?-1:i.ucmp(this.p);return s===0?(i.words[0]=0,i.length=1):s>0?i.isub(this.p):i.strip!==void 0?i.strip():i._strip(),i},U.prototype.split=function(t,i){t.iushrn(this.n,0,i)},U.prototype.imulK=function(t){return t.imul(this.k)};function _0(){U.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}h(_0,U),_0.prototype.split=function(t,i){for(var f=4194303,s=Math.min(t.length,9),l=0;l<s;l++)i.words[l]=t.words[l];if(i.length=s,t.length<=9){t.words[0]=0,t.length=1;return}var d=t.words[9];for(i.words[i.length++]=d&f,l=10;l<t.length;l++){var m=t.words[l]|0;t.words[l-10]=(m&f)<<4|d>>>22,d=m}d>>>=22,t.words[l-10]=d,d===0&&t.length>10?t.length-=10:t.length-=9},_0.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var i=0,f=0;f<t.length;f++){var s=t.words[f]|0;i+=s*977,t.words[f]=i&67108863,i=s*64+(i/67108864|0)}return t.words[t.length-1]===0&&(t.length--,t.words[t.length-1]===0&&t.length--),t};function N(){U.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}h(N,U);function I(){U.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}h(I,U);function M0(){U.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}h(M0,U),M0.prototype.imulK=function(t){for(var i=0,f=0;f<t.length;f++){var s=(t.words[f]|0)*19+i,l=s&67108863;s>>>=26,t.words[f]=l,i=s}return i!==0&&(t.words[t.length++]=i),t},o._prime=function(t){if(I0[t])return I0[t];var i;if(t==="k256")i=new _0;else if(t==="p224")i=new N;else if(t==="p192")i=new I;else if(t==="p25519")i=new M0;else throw new Error("Unknown prime "+t);return I0[t]=i,i};function D(p){if(typeof p=="string"){var t=o._prime(p);this.m=t.p,this.prime=t}else n(p.gtn(1),"modulus must be greater than 1"),this.m=p,this.prime=null}D.prototype._verify1=function(t){n(t.negative===0,"red works only with positives"),n(t.red,"red works only with red numbers")},D.prototype._verify2=function(t,i){n((t.negative|i.negative)===0,"red works only with positives"),n(t.red&&t.red===i.red,"red works only with red numbers")},D.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(E(t,t.umod(this.m)._forceRed(this)),t)},D.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},D.prototype.add=function(t,i){this._verify2(t,i);var f=t.add(i);return f.cmp(this.m)>=0&&f.isub(this.m),f._forceRed(this)},D.prototype.iadd=function(t,i){this._verify2(t,i);var f=t.iadd(i);return f.cmp(this.m)>=0&&f.isub(this.m),f},D.prototype.sub=function(t,i){this._verify2(t,i);var f=t.sub(i);return f.cmpn(0)<0&&f.iadd(this.m),f._forceRed(this)},D.prototype.isub=function(t,i){this._verify2(t,i);var f=t.isub(i);return f.cmpn(0)<0&&f.iadd(this.m),f},D.prototype.shl=function(t,i){return this._verify1(t),this.imod(t.ushln(i))},D.prototype.imul=function(t,i){return this._verify2(t,i),this.imod(t.imul(i))},D.prototype.mul=function(t,i){return this._verify2(t,i),this.imod(t.mul(i))},D.prototype.isqr=function(t){return this.imul(t,t.clone())},D.prototype.sqr=function(t){return this.mul(t,t)},D.prototype.sqrt=function(t){if(t.isZero())return t.clone();var i=this.m.andln(3);if(n(i%2===1),i===3){var f=this.m.add(new o(1)).iushrn(2);return this.pow(t,f)}for(var s=this.m.subn(1),l=0;!s.isZero()&&s.andln(1)===0;)l++,s.iushrn(1);n(!s.isZero());var d=new o(1).toRed(this),m=d.redNeg(),u=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new o(2*r*r).toRed(this);this.pow(r,u).cmp(m)!==0;)r.redIAdd(m);for(var c=this.pow(r,s),y=this.pow(t,s.addn(1).iushrn(1)),g=this.pow(t,s),b=l;g.cmp(d)!==0;){for(var M=g,O=0;M.cmp(d)!==0;O++)M=M.redSqr();n(O<b);var R=this.pow(c,new o(1).iushln(b-O-1));y=y.redMul(R),c=R.redSqr(),g=g.redMul(c),b=O}return y},D.prototype.invm=function(t){var i=t._invmp(this.m);return i.negative!==0?(i.negative=0,this.imod(i).redNeg()):this.imod(i)},D.prototype.pow=function(t,i){if(i.isZero())return new o(1).toRed(this);if(i.cmpn(1)===0)return t.clone();var f=4,s=new Array(1<<f);s[0]=new o(1).toRed(this),s[1]=t;for(var l=2;l<s.length;l++)s[l]=this.mul(s[l-1],t);var d=s[0],m=0,u=0,r=i.bitLength()%26;for(r===0&&(r=26),l=i.length-1;l>=0;l--){for(var c=i.words[l],y=r-1;y>=0;y--){var g=c>>y&1;if(d!==s[0]&&(d=this.sqr(d)),g===0&&m===0){u=0;continue}m<<=1,m|=g,u++,!(u!==f&&(l!==0||y!==0))&&(d=this.mul(d,s[m]),u=0,m=0)}r=26}return d},D.prototype.convertTo=function(t){var i=t.umod(this.m);return i===t?i.clone():i},D.prototype.convertFrom=function(t){var i=t.clone();return i.red=null,i},o.mont=function(t){return new F(t)};function F(p){D.call(this,p),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}h(F,D),F.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},F.prototype.convertFrom=function(t){var i=this.imod(t.mul(this.rinv));return i.red=null,i},F.prototype.imul=function(t,i){if(t.isZero()||i.isZero())return t.words[0]=0,t.length=1,t;var f=t.imul(i),s=f.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=f.isub(s).iushrn(this.shift),d=l;return l.cmp(this.m)>=0?d=l.isub(this.m):l.cmpn(0)<0&&(d=l.iadd(this.m)),d._forceRed(this)},F.prototype.mul=function(t,i){if(t.isZero()||i.isZero())return new o(0)._forceRed(this);var f=t.mul(i),s=f.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=f.isub(s).iushrn(this.shift),d=l;return l.cmp(this.m)>=0?d=l.isub(this.m):l.cmpn(0)<0&&(d=l.iadd(this.m)),d._forceRed(this)},F.prototype.invm=function(t){var i=this.imod(t._invmp(this.m).mul(this.r2));return i._forceRed(this)}})(typeof Tt>"u"||Tt,de)});function ce(){return{FORC:"0.63.1",FUEL_CORE:"0.33.0",FUELS:"0.94.1"}}function he(e){let[a,n,h]=e.split(".").map(o=>parseInt(o,10));return{major:a,minor:n,patch:h}}function Nt(e,a){let n=he(e),h=he(a),o=n.major-h.major,v=n.minor-h.minor,x=n.patch-h.patch;return{major:o,minor:v,patch:x,fullVersionDiff:o||v||x}}function He(e,a){let{major:n}=Nt(e,a);return n===0}function je(e,a){let{minor:n}=Nt(e,a);return n===0}function $e(e,a){let{patch:n}=Nt(e,a);return n===0}function Hr(e){let{FUEL_CORE:a}=ce();return/^\d+\.\d+\.\d+\D+/m.test(e)&&console.warn(`You're running against an unreleased fuel-core version: ${e}. Things may work as expected, but it's not guaranteed. Please use a released version.
|
|
3
|
-
This unreleased fuel-core build may include features and updates not yet supported by this version of the TS-SDK.`),{supportedVersion:a,isMajorSupported:He(e,a),isMinorSupported:je(e,a),isPatchSupported:$e(e,a)}}var pe=ce();var Ke=Object.defineProperty,Ye=(e,a,n)=>a in e?Ke(e,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[a]=n,Xe=(e,a,n)=>(Ye(e,typeof a!="symbol"?a+"":a,n),n),b0=(e=>(e.NO_ABIS_FOUND="no-abis-found",e.ABI_TYPES_AND_VALUES_MISMATCH="abi-types-and-values-mismatch",e.ABI_MAIN_METHOD_MISSING="abi-main-method-missing",e.INVALID_COMPONENT="invalid-component",e.CONFIGURABLE_NOT_FOUND="configurable-not-found",e.TYPE_NOT_FOUND="type-not-found",e.LOG_TYPE_NOT_FOUND="log-type-not-found",e.TYPE_NOT_SUPPORTED="type-not-supported",e.INVALID_DECODE_VALUE="invalid-decode-value",e.JSON_ABI_ERROR="json-abi-error",e.TYPE_ID_NOT_FOUND="type-id-not-found",e.BIN_FILE_NOT_FOUND="bin-file-not-found",e.CODER_NOT_FOUND="coder-not-found",e.INVALID_DATA="invalid-data",e.FUNCTION_NOT_FOUND="function-not-found",e.UNSUPPORTED_ENCODING_VERSION="unsupported-encoding-version",e.TIMEOUT_EXCEEDED="timeout-exceeded",e.CONFIG_FILE_NOT_FOUND="config-file-not-found",e.CONFIG_FILE_ALREADY_EXISTS="config-file-already-exists",e.WORKSPACE_NOT_DETECTED="workspace-not-detected",e.INVALID_BECH32_ADDRESS="invalid-bech32-address",e.INVALID_EVM_ADDRESS="invalid-evm-address",e.INVALID_B256_ADDRESS="invalid-b256-address",e.CHAIN_INFO_CACHE_EMPTY="chain-info-cache-empty",e.NODE_INFO_CACHE_EMPTY="node-info-cache-empty",e.MISSING_PROVIDER="missing-provider",e.INVALID_PROVIDER="invalid-provider",e.CONNECTION_REFUSED="connection-refused",e.INVALID_PUBLIC_KEY="invalid-public-key",e.WALLET_MANAGER_ERROR="wallet-manager-error",e.HD_WALLET_ERROR="hd-wallet-error",e.MISSING_CONNECTOR="missing-connector",e.PARSE_FAILED="parse-failed",e.ENCODE_ERROR="encode-error",e.DECODE_ERROR="decode-error",e.ENV_DEPENDENCY_MISSING="env-dependency-missing",e.INVALID_TTL="invalid-ttl",e.INVALID_INPUT_PARAMETERS="invalid-input-parameters",e.NOT_IMPLEMENTED="not-implemented",e.NOT_SUPPORTED="not-supported",e.CONVERTING_FAILED="converting-error",e.ELEMENT_NOT_FOUND="element-not-found",e.MISSING_REQUIRED_PARAMETER="missing-required-parameter",e.INVALID_REQUEST="invalid-request",e.INVALID_TRANSFER_AMOUNT="invalid-transfer-amount",e.NOT_ENOUGH_FUNDS="not-enough-funds",e.INVALID_CREDENTIALS="invalid-credentials",e.HASHER_LOCKED="hasher-locked",e.GAS_PRICE_TOO_LOW="gas-price-too-low",e.GAS_LIMIT_TOO_LOW="gas-limit-too-low",e.MAX_FEE_TOO_LOW="max-fee-too-low",e.TRANSACTION_NOT_FOUND="transaction-not-found",e.TRANSACTION_FAILED="transaction-failed",e.INVALID_CONFIGURABLE_CONSTANTS="invalid-configurable-constants",e.INVALID_TRANSACTION_INPUT="invalid-transaction-input",e.INVALID_TRANSACTION_OUTPUT="invalid-transaction-output",e.INVALID_TRANSACTION_STATUS="invalid-transaction-status",e.UNSUPPORTED_TRANSACTION_TYPE="unsupported-transaction-type",e.TRANSACTION_ERROR="transaction-error",e.INVALID_POLICY_TYPE="invalid-policy-type",e.DUPLICATED_POLICY="duplicated-policy",e.TRANSACTION_SQUEEZED_OUT="transaction-squeezed-out",e.CONTRACT_SIZE_EXCEEDS_LIMIT="contract-size-exceeds-limit",e.INVALID_CHUNK_SIZE_MULTIPLIER="invalid-chunk-size-multiplier",e.MAX_INPUTS_EXCEEDED="max-inputs-exceeded",e.FUNDS_TOO_LOW="funds-too-low",e.MAX_OUTPUTS_EXCEEDED="max-outputs-exceeded",e.INVALID_RECEIPT_TYPE="invalid-receipt-type",e.INVALID_WORD_LIST="invalid-word-list",e.INVALID_MNEMONIC="invalid-mnemonic",e.INVALID_ENTROPY="invalid-entropy",e.INVALID_SEED="invalid-seed",e.INVALID_CHECKSUM="invalid-checksum",e.INVALID_PASSWORD="invalid-password",e.ACCOUNT_REQUIRED="account-required",e.UNLOCKED_WALLET_REQUIRED="unlocked-wallet-required",e.ERROR_BUILDING_BLOCK_EXPLORER_URL="error-building-block-explorer-url",e.VITEPRESS_PLUGIN_ERROR="vitepress-plugin-error",e.SCRIPT_REVERTED="script-reverted",e.SCRIPT_RETURN_INVALID_TYPE="script-return-invalid-type",e.STREAM_PARSING_ERROR="stream-parsing-error",e.NODE_LAUNCH_FAILED="node-launch-failed",e.UNKNOWN="unknown",e))(b0||{}),J0=class extends Error{VERSIONS=pe;metadata;rawError;static parse(e){let a=e;if(a.code===void 0)throw new J0("parse-failed","Failed to parse the error object. The required 'code' property is missing.");let n=Object.values(b0);if(!n.includes(a.code))throw new J0("parse-failed",`Unknown error code: ${a.code}. Accepted codes: ${n.join(", ")}.`);return new J0(a.code,a.message)}code;constructor(e,a,n={},h={}){super(a),this.code=e,this.name="FuelError",this.metadata=n,this.rawError=h}toObject(){let{code:e,name:a,message:n,metadata:h,VERSIONS:o,rawError:v}=this;return{code:e,name:a,message:n,metadata:h,VERSIONS:o,rawError:v}}},O0=J0;Xe(O0,"CODES",b0);var G0=Ge(me(),1),ve=9,xe=3,Et=9;function Je(e,a){let{precision:n=ve,minPrecision:h=xe}=a||{},[o="0",v="0"]=String(e||"0.0").split("."),x=/(\d)(?=(\d{3})+\b)/g,_=o.replace(x,"$1,"),A=v.slice(0,n);if(h<n){let B=A.match(/.*[1-9]{1}/)?.[0].length||0,A0=Math.max(h,B);A=A.slice(0,A0)}let E=A?`.${A}`:"";return`${_}${E}`}var g0=class extends G0.default{MAX_U64="0xFFFFFFFFFFFFFFFF";constructor(e,a,n){let h=e,o=a;g0.isBN(e)?h=e.toArray():typeof e=="string"&&e.slice(0,2)==="0x"&&(h=e.substring(2),o=a||"hex"),super(h??0,o,n)}toString(e,a){let n=super.toString(e,a);return e===16||e==="hex"?`0x${n}`:n}toHex(e){let n=(e||0)*2;if(this.isNeg())throw new O0(b0.CONVERTING_FAILED,"Cannot convert negative value to hex.");if(e&&this.byteLength()>e)throw new O0(b0.CONVERTING_FAILED,`Provided value ${this} is too large. It should fit within ${e} bytes.`);return this.toString(16,n)}toBytes(e){if(this.isNeg())throw new O0(b0.CONVERTING_FAILED,"Cannot convert negative value to bytes.");return Uint8Array.from(this.toArray(void 0,e))}toJSON(){return this.toString(16)}valueOf(){return this.toString()}format(e){let{units:a=Et,precision:n=ve,minPrecision:h=xe}=e||{},o=this.formatUnits(a),v=Je(o,{precision:n,minPrecision:h});if(!parseFloat(v)){let[,x="0"]=o.split("."),_=x.match(/[1-9]/);if(_&&_.index&&_.index+1>n){let[A="0"]=v.split(".");return`${A}.${x.slice(0,_.index+1)}`}}return v}formatUnits(e=Et){let a=this.toString().slice(0,e*-1),n=this.toString().slice(e*-1),h=n.length,o=Array.from({length:e-h}).fill("0").join("");return`${a?`${a}.`:"0."}${o}${n}`}add(e){return this.caller(e,"add")}pow(e){return this.caller(e,"pow")}sub(e){return this.caller(e,"sub")}div(e){return this.caller(e,"div")}mul(e){return this.caller(e,"mul")}mod(e){return this.caller(e,"mod")}divRound(e){return this.caller(e,"divRound")}lt(e){return this.caller(e,"lt")}lte(e){return this.caller(e,"lte")}gt(e){return this.caller(e,"gt")}gte(e){return this.caller(e,"gte")}eq(e){return this.caller(e,"eq")}cmp(e){return this.caller(e,"cmp")}sqr(){return new g0(super.sqr().toArray())}neg(){return new g0(super.neg().toArray())}abs(){return new g0(super.abs().toArray())}toTwos(e){return new g0(super.toTwos(e).toArray())}fromTwos(e){return new g0(super.fromTwos(e).toArray())}caller(e,a){let n=super[a](new g0(e));return g0.isBN(n)?new g0(n.toArray()):n}clone(){return new g0(this.toArray())}mulTo(e,a){let n=new G0.default(this.toArray()).mulTo(e,a);return new g0(n.toArray())}egcd(e){let{a,b:n,gcd:h}=new G0.default(this.toArray()).egcd(e);return{a:new g0(a.toArray()),b:new g0(n.toArray()),gcd:new g0(h.toArray())}}divmod(e,a,n){let{div:h,mod:o}=new G0.default(this.toArray()).divmod(new g0(e),a,n);return{div:new g0(h?.toArray()),mod:new g0(o?.toArray())}}maxU64(){return this.gte(this.MAX_U64)?new g0(this.MAX_U64):this}normalizeZeroToOne(){return this.isZero()?new g0(1):this}},L0=(e,a,n)=>new g0(e,a,n);L0.parseUnits=(e,a=Et)=>{let n=e==="."?"0.":e,[h="0",o="0"]=n.split("."),v=o.length;if(v>a)throw new O0(b0.CONVERTING_FAILED,`Decimal can't have more than ${a} digits.`);let x=Array.from({length:a}).fill("0");x.splice(0,v,o);let _=`${h.replaceAll(",","")}${x.join("")}`;return L0(_)};function Jr(e){return L0(e).toNumber()}function Qr(e,a){return L0(e).toHex(a)}function ti(e,a){return L0(e).toBytes(a)}import{createRequire as Qe}from"module";var tr=Qe("/"),er;try{er=tr("worker_threads").Worker}catch{}var U0=Uint8Array,T0=Uint16Array,kt=Int32Array,Ft=new U0([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Bt=new U0([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ge=new U0([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),we=function(e,a){for(var n=new T0(31),h=0;h<31;++h)n[h]=a+=1<<e[h-1];for(var o=new kt(n[30]),h=1;h<30;++h)for(var v=n[h];v<n[h+1];++v)o[v]=v-n[h]<<5|h;return{b:n,r:o}},Me=we(Ft,2),rr=Me.b,Rt=Me.r;rr[28]=258,Rt[258]=28;var Ae=we(Bt,0),ni=Ae.b,_e=Ae.r,Lt=new T0(32768);for(S=0;S<32768;++S)F0=(S&43690)>>1|(S&21845)<<1,F0=(F0&52428)>>2|(F0&13107)<<2,F0=(F0&61680)>>4|(F0&3855)<<4,Lt[S]=((F0&65280)>>8|(F0&255)<<8)>>1;var F0,S,$0=function(e,a,n){for(var h=e.length,o=0,v=new T0(a);o<h;++o)e[o]&&++v[e[o]-1];var x=new T0(a);for(o=1;o<a;++o)x[o]=x[o-1]+v[o-1]<<1;var _;if(n){_=new T0(1<<a);var A=15-a;for(o=0;o<h;++o)if(e[o])for(var E=o<<4|e[o],w=a-e[o],B=x[e[o]-1]++<<w,A0=B|(1<<w)-1;B<=A0;++B)_[Lt[B]>>A]=E}else for(_=new T0(h),o=0;o<h;++o)e[o]&&(_[o]=Lt[x[e[o]-1]++]>>15-e[o]);return _},C0=new U0(288);for(S=0;S<144;++S)C0[S]=8;var S;for(S=144;S<256;++S)C0[S]=9;var S;for(S=256;S<280;++S)C0[S]=7;var S;for(S=280;S<288;++S)C0[S]=8;var S,Q0=new U0(32);for(S=0;S<32;++S)Q0[S]=5;var S,ir=$0(C0,9,0);var nr=$0(Q0,5,0);var Ie=function(e){return(e+7)/8|0},ar=function(e,a,n){return(a==null||a<0)&&(a=0),(n==null||n>e.length)&&(n=e.length),new U0(e.subarray(a,n))};var B0=function(e,a,n){n<<=a&7;var h=a/8|0;e[h]|=n,e[h+1]|=n>>8},H0=function(e,a,n){n<<=a&7;var h=a/8|0;e[h]|=n,e[h+1]|=n>>8,e[h+2]|=n>>16},Dt=function(e,a){for(var n=[],h=0;h<e.length;++h)e[h]&&n.push({s:h,f:e[h]});var o=n.length,v=n.slice();if(!o)return{t:Se,l:0};if(o==1){var x=new U0(n[0].s+1);return x[n[0].s]=1,{t:x,l:1}}n.sort(function(I0,U){return I0.f-U.f}),n.push({s:-1,f:25001});var _=n[0],A=n[1],E=0,w=1,B=2;for(n[0]={s:-1,f:_.f+A.f,l:_,r:A};w!=o-1;)_=n[n[E].f<n[B].f?E++:B++],A=n[E!=w&&n[E].f<n[B].f?E++:B++],n[w++]={s:-1,f:_.f+A.f,l:_,r:A};for(var A0=v[0].s,h=1;h<o;++h)v[h].s>A0&&(A0=v[h].s);var w0=new T0(A0+1),N0=Ut(n[w-1],w0,0);if(N0>a){var h=0,y0=0,D0=N0-a,z0=1<<D0;for(v.sort(function(U,_0){return w0[_0.s]-w0[U.s]||U.f-_0.f});h<o;++h){var E0=v[h].s;if(w0[E0]>a)y0+=z0-(1<<N0-w0[E0]),w0[E0]=a;else break}for(y0>>=D0;y0>0;){var k0=v[h].s;w0[k0]<a?y0-=1<<a-w0[k0]++-1:++h}for(;h>=0&&y0;--h){var k=v[h].s;w0[k]==a&&(--w0[k],++y0)}N0=a}return{t:new U0(w0),l:N0}},Ut=function(e,a,n){return e.s==-1?Math.max(Ut(e.l,a,n+1),Ut(e.r,a,n+1)):a[e.s]=n},ye=function(e){for(var a=e.length;a&&!e[--a];);for(var n=new T0(++a),h=0,o=e[0],v=1,x=function(A){n[h++]=A},_=1;_<=a;++_)if(e[_]==o&&_!=a)++v;else{if(!o&&v>2){for(;v>138;v-=138)x(32754);v>2&&(x(v>10?v-11<<5|28690:v-3<<5|12305),v=0)}else if(v>3){for(x(o),--v;v>6;v-=6)x(8304);v>2&&(x(v-3<<5|8208),v=0)}for(;v--;)x(o);v=1,o=e[_]}return{c:n.subarray(0,h),n:a}},j0=function(e,a){for(var n=0,h=0;h<a.length;++h)n+=e[h]*a[h];return n},Oe=function(e,a,n){var h=n.length,o=Ie(a+2);e[o]=h&255,e[o+1]=h>>8,e[o+2]=e[o]^255,e[o+3]=e[o+1]^255;for(var v=0;v<h;++v)e[o+v+4]=n[v];return(o+4+h)*8},be=function(e,a,n,h,o,v,x,_,A,E,w){B0(a,w++,n),++o[256];for(var B=Dt(o,15),A0=B.t,w0=B.l,N0=Dt(v,15),y0=N0.t,D0=N0.l,z0=ye(A0),E0=z0.c,k0=z0.n,k=ye(y0),I0=k.c,U=k.n,_0=new T0(19),N=0;N<E0.length;++N)++_0[E0[N]&31];for(var N=0;N<I0.length;++N)++_0[I0[N]&31];for(var I=Dt(_0,7),M0=I.t,D=I.l,F=19;F>4&&!M0[ge[F-1]];--F);var p=E+5<<3,t=j0(o,C0)+j0(v,Q0)+x,i=j0(o,A0)+j0(v,y0)+x+14+3*F+j0(_0,M0)+2*_0[16]+3*_0[17]+7*_0[18];if(A>=0&&p<=t&&p<=i)return Oe(a,w,e.subarray(A,A+E));var f,s,l,d;if(B0(a,w,1+(i<t)),w+=2,i<t){f=$0(A0,w0,0),s=A0,l=$0(y0,D0,0),d=y0;var m=$0(M0,D,0);B0(a,w,k0-257),B0(a,w+5,U-1),B0(a,w+10,F-4),w+=14;for(var N=0;N<F;++N)B0(a,w+3*N,M0[ge[N]]);w+=3*F;for(var u=[E0,I0],r=0;r<2;++r)for(var c=u[r],N=0;N<c.length;++N){var y=c[N]&31;B0(a,w,m[y]),w+=M0[y],y>15&&(B0(a,w,c[N]>>5&127),w+=c[N]>>12)}}else f=ir,s=C0,l=nr,d=Q0;for(var N=0;N<_;++N){var g=h[N];if(g>255){var y=g>>18&31;H0(a,w,f[y+257]),w+=s[y+257],y>7&&(B0(a,w,g>>23&31),w+=Ft[y]);var b=g&31;H0(a,w,l[b]),w+=d[b],b>3&&(H0(a,w,g>>5&8191),w+=Bt[b])}else H0(a,w,f[g]),w+=s[g]}return H0(a,w,f[256]),w+s[256]},or=new kt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Se=new U0(0),fr=function(e,a,n,h,o,v){var x=v.z||e.length,_=new U0(h+x+5*(1+Math.ceil(x/7e3))+o),A=_.subarray(h,_.length-o),E=v.l,w=(v.r||0)&7;if(a){w&&(A[0]=v.r>>3);for(var B=or[a-1],A0=B>>13,w0=B&8191,N0=(1<<n)-1,y0=v.p||new T0(32768),D0=v.h||new T0(N0+1),z0=Math.ceil(n/3),E0=2*z0,k0=function(z){return(e[z]^e[z+1]<<z0^e[z+2]<<E0)&N0},k=new kt(25e3),I0=new T0(288),U=new T0(32),_0=0,N=0,I=v.i||0,M0=0,D=v.w||0,F=0;I+2<x;++I){var p=k0(I),t=I&32767,i=D0[p];if(y0[t]=i,D0[p]=t,D<=I){var f=x-I;if((_0>7e3||M0>24576)&&(f>423||!E)){w=be(e,A,0,k,I0,U,N,M0,F,I-F,w),M0=_0=N=0,F=I;for(var s=0;s<286;++s)I0[s]=0;for(var s=0;s<30;++s)U[s]=0}var l=2,d=0,m=w0,u=t-i&32767;if(f>2&&p==k0(I-u))for(var r=Math.min(A0,f)-1,c=Math.min(32767,I),y=Math.min(258,f);u<=c&&--m&&t!=i;){if(e[I+l]==e[I+l-u]){for(var g=0;g<y&&e[I+g]==e[I+g-u];++g);if(g>l){if(l=g,d=u,g>r)break;for(var b=Math.min(u,g-2),M=0,s=0;s<b;++s){var O=I-u+s&32767,R=y0[O],R0=O-R&32767;R0>M&&(M=R0,i=O)}}}t=i,i=y0[t],u+=t-i&32767}if(d){k[M0++]=268435456|Rt[l]<<18|_e[d];var T=Rt[l]&31,L=_e[d]&31;N+=Ft[T]+Bt[L],++I0[257+T],++U[L],D=I+l,++_0}else k[M0++]=e[I],++I0[e[I]]}}for(I=Math.max(I,D);I<x;++I)k[M0++]=e[I],++I0[e[I]];w=be(e,A,E,k,I0,U,N,M0,F,I-F,w),E||(v.r=w&7|A[w/8|0]<<3,w-=7,v.h=D0,v.p=y0,v.i=I,v.w=D)}else{for(var I=v.w||0;I<x+E;I+=65535){var Z0=I+65535;Z0>=x&&(A[w/8|0]=E,Z0=x),w=Oe(A,w+1,e.subarray(I,Z0))}v.i=x}return ar(_,0,h+Ie(w)+o)},sr=function(){for(var e=new Int32Array(256),a=0;a<256;++a){for(var n=a,h=9;--h;)n=(n&1&&-306674912)^n>>>1;e[a]=n}return e}(),ur=function(){var e=-1;return{p:function(a){for(var n=e,h=0;h<a.length;++h)n=sr[n&255^a[h]]^n>>>8;e=n},d:function(){return~e}}};var lr=function(e,a,n,h,o){if(!o&&(o={l:1},a.dictionary)){var v=a.dictionary.subarray(-32768),x=new U0(v.length+e.length);x.set(v),x.set(e,v.length),e=x,o.w=v.length}return fr(e,a.level==null?6:a.level,a.mem==null?o.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+a.mem,n,h,o)};var zt=function(e,a,n){for(;n;++a)e[a]=n,n>>>=8},hr=function(e,a){var n=a.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=a.level<2?4:a.level==9?2:0,e[9]=3,a.mtime!=0&&zt(e,4,Math.floor(new Date(a.mtime||Date.now())/1e3)),n){e[3]=8;for(var h=0;h<=n.length;++h)e[h+10]=n.charCodeAt(h)}};var cr=function(e){return 10+(e.filename?e.filename.length+1:0)};function Ne(e,a){a||(a={});var n=ur(),h=e.length;n.p(e);var o=lr(e,a,cr(a),8),v=o.length;return hr(o,a),zt(o,v-8,n.d()),zt(o,v-4,h),o}var pr=typeof TextDecoder<"u"&&new TextDecoder,dr=0;try{pr.decode(Se,{stream:!0}),dr=1}catch{}var mr=Object.defineProperty,vr=(e,a,n)=>a in e?mr(e,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[a]=n,xr=(e,a,n)=>(vr(e,typeof a!="symbol"?a+"":a,n),n);var fi=(e,a)=>{let n=[];for(let _=0;_<e.length;_+=a){let A=new Uint8Array(a);A.set(e.slice(_,_+a)),n.push(A)}let h=n[n.length-1],o=e.length%a,v=o+(8-o%8)%8,x=h.slice(0,v);return n[n.length-1]=x,n},W0=(e,a,n=!0)=>{if(e instanceof Uint8Array)return n?new Uint8Array(e):e;if(typeof e=="string"&&e.match(/^0x([0-9a-f][0-9a-f])*$/i)){let v=new Uint8Array((e.length-2)/2),x=2;for(let _=0;_<v.length;_++)v[_]=parseInt(e.substring(x,x+2),16),x+=2;return v}let o=`invalid data:${a?` ${a} -`:""} ${e}
|
|
4
|
-
If you are attempting to transform a hex value, please make sure it is being passed as a string and wrapped in quotes.`;throw new O0(b0.INVALID_DATA,o)},gr=e=>{let a=e.map(o=>o instanceof Uint8Array?o:Uint8Array.from(o)),n=a.reduce((o,v)=>o+v.length,0),h=new Uint8Array(n);return a.reduce((o,v)=>(h.set(v,o),o+v.length),0),h},ui=e=>{let a=e.map(n=>W0(n));return gr(a)},Te="0123456789abcdef";function _r(e){let a=W0(e),n="0x";for(let h=0;h<a.length;h++){let o=a[h];n+=Te[(o&240)>>4]+Te[o&15]}return n}var hi=e=>{let n=[h=>h.replace(/\s+/g,"-"),h=>h.replace(/\./g,"-"),h=>h.replace(/_/g,"-"),h=>h.replace(/-[a-z]/g,o=>o.slice(-1).toUpperCase()),h=>h.replace(/-/g,""),h=>h.replace(/^\d+/,""),h=>h[0].toUpperCase()+h.slice(1)].reduce((h,o)=>o(h),e);if(n===""){let h=`The provided string '${e}' results in an empty output after`.concat(" normalization, therefore, it can't normalize string.");throw new O0(b0.PARSE_FAILED,h)}return n},yr=37,Ee=BigInt(2**62)+BigInt(yr),br=e=>Math.floor(e/1e3),De=e=>e*1e3,wr=e=>Number(BigInt(e)-Ee),Mr=e=>String(BigInt(e)+Ee),Ar=e=>De(wr(e)),et=class extends Date{static fromTai64(e){return new et(Ar(e))}static fromUnixMilliseconds(e){return new et(e)}static fromUnixSeconds(e){return new et(De(e))}constructor(e){super(e)}toTai64(){return Mr(this.toUnixSeconds())}toUnixMilliseconds(){return this.getTime()}toUnixSeconds(){return br(this.getTime())}},Ir=et;xr(Ir,"TAI64_NULL","");function ci(e){return new Promise(a=>{setTimeout(()=>{a(!0)},e)})}function pi(e){return e!==void 0}var Re=L0(0),qt=L0(58),rt="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",tt=null;function Or(e){if(tt==null){tt={};for(let n=0;n<rt.length;n++)tt[rt[n]]=L0(n)}let a=tt[e];if(a==null)throw new O0(b0.INVALID_DATA,`invalid base58 value ${e}`);return L0(a)}function vi(e){let a=W0(e),n=L0(a),h="";for(;n.gt(Re);)h=rt[Number(n.mod(qt))]+h,n=n.div(qt);for(let o=0;o<a.length&&!a[o];o++)h=rt[0]+h;return h}function xi(e){let a=Re;for(let n=0;n<e.length;n++)a=a.mul(qt),a=a.add(Or(e[n].toString()));return a}function _i(e,a,n){let h=W0(e);if(n!=null&&n>h.length)throw new O0(b0.INVALID_DATA,"cannot slice beyond data bounds");return _r(h.slice(a??0,n??h.length))}function bi(e,a=!0){let n=e;a&&(n=e.normalize("NFC"));let h=[];for(let o=0;o<n.length;o+=1){let v=n.charCodeAt(o);if(v<128)h.push(v);else if(v<2048)h.push(v>>6|192),h.push(v&63|128);else if((v&64512)===55296){o+=1;let x=n.charCodeAt(o);if(o>=n.length||(x&64512)!==56320)throw new O0(b0.INVALID_INPUT_PARAMETERS,"Invalid UTF-8 in the input string.");let _=65536+((v&1023)<<10)+(x&1023);h.push(_>>18|240),h.push(_>>12&63|128),h.push(_>>6&63|128),h.push(_&63|128)}else h.push(v>>12|224),h.push(v>>6&63|128),h.push(v&63|128)}return new Uint8Array(h)}function V0(e,a,n,h,o){return console.log(`invalid codepoint at offset ${a}; ${e}, bytes: ${n}`),a}function Sr(e){return e.map(a=>a<=65535?String.fromCharCode(a):(a-=65536,String.fromCharCode((a>>10&1023)+55296,(a&1023)+56320))).join("")}function Nr(e){let a=W0(e,"bytes"),n=[],h=0;for(;h<a.length;){let o=a[h++];if(!(o>>7)){n.push(o);continue}let v=null,x=null;if((o&224)===192)v=1,x=127;else if((o&240)===224)v=2,x=2047;else if((o&248)===240)v=3,x=65535;else{(o&192)===128?h+=V0("UNEXPECTED_CONTINUE",h-1,a,n):h+=V0("BAD_PREFIX",h-1,a,n);continue}if(h-1+v>=a.length){h+=V0("OVERRUN",h-1,a,n);continue}let _=o&(1<<8-v-1)-1;for(let A=0;A<v;A++){let E=a[h];if((E&192)!==128){h+=V0("MISSING_CONTINUE",h,a,n),_=null;break}_=_<<6|E&63,h++}if(_!==null){if(_>1114111){h+=V0("OUT_OF_RANGE",h-1-v,a,n,_);continue}if(_>=55296&&_<=57343){h+=V0("UTF16_SURROGATE",h-1-v,a,n,_);continue}if(_<=x){h+=V0("OVERLONG",h-1-v,a,n,_);continue}n.push(_)}}return n}function wi(e){return Sr(Nr(e))}var Ai=e=>{if(!e)return"";let a=W0(e),n=Ne(a),h=String.fromCharCode.apply(null,new Uint8Array(n));return btoa(h)};function Ii(e){throw new Error("Didn't expect to get here")}function Pt(e){return new RegExp(e.source,e.flags?e.flags:(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":"")+(e.dotAll?"s":""))}function q0(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function S0(e){return function a(n){return arguments.length===0||q0(n)?a:e.apply(this,arguments)}}var Tr=S0(function(a){return a===null?"Null":a===void 0?"Undefined":Object.prototype.toString.call(a).slice(8,-1)}),K0=Tr;function it(e,a,n){if(n||(n=new Dr),Er(e))return e;var h=function(v){var x=n.get(e);if(x)return x;n.set(e,v);for(var _ in e)Object.prototype.hasOwnProperty.call(e,_)&&(v[_]=a?it(e[_],!0,n):e[_]);return v};switch(K0(e)){case"Object":return h(Object.create(Object.getPrototypeOf(e)));case"Array":return h(Array(e.length));case"Date":return new Date(e.valueOf());case"RegExp":return Pt(e);case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}function Er(e){var a=typeof e;return e==null||a!="object"&&a!="function"}var Dr=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(a,n){var h=this.hash(a),o=this.map[h];o||(this.map[h]=o=[]),o.push([a,n]),this.length+=1},e.prototype.hash=function(a){var n=[];for(var h in a)n.push(Object.prototype.toString.call(a[h]));return n.join()},e.prototype.get=function(a){if(this.length<=180){for(var n in this.map)for(var x=this.map[n],h=0;h<x.length;h+=1){var o=x[h];if(o[0]===a)return o[1]}return}var v=this.hash(a),x=this.map[v];if(x)for(var h=0;h<x.length;h+=1){var o=x[h];if(o[0]===a)return o[1]}},e}();var Rr=S0(function(a){return a!=null&&typeof a.clone=="function"?a.clone():it(a,!0)}),Lr=Rr;function Ct(e){return e}var Ur=S0(Ct),Le=Ur;function Y0(e){return function a(n,h){switch(arguments.length){case 0:return a;case 1:return q0(n)?a:S0(function(o){return e(n,o)});default:return q0(n)&&q0(h)?a:q0(n)?S0(function(o){return e(o,h)}):q0(h)?S0(function(o){return e(n,o)}):e(n,h)}}}function nt(e){for(var a=[],n;!(n=e.next()).done;)a.push(n.value);return a}function at(e,a,n){for(var h=0,o=n.length;h<o;){if(e(a,n[h]))return!0;h+=1}return!1}function Vt(e){var a=String(e).match(/^function (\w*)/);return a==null?"":a[1]}function P0(e,a){return Object.prototype.hasOwnProperty.call(a,e)}function zr(e,a){return e===a?e!==0||1/e===1/a:e!==e&&a!==a}var ot=typeof Object.is=="function"?Object.is:zr;var Ue=Object.prototype.toString,kr=function(){return Ue.call(arguments)==="[object Arguments]"?function(a){return Ue.call(a)==="[object Arguments]"}:function(a){return P0("callee",a)}}(),ze=kr;var Fr=!{toString:null}.propertyIsEnumerable("toString"),ke=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Fe=function(){"use strict";return arguments.propertyIsEnumerable("length")}(),Br=function(a,n){for(var h=0;h<a.length;){if(a[h]===n)return!0;h+=1}return!1},qr=typeof Object.keys=="function"&&!Fe?S0(function(a){return Object(a)!==a?[]:Object.keys(a)}):S0(function(a){if(Object(a)!==a)return[];var n,h,o=[],v=Fe&&ze(a);for(n in a)P0(n,a)&&(!v||n!=="length")&&(o[o.length]=n);if(Fr)for(h=ke.length-1;h>=0;)n=ke[h],P0(n,a)&&!Br(o,n)&&(o[o.length]=n),h-=1;return o}),Zt=qr;function Be(e,a,n,h){var o=nt(e),v=nt(a);function x(_,A){return X0(_,A,n.slice(),h.slice())}return!at(function(_,A){return!at(x,A,_)},v,o)}function X0(e,a,n,h){if(ot(e,a))return!0;var o=K0(e);if(o!==K0(a))return!1;if(typeof e["fantasy-land/equals"]=="function"||typeof a["fantasy-land/equals"]=="function")return typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](a)&&typeof a["fantasy-land/equals"]=="function"&&a["fantasy-land/equals"](e);if(typeof e.equals=="function"||typeof a.equals=="function")return typeof e.equals=="function"&&e.equals(a)&&typeof a.equals=="function"&&a.equals(e);switch(o){case"Arguments":case"Array":case"Object":if(typeof e.constructor=="function"&&Vt(e.constructor)==="Promise")return e===a;break;case"Boolean":case"Number":case"String":if(!(typeof e==typeof a&&ot(e.valueOf(),a.valueOf())))return!1;break;case"Date":if(!ot(e.valueOf(),a.valueOf()))return!1;break;case"Error":return e.name===a.name&&e.message===a.message;case"RegExp":if(!(e.source===a.source&&e.global===a.global&&e.ignoreCase===a.ignoreCase&&e.multiline===a.multiline&&e.sticky===a.sticky&&e.unicode===a.unicode))return!1;break}for(var v=n.length-1;v>=0;){if(n[v]===e)return h[v]===a;v-=1}switch(o){case"Map":return e.size!==a.size?!1:Be(e.entries(),a.entries(),n.concat([e]),h.concat([a]));case"Set":return e.size!==a.size?!1:Be(e.values(),a.values(),n.concat([e]),h.concat([a]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var x=Zt(e);if(x.length!==Zt(a).length)return!1;var _=n.concat([e]),A=h.concat([a]);for(v=x.length-1;v>=0;){var E=x[v];if(!(P0(E,a)&&X0(a[E],e[E],_,A)))return!1;v-=1}return!0}var Pr=Y0(function(a,n){return X0(a,n,[],[])}),qe=Pr;function Wt(e,a,n){var h,o;if(typeof e.indexOf=="function")switch(typeof a){case"number":if(a===0){for(h=1/a;n<e.length;){if(o=e[n],o===0&&1/o===h)return n;n+=1}return-1}else if(a!==a){for(;n<e.length;){if(o=e[n],typeof o=="number"&&o!==o)return n;n+=1}return-1}return e.indexOf(a,n);case"string":case"boolean":case"function":case"undefined":return e.indexOf(a,n);case"object":if(a===null)return e.indexOf(a,n)}for(;n<e.length;){if(qe(e[n],a))return n;n+=1}return-1}function ft(e,a){return Wt(a,e,0)>=0}var Cr=function(){function e(){this._nativeSet=typeof Set=="function"?new Set:null,this._items={}}return e.prototype.add=function(a){return!Pe(a,!0,this)},e.prototype.has=function(a){return Pe(a,!1,this)},e}();function Pe(e,a,n){var h=typeof e,o,v;switch(h){case"string":case"number":return e===0&&1/e===-1/0?n._items["-0"]?!0:(a&&(n._items["-0"]=!0),!1):n._nativeSet!==null?a?(o=n._nativeSet.size,n._nativeSet.add(e),v=n._nativeSet.size,v===o):n._nativeSet.has(e):h in n._items?e in n._items[h]?!0:(a&&(n._items[h][e]=!0),!1):(a&&(n._items[h]={},n._items[h][e]=!0),!1);case"boolean":if(h in n._items){var x=e?1:0;return n._items[h][x]?!0:(a&&(n._items[h][x]=!0),!1)}else return a&&(n._items[h]=e?[!1,!0]:[!0,!1]),!1;case"function":return n._nativeSet!==null?a?(o=n._nativeSet.size,n._nativeSet.add(e),v=n._nativeSet.size,v===o):n._nativeSet.has(e):h in n._items?ft(e,n._items[h])?!0:(a&&n._items[h].push(e),!1):(a&&(n._items[h]=[e]),!1);case"undefined":return n._items[h]?!0:(a&&(n._items[h]=!0),!1);case"object":if(e===null)return n._items.null?!0:(a&&(n._items.null=!0),!1);default:return h=Object.prototype.toString.call(e),h in n._items?ft(e,n._items[h])?!0:(a&&n._items[h].push(e),!1):(a&&(n._items[h]=[e]),!1)}}var st=Cr;var Ce=Array.isArray||function(a){return a!=null&&a.length>=0&&Object.prototype.toString.call(a)==="[object Array]"};function Gt(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function Ht(e,a,n){return function(){if(arguments.length===0)return n();var h=arguments[arguments.length-1];if(!Ce(h)){for(var o=0;o<e.length;){if(typeof h[e[o]]=="function")return h[e[o]].apply(h,Array.prototype.slice.call(arguments,0,-1));o+=1}if(Gt(h)){var v=a.apply(null,Array.prototype.slice.call(arguments,0,-1));return v(h)}}return n.apply(this,arguments)}}var jt={init:function(){return this.xf["@@transducer/init"]()},result:function(e){return this.xf["@@transducer/result"](e)}};var Vr=function(){function e(a,n){this.xf=n,this.f=a,this.set=new st}return e.prototype["@@transducer/init"]=jt.init,e.prototype["@@transducer/result"]=jt.result,e.prototype["@@transducer/step"]=function(a,n){return this.set.add(this.f(n))?this.xf["@@transducer/step"](a,n):a},e}();function $t(e){return function(a){return new Vr(e,a)}}var Zr=Y0(Ht([],$t,function(e,a){for(var n=new st,h=[],o=0,v,x;o<a.length;)x=a[o],v=e(x),n.add(v)&&h.push(x),o+=1;return h})),Ve=Zr;var Wr=Ve(Le),Gr=Wr;export{Hr as a,pe as b,b0 as c,O0 as d,me as e,g0 as f,L0 as g,Jr as h,Qr as i,ti as j,fi as k,W0 as l,gr as m,ui as n,_r as o,hi as p,Ir as q,ci as r,pi as s,vi as t,xi as u,_i as v,bi as w,wi as x,Ai as y,Ii as z,Lr as A,Gr as B};
|
|
5
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as Ze,c as We,e as Ge}from"./chunk-LLHU72AA.js";var me=We((de,Tt)=>{(function(e,a){"use strict";function n(p,t){if(!p)throw new Error(t||"Assertion failed")}function h(p,t){p.super_=t;var i=function(){};i.prototype=t.prototype,p.prototype=new i,p.prototype.constructor=p}function o(p,t,i){if(o.isBN(p))return p;this.negative=0,this.words=null,this.length=0,this.red=null,p!==null&&((t==="le"||t==="be")&&(i=t,t=10),this._init(p||0,t||10,i||"be"))}typeof e=="object"?e.exports=o:a.BN=o,o.BN=o,o.wordSize=26;var v;try{typeof window<"u"&&typeof window.Buffer<"u"?v=window.Buffer:v=Ze("buffer").Buffer}catch{}o.isBN=function(t){return t instanceof o?!0:t!==null&&typeof t=="object"&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,i){return t.cmp(i)>0?t:i},o.min=function(t,i){return t.cmp(i)<0?t:i},o.prototype._init=function(t,i,f){if(typeof t=="number")return this._initNumber(t,i,f);if(typeof t=="object")return this._initArray(t,i,f);i==="hex"&&(i=16),n(i===(i|0)&&i>=2&&i<=36),t=t.toString().replace(/\s+/g,"");var s=0;t[0]==="-"&&(s++,this.negative=1),s<t.length&&(i===16?this._parseHex(t,s,f):(this._parseBase(t,i,s),f==="le"&&this._initArray(this.toArray(),i,f)))},o.prototype._initNumber=function(t,i,f){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[t&67108863],this.length=1):t<4503599627370496?(this.words=[t&67108863,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[t&67108863,t/67108864&67108863,1],this.length=3),f==="le"&&this._initArray(this.toArray(),i,f)},o.prototype._initArray=function(t,i,f){if(n(typeof t.length=="number"),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var s=0;s<this.length;s++)this.words[s]=0;var l,d,m=0;if(f==="be")for(s=t.length-1,l=0;s>=0;s-=3)d=t[s]|t[s-1]<<8|t[s-2]<<16,this.words[l]|=d<<m&67108863,this.words[l+1]=d>>>26-m&67108863,m+=24,m>=26&&(m-=26,l++);else if(f==="le")for(s=0,l=0;s<t.length;s+=3)d=t[s]|t[s+1]<<8|t[s+2]<<16,this.words[l]|=d<<m&67108863,this.words[l+1]=d>>>26-m&67108863,m+=24,m>=26&&(m-=26,l++);return this._strip()};function x(p,t){var i=p.charCodeAt(t);if(i>=48&&i<=57)return i-48;if(i>=65&&i<=70)return i-55;if(i>=97&&i<=102)return i-87;n(!1,"Invalid character in "+p)}function _(p,t,i){var f=x(p,i);return i-1>=t&&(f|=x(p,i-1)<<4),f}o.prototype._parseHex=function(t,i,f){this.length=Math.ceil((t.length-i)/6),this.words=new Array(this.length);for(var s=0;s<this.length;s++)this.words[s]=0;var l=0,d=0,m;if(f==="be")for(s=t.length-1;s>=i;s-=2)m=_(t,i,s)<<l,this.words[d]|=m&67108863,l>=18?(l-=18,d+=1,this.words[d]|=m>>>26):l+=8;else{var u=t.length-i;for(s=u%2===0?i+1:i;s<t.length;s+=2)m=_(t,i,s)<<l,this.words[d]|=m&67108863,l>=18?(l-=18,d+=1,this.words[d]|=m>>>26):l+=8}this._strip()};function A(p,t,i,f){for(var s=0,l=0,d=Math.min(p.length,i),m=t;m<d;m++){var u=p.charCodeAt(m)-48;s*=f,u>=49?l=u-49+10:u>=17?l=u-17+10:l=u,n(u>=0&&l<f,"Invalid character"),s+=l}return s}o.prototype._parseBase=function(t,i,f){this.words=[0],this.length=1;for(var s=0,l=1;l<=67108863;l*=i)s++;s--,l=l/i|0;for(var d=t.length-f,m=d%s,u=Math.min(d,d-m)+f,r=0,c=f;c<u;c+=s)r=A(t,c,c+s,i),this.imuln(l),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(m!==0){var y=1;for(r=A(t,c,t.length,i),c=0;c<m;c++)y*=i;this.imuln(y),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this._strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var i=0;i<this.length;i++)t.words[i]=this.words[i];t.length=this.length,t.negative=this.negative,t.red=this.red};function E(p,t){p.words=t.words,p.length=t.length,p.negative=t.negative,p.red=t.red}if(o.prototype._move=function(t){E(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},o.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=w}catch{o.prototype.inspect=w}else o.prototype.inspect=w;function w(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var B=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],A0=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],w0=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,i){t=t||10,i=i|0||1;var f;if(t===16||t==="hex"){f="";for(var s=0,l=0,d=0;d<this.length;d++){var m=this.words[d],u=((m<<s|l)&16777215).toString(16);l=m>>>24-s&16777215,s+=2,s>=26&&(s-=26,d--),l!==0||d!==this.length-1?f=B[6-u.length]+u+f:f=u+f}for(l!==0&&(f=l.toString(16)+f);f.length%i!==0;)f="0"+f;return this.negative!==0&&(f="-"+f),f}if(t===(t|0)&&t>=2&&t<=36){var r=A0[t],c=w0[t];f="";var y=this.clone();for(y.negative=0;!y.isZero();){var g=y.modrn(c).toString(t);y=y.idivn(c),y.isZero()?f=g+f:f=B[r-g.length]+g+f}for(this.isZero()&&(f="0"+f);f.length%i!==0;)f="0"+f;return this.negative!==0&&(f="-"+f),f}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return this.length===2?t+=this.words[1]*67108864:this.length===3&&this.words[2]===1?t+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},v&&(o.prototype.toBuffer=function(t,i){return this.toArrayLike(v,t,i)}),o.prototype.toArray=function(t,i){return this.toArrayLike(Array,t,i)};var N0=function(t,i){return t.allocUnsafe?t.allocUnsafe(i):new t(i)};o.prototype.toArrayLike=function(t,i,f){this._strip();var s=this.byteLength(),l=f||Math.max(1,s);n(s<=l,"byte array longer than desired length"),n(l>0,"Requested array length <= 0");var d=N0(t,l),m=i==="le"?"LE":"BE";return this["_toArrayLike"+m](d,s),d},o.prototype._toArrayLikeLE=function(t,i){for(var f=0,s=0,l=0,d=0;l<this.length;l++){var m=this.words[l]<<d|s;t[f++]=m&255,f<t.length&&(t[f++]=m>>8&255),f<t.length&&(t[f++]=m>>16&255),d===6?(f<t.length&&(t[f++]=m>>24&255),s=0,d=0):(s=m>>>24,d+=2)}if(f<t.length)for(t[f++]=s;f<t.length;)t[f++]=0},o.prototype._toArrayLikeBE=function(t,i){for(var f=t.length-1,s=0,l=0,d=0;l<this.length;l++){var m=this.words[l]<<d|s;t[f--]=m&255,f>=0&&(t[f--]=m>>8&255),f>=0&&(t[f--]=m>>16&255),d===6?(f>=0&&(t[f--]=m>>24&255),s=0,d=0):(s=m>>>24,d+=2)}if(f>=0)for(t[f--]=s;f>=0;)t[f--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var i=t,f=0;return i>=4096&&(f+=13,i>>>=13),i>=64&&(f+=7,i>>>=7),i>=8&&(f+=4,i>>>=4),i>=2&&(f+=2,i>>>=2),f+i},o.prototype._zeroBits=function(t){if(t===0)return 26;var i=t,f=0;return i&8191||(f+=13,i>>>=13),i&127||(f+=7,i>>>=7),i&15||(f+=4,i>>>=4),i&3||(f+=2,i>>>=2),i&1||f++,f},o.prototype.bitLength=function(){var t=this.words[this.length-1],i=this._countBits(t);return(this.length-1)*26+i};function y0(p){for(var t=new Array(p.bitLength()),i=0;i<t.length;i++){var f=i/26|0,s=i%26;t[i]=p.words[f]>>>s&1}return t}o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,i=0;i<this.length;i++){var f=this._zeroBits(this.words[i]);if(t+=f,f!==26)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return this.negative!==0?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return this.negative!==0},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]|t.words[i];return this._strip()},o.prototype.ior=function(t){return n((this.negative|t.negative)===0),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var i;this.length>t.length?i=t:i=this;for(var f=0;f<i.length;f++)this.words[f]=this.words[f]&t.words[f];return this.length=i.length,this._strip()},o.prototype.iand=function(t){return n((this.negative|t.negative)===0),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var i,f;this.length>t.length?(i=this,f=t):(i=t,f=this);for(var s=0;s<f.length;s++)this.words[s]=i.words[s]^f.words[s];if(this!==i)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=i.length,this._strip()},o.prototype.ixor=function(t){return n((this.negative|t.negative)===0),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n(typeof t=="number"&&t>=0);var i=Math.ceil(t/26)|0,f=t%26;this._expand(i),f>0&&i--;for(var s=0;s<i;s++)this.words[s]=~this.words[s]&67108863;return f>0&&(this.words[s]=~this.words[s]&67108863>>26-f),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,i){n(typeof t=="number"&&t>=0);var f=t/26|0,s=t%26;return this._expand(f+1),i?this.words[f]=this.words[f]|1<<s:this.words[f]=this.words[f]&~(1<<s),this._strip()},o.prototype.iadd=function(t){var i;if(this.negative!==0&&t.negative===0)return this.negative=0,i=this.isub(t),this.negative^=1,this._normSign();if(this.negative===0&&t.negative!==0)return t.negative=0,i=this.isub(t),t.negative=1,i._normSign();var f,s;this.length>t.length?(f=this,s=t):(f=t,s=this);for(var l=0,d=0;d<s.length;d++)i=(f.words[d]|0)+(s.words[d]|0)+l,this.words[d]=i&67108863,l=i>>>26;for(;l!==0&&d<f.length;d++)i=(f.words[d]|0)+l,this.words[d]=i&67108863,l=i>>>26;if(this.length=f.length,l!==0)this.words[this.length]=l,this.length++;else if(f!==this)for(;d<f.length;d++)this.words[d]=f.words[d];return this},o.prototype.add=function(t){var i;return t.negative!==0&&this.negative===0?(t.negative=0,i=this.sub(t),t.negative^=1,i):t.negative===0&&this.negative!==0?(this.negative=0,i=t.sub(this),this.negative=1,i):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(t.negative!==0){t.negative=0;var i=this.iadd(t);return t.negative=1,i._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var f=this.cmp(t);if(f===0)return this.negative=0,this.length=1,this.words[0]=0,this;var s,l;f>0?(s=this,l=t):(s=t,l=this);for(var d=0,m=0;m<l.length;m++)i=(s.words[m]|0)-(l.words[m]|0)+d,d=i>>26,this.words[m]=i&67108863;for(;d!==0&&m<s.length;m++)i=(s.words[m]|0)+d,d=i>>26,this.words[m]=i&67108863;if(d===0&&m<s.length&&s!==this)for(;m<s.length;m++)this.words[m]=s.words[m];return this.length=Math.max(this.length,m),s!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};function D0(p,t,i){i.negative=t.negative^p.negative;var f=p.length+t.length|0;i.length=f,f=f-1|0;var s=p.words[0]|0,l=t.words[0]|0,d=s*l,m=d&67108863,u=d/67108864|0;i.words[0]=m;for(var r=1;r<f;r++){for(var c=u>>>26,y=u&67108863,g=Math.min(r,t.length-1),b=Math.max(0,r-p.length+1);b<=g;b++){var M=r-b|0;s=p.words[M]|0,l=t.words[b]|0,d=s*l+y,c+=d/67108864|0,y=d&67108863}i.words[r]=y|0,u=c|0}return u!==0?i.words[r]=u|0:i.length--,i._strip()}var z0=function(t,i,f){var s=t.words,l=i.words,d=f.words,m=0,u,r,c,y=s[0]|0,g=y&8191,b=y>>>13,M=s[1]|0,O=M&8191,L=M>>>13,L0=s[2]|0,T=L0&8191,R=L0>>>13,Z0=s[3]|0,z=Z0&8191,q=Z0>>>13,Kt=s[4]|0,P=Kt&8191,C=Kt>>>13,Yt=s[5]|0,V=Yt&8191,Z=Yt>>>13,Xt=s[6]|0,W=Xt&8191,G=Xt>>>13,Jt=s[7]|0,j=Jt&8191,H=Jt>>>13,Qt=s[8]|0,$=Qt&8191,K=Qt>>>13,te=s[9]|0,Y=te&8191,X=te>>>13,ee=l[0]|0,J=ee&8191,Q=ee>>>13,re=l[1]|0,t0=re&8191,e0=re>>>13,ie=l[2]|0,r0=ie&8191,i0=ie>>>13,ne=l[3]|0,n0=ne&8191,a0=ne>>>13,ae=l[4]|0,o0=ae&8191,f0=ae>>>13,oe=l[5]|0,s0=oe&8191,u0=oe>>>13,fe=l[6]|0,l0=fe&8191,h0=fe>>>13,se=l[7]|0,c0=se&8191,p0=se>>>13,ue=l[8]|0,d0=ue&8191,m0=ue>>>13,le=l[9]|0,v0=le&8191,x0=le>>>13;f.negative=t.negative^i.negative,f.length=19,u=Math.imul(g,J),r=Math.imul(g,Q),r=r+Math.imul(b,J)|0,c=Math.imul(b,Q);var ut=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(ut>>>26)|0,ut&=67108863,u=Math.imul(O,J),r=Math.imul(O,Q),r=r+Math.imul(L,J)|0,c=Math.imul(L,Q),u=u+Math.imul(g,t0)|0,r=r+Math.imul(g,e0)|0,r=r+Math.imul(b,t0)|0,c=c+Math.imul(b,e0)|0;var lt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(lt>>>26)|0,lt&=67108863,u=Math.imul(T,J),r=Math.imul(T,Q),r=r+Math.imul(R,J)|0,c=Math.imul(R,Q),u=u+Math.imul(O,t0)|0,r=r+Math.imul(O,e0)|0,r=r+Math.imul(L,t0)|0,c=c+Math.imul(L,e0)|0,u=u+Math.imul(g,r0)|0,r=r+Math.imul(g,i0)|0,r=r+Math.imul(b,r0)|0,c=c+Math.imul(b,i0)|0;var ht=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(ht>>>26)|0,ht&=67108863,u=Math.imul(z,J),r=Math.imul(z,Q),r=r+Math.imul(q,J)|0,c=Math.imul(q,Q),u=u+Math.imul(T,t0)|0,r=r+Math.imul(T,e0)|0,r=r+Math.imul(R,t0)|0,c=c+Math.imul(R,e0)|0,u=u+Math.imul(O,r0)|0,r=r+Math.imul(O,i0)|0,r=r+Math.imul(L,r0)|0,c=c+Math.imul(L,i0)|0,u=u+Math.imul(g,n0)|0,r=r+Math.imul(g,a0)|0,r=r+Math.imul(b,n0)|0,c=c+Math.imul(b,a0)|0;var ct=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(ct>>>26)|0,ct&=67108863,u=Math.imul(P,J),r=Math.imul(P,Q),r=r+Math.imul(C,J)|0,c=Math.imul(C,Q),u=u+Math.imul(z,t0)|0,r=r+Math.imul(z,e0)|0,r=r+Math.imul(q,t0)|0,c=c+Math.imul(q,e0)|0,u=u+Math.imul(T,r0)|0,r=r+Math.imul(T,i0)|0,r=r+Math.imul(R,r0)|0,c=c+Math.imul(R,i0)|0,u=u+Math.imul(O,n0)|0,r=r+Math.imul(O,a0)|0,r=r+Math.imul(L,n0)|0,c=c+Math.imul(L,a0)|0,u=u+Math.imul(g,o0)|0,r=r+Math.imul(g,f0)|0,r=r+Math.imul(b,o0)|0,c=c+Math.imul(b,f0)|0;var pt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(pt>>>26)|0,pt&=67108863,u=Math.imul(V,J),r=Math.imul(V,Q),r=r+Math.imul(Z,J)|0,c=Math.imul(Z,Q),u=u+Math.imul(P,t0)|0,r=r+Math.imul(P,e0)|0,r=r+Math.imul(C,t0)|0,c=c+Math.imul(C,e0)|0,u=u+Math.imul(z,r0)|0,r=r+Math.imul(z,i0)|0,r=r+Math.imul(q,r0)|0,c=c+Math.imul(q,i0)|0,u=u+Math.imul(T,n0)|0,r=r+Math.imul(T,a0)|0,r=r+Math.imul(R,n0)|0,c=c+Math.imul(R,a0)|0,u=u+Math.imul(O,o0)|0,r=r+Math.imul(O,f0)|0,r=r+Math.imul(L,o0)|0,c=c+Math.imul(L,f0)|0,u=u+Math.imul(g,s0)|0,r=r+Math.imul(g,u0)|0,r=r+Math.imul(b,s0)|0,c=c+Math.imul(b,u0)|0;var dt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(dt>>>26)|0,dt&=67108863,u=Math.imul(W,J),r=Math.imul(W,Q),r=r+Math.imul(G,J)|0,c=Math.imul(G,Q),u=u+Math.imul(V,t0)|0,r=r+Math.imul(V,e0)|0,r=r+Math.imul(Z,t0)|0,c=c+Math.imul(Z,e0)|0,u=u+Math.imul(P,r0)|0,r=r+Math.imul(P,i0)|0,r=r+Math.imul(C,r0)|0,c=c+Math.imul(C,i0)|0,u=u+Math.imul(z,n0)|0,r=r+Math.imul(z,a0)|0,r=r+Math.imul(q,n0)|0,c=c+Math.imul(q,a0)|0,u=u+Math.imul(T,o0)|0,r=r+Math.imul(T,f0)|0,r=r+Math.imul(R,o0)|0,c=c+Math.imul(R,f0)|0,u=u+Math.imul(O,s0)|0,r=r+Math.imul(O,u0)|0,r=r+Math.imul(L,s0)|0,c=c+Math.imul(L,u0)|0,u=u+Math.imul(g,l0)|0,r=r+Math.imul(g,h0)|0,r=r+Math.imul(b,l0)|0,c=c+Math.imul(b,h0)|0;var mt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(mt>>>26)|0,mt&=67108863,u=Math.imul(j,J),r=Math.imul(j,Q),r=r+Math.imul(H,J)|0,c=Math.imul(H,Q),u=u+Math.imul(W,t0)|0,r=r+Math.imul(W,e0)|0,r=r+Math.imul(G,t0)|0,c=c+Math.imul(G,e0)|0,u=u+Math.imul(V,r0)|0,r=r+Math.imul(V,i0)|0,r=r+Math.imul(Z,r0)|0,c=c+Math.imul(Z,i0)|0,u=u+Math.imul(P,n0)|0,r=r+Math.imul(P,a0)|0,r=r+Math.imul(C,n0)|0,c=c+Math.imul(C,a0)|0,u=u+Math.imul(z,o0)|0,r=r+Math.imul(z,f0)|0,r=r+Math.imul(q,o0)|0,c=c+Math.imul(q,f0)|0,u=u+Math.imul(T,s0)|0,r=r+Math.imul(T,u0)|0,r=r+Math.imul(R,s0)|0,c=c+Math.imul(R,u0)|0,u=u+Math.imul(O,l0)|0,r=r+Math.imul(O,h0)|0,r=r+Math.imul(L,l0)|0,c=c+Math.imul(L,h0)|0,u=u+Math.imul(g,c0)|0,r=r+Math.imul(g,p0)|0,r=r+Math.imul(b,c0)|0,c=c+Math.imul(b,p0)|0;var vt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,u=Math.imul($,J),r=Math.imul($,Q),r=r+Math.imul(K,J)|0,c=Math.imul(K,Q),u=u+Math.imul(j,t0)|0,r=r+Math.imul(j,e0)|0,r=r+Math.imul(H,t0)|0,c=c+Math.imul(H,e0)|0,u=u+Math.imul(W,r0)|0,r=r+Math.imul(W,i0)|0,r=r+Math.imul(G,r0)|0,c=c+Math.imul(G,i0)|0,u=u+Math.imul(V,n0)|0,r=r+Math.imul(V,a0)|0,r=r+Math.imul(Z,n0)|0,c=c+Math.imul(Z,a0)|0,u=u+Math.imul(P,o0)|0,r=r+Math.imul(P,f0)|0,r=r+Math.imul(C,o0)|0,c=c+Math.imul(C,f0)|0,u=u+Math.imul(z,s0)|0,r=r+Math.imul(z,u0)|0,r=r+Math.imul(q,s0)|0,c=c+Math.imul(q,u0)|0,u=u+Math.imul(T,l0)|0,r=r+Math.imul(T,h0)|0,r=r+Math.imul(R,l0)|0,c=c+Math.imul(R,h0)|0,u=u+Math.imul(O,c0)|0,r=r+Math.imul(O,p0)|0,r=r+Math.imul(L,c0)|0,c=c+Math.imul(L,p0)|0,u=u+Math.imul(g,d0)|0,r=r+Math.imul(g,m0)|0,r=r+Math.imul(b,d0)|0,c=c+Math.imul(b,m0)|0;var xt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(xt>>>26)|0,xt&=67108863,u=Math.imul(Y,J),r=Math.imul(Y,Q),r=r+Math.imul(X,J)|0,c=Math.imul(X,Q),u=u+Math.imul($,t0)|0,r=r+Math.imul($,e0)|0,r=r+Math.imul(K,t0)|0,c=c+Math.imul(K,e0)|0,u=u+Math.imul(j,r0)|0,r=r+Math.imul(j,i0)|0,r=r+Math.imul(H,r0)|0,c=c+Math.imul(H,i0)|0,u=u+Math.imul(W,n0)|0,r=r+Math.imul(W,a0)|0,r=r+Math.imul(G,n0)|0,c=c+Math.imul(G,a0)|0,u=u+Math.imul(V,o0)|0,r=r+Math.imul(V,f0)|0,r=r+Math.imul(Z,o0)|0,c=c+Math.imul(Z,f0)|0,u=u+Math.imul(P,s0)|0,r=r+Math.imul(P,u0)|0,r=r+Math.imul(C,s0)|0,c=c+Math.imul(C,u0)|0,u=u+Math.imul(z,l0)|0,r=r+Math.imul(z,h0)|0,r=r+Math.imul(q,l0)|0,c=c+Math.imul(q,h0)|0,u=u+Math.imul(T,c0)|0,r=r+Math.imul(T,p0)|0,r=r+Math.imul(R,c0)|0,c=c+Math.imul(R,p0)|0,u=u+Math.imul(O,d0)|0,r=r+Math.imul(O,m0)|0,r=r+Math.imul(L,d0)|0,c=c+Math.imul(L,m0)|0,u=u+Math.imul(g,v0)|0,r=r+Math.imul(g,x0)|0,r=r+Math.imul(b,v0)|0,c=c+Math.imul(b,x0)|0;var gt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(gt>>>26)|0,gt&=67108863,u=Math.imul(Y,t0),r=Math.imul(Y,e0),r=r+Math.imul(X,t0)|0,c=Math.imul(X,e0),u=u+Math.imul($,r0)|0,r=r+Math.imul($,i0)|0,r=r+Math.imul(K,r0)|0,c=c+Math.imul(K,i0)|0,u=u+Math.imul(j,n0)|0,r=r+Math.imul(j,a0)|0,r=r+Math.imul(H,n0)|0,c=c+Math.imul(H,a0)|0,u=u+Math.imul(W,o0)|0,r=r+Math.imul(W,f0)|0,r=r+Math.imul(G,o0)|0,c=c+Math.imul(G,f0)|0,u=u+Math.imul(V,s0)|0,r=r+Math.imul(V,u0)|0,r=r+Math.imul(Z,s0)|0,c=c+Math.imul(Z,u0)|0,u=u+Math.imul(P,l0)|0,r=r+Math.imul(P,h0)|0,r=r+Math.imul(C,l0)|0,c=c+Math.imul(C,h0)|0,u=u+Math.imul(z,c0)|0,r=r+Math.imul(z,p0)|0,r=r+Math.imul(q,c0)|0,c=c+Math.imul(q,p0)|0,u=u+Math.imul(T,d0)|0,r=r+Math.imul(T,m0)|0,r=r+Math.imul(R,d0)|0,c=c+Math.imul(R,m0)|0,u=u+Math.imul(O,v0)|0,r=r+Math.imul(O,x0)|0,r=r+Math.imul(L,v0)|0,c=c+Math.imul(L,x0)|0;var _t=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(_t>>>26)|0,_t&=67108863,u=Math.imul(Y,r0),r=Math.imul(Y,i0),r=r+Math.imul(X,r0)|0,c=Math.imul(X,i0),u=u+Math.imul($,n0)|0,r=r+Math.imul($,a0)|0,r=r+Math.imul(K,n0)|0,c=c+Math.imul(K,a0)|0,u=u+Math.imul(j,o0)|0,r=r+Math.imul(j,f0)|0,r=r+Math.imul(H,o0)|0,c=c+Math.imul(H,f0)|0,u=u+Math.imul(W,s0)|0,r=r+Math.imul(W,u0)|0,r=r+Math.imul(G,s0)|0,c=c+Math.imul(G,u0)|0,u=u+Math.imul(V,l0)|0,r=r+Math.imul(V,h0)|0,r=r+Math.imul(Z,l0)|0,c=c+Math.imul(Z,h0)|0,u=u+Math.imul(P,c0)|0,r=r+Math.imul(P,p0)|0,r=r+Math.imul(C,c0)|0,c=c+Math.imul(C,p0)|0,u=u+Math.imul(z,d0)|0,r=r+Math.imul(z,m0)|0,r=r+Math.imul(q,d0)|0,c=c+Math.imul(q,m0)|0,u=u+Math.imul(T,v0)|0,r=r+Math.imul(T,x0)|0,r=r+Math.imul(R,v0)|0,c=c+Math.imul(R,x0)|0;var yt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,u=Math.imul(Y,n0),r=Math.imul(Y,a0),r=r+Math.imul(X,n0)|0,c=Math.imul(X,a0),u=u+Math.imul($,o0)|0,r=r+Math.imul($,f0)|0,r=r+Math.imul(K,o0)|0,c=c+Math.imul(K,f0)|0,u=u+Math.imul(j,s0)|0,r=r+Math.imul(j,u0)|0,r=r+Math.imul(H,s0)|0,c=c+Math.imul(H,u0)|0,u=u+Math.imul(W,l0)|0,r=r+Math.imul(W,h0)|0,r=r+Math.imul(G,l0)|0,c=c+Math.imul(G,h0)|0,u=u+Math.imul(V,c0)|0,r=r+Math.imul(V,p0)|0,r=r+Math.imul(Z,c0)|0,c=c+Math.imul(Z,p0)|0,u=u+Math.imul(P,d0)|0,r=r+Math.imul(P,m0)|0,r=r+Math.imul(C,d0)|0,c=c+Math.imul(C,m0)|0,u=u+Math.imul(z,v0)|0,r=r+Math.imul(z,x0)|0,r=r+Math.imul(q,v0)|0,c=c+Math.imul(q,x0)|0;var bt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,u=Math.imul(Y,o0),r=Math.imul(Y,f0),r=r+Math.imul(X,o0)|0,c=Math.imul(X,f0),u=u+Math.imul($,s0)|0,r=r+Math.imul($,u0)|0,r=r+Math.imul(K,s0)|0,c=c+Math.imul(K,u0)|0,u=u+Math.imul(j,l0)|0,r=r+Math.imul(j,h0)|0,r=r+Math.imul(H,l0)|0,c=c+Math.imul(H,h0)|0,u=u+Math.imul(W,c0)|0,r=r+Math.imul(W,p0)|0,r=r+Math.imul(G,c0)|0,c=c+Math.imul(G,p0)|0,u=u+Math.imul(V,d0)|0,r=r+Math.imul(V,m0)|0,r=r+Math.imul(Z,d0)|0,c=c+Math.imul(Z,m0)|0,u=u+Math.imul(P,v0)|0,r=r+Math.imul(P,x0)|0,r=r+Math.imul(C,v0)|0,c=c+Math.imul(C,x0)|0;var wt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,u=Math.imul(Y,s0),r=Math.imul(Y,u0),r=r+Math.imul(X,s0)|0,c=Math.imul(X,u0),u=u+Math.imul($,l0)|0,r=r+Math.imul($,h0)|0,r=r+Math.imul(K,l0)|0,c=c+Math.imul(K,h0)|0,u=u+Math.imul(j,c0)|0,r=r+Math.imul(j,p0)|0,r=r+Math.imul(H,c0)|0,c=c+Math.imul(H,p0)|0,u=u+Math.imul(W,d0)|0,r=r+Math.imul(W,m0)|0,r=r+Math.imul(G,d0)|0,c=c+Math.imul(G,m0)|0,u=u+Math.imul(V,v0)|0,r=r+Math.imul(V,x0)|0,r=r+Math.imul(Z,v0)|0,c=c+Math.imul(Z,x0)|0;var Mt=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,u=Math.imul(Y,l0),r=Math.imul(Y,h0),r=r+Math.imul(X,l0)|0,c=Math.imul(X,h0),u=u+Math.imul($,c0)|0,r=r+Math.imul($,p0)|0,r=r+Math.imul(K,c0)|0,c=c+Math.imul(K,p0)|0,u=u+Math.imul(j,d0)|0,r=r+Math.imul(j,m0)|0,r=r+Math.imul(H,d0)|0,c=c+Math.imul(H,m0)|0,u=u+Math.imul(W,v0)|0,r=r+Math.imul(W,x0)|0,r=r+Math.imul(G,v0)|0,c=c+Math.imul(G,x0)|0;var At=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(At>>>26)|0,At&=67108863,u=Math.imul(Y,c0),r=Math.imul(Y,p0),r=r+Math.imul(X,c0)|0,c=Math.imul(X,p0),u=u+Math.imul($,d0)|0,r=r+Math.imul($,m0)|0,r=r+Math.imul(K,d0)|0,c=c+Math.imul(K,m0)|0,u=u+Math.imul(j,v0)|0,r=r+Math.imul(j,x0)|0,r=r+Math.imul(H,v0)|0,c=c+Math.imul(H,x0)|0;var It=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(It>>>26)|0,It&=67108863,u=Math.imul(Y,d0),r=Math.imul(Y,m0),r=r+Math.imul(X,d0)|0,c=Math.imul(X,m0),u=u+Math.imul($,v0)|0,r=r+Math.imul($,x0)|0,r=r+Math.imul(K,v0)|0,c=c+Math.imul(K,x0)|0;var Ot=(m+u|0)+((r&8191)<<13)|0;m=(c+(r>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,u=Math.imul(Y,v0),r=Math.imul(Y,x0),r=r+Math.imul(X,v0)|0,c=Math.imul(X,x0);var St=(m+u|0)+((r&8191)<<13)|0;return m=(c+(r>>>13)|0)+(St>>>26)|0,St&=67108863,d[0]=ut,d[1]=lt,d[2]=ht,d[3]=ct,d[4]=pt,d[5]=dt,d[6]=mt,d[7]=vt,d[8]=xt,d[9]=gt,d[10]=_t,d[11]=yt,d[12]=bt,d[13]=wt,d[14]=Mt,d[15]=At,d[16]=It,d[17]=Ot,d[18]=St,m!==0&&(d[19]=m,f.length++),f};Math.imul||(z0=D0);function E0(p,t,i){i.negative=t.negative^p.negative,i.length=p.length+t.length;for(var f=0,s=0,l=0;l<i.length-1;l++){var d=s;s=0;for(var m=f&67108863,u=Math.min(l,t.length-1),r=Math.max(0,l-p.length+1);r<=u;r++){var c=l-r,y=p.words[c]|0,g=t.words[r]|0,b=y*g,M=b&67108863;d=d+(b/67108864|0)|0,M=M+m|0,m=M&67108863,d=d+(M>>>26)|0,s+=d>>>26,d&=67108863}i.words[l]=m,f=d,d=s}return f!==0?i.words[l]=f:i.length--,i._strip()}function k0(p,t,i){return E0(p,t,i)}o.prototype.mulTo=function(t,i){var f,s=this.length+t.length;return this.length===10&&t.length===10?f=z0(this,t,i):s<63?f=D0(this,t,i):s<1024?f=E0(this,t,i):f=k0(this,t,i),f};function k(p,t){this.x=p,this.y=t}k.prototype.makeRBT=function(t){for(var i=new Array(t),f=o.prototype._countBits(t)-1,s=0;s<t;s++)i[s]=this.revBin(s,f,t);return i},k.prototype.revBin=function(t,i,f){if(t===0||t===f-1)return t;for(var s=0,l=0;l<i;l++)s|=(t&1)<<i-l-1,t>>=1;return s},k.prototype.permute=function(t,i,f,s,l,d){for(var m=0;m<d;m++)s[m]=i[t[m]],l[m]=f[t[m]]},k.prototype.transform=function(t,i,f,s,l,d){this.permute(d,t,i,f,s,l);for(var m=1;m<l;m<<=1)for(var u=m<<1,r=Math.cos(2*Math.PI/u),c=Math.sin(2*Math.PI/u),y=0;y<l;y+=u)for(var g=r,b=c,M=0;M<m;M++){var O=f[y+M],L=s[y+M],L0=f[y+M+m],T=s[y+M+m],R=g*L0-b*T;T=g*T+b*L0,L0=R,f[y+M]=O+L0,s[y+M]=L+T,f[y+M+m]=O-L0,s[y+M+m]=L-T,M!==u&&(R=r*g-c*b,b=r*b+c*g,g=R)}},k.prototype.guessLen13b=function(t,i){var f=Math.max(i,t)|1,s=f&1,l=0;for(f=f/2|0;f;f=f>>>1)l++;return 1<<l+1+s},k.prototype.conjugate=function(t,i,f){if(!(f<=1))for(var s=0;s<f/2;s++){var l=t[s];t[s]=t[f-s-1],t[f-s-1]=l,l=i[s],i[s]=-i[f-s-1],i[f-s-1]=-l}},k.prototype.normalize13b=function(t,i){for(var f=0,s=0;s<i/2;s++){var l=Math.round(t[2*s+1]/i)*8192+Math.round(t[2*s]/i)+f;t[s]=l&67108863,l<67108864?f=0:f=l/67108864|0}return t},k.prototype.convert13b=function(t,i,f,s){for(var l=0,d=0;d<i;d++)l=l+(t[d]|0),f[2*d]=l&8191,l=l>>>13,f[2*d+1]=l&8191,l=l>>>13;for(d=2*i;d<s;++d)f[d]=0;n(l===0),n((l&-8192)===0)},k.prototype.stub=function(t){for(var i=new Array(t),f=0;f<t;f++)i[f]=0;return i},k.prototype.mulp=function(t,i,f){var s=2*this.guessLen13b(t.length,i.length),l=this.makeRBT(s),d=this.stub(s),m=new Array(s),u=new Array(s),r=new Array(s),c=new Array(s),y=new Array(s),g=new Array(s),b=f.words;b.length=s,this.convert13b(t.words,t.length,m,s),this.convert13b(i.words,i.length,c,s),this.transform(m,d,u,r,s,l),this.transform(c,d,y,g,s,l);for(var M=0;M<s;M++){var O=u[M]*y[M]-r[M]*g[M];r[M]=u[M]*g[M]+r[M]*y[M],u[M]=O}return this.conjugate(u,r,s),this.transform(u,r,b,d,s,l),this.conjugate(b,d,s),this.normalize13b(b,s),f.negative=t.negative^i.negative,f.length=t.length+i.length,f._strip()},o.prototype.mul=function(t){var i=new o(null);return i.words=new Array(this.length+t.length),this.mulTo(t,i)},o.prototype.mulf=function(t){var i=new o(null);return i.words=new Array(this.length+t.length),k0(this,t,i)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var i=t<0;i&&(t=-t),n(typeof t=="number"),n(t<67108864);for(var f=0,s=0;s<this.length;s++){var l=(this.words[s]|0)*t,d=(l&67108863)+(f&67108863);f>>=26,f+=l/67108864|0,f+=d>>>26,this.words[s]=d&67108863}return f!==0&&(this.words[s]=f,this.length++),i?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var i=y0(t);if(i.length===0)return new o(1);for(var f=this,s=0;s<i.length&&i[s]===0;s++,f=f.sqr());if(++s<i.length)for(var l=f.sqr();s<i.length;s++,l=l.sqr())i[s]!==0&&(f=f.mul(l));return f},o.prototype.iushln=function(t){n(typeof t=="number"&&t>=0);var i=t%26,f=(t-i)/26,s=67108863>>>26-i<<26-i,l;if(i!==0){var d=0;for(l=0;l<this.length;l++){var m=this.words[l]&s,u=(this.words[l]|0)-m<<i;this.words[l]=u|d,d=m>>>26-i}d&&(this.words[l]=d,this.length++)}if(f!==0){for(l=this.length-1;l>=0;l--)this.words[l+f]=this.words[l];for(l=0;l<f;l++)this.words[l]=0;this.length+=f}return this._strip()},o.prototype.ishln=function(t){return n(this.negative===0),this.iushln(t)},o.prototype.iushrn=function(t,i,f){n(typeof t=="number"&&t>=0);var s;i?s=(i-i%26)/26:s=0;var l=t%26,d=Math.min((t-l)/26,this.length),m=67108863^67108863>>>l<<l,u=f;if(s-=d,s=Math.max(0,s),u){for(var r=0;r<d;r++)u.words[r]=this.words[r];u.length=d}if(d!==0)if(this.length>d)for(this.length-=d,r=0;r<this.length;r++)this.words[r]=this.words[r+d];else this.words[0]=0,this.length=1;var c=0;for(r=this.length-1;r>=0&&(c!==0||r>=s);r--){var y=this.words[r]|0;this.words[r]=c<<26-l|y>>>l,c=y&m}return u&&c!==0&&(u.words[u.length++]=c),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,i,f){return n(this.negative===0),this.iushrn(t,i,f)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n(typeof t=="number"&&t>=0);var i=t%26,f=(t-i)/26,s=1<<i;if(this.length<=f)return!1;var l=this.words[f];return!!(l&s)},o.prototype.imaskn=function(t){n(typeof t=="number"&&t>=0);var i=t%26,f=(t-i)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=f)return this;if(i!==0&&f++,this.length=Math.min(f,this.length),i!==0){var s=67108863^67108863>>>i<<i;this.words[this.length-1]&=s}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n(typeof t=="number"),n(t<67108864),t<0?this.isubn(-t):this.negative!==0?this.length===1&&(this.words[0]|0)<=t?(this.words[0]=t-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},o.prototype.isubn=function(t){if(n(typeof t=="number"),n(t<67108864),t<0)return this.iaddn(-t);if(this.negative!==0)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,i,f){var s=t.length+f,l;this._expand(s);var d,m=0;for(l=0;l<t.length;l++){d=(this.words[l+f]|0)+m;var u=(t.words[l]|0)*i;d-=u&67108863,m=(d>>26)-(u/67108864|0),this.words[l+f]=d&67108863}for(;l<this.length-f;l++)d=(this.words[l+f]|0)+m,m=d>>26,this.words[l+f]=d&67108863;if(m===0)return this._strip();for(n(m===-1),m=0,l=0;l<this.length;l++)d=-(this.words[l]|0)+m,m=d>>26,this.words[l]=d&67108863;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,i){var f=this.length-t.length,s=this.clone(),l=t,d=l.words[l.length-1]|0,m=this._countBits(d);f=26-m,f!==0&&(l=l.ushln(f),s.iushln(f),d=l.words[l.length-1]|0);var u=s.length-l.length,r;if(i!=="mod"){r=new o(null),r.length=u+1,r.words=new Array(r.length);for(var c=0;c<r.length;c++)r.words[c]=0}var y=s.clone()._ishlnsubmul(l,1,u);y.negative===0&&(s=y,r&&(r.words[u]=1));for(var g=u-1;g>=0;g--){var b=(s.words[l.length+g]|0)*67108864+(s.words[l.length+g-1]|0);for(b=Math.min(b/d|0,67108863),s._ishlnsubmul(l,b,g);s.negative!==0;)b--,s.negative=0,s._ishlnsubmul(l,1,g),s.isZero()||(s.negative^=1);r&&(r.words[g]=b)}return r&&r._strip(),s._strip(),i!=="div"&&f!==0&&s.iushrn(f),{div:r||null,mod:s}},o.prototype.divmod=function(t,i,f){if(n(!t.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var s,l,d;return this.negative!==0&&t.negative===0?(d=this.neg().divmod(t,i),i!=="mod"&&(s=d.div.neg()),i!=="div"&&(l=d.mod.neg(),f&&l.negative!==0&&l.iadd(t)),{div:s,mod:l}):this.negative===0&&t.negative!==0?(d=this.divmod(t.neg(),i),i!=="mod"&&(s=d.div.neg()),{div:s,mod:d.mod}):this.negative&t.negative?(d=this.neg().divmod(t.neg(),i),i!=="div"&&(l=d.mod.neg(),f&&l.negative!==0&&l.isub(t)),{div:d.div,mod:l}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:t.length===1?i==="div"?{div:this.divn(t.words[0]),mod:null}:i==="mod"?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,i)},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var i=this.divmod(t);if(i.mod.isZero())return i.div;var f=i.div.negative!==0?i.mod.isub(t):i.mod,s=t.ushrn(1),l=t.andln(1),d=f.cmp(s);return d<0||l===1&&d===0?i.div:i.div.negative!==0?i.div.isubn(1):i.div.iaddn(1)},o.prototype.modrn=function(t){var i=t<0;i&&(t=-t),n(t<=67108863);for(var f=(1<<26)%t,s=0,l=this.length-1;l>=0;l--)s=(f*s+(this.words[l]|0))%t;return i?-s:s},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var i=t<0;i&&(t=-t),n(t<=67108863);for(var f=0,s=this.length-1;s>=0;s--){var l=(this.words[s]|0)+f*67108864;this.words[s]=l/t|0,f=l%t}return this._strip(),i?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(t.negative===0),n(!t.isZero());var i=this,f=t.clone();i.negative!==0?i=i.umod(t):i=i.clone();for(var s=new o(1),l=new o(0),d=new o(0),m=new o(1),u=0;i.isEven()&&f.isEven();)i.iushrn(1),f.iushrn(1),++u;for(var r=f.clone(),c=i.clone();!i.isZero();){for(var y=0,g=1;!(i.words[0]&g)&&y<26;++y,g<<=1);if(y>0)for(i.iushrn(y);y-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(r),l.isub(c)),s.iushrn(1),l.iushrn(1);for(var b=0,M=1;!(f.words[0]&M)&&b<26;++b,M<<=1);if(b>0)for(f.iushrn(b);b-- >0;)(d.isOdd()||m.isOdd())&&(d.iadd(r),m.isub(c)),d.iushrn(1),m.iushrn(1);i.cmp(f)>=0?(i.isub(f),s.isub(d),l.isub(m)):(f.isub(i),d.isub(s),m.isub(l))}return{a:d,b:m,gcd:f.iushln(u)}},o.prototype._invmp=function(t){n(t.negative===0),n(!t.isZero());var i=this,f=t.clone();i.negative!==0?i=i.umod(t):i=i.clone();for(var s=new o(1),l=new o(0),d=f.clone();i.cmpn(1)>0&&f.cmpn(1)>0;){for(var m=0,u=1;!(i.words[0]&u)&&m<26;++m,u<<=1);if(m>0)for(i.iushrn(m);m-- >0;)s.isOdd()&&s.iadd(d),s.iushrn(1);for(var r=0,c=1;!(f.words[0]&c)&&r<26;++r,c<<=1);if(r>0)for(f.iushrn(r);r-- >0;)l.isOdd()&&l.iadd(d),l.iushrn(1);i.cmp(f)>=0?(i.isub(f),s.isub(l)):(f.isub(i),l.isub(s))}var y;return i.cmpn(1)===0?y=s:y=l,y.cmpn(0)<0&&y.iadd(t),y},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var i=this.clone(),f=t.clone();i.negative=0,f.negative=0;for(var s=0;i.isEven()&&f.isEven();s++)i.iushrn(1),f.iushrn(1);do{for(;i.isEven();)i.iushrn(1);for(;f.isEven();)f.iushrn(1);var l=i.cmp(f);if(l<0){var d=i;i=f,f=d}else if(l===0||f.cmpn(1)===0)break;i.isub(f)}while(!0);return f.iushln(s)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return(this.words[0]&1)===0},o.prototype.isOdd=function(){return(this.words[0]&1)===1},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n(typeof t=="number");var i=t%26,f=(t-i)/26,s=1<<i;if(this.length<=f)return this._expand(f+1),this.words[f]|=s,this;for(var l=s,d=f;l!==0&&d<this.length;d++){var m=this.words[d]|0;m+=l,l=m>>>26,m&=67108863,this.words[d]=m}return l!==0&&(this.words[d]=l,this.length++),this},o.prototype.isZero=function(){return this.length===1&&this.words[0]===0},o.prototype.cmpn=function(t){var i=t<0;if(this.negative!==0&&!i)return-1;if(this.negative===0&&i)return 1;this._strip();var f;if(this.length>1)f=1;else{i&&(t=-t),n(t<=67108863,"Number is too big");var s=this.words[0]|0;f=s===t?0:s<t?-1:1}return this.negative!==0?-f|0:f},o.prototype.cmp=function(t){if(this.negative!==0&&t.negative===0)return-1;if(this.negative===0&&t.negative!==0)return 1;var i=this.ucmp(t);return this.negative!==0?-i|0:i},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var i=0,f=this.length-1;f>=0;f--){var s=this.words[f]|0,l=t.words[f]|0;if(s!==l){s<l?i=-1:s>l&&(i=1);break}}return i},o.prototype.gtn=function(t){return this.cmpn(t)===1},o.prototype.gt=function(t){return this.cmp(t)===1},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return this.cmpn(t)===-1},o.prototype.lt=function(t){return this.cmp(t)===-1},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return this.cmpn(t)===0},o.prototype.eq=function(t){return this.cmp(t)===0},o.red=function(t){return new D(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var I0={k256:null,p224:null,p192:null,p25519:null};function U(p,t){this.name=p,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}U.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},U.prototype.ireduce=function(t){var i=t,f;do this.split(i,this.tmp),i=this.imulK(i),i=i.iadd(this.tmp),f=i.bitLength();while(f>this.n);var s=f<this.n?-1:i.ucmp(this.p);return s===0?(i.words[0]=0,i.length=1):s>0?i.isub(this.p):i.strip!==void 0?i.strip():i._strip(),i},U.prototype.split=function(t,i){t.iushrn(this.n,0,i)},U.prototype.imulK=function(t){return t.imul(this.k)};function _0(){U.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}h(_0,U),_0.prototype.split=function(t,i){for(var f=4194303,s=Math.min(t.length,9),l=0;l<s;l++)i.words[l]=t.words[l];if(i.length=s,t.length<=9){t.words[0]=0,t.length=1;return}var d=t.words[9];for(i.words[i.length++]=d&f,l=10;l<t.length;l++){var m=t.words[l]|0;t.words[l-10]=(m&f)<<4|d>>>22,d=m}d>>>=22,t.words[l-10]=d,d===0&&t.length>10?t.length-=10:t.length-=9},_0.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var i=0,f=0;f<t.length;f++){var s=t.words[f]|0;i+=s*977,t.words[f]=i&67108863,i=s*64+(i/67108864|0)}return t.words[t.length-1]===0&&(t.length--,t.words[t.length-1]===0&&t.length--),t};function N(){U.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}h(N,U);function I(){U.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}h(I,U);function M0(){U.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}h(M0,U),M0.prototype.imulK=function(t){for(var i=0,f=0;f<t.length;f++){var s=(t.words[f]|0)*19+i,l=s&67108863;s>>>=26,t.words[f]=l,i=s}return i!==0&&(t.words[t.length++]=i),t},o._prime=function(t){if(I0[t])return I0[t];var i;if(t==="k256")i=new _0;else if(t==="p224")i=new N;else if(t==="p192")i=new I;else if(t==="p25519")i=new M0;else throw new Error("Unknown prime "+t);return I0[t]=i,i};function D(p){if(typeof p=="string"){var t=o._prime(p);this.m=t.p,this.prime=t}else n(p.gtn(1),"modulus must be greater than 1"),this.m=p,this.prime=null}D.prototype._verify1=function(t){n(t.negative===0,"red works only with positives"),n(t.red,"red works only with red numbers")},D.prototype._verify2=function(t,i){n((t.negative|i.negative)===0,"red works only with positives"),n(t.red&&t.red===i.red,"red works only with red numbers")},D.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(E(t,t.umod(this.m)._forceRed(this)),t)},D.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},D.prototype.add=function(t,i){this._verify2(t,i);var f=t.add(i);return f.cmp(this.m)>=0&&f.isub(this.m),f._forceRed(this)},D.prototype.iadd=function(t,i){this._verify2(t,i);var f=t.iadd(i);return f.cmp(this.m)>=0&&f.isub(this.m),f},D.prototype.sub=function(t,i){this._verify2(t,i);var f=t.sub(i);return f.cmpn(0)<0&&f.iadd(this.m),f._forceRed(this)},D.prototype.isub=function(t,i){this._verify2(t,i);var f=t.isub(i);return f.cmpn(0)<0&&f.iadd(this.m),f},D.prototype.shl=function(t,i){return this._verify1(t),this.imod(t.ushln(i))},D.prototype.imul=function(t,i){return this._verify2(t,i),this.imod(t.imul(i))},D.prototype.mul=function(t,i){return this._verify2(t,i),this.imod(t.mul(i))},D.prototype.isqr=function(t){return this.imul(t,t.clone())},D.prototype.sqr=function(t){return this.mul(t,t)},D.prototype.sqrt=function(t){if(t.isZero())return t.clone();var i=this.m.andln(3);if(n(i%2===1),i===3){var f=this.m.add(new o(1)).iushrn(2);return this.pow(t,f)}for(var s=this.m.subn(1),l=0;!s.isZero()&&s.andln(1)===0;)l++,s.iushrn(1);n(!s.isZero());var d=new o(1).toRed(this),m=d.redNeg(),u=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new o(2*r*r).toRed(this);this.pow(r,u).cmp(m)!==0;)r.redIAdd(m);for(var c=this.pow(r,s),y=this.pow(t,s.addn(1).iushrn(1)),g=this.pow(t,s),b=l;g.cmp(d)!==0;){for(var M=g,O=0;M.cmp(d)!==0;O++)M=M.redSqr();n(O<b);var L=this.pow(c,new o(1).iushln(b-O-1));y=y.redMul(L),c=L.redSqr(),g=g.redMul(c),b=O}return y},D.prototype.invm=function(t){var i=t._invmp(this.m);return i.negative!==0?(i.negative=0,this.imod(i).redNeg()):this.imod(i)},D.prototype.pow=function(t,i){if(i.isZero())return new o(1).toRed(this);if(i.cmpn(1)===0)return t.clone();var f=4,s=new Array(1<<f);s[0]=new o(1).toRed(this),s[1]=t;for(var l=2;l<s.length;l++)s[l]=this.mul(s[l-1],t);var d=s[0],m=0,u=0,r=i.bitLength()%26;for(r===0&&(r=26),l=i.length-1;l>=0;l--){for(var c=i.words[l],y=r-1;y>=0;y--){var g=c>>y&1;if(d!==s[0]&&(d=this.sqr(d)),g===0&&m===0){u=0;continue}m<<=1,m|=g,u++,!(u!==f&&(l!==0||y!==0))&&(d=this.mul(d,s[m]),u=0,m=0)}r=26}return d},D.prototype.convertTo=function(t){var i=t.umod(this.m);return i===t?i.clone():i},D.prototype.convertFrom=function(t){var i=t.clone();return i.red=null,i},o.mont=function(t){return new F(t)};function F(p){D.call(this,p),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}h(F,D),F.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},F.prototype.convertFrom=function(t){var i=this.imod(t.mul(this.rinv));return i.red=null,i},F.prototype.imul=function(t,i){if(t.isZero()||i.isZero())return t.words[0]=0,t.length=1,t;var f=t.imul(i),s=f.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=f.isub(s).iushrn(this.shift),d=l;return l.cmp(this.m)>=0?d=l.isub(this.m):l.cmpn(0)<0&&(d=l.iadd(this.m)),d._forceRed(this)},F.prototype.mul=function(t,i){if(t.isZero()||i.isZero())return new o(0)._forceRed(this);var f=t.mul(i),s=f.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),l=f.isub(s).iushrn(this.shift),d=l;return l.cmp(this.m)>=0?d=l.isub(this.m):l.cmpn(0)<0&&(d=l.iadd(this.m)),d._forceRed(this)},F.prototype.invm=function(t){var i=this.imod(t._invmp(this.m).mul(this.r2));return i._forceRed(this)}})(typeof Tt>"u"||Tt,de)});function ce(){return{FORC:"0.63.3",FUEL_CORE:"0.34.0",FUELS:"0.94.3"}}function he(e){let[a,n,h]=e.split(".").map(o=>parseInt(o,10));return{major:a,minor:n,patch:h}}function Nt(e,a){let n=he(e),h=he(a),o=n.major-h.major,v=n.minor-h.minor,x=n.patch-h.patch;return{major:o,minor:v,patch:x,fullVersionDiff:o||v||x}}function je(e,a){let{major:n}=Nt(e,a);return n===0}function He(e,a){let{minor:n}=Nt(e,a);return n===0}function $e(e,a){let{patch:n}=Nt(e,a);return n===0}function jr(e){let{FUEL_CORE:a}=ce();return/^\d+\.\d+\.\d+\D+/m.test(e)&&console.warn(`You're running against an unreleased fuel-core version: ${e}. Things may work as expected, but it's not guaranteed. Please use a released version.
|
|
3
|
+
This unreleased fuel-core build may include features and updates not yet supported by this version of the TS-SDK.`),{supportedVersion:a,isMajorSupported:je(e,a),isMinorSupported:He(e,a),isPatchSupported:$e(e,a)}}var pe=ce();var Ke=Object.defineProperty,Ye=(e,a,n)=>a in e?Ke(e,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[a]=n,Xe=(e,a,n)=>(Ye(e,typeof a!="symbol"?a+"":a,n),n),b0=(e=>(e.NO_ABIS_FOUND="no-abis-found",e.ABI_TYPES_AND_VALUES_MISMATCH="abi-types-and-values-mismatch",e.ABI_MAIN_METHOD_MISSING="abi-main-method-missing",e.INVALID_COMPONENT="invalid-component",e.CONFIGURABLE_NOT_FOUND="configurable-not-found",e.TYPE_NOT_FOUND="type-not-found",e.LOG_TYPE_NOT_FOUND="log-type-not-found",e.TYPE_NOT_SUPPORTED="type-not-supported",e.INVALID_DECODE_VALUE="invalid-decode-value",e.JSON_ABI_ERROR="json-abi-error",e.TYPE_ID_NOT_FOUND="type-id-not-found",e.BIN_FILE_NOT_FOUND="bin-file-not-found",e.CODER_NOT_FOUND="coder-not-found",e.INVALID_DATA="invalid-data",e.FUNCTION_NOT_FOUND="function-not-found",e.UNSUPPORTED_ENCODING_VERSION="unsupported-encoding-version",e.TIMEOUT_EXCEEDED="timeout-exceeded",e.CONFIG_FILE_NOT_FOUND="config-file-not-found",e.CONFIG_FILE_ALREADY_EXISTS="config-file-already-exists",e.WORKSPACE_NOT_DETECTED="workspace-not-detected",e.INVALID_BECH32_ADDRESS="invalid-bech32-address",e.INVALID_EVM_ADDRESS="invalid-evm-address",e.INVALID_B256_ADDRESS="invalid-b256-address",e.CHAIN_INFO_CACHE_EMPTY="chain-info-cache-empty",e.NODE_INFO_CACHE_EMPTY="node-info-cache-empty",e.MISSING_PROVIDER="missing-provider",e.INVALID_PROVIDER="invalid-provider",e.CONNECTION_REFUSED="connection-refused",e.INVALID_PUBLIC_KEY="invalid-public-key",e.WALLET_MANAGER_ERROR="wallet-manager-error",e.HD_WALLET_ERROR="hd-wallet-error",e.MISSING_CONNECTOR="missing-connector",e.PARSE_FAILED="parse-failed",e.ENCODE_ERROR="encode-error",e.DECODE_ERROR="decode-error",e.ENV_DEPENDENCY_MISSING="env-dependency-missing",e.INVALID_TTL="invalid-ttl",e.INVALID_INPUT_PARAMETERS="invalid-input-parameters",e.NOT_IMPLEMENTED="not-implemented",e.NOT_SUPPORTED="not-supported",e.CONVERTING_FAILED="converting-error",e.ELEMENT_NOT_FOUND="element-not-found",e.MISSING_REQUIRED_PARAMETER="missing-required-parameter",e.INVALID_REQUEST="invalid-request",e.INVALID_TRANSFER_AMOUNT="invalid-transfer-amount",e.NOT_ENOUGH_FUNDS="not-enough-funds",e.INVALID_CREDENTIALS="invalid-credentials",e.HASHER_LOCKED="hasher-locked",e.GAS_PRICE_TOO_LOW="gas-price-too-low",e.GAS_LIMIT_TOO_LOW="gas-limit-too-low",e.MAX_FEE_TOO_LOW="max-fee-too-low",e.TRANSACTION_NOT_FOUND="transaction-not-found",e.TRANSACTION_FAILED="transaction-failed",e.INVALID_CONFIGURABLE_CONSTANTS="invalid-configurable-constants",e.INVALID_TRANSACTION_INPUT="invalid-transaction-input",e.INVALID_TRANSACTION_OUTPUT="invalid-transaction-output",e.INVALID_TRANSACTION_STATUS="invalid-transaction-status",e.UNSUPPORTED_TRANSACTION_TYPE="unsupported-transaction-type",e.TRANSACTION_ERROR="transaction-error",e.INVALID_POLICY_TYPE="invalid-policy-type",e.DUPLICATED_POLICY="duplicated-policy",e.TRANSACTION_SQUEEZED_OUT="transaction-squeezed-out",e.CONTRACT_SIZE_EXCEEDS_LIMIT="contract-size-exceeds-limit",e.INVALID_CHUNK_SIZE_MULTIPLIER="invalid-chunk-size-multiplier",e.MAX_INPUTS_EXCEEDED="max-inputs-exceeded",e.FUNDS_TOO_LOW="funds-too-low",e.MAX_OUTPUTS_EXCEEDED="max-outputs-exceeded",e.INVALID_RECEIPT_TYPE="invalid-receipt-type",e.INVALID_WORD_LIST="invalid-word-list",e.INVALID_MNEMONIC="invalid-mnemonic",e.INVALID_ENTROPY="invalid-entropy",e.INVALID_SEED="invalid-seed",e.INVALID_CHECKSUM="invalid-checksum",e.INVALID_PASSWORD="invalid-password",e.ACCOUNT_REQUIRED="account-required",e.UNLOCKED_WALLET_REQUIRED="unlocked-wallet-required",e.ERROR_BUILDING_BLOCK_EXPLORER_URL="error-building-block-explorer-url",e.VITEPRESS_PLUGIN_ERROR="vitepress-plugin-error",e.SCRIPT_REVERTED="script-reverted",e.SCRIPT_RETURN_INVALID_TYPE="script-return-invalid-type",e.STREAM_PARSING_ERROR="stream-parsing-error",e.NODE_LAUNCH_FAILED="node-launch-failed",e.UNKNOWN="unknown",e))(b0||{}),J0=class extends Error{VERSIONS=pe;metadata;rawError;static parse(e){let a=e;if(a.code===void 0)throw new J0("parse-failed","Failed to parse the error object. The required 'code' property is missing.");let n=Object.values(b0);if(!n.includes(a.code))throw new J0("parse-failed",`Unknown error code: ${a.code}. Accepted codes: ${n.join(", ")}.`);return new J0(a.code,a.message)}code;constructor(e,a,n={},h={}){super(a),this.code=e,this.name="FuelError",this.metadata=n,this.rawError=h}toObject(){let{code:e,name:a,message:n,metadata:h,VERSIONS:o,rawError:v}=this;return{code:e,name:a,message:n,metadata:h,VERSIONS:o,rawError:v}}},O0=J0;Xe(O0,"CODES",b0);var G0=Ge(me(),1),ve=9,xe=3,Et=9;function Je(e,a){let{precision:n=ve,minPrecision:h=xe}=a||{},[o="0",v="0"]=String(e||"0.0").split("."),x=/(\d)(?=(\d{3})+\b)/g,_=o.replace(x,"$1,"),A=v.slice(0,n);if(h<n){let B=A.match(/.*[1-9]{1}/)?.[0].length||0,A0=Math.max(h,B);A=A.slice(0,A0)}let E=A?`.${A}`:"";return`${_}${E}`}var g0=class extends G0.default{MAX_U64="0xFFFFFFFFFFFFFFFF";constructor(e,a,n){let h=e,o=a;g0.isBN(e)?h=e.toArray():typeof e=="string"&&e.slice(0,2)==="0x"&&(h=e.substring(2),o=a||"hex"),super(h??0,o,n)}toString(e,a){let n=super.toString(e,a);return e===16||e==="hex"?`0x${n}`:n}toHex(e){let n=(e||0)*2;if(this.isNeg())throw new O0(b0.CONVERTING_FAILED,"Cannot convert negative value to hex.");if(e&&this.byteLength()>e)throw new O0(b0.CONVERTING_FAILED,`Provided value ${this} is too large. It should fit within ${e} bytes.`);return this.toString(16,n)}toBytes(e){if(this.isNeg())throw new O0(b0.CONVERTING_FAILED,"Cannot convert negative value to bytes.");return Uint8Array.from(this.toArray(void 0,e))}toJSON(){return this.toString(16)}valueOf(){return this.toString()}format(e){let{units:a=Et,precision:n=ve,minPrecision:h=xe}=e||{},o=this.formatUnits(a),v=Je(o,{precision:n,minPrecision:h});if(!parseFloat(v)){let[,x="0"]=o.split("."),_=x.match(/[1-9]/);if(_&&_.index&&_.index+1>n){let[A="0"]=v.split(".");return`${A}.${x.slice(0,_.index+1)}`}}return v}formatUnits(e=Et){let a=this.toString().slice(0,e*-1),n=this.toString().slice(e*-1),h=n.length,o=Array.from({length:e-h}).fill("0").join("");return`${a?`${a}.`:"0."}${o}${n}`}add(e){return this.caller(e,"add")}pow(e){return this.caller(e,"pow")}sub(e){return this.caller(e,"sub")}div(e){return this.caller(e,"div")}mul(e){return this.caller(e,"mul")}mod(e){return this.caller(e,"mod")}divRound(e){return this.caller(e,"divRound")}lt(e){return this.caller(e,"lt")}lte(e){return this.caller(e,"lte")}gt(e){return this.caller(e,"gt")}gte(e){return this.caller(e,"gte")}eq(e){return this.caller(e,"eq")}cmp(e){return this.caller(e,"cmp")}sqr(){return new g0(super.sqr().toArray())}neg(){return new g0(super.neg().toArray())}abs(){return new g0(super.abs().toArray())}toTwos(e){return new g0(super.toTwos(e).toArray())}fromTwos(e){return new g0(super.fromTwos(e).toArray())}caller(e,a){let n=super[a](new g0(e));return g0.isBN(n)?new g0(n.toArray()):n}clone(){return new g0(this.toArray())}mulTo(e,a){let n=new G0.default(this.toArray()).mulTo(e,a);return new g0(n.toArray())}egcd(e){let{a,b:n,gcd:h}=new G0.default(this.toArray()).egcd(e);return{a:new g0(a.toArray()),b:new g0(n.toArray()),gcd:new g0(h.toArray())}}divmod(e,a,n){let{div:h,mod:o}=new G0.default(this.toArray()).divmod(new g0(e),a,n);return{div:new g0(h?.toArray()),mod:new g0(o?.toArray())}}maxU64(){return this.gte(this.MAX_U64)?new g0(this.MAX_U64):this}normalizeZeroToOne(){return this.isZero()?new g0(1):this}},R0=(e,a,n)=>new g0(e,a,n);R0.parseUnits=(e,a=Et)=>{let n=e==="."?"0.":e,[h="0",o="0"]=n.split("."),v=o.length;if(v>a)throw new O0(b0.CONVERTING_FAILED,`Decimal can't have more than ${a} digits.`);let x=Array.from({length:a}).fill("0");x.splice(0,v,o);let _=`${h.replaceAll(",","")}${x.join("")}`;return R0(_)};function Jr(e){return R0(e).toNumber()}function Qr(e,a){return R0(e).toHex(a)}function ti(e,a){return R0(e).toBytes(a)}import{createRequire as Qe}from"module";var tr=Qe("/"),er;try{er=tr("worker_threads").Worker}catch{}var U0=Uint8Array,T0=Uint16Array,kt=Int32Array,Ft=new U0([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Bt=new U0([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ge=new U0([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),we=function(e,a){for(var n=new T0(31),h=0;h<31;++h)n[h]=a+=1<<e[h-1];for(var o=new kt(n[30]),h=1;h<30;++h)for(var v=n[h];v<n[h+1];++v)o[v]=v-n[h]<<5|h;return{b:n,r:o}},Me=we(Ft,2),rr=Me.b,Lt=Me.r;rr[28]=258,Lt[258]=28;var Ae=we(Bt,0),ni=Ae.b,_e=Ae.r,Rt=new T0(32768);for(S=0;S<32768;++S)F0=(S&43690)>>1|(S&21845)<<1,F0=(F0&52428)>>2|(F0&13107)<<2,F0=(F0&61680)>>4|(F0&3855)<<4,Rt[S]=((F0&65280)>>8|(F0&255)<<8)>>1;var F0,S,$0=function(e,a,n){for(var h=e.length,o=0,v=new T0(a);o<h;++o)e[o]&&++v[e[o]-1];var x=new T0(a);for(o=1;o<a;++o)x[o]=x[o-1]+v[o-1]<<1;var _;if(n){_=new T0(1<<a);var A=15-a;for(o=0;o<h;++o)if(e[o])for(var E=o<<4|e[o],w=a-e[o],B=x[e[o]-1]++<<w,A0=B|(1<<w)-1;B<=A0;++B)_[Rt[B]>>A]=E}else for(_=new T0(h),o=0;o<h;++o)e[o]&&(_[o]=Rt[x[e[o]-1]++]>>15-e[o]);return _},C0=new U0(288);for(S=0;S<144;++S)C0[S]=8;var S;for(S=144;S<256;++S)C0[S]=9;var S;for(S=256;S<280;++S)C0[S]=7;var S;for(S=280;S<288;++S)C0[S]=8;var S,Q0=new U0(32);for(S=0;S<32;++S)Q0[S]=5;var S,ir=$0(C0,9,0);var nr=$0(Q0,5,0);var Ie=function(e){return(e+7)/8|0},ar=function(e,a,n){return(a==null||a<0)&&(a=0),(n==null||n>e.length)&&(n=e.length),new U0(e.subarray(a,n))};var B0=function(e,a,n){n<<=a&7;var h=a/8|0;e[h]|=n,e[h+1]|=n>>8},j0=function(e,a,n){n<<=a&7;var h=a/8|0;e[h]|=n,e[h+1]|=n>>8,e[h+2]|=n>>16},Dt=function(e,a){for(var n=[],h=0;h<e.length;++h)e[h]&&n.push({s:h,f:e[h]});var o=n.length,v=n.slice();if(!o)return{t:Se,l:0};if(o==1){var x=new U0(n[0].s+1);return x[n[0].s]=1,{t:x,l:1}}n.sort(function(I0,U){return I0.f-U.f}),n.push({s:-1,f:25001});var _=n[0],A=n[1],E=0,w=1,B=2;for(n[0]={s:-1,f:_.f+A.f,l:_,r:A};w!=o-1;)_=n[n[E].f<n[B].f?E++:B++],A=n[E!=w&&n[E].f<n[B].f?E++:B++],n[w++]={s:-1,f:_.f+A.f,l:_,r:A};for(var A0=v[0].s,h=1;h<o;++h)v[h].s>A0&&(A0=v[h].s);var w0=new T0(A0+1),N0=Ut(n[w-1],w0,0);if(N0>a){var h=0,y0=0,D0=N0-a,z0=1<<D0;for(v.sort(function(U,_0){return w0[_0.s]-w0[U.s]||U.f-_0.f});h<o;++h){var E0=v[h].s;if(w0[E0]>a)y0+=z0-(1<<N0-w0[E0]),w0[E0]=a;else break}for(y0>>=D0;y0>0;){var k0=v[h].s;w0[k0]<a?y0-=1<<a-w0[k0]++-1:++h}for(;h>=0&&y0;--h){var k=v[h].s;w0[k]==a&&(--w0[k],++y0)}N0=a}return{t:new U0(w0),l:N0}},Ut=function(e,a,n){return e.s==-1?Math.max(Ut(e.l,a,n+1),Ut(e.r,a,n+1)):a[e.s]=n},ye=function(e){for(var a=e.length;a&&!e[--a];);for(var n=new T0(++a),h=0,o=e[0],v=1,x=function(A){n[h++]=A},_=1;_<=a;++_)if(e[_]==o&&_!=a)++v;else{if(!o&&v>2){for(;v>138;v-=138)x(32754);v>2&&(x(v>10?v-11<<5|28690:v-3<<5|12305),v=0)}else if(v>3){for(x(o),--v;v>6;v-=6)x(8304);v>2&&(x(v-3<<5|8208),v=0)}for(;v--;)x(o);v=1,o=e[_]}return{c:n.subarray(0,h),n:a}},H0=function(e,a){for(var n=0,h=0;h<a.length;++h)n+=e[h]*a[h];return n},Oe=function(e,a,n){var h=n.length,o=Ie(a+2);e[o]=h&255,e[o+1]=h>>8,e[o+2]=e[o]^255,e[o+3]=e[o+1]^255;for(var v=0;v<h;++v)e[o+v+4]=n[v];return(o+4+h)*8},be=function(e,a,n,h,o,v,x,_,A,E,w){B0(a,w++,n),++o[256];for(var B=Dt(o,15),A0=B.t,w0=B.l,N0=Dt(v,15),y0=N0.t,D0=N0.l,z0=ye(A0),E0=z0.c,k0=z0.n,k=ye(y0),I0=k.c,U=k.n,_0=new T0(19),N=0;N<E0.length;++N)++_0[E0[N]&31];for(var N=0;N<I0.length;++N)++_0[I0[N]&31];for(var I=Dt(_0,7),M0=I.t,D=I.l,F=19;F>4&&!M0[ge[F-1]];--F);var p=E+5<<3,t=H0(o,C0)+H0(v,Q0)+x,i=H0(o,A0)+H0(v,y0)+x+14+3*F+H0(_0,M0)+2*_0[16]+3*_0[17]+7*_0[18];if(A>=0&&p<=t&&p<=i)return Oe(a,w,e.subarray(A,A+E));var f,s,l,d;if(B0(a,w,1+(i<t)),w+=2,i<t){f=$0(A0,w0,0),s=A0,l=$0(y0,D0,0),d=y0;var m=$0(M0,D,0);B0(a,w,k0-257),B0(a,w+5,U-1),B0(a,w+10,F-4),w+=14;for(var N=0;N<F;++N)B0(a,w+3*N,M0[ge[N]]);w+=3*F;for(var u=[E0,I0],r=0;r<2;++r)for(var c=u[r],N=0;N<c.length;++N){var y=c[N]&31;B0(a,w,m[y]),w+=M0[y],y>15&&(B0(a,w,c[N]>>5&127),w+=c[N]>>12)}}else f=ir,s=C0,l=nr,d=Q0;for(var N=0;N<_;++N){var g=h[N];if(g>255){var y=g>>18&31;j0(a,w,f[y+257]),w+=s[y+257],y>7&&(B0(a,w,g>>23&31),w+=Ft[y]);var b=g&31;j0(a,w,l[b]),w+=d[b],b>3&&(j0(a,w,g>>5&8191),w+=Bt[b])}else j0(a,w,f[g]),w+=s[g]}return j0(a,w,f[256]),w+s[256]},or=new kt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Se=new U0(0),fr=function(e,a,n,h,o,v){var x=v.z||e.length,_=new U0(h+x+5*(1+Math.ceil(x/7e3))+o),A=_.subarray(h,_.length-o),E=v.l,w=(v.r||0)&7;if(a){w&&(A[0]=v.r>>3);for(var B=or[a-1],A0=B>>13,w0=B&8191,N0=(1<<n)-1,y0=v.p||new T0(32768),D0=v.h||new T0(N0+1),z0=Math.ceil(n/3),E0=2*z0,k0=function(z){return(e[z]^e[z+1]<<z0^e[z+2]<<E0)&N0},k=new kt(25e3),I0=new T0(288),U=new T0(32),_0=0,N=0,I=v.i||0,M0=0,D=v.w||0,F=0;I+2<x;++I){var p=k0(I),t=I&32767,i=D0[p];if(y0[t]=i,D0[p]=t,D<=I){var f=x-I;if((_0>7e3||M0>24576)&&(f>423||!E)){w=be(e,A,0,k,I0,U,N,M0,F,I-F,w),M0=_0=N=0,F=I;for(var s=0;s<286;++s)I0[s]=0;for(var s=0;s<30;++s)U[s]=0}var l=2,d=0,m=w0,u=t-i&32767;if(f>2&&p==k0(I-u))for(var r=Math.min(A0,f)-1,c=Math.min(32767,I),y=Math.min(258,f);u<=c&&--m&&t!=i;){if(e[I+l]==e[I+l-u]){for(var g=0;g<y&&e[I+g]==e[I+g-u];++g);if(g>l){if(l=g,d=u,g>r)break;for(var b=Math.min(u,g-2),M=0,s=0;s<b;++s){var O=I-u+s&32767,L=y0[O],L0=O-L&32767;L0>M&&(M=L0,i=O)}}}t=i,i=y0[t],u+=t-i&32767}if(d){k[M0++]=268435456|Lt[l]<<18|_e[d];var T=Lt[l]&31,R=_e[d]&31;N+=Ft[T]+Bt[R],++I0[257+T],++U[R],D=I+l,++_0}else k[M0++]=e[I],++I0[e[I]]}}for(I=Math.max(I,D);I<x;++I)k[M0++]=e[I],++I0[e[I]];w=be(e,A,E,k,I0,U,N,M0,F,I-F,w),E||(v.r=w&7|A[w/8|0]<<3,w-=7,v.h=D0,v.p=y0,v.i=I,v.w=D)}else{for(var I=v.w||0;I<x+E;I+=65535){var Z0=I+65535;Z0>=x&&(A[w/8|0]=E,Z0=x),w=Oe(A,w+1,e.subarray(I,Z0))}v.i=x}return ar(_,0,h+Ie(w)+o)},sr=function(){for(var e=new Int32Array(256),a=0;a<256;++a){for(var n=a,h=9;--h;)n=(n&1&&-306674912)^n>>>1;e[a]=n}return e}(),ur=function(){var e=-1;return{p:function(a){for(var n=e,h=0;h<a.length;++h)n=sr[n&255^a[h]]^n>>>8;e=n},d:function(){return~e}}};var lr=function(e,a,n,h,o){if(!o&&(o={l:1},a.dictionary)){var v=a.dictionary.subarray(-32768),x=new U0(v.length+e.length);x.set(v),x.set(e,v.length),e=x,o.w=v.length}return fr(e,a.level==null?6:a.level,a.mem==null?o.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+a.mem,n,h,o)};var zt=function(e,a,n){for(;n;++a)e[a]=n,n>>>=8},hr=function(e,a){var n=a.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=a.level<2?4:a.level==9?2:0,e[9]=3,a.mtime!=0&&zt(e,4,Math.floor(new Date(a.mtime||Date.now())/1e3)),n){e[3]=8;for(var h=0;h<=n.length;++h)e[h+10]=n.charCodeAt(h)}};var cr=function(e){return 10+(e.filename?e.filename.length+1:0)};function Ne(e,a){a||(a={});var n=ur(),h=e.length;n.p(e);var o=lr(e,a,cr(a),8),v=o.length;return hr(o,a),zt(o,v-8,n.d()),zt(o,v-4,h),o}var pr=typeof TextDecoder<"u"&&new TextDecoder,dr=0;try{pr.decode(Se,{stream:!0}),dr=1}catch{}var mr=Object.defineProperty,vr=(e,a,n)=>a in e?mr(e,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[a]=n,xr=(e,a,n)=>(vr(e,typeof a!="symbol"?a+"":a,n),n);var fi=(e,a)=>{let n=[];for(let _=0;_<e.length;_+=a){let A=new Uint8Array(a);A.set(e.slice(_,_+a)),n.push(A)}let h=n[n.length-1],o=e.length%a,v=o+(8-o%8)%8,x=h.slice(0,v);return n[n.length-1]=x,n},W0=(e,a,n=!0)=>{if(e instanceof Uint8Array)return n?new Uint8Array(e):e;if(typeof e=="string"&&e.match(/^0x([0-9a-f][0-9a-f])*$/i)){let v=new Uint8Array((e.length-2)/2),x=2;for(let _=0;_<v.length;_++)v[_]=parseInt(e.substring(x,x+2),16),x+=2;return v}let o=`invalid data:${a?` ${a} -`:""} ${e}
|
|
4
|
+
If you are attempting to transform a hex value, please make sure it is being passed as a string and wrapped in quotes.`;throw new O0(b0.INVALID_DATA,o)},gr=e=>{let a=e.map(o=>o instanceof Uint8Array?o:Uint8Array.from(o)),n=a.reduce((o,v)=>o+v.length,0),h=new Uint8Array(n);return a.reduce((o,v)=>(h.set(v,o),o+v.length),0),h},ui=e=>{let a=e.map(n=>W0(n));return gr(a)},Te="0123456789abcdef";function _r(e){let a=W0(e),n="0x";for(let h=0;h<a.length;h++){let o=a[h];n+=Te[(o&240)>>4]+Te[o&15]}return n}var hi=e=>{let n=[h=>h.replace(/\s+/g,"-"),h=>h.replace(/\./g,"-"),h=>h.replace(/_/g,"-"),h=>h.replace(/-[a-z]/g,o=>o.slice(-1).toUpperCase()),h=>h.replace(/-/g,""),h=>h.replace(/^\d+/,""),h=>h[0].toUpperCase()+h.slice(1)].reduce((h,o)=>o(h),e);if(n===""){let h=`The provided string '${e}' results in an empty output after`.concat(" normalization, therefore, it can't normalize string.");throw new O0(b0.PARSE_FAILED,h)}return n},yr=37,Ee=BigInt(2**62)+BigInt(yr),br=e=>Math.floor(e/1e3),De=e=>e*1e3,wr=e=>Number(BigInt(e)-Ee),Mr=e=>String(BigInt(e)+Ee),Ar=e=>De(wr(e)),et=class extends Date{static fromTai64(e){return new et(Ar(e))}static fromUnixMilliseconds(e){return new et(e)}static fromUnixSeconds(e){return new et(De(e))}constructor(e){super(e)}toTai64(){return Mr(this.toUnixSeconds())}toUnixMilliseconds(){return this.getTime()}toUnixSeconds(){return br(this.getTime())}},Ir=et;xr(Ir,"TAI64_NULL","");function ci(e){return new Promise(a=>{setTimeout(()=>{a(!0)},e)})}function pi(e){return e!==void 0}var Le=R0(0),qt=R0(58),rt="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",tt=null;function Or(e){if(tt==null){tt={};for(let n=0;n<rt.length;n++)tt[rt[n]]=R0(n)}let a=tt[e];if(a==null)throw new O0(b0.INVALID_DATA,`invalid base58 value ${e}`);return R0(a)}function vi(e){let a=W0(e),n=R0(a),h="";for(;n.gt(Le);)h=rt[Number(n.mod(qt))]+h,n=n.div(qt);for(let o=0;o<a.length&&!a[o];o++)h=rt[0]+h;return h}function xi(e){let a=Le;for(let n=0;n<e.length;n++)a=a.mul(qt),a=a.add(Or(e[n].toString()));return a}function _i(e,a,n){let h=W0(e);if(n!=null&&n>h.length)throw new O0(b0.INVALID_DATA,"cannot slice beyond data bounds");return _r(h.slice(a??0,n??h.length))}function bi(e,a=!0){let n=e;a&&(n=e.normalize("NFC"));let h=[];for(let o=0;o<n.length;o+=1){let v=n.charCodeAt(o);if(v<128)h.push(v);else if(v<2048)h.push(v>>6|192),h.push(v&63|128);else if((v&64512)===55296){o+=1;let x=n.charCodeAt(o);if(o>=n.length||(x&64512)!==56320)throw new O0(b0.INVALID_INPUT_PARAMETERS,"Invalid UTF-8 in the input string.");let _=65536+((v&1023)<<10)+(x&1023);h.push(_>>18|240),h.push(_>>12&63|128),h.push(_>>6&63|128),h.push(_&63|128)}else h.push(v>>12|224),h.push(v>>6&63|128),h.push(v&63|128)}return new Uint8Array(h)}function V0(e,a,n,h,o){return console.log(`invalid codepoint at offset ${a}; ${e}, bytes: ${n}`),a}function Sr(e){return e.map(a=>a<=65535?String.fromCharCode(a):(a-=65536,String.fromCharCode((a>>10&1023)+55296,(a&1023)+56320))).join("")}function Nr(e){let a=W0(e,"bytes"),n=[],h=0;for(;h<a.length;){let o=a[h++];if(!(o>>7)){n.push(o);continue}let v=null,x=null;if((o&224)===192)v=1,x=127;else if((o&240)===224)v=2,x=2047;else if((o&248)===240)v=3,x=65535;else{(o&192)===128?h+=V0("UNEXPECTED_CONTINUE",h-1,a,n):h+=V0("BAD_PREFIX",h-1,a,n);continue}if(h-1+v>=a.length){h+=V0("OVERRUN",h-1,a,n);continue}let _=o&(1<<8-v-1)-1;for(let A=0;A<v;A++){let E=a[h];if((E&192)!==128){h+=V0("MISSING_CONTINUE",h,a,n),_=null;break}_=_<<6|E&63,h++}if(_!==null){if(_>1114111){h+=V0("OUT_OF_RANGE",h-1-v,a,n,_);continue}if(_>=55296&&_<=57343){h+=V0("UTF16_SURROGATE",h-1-v,a,n,_);continue}if(_<=x){h+=V0("OVERLONG",h-1-v,a,n,_);continue}n.push(_)}}return n}function wi(e){return Sr(Nr(e))}var Ai=e=>{if(!e)return"";let a=W0(e),n=Ne(a,{mtime:0}),h=String.fromCharCode.apply(null,new Uint8Array(n));return btoa(h)};function Ii(e){throw new Error("Didn't expect to get here")}function Pt(e){return new RegExp(e.source,e.flags?e.flags:(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.sticky?"y":"")+(e.unicode?"u":"")+(e.dotAll?"s":""))}function q0(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function S0(e){return function a(n){return arguments.length===0||q0(n)?a:e.apply(this,arguments)}}var Tr=S0(function(a){return a===null?"Null":a===void 0?"Undefined":Object.prototype.toString.call(a).slice(8,-1)}),K0=Tr;function it(e,a,n){if(n||(n=new Dr),Er(e))return e;var h=function(v){var x=n.get(e);if(x)return x;n.set(e,v);for(var _ in e)Object.prototype.hasOwnProperty.call(e,_)&&(v[_]=a?it(e[_],!0,n):e[_]);return v};switch(K0(e)){case"Object":return h(Object.create(Object.getPrototypeOf(e)));case"Array":return h(Array(e.length));case"Date":return new Date(e.valueOf());case"RegExp":return Pt(e);case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return e.slice();default:return e}}function Er(e){var a=typeof e;return e==null||a!="object"&&a!="function"}var Dr=function(){function e(){this.map={},this.length=0}return e.prototype.set=function(a,n){var h=this.hash(a),o=this.map[h];o||(this.map[h]=o=[]),o.push([a,n]),this.length+=1},e.prototype.hash=function(a){var n=[];for(var h in a)n.push(Object.prototype.toString.call(a[h]));return n.join()},e.prototype.get=function(a){if(this.length<=180){for(var n in this.map)for(var x=this.map[n],h=0;h<x.length;h+=1){var o=x[h];if(o[0]===a)return o[1]}return}var v=this.hash(a),x=this.map[v];if(x)for(var h=0;h<x.length;h+=1){var o=x[h];if(o[0]===a)return o[1]}},e}();var Lr=S0(function(a){return a!=null&&typeof a.clone=="function"?a.clone():it(a,!0)}),Rr=Lr;function Ct(e){return e}var Ur=S0(Ct),Re=Ur;function Y0(e){return function a(n,h){switch(arguments.length){case 0:return a;case 1:return q0(n)?a:S0(function(o){return e(n,o)});default:return q0(n)&&q0(h)?a:q0(n)?S0(function(o){return e(o,h)}):q0(h)?S0(function(o){return e(n,o)}):e(n,h)}}}function nt(e){for(var a=[],n;!(n=e.next()).done;)a.push(n.value);return a}function at(e,a,n){for(var h=0,o=n.length;h<o;){if(e(a,n[h]))return!0;h+=1}return!1}function Vt(e){var a=String(e).match(/^function (\w*)/);return a==null?"":a[1]}function P0(e,a){return Object.prototype.hasOwnProperty.call(a,e)}function zr(e,a){return e===a?e!==0||1/e===1/a:e!==e&&a!==a}var ot=typeof Object.is=="function"?Object.is:zr;var Ue=Object.prototype.toString,kr=function(){return Ue.call(arguments)==="[object Arguments]"?function(a){return Ue.call(a)==="[object Arguments]"}:function(a){return P0("callee",a)}}(),ze=kr;var Fr=!{toString:null}.propertyIsEnumerable("toString"),ke=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Fe=function(){"use strict";return arguments.propertyIsEnumerable("length")}(),Br=function(a,n){for(var h=0;h<a.length;){if(a[h]===n)return!0;h+=1}return!1},qr=typeof Object.keys=="function"&&!Fe?S0(function(a){return Object(a)!==a?[]:Object.keys(a)}):S0(function(a){if(Object(a)!==a)return[];var n,h,o=[],v=Fe&&ze(a);for(n in a)P0(n,a)&&(!v||n!=="length")&&(o[o.length]=n);if(Fr)for(h=ke.length-1;h>=0;)n=ke[h],P0(n,a)&&!Br(o,n)&&(o[o.length]=n),h-=1;return o}),Zt=qr;function Be(e,a,n,h){var o=nt(e),v=nt(a);function x(_,A){return X0(_,A,n.slice(),h.slice())}return!at(function(_,A){return!at(x,A,_)},v,o)}function X0(e,a,n,h){if(ot(e,a))return!0;var o=K0(e);if(o!==K0(a))return!1;if(typeof e["fantasy-land/equals"]=="function"||typeof a["fantasy-land/equals"]=="function")return typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](a)&&typeof a["fantasy-land/equals"]=="function"&&a["fantasy-land/equals"](e);if(typeof e.equals=="function"||typeof a.equals=="function")return typeof e.equals=="function"&&e.equals(a)&&typeof a.equals=="function"&&a.equals(e);switch(o){case"Arguments":case"Array":case"Object":if(typeof e.constructor=="function"&&Vt(e.constructor)==="Promise")return e===a;break;case"Boolean":case"Number":case"String":if(!(typeof e==typeof a&&ot(e.valueOf(),a.valueOf())))return!1;break;case"Date":if(!ot(e.valueOf(),a.valueOf()))return!1;break;case"Error":return e.name===a.name&&e.message===a.message;case"RegExp":if(!(e.source===a.source&&e.global===a.global&&e.ignoreCase===a.ignoreCase&&e.multiline===a.multiline&&e.sticky===a.sticky&&e.unicode===a.unicode))return!1;break}for(var v=n.length-1;v>=0;){if(n[v]===e)return h[v]===a;v-=1}switch(o){case"Map":return e.size!==a.size?!1:Be(e.entries(),a.entries(),n.concat([e]),h.concat([a]));case"Set":return e.size!==a.size?!1:Be(e.values(),a.values(),n.concat([e]),h.concat([a]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var x=Zt(e);if(x.length!==Zt(a).length)return!1;var _=n.concat([e]),A=h.concat([a]);for(v=x.length-1;v>=0;){var E=x[v];if(!(P0(E,a)&&X0(a[E],e[E],_,A)))return!1;v-=1}return!0}var Pr=Y0(function(a,n){return X0(a,n,[],[])}),qe=Pr;function Wt(e,a,n){var h,o;if(typeof e.indexOf=="function")switch(typeof a){case"number":if(a===0){for(h=1/a;n<e.length;){if(o=e[n],o===0&&1/o===h)return n;n+=1}return-1}else if(a!==a){for(;n<e.length;){if(o=e[n],typeof o=="number"&&o!==o)return n;n+=1}return-1}return e.indexOf(a,n);case"string":case"boolean":case"function":case"undefined":return e.indexOf(a,n);case"object":if(a===null)return e.indexOf(a,n)}for(;n<e.length;){if(qe(e[n],a))return n;n+=1}return-1}function ft(e,a){return Wt(a,e,0)>=0}var Cr=function(){function e(){this._nativeSet=typeof Set=="function"?new Set:null,this._items={}}return e.prototype.add=function(a){return!Pe(a,!0,this)},e.prototype.has=function(a){return Pe(a,!1,this)},e}();function Pe(e,a,n){var h=typeof e,o,v;switch(h){case"string":case"number":return e===0&&1/e===-1/0?n._items["-0"]?!0:(a&&(n._items["-0"]=!0),!1):n._nativeSet!==null?a?(o=n._nativeSet.size,n._nativeSet.add(e),v=n._nativeSet.size,v===o):n._nativeSet.has(e):h in n._items?e in n._items[h]?!0:(a&&(n._items[h][e]=!0),!1):(a&&(n._items[h]={},n._items[h][e]=!0),!1);case"boolean":if(h in n._items){var x=e?1:0;return n._items[h][x]?!0:(a&&(n._items[h][x]=!0),!1)}else return a&&(n._items[h]=e?[!1,!0]:[!0,!1]),!1;case"function":return n._nativeSet!==null?a?(o=n._nativeSet.size,n._nativeSet.add(e),v=n._nativeSet.size,v===o):n._nativeSet.has(e):h in n._items?ft(e,n._items[h])?!0:(a&&n._items[h].push(e),!1):(a&&(n._items[h]=[e]),!1);case"undefined":return n._items[h]?!0:(a&&(n._items[h]=!0),!1);case"object":if(e===null)return n._items.null?!0:(a&&(n._items.null=!0),!1);default:return h=Object.prototype.toString.call(e),h in n._items?ft(e,n._items[h])?!0:(a&&n._items[h].push(e),!1):(a&&(n._items[h]=[e]),!1)}}var st=Cr;var Ce=Array.isArray||function(a){return a!=null&&a.length>=0&&Object.prototype.toString.call(a)==="[object Array]"};function Gt(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function jt(e,a,n){return function(){if(arguments.length===0)return n();var h=arguments[arguments.length-1];if(!Ce(h)){for(var o=0;o<e.length;){if(typeof h[e[o]]=="function")return h[e[o]].apply(h,Array.prototype.slice.call(arguments,0,-1));o+=1}if(Gt(h)){var v=a.apply(null,Array.prototype.slice.call(arguments,0,-1));return v(h)}}return n.apply(this,arguments)}}var Ht={init:function(){return this.xf["@@transducer/init"]()},result:function(e){return this.xf["@@transducer/result"](e)}};var Vr=function(){function e(a,n){this.xf=n,this.f=a,this.set=new st}return e.prototype["@@transducer/init"]=Ht.init,e.prototype["@@transducer/result"]=Ht.result,e.prototype["@@transducer/step"]=function(a,n){return this.set.add(this.f(n))?this.xf["@@transducer/step"](a,n):a},e}();function $t(e){return function(a){return new Vr(e,a)}}var Zr=Y0(jt([],$t,function(e,a){for(var n=new st,h=[],o=0,v,x;o<a.length;)x=a[o],v=e(x),n.add(v)&&h.push(x),o+=1;return h})),Ve=Zr;var Wr=Ve(Re),Gr=Wr;export{jr as a,pe as b,b0 as c,O0 as d,me as e,g0 as f,R0 as g,Jr as h,Qr as i,ti as j,fi as k,W0 as l,gr as m,ui as n,_r as o,hi as p,Ir as q,ci as r,pi as s,vi as t,xi as u,_i as v,bi as w,wi as x,Ai as y,Ii as z,Rr as A,Gr as B};
|
|
5
|
+
//# sourceMappingURL=chunk-SBU7XQ42.js.map
|