@hinkal/common 0.0.112 → 0.0.114
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/API/API.js +58 -0
- package/API/HinkalPointsCalls.js +38 -0
- package/API/callBeefyGraphAPI.js +37 -0
- package/API/callCurveAPI.js +156 -0
- package/API/callMonitor.js +30 -0
- package/API/callOdosAPI.js +44 -0
- package/API/callOneInchAPI.js +37 -0
- package/API/callRelayer.js +32 -0
- package/API/checkRisk.js +30 -0
- package/API/dataServerCalls.js +32 -0
- package/API/fetchCommitmentsCache.js +31 -0
- package/API/fetchNullifiers.js +30 -0
- package/API/getAxelarGasEstimate.js +37 -0
- package/API/getCoingeckoPrice.js +27 -0
- package/API/getConnextReceiveFee.js +30 -0
- package/API/getGasEstimates.js +38 -0
- package/API/getRelayerURL.js +32 -0
- package/API/getServerURL.js +67 -0
- package/API/getTokenPrice.js +41 -0
- package/API/kycCalls.js +32 -0
- package/API/passwordCalls.js +36 -0
- package/API/referralProgramCalls.js +58 -0
- package/API/relayCalls.js +30 -0
- package/API/restoreSnapshots.js +32 -0
- package/API/rewardsPointsCalls.js +40 -0
- package/API/userVerifyTransactions.js +45 -0
- package/assets/{snarkjsWorkerLauncher-fuD5h_j0.js → snarkjsWorkerLauncher-CaBCnle3.js} +283 -257
- package/assets/snarkjsWorkerLogic-BAbiO5gj.js +17935 -0
- package/assets/snarkjsWorkerLogic-wHJfYCfg.js +15636 -0
- package/assets/{utxoWorkerLogic-CtFLQiAX.js → utxoWorkerLogic-BGFm-Zl2.js} +2 -2
- package/assets/{zkProofWorkerLauncher-J3Ts5_Ba.js → zkProofWorkerLauncher-BteYxRBn.js} +1 -1
- package/assets/{zkProofWorkerLogic-CPNuu61R.js → zkProofWorkerLogic-DiLbAhAo.js} +8354 -8298
- package/constants/assets.constants.js +16 -0
- package/constants/axelar.constants.js +55 -0
- package/constants/backend.constants.js +18 -0
- package/constants/beefy.registry.js +24 -0
- package/constants/chains.constants.js +204 -0
- package/constants/coingecko.constants.js +53 -0
- package/constants/contracts.constants.js +276 -0
- package/constants/crvCvx.registry.js +636 -0
- package/constants/crvDynamic.registry.js +24 -0
- package/constants/deploy-data/deploy-data-arbMainnet.json.js +7415 -0
- package/constants/deploy-data/deploy-data-avalanche.json.js +7411 -0
- package/constants/deploy-data/deploy-data-axelar1.json.js +4329 -0
- package/constants/deploy-data/deploy-data-axelar2.json.js +4329 -0
- package/constants/deploy-data/deploy-data-base.json.js +8425 -0
- package/constants/deploy-data/deploy-data-blast.json.js +9600 -0
- package/constants/deploy-data/deploy-data-bnbMainnet.json.js +6877 -0
- package/constants/deploy-data/deploy-data-ethMainnet.json.js +11427 -0
- package/constants/deploy-data/deploy-data-localhost.json.js +13283 -0
- package/constants/deploy-data/deploy-data-optimism.json.js +7417 -0
- package/constants/deploy-data/deploy-data-polygon.json.js +7439 -0
- package/constants/fees.constants.js +57 -0
- package/constants/kyc.constants.js +118 -0
- package/constants/lido.constants.js +13 -0
- package/constants/pendle.registry.js +253 -0
- package/constants/protocol.constants.js +26 -0
- package/constants/reorg-depths.constants.js +15 -0
- package/constants/rewards.constants.js +27 -0
- package/constants/server.constants.js +157 -0
- package/constants/token-data/ERC20Registry.js +85 -0
- package/constants/token-data/arbMainnetRegistry.json.js +946 -0
- package/constants/token-data/arbMainnetRegistryFixed.json.js +856 -0
- package/constants/token-data/avalancheRegistry.json.js +591 -0
- package/constants/token-data/avalancheRegistryFixed.json.js +591 -0
- package/constants/token-data/baseRegistry.json.js +490 -0
- package/constants/token-data/baseRegistryFixed.json.js +463 -0
- package/constants/token-data/blastRegistry.json.js +137 -0
- package/constants/token-data/blastRegistryFixed.json.js +137 -0
- package/constants/token-data/bnbMainnetRegistry.json.js +973 -0
- package/constants/token-data/bnbMainnetRegistryFixed.json.js +973 -0
- package/constants/token-data/coingeckoRegistry.json.js +115623 -0
- package/constants/token-data/ethMainnetRegistry.json.js +2700 -0
- package/constants/token-data/ethMainnetRegistryFixed.json.js +2251 -0
- package/constants/token-data/index.js +6 -0
- package/constants/token-data/localhostRegistry.json.js +2768 -0
- package/constants/token-data/optimismRegistry.json.js +1455 -0
- package/constants/token-data/optimismRegistryFixed.json.js +1392 -0
- package/constants/token-data/polygonRegistry.json.js +1327 -0
- package/constants/token-data/polygonRegistryFixed.json.js +1255 -0
- package/constants/token-data/popularTokens.constants.js +14 -0
- package/constants/token-data/tokenPricing.consts.js +8 -0
- package/constants/vite.constants.js +29 -0
- package/crypto/babyJub.js +15 -0
- package/crypto/poseidon.js +26 -0
- package/crypto/preProcessing.js +9 -0
- package/data-structures/Hinkal/Hinkal.js +299 -0
- package/data-structures/Hinkal/hinkalActionBeefy.js +101 -0
- package/data-structures/Hinkal/hinkalActionConvex.js +83 -0
- package/data-structures/Hinkal/hinkalActionCurve.js +112 -0
- package/data-structures/Hinkal/hinkalActionLidoEth.js +91 -0
- package/data-structures/Hinkal/hinkalActionPendle.js +140 -0
- package/data-structures/Hinkal/hinkalActionPendleLP.js +96 -0
- package/data-structures/Hinkal/hinkalActionStake.js +138 -0
- package/data-structures/Hinkal/hinkalActionVolatile.js +112 -0
- package/data-structures/Hinkal/hinkalDeposit.js +95 -0
- package/data-structures/Hinkal/hinkalGetZkMeProvider.js +47 -0
- package/data-structures/Hinkal/hinkalPrivateWallet.js +66 -0
- package/data-structures/Hinkal/hinkalSwap.js +98 -0
- package/data-structures/Hinkal/hinkalTransfer.js +5 -0
- package/data-structures/Hinkal/hinkalWithdraw.js +91 -0
- package/data-structures/Hinkal/resetMerkleTrees.js +49 -0
- package/data-structures/MultiThreadedUtxoUtils/MultiThreadedUtxoUtils.js +83 -0
- package/data-structures/ValueCache/ValueCache.js +25 -0
- package/data-structures/crypto-keys/decodeUTXO.js +40 -0
- package/data-structures/crypto-keys/encryptDecryptUtxo.js +41 -0
- package/data-structures/crypto-keys/keyUtils.js +10 -0
- package/data-structures/crypto-keys/keys.js +90 -0
- package/data-structures/custom-token-registry/CustomTokenRegistry.js +33 -0
- package/data-structures/event-service/AbstractAccessTokenSnapshotService.js +131 -0
- package/data-structures/event-service/AbstractCommitmentsSnapshotService.js +132 -0
- package/data-structures/event-service/AbstractEventService.js +118 -0
- package/data-structures/event-service/AbstractNullifierSnapshotService.js +59 -0
- package/data-structures/event-service/AbstractSnapshotService.js +35 -0
- package/data-structures/merkle-tree/MerkleTree.js +177 -0
- package/data-structures/merkle-tree/MerkleTreeIncompleteError.js +8 -0
- package/data-structures/snapshot/ClientAccessTokenSnapshotService.js +48 -0
- package/data-structures/snapshot/ClientCommitmentsSnapshotService.js +47 -0
- package/data-structures/snapshot/ClientNullifierSnapshotService.js +44 -0
- package/data-structures/token-price-fetcher/TokenChecker.js +29 -0
- package/data-structures/token-price-fetcher/TokenPriceFetcher.js +218 -0
- package/data-structures/transactions-manager/TransactionsManager.js +194 -0
- package/data-structures/transactions-manager/history/getBeefyData.js +68 -0
- package/data-structures/transactions-manager/history/getConvexData.js +57 -0
- package/data-structures/transactions-manager/history/getCurveData.js +97 -0
- package/data-structures/transactions-manager/history/getDepositData.js +36 -0
- package/data-structures/transactions-manager/history/getLidoData.js +44 -0
- package/data-structures/transactions-manager/history/getPendleData.js +59 -0
- package/data-structures/transactions-manager/history/getSwapData.js +43 -0
- package/data-structures/transactions-manager/history/getTxDetails.js +74 -0
- package/data-structures/transactions-manager/history/getVolatileData.js +75 -0
- package/data-structures/transactions-manager/history/history.types.js +62 -0
- package/data-structures/transactions-manager/history/history.utils.js +8 -0
- package/data-structures/utxo/Utxo.js +134 -0
- package/data-structures/volatile-helper/VolatileHelper.js +181 -0
- package/error-handling/customErrors/ErrorWithAmount.js +9 -0
- package/error-handling/customErrors/FeeOverTransactionValueError.js +9 -0
- package/error-handling/customErrors/customErrors.helpers.js +21 -0
- package/error-handling/error-codes.constants.js +184 -0
- package/error-handling/get-error.message.js +53 -0
- package/error-handling/handleErrorRestore.js +35 -0
- package/error-handling/logError.js +7 -0
- package/error-handling/types.js +4 -0
- package/externalABIs/BUSD.js +519 -0
- package/externalABIs/BabPassport.json.js +24 -0
- package/externalABIs/BeefyRouterAbi.json.js +1022 -0
- package/externalABIs/BeefyStrategyAbi.json.js +1423 -0
- package/externalABIs/BeefyVaultAbi.json.js +570 -0
- package/externalABIs/BeefyZapAbi.json.js +208 -0
- package/externalABIs/BeefyZapOneInchAbi.json.js +340 -0
- package/externalABIs/ConvexBoosterAbi.json.js +674 -0
- package/externalABIs/ConvexBoosterAbiMainnet.json.js +1002 -0
- package/externalABIs/ConvexRewardPoolAbi.json.js +883 -0
- package/externalABIs/CurveReadingWrapperAbi.json.js +1422 -0
- package/externalABIs/CurveWrappedMainPool.json.js +1136 -0
- package/externalABIs/CurveZap.json.js +262 -0
- package/externalABIs/CvxCrvUtilities.json.js +264 -0
- package/externalABIs/DAI.js +334 -0
- package/externalABIs/ERC20.json.js +291 -0
- package/externalABIs/GalxePassport.json.js +41 -0
- package/externalABIs/IQuoterV2.json.js +205 -0
- package/externalABIs/ISwapRouter.json.js +568 -0
- package/externalABIs/IUniswapV3Factory.json.js +201 -0
- package/externalABIs/IUniswapV3Pool.json.js +999 -0
- package/externalABIs/LidoStEthAbi.json.js +1603 -0
- package/externalABIs/LidoStMaticAbi.json.js +1764 -0
- package/externalABIs/LidoStakeManagerAbi.json.js +2082 -0
- package/externalABIs/LidoWithdrawalQueueERC721Abi.json.js +2030 -0
- package/externalABIs/LidoWstEthAbi.json.js +480 -0
- package/externalABIs/OptimismGasPriceOracle.json.js +206 -0
- package/externalABIs/PendleRouterAbi.json.js +173 -0
- package/externalABIs/PoLidoNftAbi.json.js +701 -0
- package/externalABIs/SanctionsList.js +89 -0
- package/externalABIs/USDC.js +721 -0
- package/externalABIs/USDR.js +346 -0
- package/externalABIs/USDR3CRV.js +542 -0
- package/externalABIs/USDT.js +393 -0
- package/externalABIs/UniswapV2PoolAbi.json.js +80 -0
- package/externalABIs/WETH.js +156 -0
- package/externalABIs/amToken.js +350 -0
- package/externalABIs/transactionsProver.json.js +39 -0
- package/functions/kyc/authentoHelper.js +42 -0
- package/functions/kyc/passportHelper.js +39 -0
- package/functions/kyc/zkMeHelper.js +56 -0
- package/functions/pre-transaction/getFlatFees.js +203 -0
- package/functions/pre-transaction/interaction-to-action.js +57 -0
- package/functions/pre-transaction/outputUtxoProcessing.js +45 -0
- package/functions/pre-transaction/process-gas-estimates.js +57 -0
- package/functions/pre-transaction/processAmountChanges.js +229 -0
- package/functions/private-wallet/emporium.helpers.js +19 -0
- package/functions/private-wallet/opProducer.js +24 -0
- package/functions/protocols/convex.protocols.js +41 -0
- package/functions/protocols/curve.protocols.js +45 -0
- package/functions/protocols/pendle.helpers.js +108 -0
- package/functions/snarkjs/common.snarkjs.js +96 -0
- package/functions/snarkjs/constant.js +211 -0
- package/functions/snarkjs/constructEmporiumProof.js +105 -0
- package/functions/snarkjs/constructGeneralZkProof.js +129 -0
- package/functions/snarkjs/generateCircomData.js +60 -0
- package/functions/snarkjs/generateZkProof.js +18 -0
- package/functions/snarkjs/getZKFiles.js +30 -0
- package/functions/staking/index.js +40 -0
- package/functions/utils/amounts.utils.js +70 -0
- package/functions/utils/axelar.utils.js +38 -0
- package/functions/utils/cacheFunctions.js +67 -0
- package/functions/utils/caseInsensitive.utils.js +6 -0
- package/functions/utils/convertIntegrationProviderToExternalActionId.js +16 -0
- package/functions/utils/create-provider.js +5 -0
- package/functions/utils/enum.utils.js +14 -0
- package/functions/utils/erc20tokenFunctions.js +20 -0
- package/functions/utils/evmNetworkFunctions.js +29 -0
- package/functions/utils/external-action.utils.js +61 -0
- package/functions/utils/getDataFromTransaction.js +105 -0
- package/functions/utils/memoize.utils.js +14 -0
- package/functions/utils/nickname.utils.js +7 -0
- package/functions/utils/process.utils.js +4 -0
- package/functions/utils/reloadPage.js +4 -0
- package/functions/utils/requireEnv.js +7 -0
- package/functions/utils/resolve-sync.utils.js +22 -0
- package/functions/utils/serialize.utils.js +4 -0
- package/functions/utils/string.utils.js +14 -0
- package/functions/utils/time.utils.js +8 -0
- package/functions/utils/userAgent.js +15 -0
- package/functions/utils/volatile-patcher.utils.js +40 -0
- package/functions/web3/etherFunctions.js +41 -0
- package/functions/web3/events/balanceChangedHandler.js +10 -0
- package/functions/web3/events/getInputUtxoAndBalance.js +72 -0
- package/functions/web3/events/getShieldedBalance.js +107 -0
- package/functions/web3/events/web3RetrieveEvents.js +9 -0
- package/functions/web3/functionCalls/accessTokenCalls.js +48 -0
- package/functions/web3/functionCalls/approveToken.js +153 -0
- package/functions/web3/functionCalls/estimateGasRelayer.js +18 -0
- package/functions/web3/functionCalls/transactCallDirect.js +60 -0
- package/functions/web3/functionCalls/transactCallRelayer.js +42 -0
- package/functions/web3/odosAPI.js +65 -0
- package/functions/web3/oneInchAPI.js +61 -0
- package/functions/web3/runContractFunction.js +95 -0
- package/functions/web3/uniswapAPI.js +97 -0
- package/index.js +642 -455
- package/package.json +2 -2
- package/types/beefy.types.js +21 -0
- package/types/circom-data.types.js +22 -0
- package/types/curve.types.js +25 -0
- package/types/ethereum-network.types.js +4 -0
- package/types/external-action.types.js +4 -0
- package/types/hinkal.stake.types.js +4 -0
- package/types/hinkal.types.js +15 -0
- package/types/kyc.types.js +13 -0
- package/types/pendle.types.js +15 -0
- package/types/rewards.types.js +27 -0
- package/types/slippage.types.js +15 -0
- package/types/time.types.js +58 -0
- package/types/token.types.js +4 -0
- package/types/transactions.types.js +36 -0
- package/webworker/performTaskWithWorker.js +62 -0
- package/webworker/snarkjsWorker/snarkjsWorker.types.js +4 -0
- package/{snarkjsWorkerLogic-CVna_BW9.mjs → webworker/snarkjsWorker/snarkjsWorkerLogic.js} +1 -1
- package/webworker/utxoWorker/utxoWorker.types.js +4 -0
- package/webworker/utxoWorker/utxoWorkerLogic.js +70 -0
- package/webworker/worker.registry.js +4 -0
- package/webworker/workerFactory.js +42 -0
- package/{workerProxy-BDj498Ht.mjs → webworker/workerProxy.js} +1 -1
- package/webworker/zkProofWorker/zkProofWorker.types.js +4 -0
- package/webworker/zkProofWorker/zkProofWorkerLogic.js +66 -0
- package/assets/snarkjsWorkerLogic-B6N4z_eM.js +0 -12136
- package/assets/snarkjsWorkerLogic-Fv0M38Mc.js +0 -12087
- package/index-DXElTGy9.mjs +0 -254449
- package/utxoWorkerLogic-B1Hh-bq4.mjs +0 -64
- package/zkProofWorkerLogic-D9rxuuiK.mjs +0 -60
|
@@ -1,78 +1,100 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var it = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function Yr(f) {
|
|
3
|
+
return f && f.__esModule && Object.prototype.hasOwnProperty.call(f, "default") ? f.default : f;
|
|
4
|
+
}
|
|
5
|
+
function ot(f) {
|
|
6
|
+
if (f.__esModule)
|
|
7
|
+
return f;
|
|
8
|
+
var h = f.default;
|
|
9
|
+
if (typeof h == "function") {
|
|
10
|
+
var s = function y() {
|
|
11
|
+
return this instanceof y ? Reflect.construct(h, arguments, this.constructor) : h.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
s.prototype = h.prototype;
|
|
14
|
+
} else
|
|
15
|
+
s = {};
|
|
16
|
+
return Object.defineProperty(s, "__esModule", { value: !0 }), Object.keys(f).forEach(function(y) {
|
|
17
|
+
var w = Object.getOwnPropertyDescriptor(f, y);
|
|
18
|
+
Object.defineProperty(s, y, w.get ? w : {
|
|
19
|
+
enumerable: !0,
|
|
20
|
+
get: function() {
|
|
21
|
+
return f[y];
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}), s;
|
|
3
25
|
}
|
|
4
26
|
var xr = {}, J = {};
|
|
5
27
|
J.byteLength = Vr;
|
|
6
28
|
J.toByteArray = Jr;
|
|
7
29
|
J.fromByteArray = Kr;
|
|
8
|
-
var
|
|
9
|
-
for (var
|
|
10
|
-
|
|
30
|
+
var L = [], R = [], qr = typeof Uint8Array < "u" ? Uint8Array : Array, v = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
31
|
+
for (var G = 0, Hr = v.length; G < Hr; ++G)
|
|
32
|
+
L[G] = v[G], R[v.charCodeAt(G)] = G;
|
|
11
33
|
R[45] = 62;
|
|
12
34
|
R[95] = 63;
|
|
13
|
-
function
|
|
14
|
-
var
|
|
15
|
-
if (
|
|
35
|
+
function dr(f) {
|
|
36
|
+
var h = f.length;
|
|
37
|
+
if (h % 4 > 0)
|
|
16
38
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
var
|
|
20
|
-
return [
|
|
39
|
+
var s = f.indexOf("=");
|
|
40
|
+
s === -1 && (s = h);
|
|
41
|
+
var y = s === h ? 0 : 4 - s % 4;
|
|
42
|
+
return [s, y];
|
|
21
43
|
}
|
|
22
|
-
function Vr(
|
|
23
|
-
var
|
|
24
|
-
return (
|
|
44
|
+
function Vr(f) {
|
|
45
|
+
var h = dr(f), s = h[0], y = h[1];
|
|
46
|
+
return (s + y) * 3 / 4 - y;
|
|
25
47
|
}
|
|
26
|
-
function Xr(
|
|
27
|
-
return (
|
|
48
|
+
function Xr(f, h, s) {
|
|
49
|
+
return (h + s) * 3 / 4 - s;
|
|
28
50
|
}
|
|
29
|
-
function Jr(
|
|
30
|
-
var
|
|
31
|
-
for (
|
|
32
|
-
|
|
33
|
-
return
|
|
51
|
+
function Jr(f) {
|
|
52
|
+
var h, s = dr(f), y = s[0], w = s[1], a = new qr(Xr(f, y, w)), p = 0, o = w > 0 ? y - 4 : y, d;
|
|
53
|
+
for (d = 0; d < o; d += 4)
|
|
54
|
+
h = R[f.charCodeAt(d)] << 18 | R[f.charCodeAt(d + 1)] << 12 | R[f.charCodeAt(d + 2)] << 6 | R[f.charCodeAt(d + 3)], a[p++] = h >> 16 & 255, a[p++] = h >> 8 & 255, a[p++] = h & 255;
|
|
55
|
+
return w === 2 && (h = R[f.charCodeAt(d)] << 2 | R[f.charCodeAt(d + 1)] >> 4, a[p++] = h & 255), w === 1 && (h = R[f.charCodeAt(d)] << 10 | R[f.charCodeAt(d + 1)] << 4 | R[f.charCodeAt(d + 2)] >> 2, a[p++] = h >> 8 & 255, a[p++] = h & 255), a;
|
|
34
56
|
}
|
|
35
|
-
function zr(
|
|
36
|
-
return
|
|
57
|
+
function zr(f) {
|
|
58
|
+
return L[f >> 18 & 63] + L[f >> 12 & 63] + L[f >> 6 & 63] + L[f & 63];
|
|
37
59
|
}
|
|
38
|
-
function Qr(
|
|
39
|
-
for (var
|
|
40
|
-
|
|
41
|
-
return
|
|
60
|
+
function Qr(f, h, s) {
|
|
61
|
+
for (var y, w = [], a = h; a < s; a += 3)
|
|
62
|
+
y = (f[a] << 16 & 16711680) + (f[a + 1] << 8 & 65280) + (f[a + 2] & 255), w.push(zr(y));
|
|
63
|
+
return w.join("");
|
|
42
64
|
}
|
|
43
|
-
function Kr(
|
|
44
|
-
for (var
|
|
45
|
-
|
|
46
|
-
return
|
|
47
|
-
|
|
48
|
-
)) :
|
|
49
|
-
|
|
50
|
-
)),
|
|
65
|
+
function Kr(f) {
|
|
66
|
+
for (var h, s = f.length, y = s % 3, w = [], a = 16383, p = 0, o = s - y; p < o; p += a)
|
|
67
|
+
w.push(Qr(f, p, p + a > o ? o : p + a));
|
|
68
|
+
return y === 1 ? (h = f[s - 1], w.push(
|
|
69
|
+
L[h >> 2] + L[h << 4 & 63] + "=="
|
|
70
|
+
)) : y === 2 && (h = (f[s - 2] << 8) + f[s - 1], w.push(
|
|
71
|
+
L[h >> 10] + L[h >> 4 & 63] + L[h << 2 & 63] + "="
|
|
72
|
+
)), w.join("");
|
|
51
73
|
}
|
|
52
74
|
var er = {};
|
|
53
75
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
54
|
-
er.read = function(
|
|
55
|
-
var a,
|
|
56
|
-
for (A += k, a = U & (1 << -F) - 1, U >>= -F, F += o; F > 0; a = a * 256 +
|
|
76
|
+
er.read = function(f, h, s, y, w) {
|
|
77
|
+
var a, p, o = w * 8 - y - 1, d = (1 << o) - 1, C = d >> 1, F = -7, A = s ? w - 1 : 0, k = s ? -1 : 1, U = f[h + A];
|
|
78
|
+
for (A += k, a = U & (1 << -F) - 1, U >>= -F, F += o; F > 0; a = a * 256 + f[h + A], A += k, F -= 8)
|
|
57
79
|
;
|
|
58
|
-
for (
|
|
80
|
+
for (p = a & (1 << -F) - 1, a >>= -F, F += y; F > 0; p = p * 256 + f[h + A], A += k, F -= 8)
|
|
59
81
|
;
|
|
60
82
|
if (a === 0)
|
|
61
83
|
a = 1 - C;
|
|
62
84
|
else {
|
|
63
|
-
if (a ===
|
|
64
|
-
return
|
|
65
|
-
|
|
85
|
+
if (a === d)
|
|
86
|
+
return p ? NaN : (U ? -1 : 1) * (1 / 0);
|
|
87
|
+
p = p + Math.pow(2, y), a = a - C;
|
|
66
88
|
}
|
|
67
|
-
return (U ? -1 : 1) *
|
|
89
|
+
return (U ? -1 : 1) * p * Math.pow(2, a - y);
|
|
68
90
|
};
|
|
69
|
-
er.write = function(
|
|
70
|
-
var
|
|
71
|
-
for (
|
|
91
|
+
er.write = function(f, h, s, y, w, a) {
|
|
92
|
+
var p, o, d, C = a * 8 - w - 1, F = (1 << C) - 1, A = F >> 1, k = w === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, U = y ? 0 : a - 1, Y = y ? 1 : -1, q = h < 0 || h === 0 && 1 / h < 0 ? 1 : 0;
|
|
93
|
+
for (h = Math.abs(h), isNaN(h) || h === 1 / 0 ? (o = isNaN(h) ? 1 : 0, p = F) : (p = Math.floor(Math.log(h) / Math.LN2), h * (d = Math.pow(2, -p)) < 1 && (p--, d *= 2), p + A >= 1 ? h += k / d : h += k * Math.pow(2, 1 - A), h * d >= 2 && (p++, d /= 2), p + A >= F ? (o = 0, p = F) : p + A >= 1 ? (o = (h * d - 1) * Math.pow(2, w), p = p + A) : (o = h * Math.pow(2, A - 1) * Math.pow(2, w), p = 0)); w >= 8; f[s + U] = o & 255, U += Y, o /= 256, w -= 8)
|
|
72
94
|
;
|
|
73
|
-
for (
|
|
95
|
+
for (p = p << w | o, C += w; C > 0; f[s + U] = p & 255, U += Y, p /= 256, C -= 8)
|
|
74
96
|
;
|
|
75
|
-
|
|
97
|
+
f[s + U - Y] |= q * 128;
|
|
76
98
|
};
|
|
77
99
|
/*!
|
|
78
100
|
* The buffer module from node.js, for the browser.
|
|
@@ -80,11 +102,11 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
80
102
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
81
103
|
* @license MIT
|
|
82
104
|
*/
|
|
83
|
-
(function(
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
|
|
105
|
+
(function(f) {
|
|
106
|
+
const h = J, s = er, y = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
107
|
+
f.Buffer = o, f.SlowBuffer = Fr, f.INSPECT_MAX_BYTES = 50;
|
|
108
|
+
const w = 2147483647;
|
|
109
|
+
f.kMaxLength = w, o.TYPED_ARRAY_SUPPORT = a(), !o.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
|
|
88
110
|
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
89
111
|
);
|
|
90
112
|
function a() {
|
|
@@ -110,8 +132,8 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
110
132
|
return this.byteOffset;
|
|
111
133
|
}
|
|
112
134
|
});
|
|
113
|
-
function
|
|
114
|
-
if (e >
|
|
135
|
+
function p(e) {
|
|
136
|
+
if (e > w)
|
|
115
137
|
throw new RangeError('The value "' + e + '" is invalid for option "size"');
|
|
116
138
|
const r = new Uint8Array(e);
|
|
117
139
|
return Object.setPrototypeOf(r, o.prototype), r;
|
|
@@ -124,10 +146,10 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
124
146
|
);
|
|
125
147
|
return A(e);
|
|
126
148
|
}
|
|
127
|
-
return
|
|
149
|
+
return d(e, r, t);
|
|
128
150
|
}
|
|
129
151
|
o.poolSize = 8192;
|
|
130
|
-
function
|
|
152
|
+
function d(e, r, t) {
|
|
131
153
|
if (typeof e == "string")
|
|
132
154
|
return k(e, r);
|
|
133
155
|
if (ArrayBuffer.isView(e))
|
|
@@ -136,7 +158,7 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
136
158
|
throw new TypeError(
|
|
137
159
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e
|
|
138
160
|
);
|
|
139
|
-
if (
|
|
161
|
+
if (b(e, ArrayBuffer) || e && b(e.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (b(e, SharedArrayBuffer) || e && b(e.buffer, SharedArrayBuffer)))
|
|
140
162
|
return q(e, r, t);
|
|
141
163
|
if (typeof e == "number")
|
|
142
164
|
throw new TypeError(
|
|
@@ -155,7 +177,7 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
155
177
|
);
|
|
156
178
|
}
|
|
157
179
|
o.from = function(e, r, t) {
|
|
158
|
-
return
|
|
180
|
+
return d(e, r, t);
|
|
159
181
|
}, Object.setPrototypeOf(o.prototype, Uint8Array.prototype), Object.setPrototypeOf(o, Uint8Array);
|
|
160
182
|
function C(e) {
|
|
161
183
|
if (typeof e != "number")
|
|
@@ -164,13 +186,13 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
164
186
|
throw new RangeError('The value "' + e + '" is invalid for option "size"');
|
|
165
187
|
}
|
|
166
188
|
function F(e, r, t) {
|
|
167
|
-
return C(e), e <= 0 ?
|
|
189
|
+
return C(e), e <= 0 ? p(e) : r !== void 0 ? typeof t == "string" ? p(e).fill(r, t) : p(e).fill(r) : p(e);
|
|
168
190
|
}
|
|
169
191
|
o.alloc = function(e, r, t) {
|
|
170
192
|
return F(e, r, t);
|
|
171
193
|
};
|
|
172
194
|
function A(e) {
|
|
173
|
-
return C(e),
|
|
195
|
+
return C(e), p(e < 0 ? 0 : z(e) | 0);
|
|
174
196
|
}
|
|
175
197
|
o.allocUnsafe = function(e) {
|
|
176
198
|
return A(e);
|
|
@@ -181,18 +203,18 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
181
203
|
if ((typeof r != "string" || r === "") && (r = "utf8"), !o.isEncoding(r))
|
|
182
204
|
throw new TypeError("Unknown encoding: " + r);
|
|
183
205
|
const t = nr(e, r) | 0;
|
|
184
|
-
let n =
|
|
206
|
+
let n = p(t);
|
|
185
207
|
const i = n.write(e, r);
|
|
186
208
|
return i !== t && (n = n.slice(0, i)), n;
|
|
187
209
|
}
|
|
188
210
|
function U(e) {
|
|
189
|
-
const r = e.length < 0 ? 0 : z(e.length) | 0, t =
|
|
211
|
+
const r = e.length < 0 ? 0 : z(e.length) | 0, t = p(r);
|
|
190
212
|
for (let n = 0; n < r; n += 1)
|
|
191
213
|
t[n] = e[n] & 255;
|
|
192
214
|
return t;
|
|
193
215
|
}
|
|
194
216
|
function Y(e) {
|
|
195
|
-
if (
|
|
217
|
+
if (b(e, Uint8Array)) {
|
|
196
218
|
const r = new Uint8Array(e);
|
|
197
219
|
return q(r.buffer, r.byteOffset, r.byteLength);
|
|
198
220
|
}
|
|
@@ -208,17 +230,17 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
208
230
|
}
|
|
209
231
|
function Ir(e) {
|
|
210
232
|
if (o.isBuffer(e)) {
|
|
211
|
-
const r = z(e.length) | 0, t =
|
|
233
|
+
const r = z(e.length) | 0, t = p(r);
|
|
212
234
|
return t.length === 0 || e.copy(t, 0, 0, r), t;
|
|
213
235
|
}
|
|
214
236
|
if (e.length !== void 0)
|
|
215
|
-
return typeof e.length != "number" || Z(e.length) ?
|
|
237
|
+
return typeof e.length != "number" || Z(e.length) ? p(0) : U(e);
|
|
216
238
|
if (e.type === "Buffer" && Array.isArray(e.data))
|
|
217
239
|
return U(e.data);
|
|
218
240
|
}
|
|
219
241
|
function z(e) {
|
|
220
|
-
if (e >=
|
|
221
|
-
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" +
|
|
242
|
+
if (e >= w)
|
|
243
|
+
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + w.toString(16) + " bytes");
|
|
222
244
|
return e | 0;
|
|
223
245
|
}
|
|
224
246
|
function Fr(e) {
|
|
@@ -227,14 +249,14 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
227
249
|
o.isBuffer = function(r) {
|
|
228
250
|
return r != null && r._isBuffer === !0 && r !== o.prototype;
|
|
229
251
|
}, o.compare = function(r, t) {
|
|
230
|
-
if (
|
|
252
|
+
if (b(r, Uint8Array) && (r = o.from(r, r.offset, r.byteLength)), b(t, Uint8Array) && (t = o.from(t, t.offset, t.byteLength)), !o.isBuffer(r) || !o.isBuffer(t))
|
|
231
253
|
throw new TypeError(
|
|
232
254
|
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
233
255
|
);
|
|
234
256
|
if (r === t)
|
|
235
257
|
return 0;
|
|
236
258
|
let n = r.length, i = t.length;
|
|
237
|
-
for (let u = 0,
|
|
259
|
+
for (let u = 0, c = Math.min(n, i); u < c; ++u)
|
|
238
260
|
if (r[u] !== t[u]) {
|
|
239
261
|
n = r[u], i = t[u];
|
|
240
262
|
break;
|
|
@@ -269,25 +291,25 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
269
291
|
const i = o.allocUnsafe(t);
|
|
270
292
|
let u = 0;
|
|
271
293
|
for (n = 0; n < r.length; ++n) {
|
|
272
|
-
let
|
|
273
|
-
if (
|
|
274
|
-
u +
|
|
294
|
+
let c = r[n];
|
|
295
|
+
if (b(c, Uint8Array))
|
|
296
|
+
u + c.length > i.length ? (o.isBuffer(c) || (c = o.from(c)), c.copy(i, u)) : Uint8Array.prototype.set.call(
|
|
275
297
|
i,
|
|
276
|
-
|
|
298
|
+
c,
|
|
277
299
|
u
|
|
278
300
|
);
|
|
279
|
-
else if (o.isBuffer(
|
|
280
|
-
|
|
301
|
+
else if (o.isBuffer(c))
|
|
302
|
+
c.copy(i, u);
|
|
281
303
|
else
|
|
282
304
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
283
|
-
u +=
|
|
305
|
+
u += c.length;
|
|
284
306
|
}
|
|
285
307
|
return i;
|
|
286
308
|
};
|
|
287
309
|
function nr(e, r) {
|
|
288
310
|
if (o.isBuffer(e))
|
|
289
311
|
return e.length;
|
|
290
|
-
if (ArrayBuffer.isView(e) ||
|
|
312
|
+
if (ArrayBuffer.isView(e) || b(e, ArrayBuffer))
|
|
291
313
|
return e.byteLength;
|
|
292
314
|
if (typeof e != "string")
|
|
293
315
|
throw new TypeError(
|
|
@@ -334,7 +356,7 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
334
356
|
case "utf-8":
|
|
335
357
|
return ur(this, r, t);
|
|
336
358
|
case "ascii":
|
|
337
|
-
return
|
|
359
|
+
return Lr(this, r, t);
|
|
338
360
|
case "latin1":
|
|
339
361
|
case "binary":
|
|
340
362
|
return Mr(this, r, t);
|
|
@@ -386,10 +408,10 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
386
408
|
return this === r ? !0 : o.compare(this, r) === 0;
|
|
387
409
|
}, o.prototype.inspect = function() {
|
|
388
410
|
let r = "";
|
|
389
|
-
const t =
|
|
411
|
+
const t = f.INSPECT_MAX_BYTES;
|
|
390
412
|
return r = this.toString("hex", 0, t).replace(/(.{2})/g, "$1 ").trim(), this.length > t && (r += " ... "), "<Buffer " + r + ">";
|
|
391
|
-
},
|
|
392
|
-
if (
|
|
413
|
+
}, y && (o.prototype[y] = o.prototype.inspect), o.prototype.compare = function(r, t, n, i, u) {
|
|
414
|
+
if (b(r, Uint8Array) && (r = o.from(r, r.offset, r.byteLength)), !o.isBuffer(r))
|
|
393
415
|
throw new TypeError(
|
|
394
416
|
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof r
|
|
395
417
|
);
|
|
@@ -403,14 +425,14 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
403
425
|
return 1;
|
|
404
426
|
if (t >>>= 0, n >>>= 0, i >>>= 0, u >>>= 0, this === r)
|
|
405
427
|
return 0;
|
|
406
|
-
let
|
|
407
|
-
const E = Math.min(
|
|
408
|
-
for (let
|
|
409
|
-
if (
|
|
410
|
-
|
|
428
|
+
let c = u - i, l = n - t;
|
|
429
|
+
const E = Math.min(c, l), B = this.slice(i, u), g = r.slice(t, n);
|
|
430
|
+
for (let x = 0; x < E; ++x)
|
|
431
|
+
if (B[x] !== g[x]) {
|
|
432
|
+
c = B[x], l = g[x];
|
|
411
433
|
break;
|
|
412
434
|
}
|
|
413
|
-
return
|
|
435
|
+
return c < l ? -1 : l < c ? 1 : 0;
|
|
414
436
|
};
|
|
415
437
|
function ir(e, r, t, n, i) {
|
|
416
438
|
if (e.length === 0)
|
|
@@ -431,34 +453,34 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
431
453
|
throw new TypeError("val must be string, number or Buffer");
|
|
432
454
|
}
|
|
433
455
|
function or(e, r, t, n, i) {
|
|
434
|
-
let u = 1,
|
|
456
|
+
let u = 1, c = e.length, l = r.length;
|
|
435
457
|
if (n !== void 0 && (n = String(n).toLowerCase(), n === "ucs2" || n === "ucs-2" || n === "utf16le" || n === "utf-16le")) {
|
|
436
458
|
if (e.length < 2 || r.length < 2)
|
|
437
459
|
return -1;
|
|
438
|
-
u = 2,
|
|
460
|
+
u = 2, c /= 2, l /= 2, t /= 2;
|
|
439
461
|
}
|
|
440
|
-
function E(
|
|
441
|
-
return u === 1 ?
|
|
462
|
+
function E(g, x) {
|
|
463
|
+
return u === 1 ? g[x] : g.readUInt16BE(x * u);
|
|
442
464
|
}
|
|
443
|
-
let
|
|
465
|
+
let B;
|
|
444
466
|
if (i) {
|
|
445
|
-
let
|
|
446
|
-
for (
|
|
447
|
-
if (E(e,
|
|
448
|
-
if (
|
|
449
|
-
return
|
|
467
|
+
let g = -1;
|
|
468
|
+
for (B = t; B < c; B++)
|
|
469
|
+
if (E(e, B) === E(r, g === -1 ? 0 : B - g)) {
|
|
470
|
+
if (g === -1 && (g = B), B - g + 1 === l)
|
|
471
|
+
return g * u;
|
|
450
472
|
} else
|
|
451
|
-
|
|
473
|
+
g !== -1 && (B -= B - g), g = -1;
|
|
452
474
|
} else
|
|
453
|
-
for (t + l >
|
|
454
|
-
let
|
|
455
|
-
for (let
|
|
456
|
-
if (E(e,
|
|
457
|
-
|
|
475
|
+
for (t + l > c && (t = c - l), B = t; B >= 0; B--) {
|
|
476
|
+
let g = !0;
|
|
477
|
+
for (let x = 0; x < l; x++)
|
|
478
|
+
if (E(e, B + x) !== E(r, x)) {
|
|
479
|
+
g = !1;
|
|
458
480
|
break;
|
|
459
481
|
}
|
|
460
|
-
if (
|
|
461
|
-
return
|
|
482
|
+
if (g)
|
|
483
|
+
return B;
|
|
462
484
|
}
|
|
463
485
|
return -1;
|
|
464
486
|
}
|
|
@@ -475,14 +497,14 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
475
497
|
n ? (n = Number(n), n > i && (n = i)) : n = i;
|
|
476
498
|
const u = r.length;
|
|
477
499
|
n > u / 2 && (n = u / 2);
|
|
478
|
-
let
|
|
479
|
-
for (
|
|
480
|
-
const l = parseInt(r.substr(
|
|
500
|
+
let c;
|
|
501
|
+
for (c = 0; c < n; ++c) {
|
|
502
|
+
const l = parseInt(r.substr(c * 2, 2), 16);
|
|
481
503
|
if (Z(l))
|
|
482
|
-
return
|
|
483
|
-
e[t +
|
|
504
|
+
return c;
|
|
505
|
+
e[t + c] = l;
|
|
484
506
|
}
|
|
485
|
-
return
|
|
507
|
+
return c;
|
|
486
508
|
}
|
|
487
509
|
function Tr(e, r, t, n) {
|
|
488
510
|
return V(K(r, e.length - t), e, t, n);
|
|
@@ -493,8 +515,8 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
493
515
|
function Cr(e, r, t, n) {
|
|
494
516
|
return V(wr(r), e, t, n);
|
|
495
517
|
}
|
|
496
|
-
function
|
|
497
|
-
return V(
|
|
518
|
+
function br(e, r, t, n) {
|
|
519
|
+
return V(jr(r, e.length - t), e, t, n);
|
|
498
520
|
}
|
|
499
521
|
o.prototype.write = function(r, t, n, i) {
|
|
500
522
|
if (t === void 0)
|
|
@@ -511,7 +533,7 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
511
533
|
if ((n === void 0 || n > u) && (n = u), r.length > 0 && (n < 0 || t < 0) || t > this.length)
|
|
512
534
|
throw new RangeError("Attempt to write outside buffer bounds");
|
|
513
535
|
i || (i = "utf8");
|
|
514
|
-
let
|
|
536
|
+
let c = !1;
|
|
515
537
|
for (; ; )
|
|
516
538
|
switch (i) {
|
|
517
539
|
case "hex":
|
|
@@ -529,11 +551,11 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
529
551
|
case "ucs-2":
|
|
530
552
|
case "utf16le":
|
|
531
553
|
case "utf-16le":
|
|
532
|
-
return
|
|
554
|
+
return br(this, r, t, n);
|
|
533
555
|
default:
|
|
534
|
-
if (
|
|
556
|
+
if (c)
|
|
535
557
|
throw new TypeError("Unknown encoding: " + i);
|
|
536
|
-
i = ("" + i).toLowerCase(),
|
|
558
|
+
i = ("" + i).toLowerCase(), c = !0;
|
|
537
559
|
}
|
|
538
560
|
}, o.prototype.toJSON = function() {
|
|
539
561
|
return {
|
|
@@ -542,7 +564,7 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
542
564
|
};
|
|
543
565
|
};
|
|
544
566
|
function _r(e, r, t) {
|
|
545
|
-
return r === 0 && t === e.length ?
|
|
567
|
+
return r === 0 && t === e.length ? h.fromByteArray(e) : h.fromByteArray(e.slice(r, t));
|
|
546
568
|
}
|
|
547
569
|
function ur(e, r, t) {
|
|
548
570
|
t = Math.min(e.length, t);
|
|
@@ -550,41 +572,41 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
550
572
|
let i = r;
|
|
551
573
|
for (; i < t; ) {
|
|
552
574
|
const u = e[i];
|
|
553
|
-
let
|
|
575
|
+
let c = null, l = u > 239 ? 4 : u > 223 ? 3 : u > 191 ? 2 : 1;
|
|
554
576
|
if (i + l <= t) {
|
|
555
|
-
let E,
|
|
577
|
+
let E, B, g, x;
|
|
556
578
|
switch (l) {
|
|
557
579
|
case 1:
|
|
558
|
-
u < 128 && (
|
|
580
|
+
u < 128 && (c = u);
|
|
559
581
|
break;
|
|
560
582
|
case 2:
|
|
561
|
-
E = e[i + 1], (E & 192) === 128 && (
|
|
583
|
+
E = e[i + 1], (E & 192) === 128 && (x = (u & 31) << 6 | E & 63, x > 127 && (c = x));
|
|
562
584
|
break;
|
|
563
585
|
case 3:
|
|
564
|
-
E = e[i + 1],
|
|
586
|
+
E = e[i + 1], B = e[i + 2], (E & 192) === 128 && (B & 192) === 128 && (x = (u & 15) << 12 | (E & 63) << 6 | B & 63, x > 2047 && (x < 55296 || x > 57343) && (c = x));
|
|
565
587
|
break;
|
|
566
588
|
case 4:
|
|
567
|
-
E = e[i + 1],
|
|
589
|
+
E = e[i + 1], B = e[i + 2], g = e[i + 3], (E & 192) === 128 && (B & 192) === 128 && (g & 192) === 128 && (x = (u & 15) << 18 | (E & 63) << 12 | (B & 63) << 6 | g & 63, x > 65535 && x < 1114112 && (c = x));
|
|
568
590
|
}
|
|
569
591
|
}
|
|
570
|
-
|
|
592
|
+
c === null ? (c = 65533, l = 1) : c > 65535 && (c -= 65536, n.push(c >>> 10 & 1023 | 55296), c = 56320 | c & 1023), n.push(c), i += l;
|
|
571
593
|
}
|
|
572
|
-
return
|
|
594
|
+
return Sr(n);
|
|
573
595
|
}
|
|
574
|
-
const
|
|
575
|
-
function
|
|
596
|
+
const cr = 4096;
|
|
597
|
+
function Sr(e) {
|
|
576
598
|
const r = e.length;
|
|
577
|
-
if (r <=
|
|
599
|
+
if (r <= cr)
|
|
578
600
|
return String.fromCharCode.apply(String, e);
|
|
579
601
|
let t = "", n = 0;
|
|
580
602
|
for (; n < r; )
|
|
581
603
|
t += String.fromCharCode.apply(
|
|
582
604
|
String,
|
|
583
|
-
e.slice(n, n +=
|
|
605
|
+
e.slice(n, n += cr)
|
|
584
606
|
);
|
|
585
607
|
return t;
|
|
586
608
|
}
|
|
587
|
-
function
|
|
609
|
+
function Lr(e, r, t) {
|
|
588
610
|
let n = "";
|
|
589
611
|
t = Math.min(e.length, t);
|
|
590
612
|
for (let i = r; i < t; ++i)
|
|
@@ -603,7 +625,7 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
603
625
|
(!r || r < 0) && (r = 0), (!t || t < 0 || t > n) && (t = n);
|
|
604
626
|
let i = "";
|
|
605
627
|
for (let u = r; u < t; ++u)
|
|
606
|
-
i +=
|
|
628
|
+
i += Gr[e[u]];
|
|
607
629
|
return i;
|
|
608
630
|
}
|
|
609
631
|
function kr(e, r, t) {
|
|
@@ -627,9 +649,9 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
627
649
|
}
|
|
628
650
|
o.prototype.readUintLE = o.prototype.readUIntLE = function(r, t, n) {
|
|
629
651
|
r = r >>> 0, t = t >>> 0, n || I(r, t, this.length);
|
|
630
|
-
let i = this[r], u = 1,
|
|
631
|
-
for (; ++
|
|
632
|
-
i += this[r +
|
|
652
|
+
let i = this[r], u = 1, c = 0;
|
|
653
|
+
for (; ++c < t && (u *= 256); )
|
|
654
|
+
i += this[r + c] * u;
|
|
633
655
|
return i;
|
|
634
656
|
}, o.prototype.readUintBE = o.prototype.readUIntBE = function(r, t, n) {
|
|
635
657
|
r = r >>> 0, t = t >>> 0, n || I(r, t, this.length);
|
|
@@ -648,29 +670,29 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
648
670
|
}, o.prototype.readUint32BE = o.prototype.readUInt32BE = function(r, t) {
|
|
649
671
|
return r = r >>> 0, t || I(r, 4, this.length), this[r] * 16777216 + (this[r + 1] << 16 | this[r + 2] << 8 | this[r + 3]);
|
|
650
672
|
}, o.prototype.readBigUInt64LE = D(function(r) {
|
|
651
|
-
r = r >>> 0,
|
|
673
|
+
r = r >>> 0, j(r, "offset");
|
|
652
674
|
const t = this[r], n = this[r + 7];
|
|
653
675
|
(t === void 0 || n === void 0) && H(r, this.length - 8);
|
|
654
676
|
const i = t + this[++r] * 2 ** 8 + this[++r] * 2 ** 16 + this[++r] * 2 ** 24, u = this[++r] + this[++r] * 2 ** 8 + this[++r] * 2 ** 16 + n * 2 ** 24;
|
|
655
677
|
return BigInt(i) + (BigInt(u) << BigInt(32));
|
|
656
678
|
}), o.prototype.readBigUInt64BE = D(function(r) {
|
|
657
|
-
r = r >>> 0,
|
|
679
|
+
r = r >>> 0, j(r, "offset");
|
|
658
680
|
const t = this[r], n = this[r + 7];
|
|
659
681
|
(t === void 0 || n === void 0) && H(r, this.length - 8);
|
|
660
682
|
const i = t * 2 ** 24 + this[++r] * 2 ** 16 + this[++r] * 2 ** 8 + this[++r], u = this[++r] * 2 ** 24 + this[++r] * 2 ** 16 + this[++r] * 2 ** 8 + n;
|
|
661
683
|
return (BigInt(i) << BigInt(32)) + BigInt(u);
|
|
662
684
|
}), o.prototype.readIntLE = function(r, t, n) {
|
|
663
685
|
r = r >>> 0, t = t >>> 0, n || I(r, t, this.length);
|
|
664
|
-
let i = this[r], u = 1,
|
|
665
|
-
for (; ++
|
|
666
|
-
i += this[r +
|
|
686
|
+
let i = this[r], u = 1, c = 0;
|
|
687
|
+
for (; ++c < t && (u *= 256); )
|
|
688
|
+
i += this[r + c] * u;
|
|
667
689
|
return u *= 128, i >= u && (i -= Math.pow(2, 8 * t)), i;
|
|
668
690
|
}, o.prototype.readIntBE = function(r, t, n) {
|
|
669
691
|
r = r >>> 0, t = t >>> 0, n || I(r, t, this.length);
|
|
670
|
-
let i = t, u = 1,
|
|
692
|
+
let i = t, u = 1, c = this[r + --i];
|
|
671
693
|
for (; i > 0 && (u *= 256); )
|
|
672
|
-
|
|
673
|
-
return u *= 128,
|
|
694
|
+
c += this[r + --i] * u;
|
|
695
|
+
return u *= 128, c >= u && (c -= Math.pow(2, 8 * t)), c;
|
|
674
696
|
}, o.prototype.readInt8 = function(r, t) {
|
|
675
697
|
return r = r >>> 0, t || I(r, 1, this.length), this[r] & 128 ? (255 - this[r] + 1) * -1 : this[r];
|
|
676
698
|
}, o.prototype.readInt16LE = function(r, t) {
|
|
@@ -686,26 +708,26 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
686
708
|
}, o.prototype.readInt32BE = function(r, t) {
|
|
687
709
|
return r = r >>> 0, t || I(r, 4, this.length), this[r] << 24 | this[r + 1] << 16 | this[r + 2] << 8 | this[r + 3];
|
|
688
710
|
}, o.prototype.readBigInt64LE = D(function(r) {
|
|
689
|
-
r = r >>> 0,
|
|
711
|
+
r = r >>> 0, j(r, "offset");
|
|
690
712
|
const t = this[r], n = this[r + 7];
|
|
691
713
|
(t === void 0 || n === void 0) && H(r, this.length - 8);
|
|
692
714
|
const i = this[r + 4] + this[r + 5] * 2 ** 8 + this[r + 6] * 2 ** 16 + (n << 24);
|
|
693
715
|
return (BigInt(i) << BigInt(32)) + BigInt(t + this[++r] * 2 ** 8 + this[++r] * 2 ** 16 + this[++r] * 2 ** 24);
|
|
694
716
|
}), o.prototype.readBigInt64BE = D(function(r) {
|
|
695
|
-
r = r >>> 0,
|
|
717
|
+
r = r >>> 0, j(r, "offset");
|
|
696
718
|
const t = this[r], n = this[r + 7];
|
|
697
719
|
(t === void 0 || n === void 0) && H(r, this.length - 8);
|
|
698
720
|
const i = (t << 24) + // Overflow
|
|
699
721
|
this[++r] * 2 ** 16 + this[++r] * 2 ** 8 + this[++r];
|
|
700
722
|
return (BigInt(i) << BigInt(32)) + BigInt(this[++r] * 2 ** 24 + this[++r] * 2 ** 16 + this[++r] * 2 ** 8 + n);
|
|
701
723
|
}), o.prototype.readFloatLE = function(r, t) {
|
|
702
|
-
return r = r >>> 0, t || I(r, 4, this.length),
|
|
724
|
+
return r = r >>> 0, t || I(r, 4, this.length), s.read(this, r, !0, 23, 4);
|
|
703
725
|
}, o.prototype.readFloatBE = function(r, t) {
|
|
704
|
-
return r = r >>> 0, t || I(r, 4, this.length),
|
|
726
|
+
return r = r >>> 0, t || I(r, 4, this.length), s.read(this, r, !1, 23, 4);
|
|
705
727
|
}, o.prototype.readDoubleLE = function(r, t) {
|
|
706
|
-
return r = r >>> 0, t || I(r, 8, this.length),
|
|
728
|
+
return r = r >>> 0, t || I(r, 8, this.length), s.read(this, r, !0, 52, 8);
|
|
707
729
|
}, o.prototype.readDoubleBE = function(r, t) {
|
|
708
|
-
return r = r >>> 0, t || I(r, 8, this.length),
|
|
730
|
+
return r = r >>> 0, t || I(r, 8, this.length), s.read(this, r, !1, 52, 8);
|
|
709
731
|
};
|
|
710
732
|
function T(e, r, t, n, i, u) {
|
|
711
733
|
if (!o.isBuffer(e))
|
|
@@ -720,18 +742,18 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
720
742
|
const l = Math.pow(2, 8 * n) - 1;
|
|
721
743
|
T(this, r, t, n, l, 0);
|
|
722
744
|
}
|
|
723
|
-
let u = 1,
|
|
724
|
-
for (this[t] = r & 255; ++
|
|
725
|
-
this[t +
|
|
745
|
+
let u = 1, c = 0;
|
|
746
|
+
for (this[t] = r & 255; ++c < n && (u *= 256); )
|
|
747
|
+
this[t + c] = r / u & 255;
|
|
726
748
|
return t + n;
|
|
727
749
|
}, o.prototype.writeUintBE = o.prototype.writeUIntBE = function(r, t, n, i) {
|
|
728
750
|
if (r = +r, t = t >>> 0, n = n >>> 0, !i) {
|
|
729
751
|
const l = Math.pow(2, 8 * n) - 1;
|
|
730
752
|
T(this, r, t, n, l, 0);
|
|
731
753
|
}
|
|
732
|
-
let u = n - 1,
|
|
733
|
-
for (this[t + u] = r & 255; --u >= 0 && (
|
|
734
|
-
this[t + u] = r /
|
|
754
|
+
let u = n - 1, c = 1;
|
|
755
|
+
for (this[t + u] = r & 255; --u >= 0 && (c *= 256); )
|
|
756
|
+
this[t + u] = r / c & 255;
|
|
735
757
|
return t + n;
|
|
736
758
|
}, o.prototype.writeUint8 = o.prototype.writeUInt8 = function(r, t, n) {
|
|
737
759
|
return r = +r, t = t >>> 0, n || T(this, r, t, 1, 255, 0), this[t] = r & 255, t + 1;
|
|
@@ -744,41 +766,41 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
744
766
|
}, o.prototype.writeUint32BE = o.prototype.writeUInt32BE = function(r, t, n) {
|
|
745
767
|
return r = +r, t = t >>> 0, n || T(this, r, t, 4, 4294967295, 0), this[t] = r >>> 24, this[t + 1] = r >>> 16, this[t + 2] = r >>> 8, this[t + 3] = r & 255, t + 4;
|
|
746
768
|
};
|
|
747
|
-
function
|
|
769
|
+
function fr(e, r, t, n, i) {
|
|
748
770
|
yr(r, n, i, e, t, 7);
|
|
749
771
|
let u = Number(r & BigInt(4294967295));
|
|
750
772
|
e[t++] = u, u = u >> 8, e[t++] = u, u = u >> 8, e[t++] = u, u = u >> 8, e[t++] = u;
|
|
751
|
-
let
|
|
752
|
-
return e[t++] =
|
|
773
|
+
let c = Number(r >> BigInt(32) & BigInt(4294967295));
|
|
774
|
+
return e[t++] = c, c = c >> 8, e[t++] = c, c = c >> 8, e[t++] = c, c = c >> 8, e[t++] = c, t;
|
|
753
775
|
}
|
|
754
|
-
function
|
|
776
|
+
function hr(e, r, t, n, i) {
|
|
755
777
|
yr(r, n, i, e, t, 7);
|
|
756
778
|
let u = Number(r & BigInt(4294967295));
|
|
757
779
|
e[t + 7] = u, u = u >> 8, e[t + 6] = u, u = u >> 8, e[t + 5] = u, u = u >> 8, e[t + 4] = u;
|
|
758
|
-
let
|
|
759
|
-
return e[t + 3] =
|
|
780
|
+
let c = Number(r >> BigInt(32) & BigInt(4294967295));
|
|
781
|
+
return e[t + 3] = c, c = c >> 8, e[t + 2] = c, c = c >> 8, e[t + 1] = c, c = c >> 8, e[t] = c, t + 8;
|
|
760
782
|
}
|
|
761
783
|
o.prototype.writeBigUInt64LE = D(function(r, t = 0) {
|
|
762
|
-
return cr(this, r, t, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
763
|
-
}), o.prototype.writeBigUInt64BE = D(function(r, t = 0) {
|
|
764
784
|
return fr(this, r, t, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
785
|
+
}), o.prototype.writeBigUInt64BE = D(function(r, t = 0) {
|
|
786
|
+
return hr(this, r, t, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
765
787
|
}), o.prototype.writeIntLE = function(r, t, n, i) {
|
|
766
788
|
if (r = +r, t = t >>> 0, !i) {
|
|
767
789
|
const E = Math.pow(2, 8 * n - 1);
|
|
768
790
|
T(this, r, t, n, E - 1, -E);
|
|
769
791
|
}
|
|
770
|
-
let u = 0,
|
|
771
|
-
for (this[t] = r & 255; ++u < n && (
|
|
772
|
-
r < 0 && l === 0 && this[t + u - 1] !== 0 && (l = 1), this[t + u] = (r /
|
|
792
|
+
let u = 0, c = 1, l = 0;
|
|
793
|
+
for (this[t] = r & 255; ++u < n && (c *= 256); )
|
|
794
|
+
r < 0 && l === 0 && this[t + u - 1] !== 0 && (l = 1), this[t + u] = (r / c >> 0) - l & 255;
|
|
773
795
|
return t + n;
|
|
774
796
|
}, o.prototype.writeIntBE = function(r, t, n, i) {
|
|
775
797
|
if (r = +r, t = t >>> 0, !i) {
|
|
776
798
|
const E = Math.pow(2, 8 * n - 1);
|
|
777
799
|
T(this, r, t, n, E - 1, -E);
|
|
778
800
|
}
|
|
779
|
-
let u = n - 1,
|
|
780
|
-
for (this[t + u] = r & 255; --u >= 0 && (
|
|
781
|
-
r < 0 && l === 0 && this[t + u + 1] !== 0 && (l = 1), this[t + u] = (r /
|
|
801
|
+
let u = n - 1, c = 1, l = 0;
|
|
802
|
+
for (this[t + u] = r & 255; --u >= 0 && (c *= 256); )
|
|
803
|
+
r < 0 && l === 0 && this[t + u + 1] !== 0 && (l = 1), this[t + u] = (r / c >> 0) - l & 255;
|
|
782
804
|
return t + n;
|
|
783
805
|
}, o.prototype.writeInt8 = function(r, t, n) {
|
|
784
806
|
return r = +r, t = t >>> 0, n || T(this, r, t, 1, 127, -128), r < 0 && (r = 255 + r + 1), this[t] = r & 255, t + 1;
|
|
@@ -791,9 +813,9 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
791
813
|
}, o.prototype.writeInt32BE = function(r, t, n) {
|
|
792
814
|
return r = +r, t = t >>> 0, n || T(this, r, t, 4, 2147483647, -2147483648), r < 0 && (r = 4294967295 + r + 1), this[t] = r >>> 24, this[t + 1] = r >>> 16, this[t + 2] = r >>> 8, this[t + 3] = r & 255, t + 4;
|
|
793
815
|
}, o.prototype.writeBigInt64LE = D(function(r, t = 0) {
|
|
794
|
-
return cr(this, r, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
795
|
-
}), o.prototype.writeBigInt64BE = D(function(r, t = 0) {
|
|
796
816
|
return fr(this, r, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
817
|
+
}), o.prototype.writeBigInt64BE = D(function(r, t = 0) {
|
|
818
|
+
return hr(this, r, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
797
819
|
});
|
|
798
820
|
function sr(e, r, t, n, i, u) {
|
|
799
821
|
if (t + n > e.length)
|
|
@@ -802,7 +824,7 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
802
824
|
throw new RangeError("Index out of range");
|
|
803
825
|
}
|
|
804
826
|
function pr(e, r, t, n, i) {
|
|
805
|
-
return r = +r, t = t >>> 0, i || sr(e, r, t, 4),
|
|
827
|
+
return r = +r, t = t >>> 0, i || sr(e, r, t, 4), s.write(e, r, t, n, 23, 4), t + 4;
|
|
806
828
|
}
|
|
807
829
|
o.prototype.writeFloatLE = function(r, t, n) {
|
|
808
830
|
return pr(this, r, t, !0, n);
|
|
@@ -810,7 +832,7 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
810
832
|
return pr(this, r, t, !1, n);
|
|
811
833
|
};
|
|
812
834
|
function lr(e, r, t, n, i) {
|
|
813
|
-
return r = +r, t = t >>> 0, i || sr(e, r, t, 8),
|
|
835
|
+
return r = +r, t = t >>> 0, i || sr(e, r, t, 8), s.write(e, r, t, n, 52, 8), t + 8;
|
|
814
836
|
}
|
|
815
837
|
o.prototype.writeDoubleLE = function(r, t, n) {
|
|
816
838
|
return lr(this, r, t, !0, n);
|
|
@@ -841,8 +863,8 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
841
863
|
if (typeof i == "string" && !o.isEncoding(i))
|
|
842
864
|
throw new TypeError("Unknown encoding: " + i);
|
|
843
865
|
if (r.length === 1) {
|
|
844
|
-
const
|
|
845
|
-
(i === "utf8" &&
|
|
866
|
+
const c = r.charCodeAt(0);
|
|
867
|
+
(i === "utf8" && c < 128 || i === "latin1") && (r = c);
|
|
846
868
|
}
|
|
847
869
|
} else
|
|
848
870
|
typeof r == "number" ? r = r & 255 : typeof r == "boolean" && (r = Number(r));
|
|
@@ -856,11 +878,11 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
856
878
|
for (u = t; u < n; ++u)
|
|
857
879
|
this[u] = r;
|
|
858
880
|
else {
|
|
859
|
-
const
|
|
881
|
+
const c = o.isBuffer(r) ? r : o.from(r, i), l = c.length;
|
|
860
882
|
if (l === 0)
|
|
861
883
|
throw new TypeError('The value "' + r + '" is invalid for argument "value"');
|
|
862
884
|
for (u = 0; u < n - t; ++u)
|
|
863
|
-
this[u + t] =
|
|
885
|
+
this[u + t] = c[u % l];
|
|
864
886
|
}
|
|
865
887
|
return this;
|
|
866
888
|
};
|
|
@@ -918,22 +940,22 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
918
940
|
return `${e.slice(0, t)}${r}`;
|
|
919
941
|
}
|
|
920
942
|
function Dr(e, r, t) {
|
|
921
|
-
|
|
943
|
+
j(r, "offset"), (e[r] === void 0 || e[r + t] === void 0) && H(r, e.length - (t + 1));
|
|
922
944
|
}
|
|
923
945
|
function yr(e, r, t, n, i, u) {
|
|
924
946
|
if (e > t || e < r) {
|
|
925
|
-
const
|
|
947
|
+
const c = typeof r == "bigint" ? "n" : "";
|
|
926
948
|
let l;
|
|
927
|
-
throw u > 3 ? r === 0 || r === BigInt(0) ? l = `>= 0${
|
|
949
|
+
throw u > 3 ? r === 0 || r === BigInt(0) ? l = `>= 0${c} and < 2${c} ** ${(u + 1) * 8}${c}` : l = `>= -(2${c} ** ${(u + 1) * 8 - 1}${c}) and < 2 ** ${(u + 1) * 8 - 1}${c}` : l = `>= ${r}${c} and <= ${t}${c}`, new O.ERR_OUT_OF_RANGE("value", l, e);
|
|
928
950
|
}
|
|
929
951
|
Dr(n, i, u);
|
|
930
952
|
}
|
|
931
|
-
function
|
|
953
|
+
function j(e, r) {
|
|
932
954
|
if (typeof e != "number")
|
|
933
955
|
throw new O.ERR_INVALID_ARG_TYPE(r, "number", e);
|
|
934
956
|
}
|
|
935
957
|
function H(e, r, t) {
|
|
936
|
-
throw Math.floor(e) !== e ? (
|
|
958
|
+
throw Math.floor(e) !== e ? (j(e, t), new O.ERR_OUT_OF_RANGE(t || "offset", "an integer", e)) : r < 0 ? new O.ERR_BUFFER_OUT_OF_BOUNDS() : new O.ERR_OUT_OF_RANGE(
|
|
937
959
|
t || "offset",
|
|
938
960
|
`>= ${t ? 1 : 0} and <= ${r}`,
|
|
939
961
|
e
|
|
@@ -953,13 +975,13 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
953
975
|
const n = e.length;
|
|
954
976
|
let i = null;
|
|
955
977
|
const u = [];
|
|
956
|
-
for (let
|
|
957
|
-
if (t = e.charCodeAt(
|
|
978
|
+
for (let c = 0; c < n; ++c) {
|
|
979
|
+
if (t = e.charCodeAt(c), t > 55295 && t < 57344) {
|
|
958
980
|
if (!i) {
|
|
959
981
|
if (t > 56319) {
|
|
960
982
|
(r -= 3) > -1 && u.push(239, 191, 189);
|
|
961
983
|
continue;
|
|
962
|
-
} else if (
|
|
984
|
+
} else if (c + 1 === n) {
|
|
963
985
|
(r -= 3) > -1 && u.push(239, 191, 189);
|
|
964
986
|
continue;
|
|
965
987
|
}
|
|
@@ -1012,15 +1034,15 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
1012
1034
|
r.push(e.charCodeAt(t) & 255);
|
|
1013
1035
|
return r;
|
|
1014
1036
|
}
|
|
1015
|
-
function
|
|
1037
|
+
function jr(e, r) {
|
|
1016
1038
|
let t, n, i;
|
|
1017
1039
|
const u = [];
|
|
1018
|
-
for (let
|
|
1019
|
-
t = e.charCodeAt(
|
|
1040
|
+
for (let c = 0; c < e.length && !((r -= 2) < 0); ++c)
|
|
1041
|
+
t = e.charCodeAt(c), n = t >> 8, i = t % 256, u.push(i), u.push(n);
|
|
1020
1042
|
return u;
|
|
1021
1043
|
}
|
|
1022
1044
|
function wr(e) {
|
|
1023
|
-
return
|
|
1045
|
+
return h.toByteArray(Pr(e));
|
|
1024
1046
|
}
|
|
1025
1047
|
function V(e, r, t, n) {
|
|
1026
1048
|
let i;
|
|
@@ -1028,13 +1050,13 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
1028
1050
|
r[i + t] = e[i];
|
|
1029
1051
|
return i;
|
|
1030
1052
|
}
|
|
1031
|
-
function
|
|
1053
|
+
function b(e, r) {
|
|
1032
1054
|
return e instanceof r || e != null && e.constructor != null && e.constructor.name != null && e.constructor.name === r.name;
|
|
1033
1055
|
}
|
|
1034
1056
|
function Z(e) {
|
|
1035
1057
|
return e !== e;
|
|
1036
1058
|
}
|
|
1037
|
-
const
|
|
1059
|
+
const Gr = function() {
|
|
1038
1060
|
const e = "0123456789abcdef", r = new Array(256);
|
|
1039
1061
|
for (let t = 0; t < 16; ++t) {
|
|
1040
1062
|
const n = t * 16;
|
|
@@ -1044,13 +1066,13 @@ er.write = function(c, f, p, x, y, a) {
|
|
|
1044
1066
|
return r;
|
|
1045
1067
|
}();
|
|
1046
1068
|
function D(e) {
|
|
1047
|
-
return typeof BigInt > "u" ?
|
|
1069
|
+
return typeof BigInt > "u" ? Wr : e;
|
|
1048
1070
|
}
|
|
1049
|
-
function
|
|
1071
|
+
function Wr() {
|
|
1050
1072
|
throw new Error("BigInt not supported");
|
|
1051
1073
|
}
|
|
1052
1074
|
})(xr);
|
|
1053
|
-
var
|
|
1075
|
+
var Br = { exports: {} }, m = Br.exports = {}, _, S;
|
|
1054
1076
|
function rr() {
|
|
1055
1077
|
throw new Error("setTimeout has not been defined");
|
|
1056
1078
|
}
|
|
@@ -1064,113 +1086,117 @@ function tr() {
|
|
|
1064
1086
|
_ = rr;
|
|
1065
1087
|
}
|
|
1066
1088
|
try {
|
|
1067
|
-
typeof clearTimeout == "function" ?
|
|
1089
|
+
typeof clearTimeout == "function" ? S = clearTimeout : S = tr;
|
|
1068
1090
|
} catch {
|
|
1069
|
-
|
|
1091
|
+
S = tr;
|
|
1070
1092
|
}
|
|
1071
1093
|
})();
|
|
1072
|
-
function Er(
|
|
1094
|
+
function Er(f) {
|
|
1073
1095
|
if (_ === setTimeout)
|
|
1074
|
-
return setTimeout(
|
|
1096
|
+
return setTimeout(f, 0);
|
|
1075
1097
|
if ((_ === rr || !_) && setTimeout)
|
|
1076
|
-
return _ = setTimeout, setTimeout(
|
|
1098
|
+
return _ = setTimeout, setTimeout(f, 0);
|
|
1077
1099
|
try {
|
|
1078
|
-
return _(
|
|
1100
|
+
return _(f, 0);
|
|
1079
1101
|
} catch {
|
|
1080
1102
|
try {
|
|
1081
|
-
return _.call(null,
|
|
1103
|
+
return _.call(null, f, 0);
|
|
1082
1104
|
} catch {
|
|
1083
|
-
return _.call(this,
|
|
1105
|
+
return _.call(this, f, 0);
|
|
1084
1106
|
}
|
|
1085
1107
|
}
|
|
1086
1108
|
}
|
|
1087
|
-
function Zr(
|
|
1088
|
-
if (
|
|
1089
|
-
return clearTimeout(
|
|
1090
|
-
if ((
|
|
1091
|
-
return
|
|
1109
|
+
function Zr(f) {
|
|
1110
|
+
if (S === clearTimeout)
|
|
1111
|
+
return clearTimeout(f);
|
|
1112
|
+
if ((S === tr || !S) && clearTimeout)
|
|
1113
|
+
return S = clearTimeout, clearTimeout(f);
|
|
1092
1114
|
try {
|
|
1093
|
-
return
|
|
1115
|
+
return S(f);
|
|
1094
1116
|
} catch {
|
|
1095
1117
|
try {
|
|
1096
|
-
return
|
|
1118
|
+
return S.call(null, f);
|
|
1097
1119
|
} catch {
|
|
1098
|
-
return
|
|
1120
|
+
return S.call(this, f);
|
|
1099
1121
|
}
|
|
1100
1122
|
}
|
|
1101
1123
|
}
|
|
1102
|
-
var M = [],
|
|
1124
|
+
var M = [], W = !1, P, X = -1;
|
|
1103
1125
|
function vr() {
|
|
1104
|
-
!
|
|
1126
|
+
!W || !P || (W = !1, P.length ? M = P.concat(M) : X = -1, M.length && gr());
|
|
1105
1127
|
}
|
|
1106
|
-
function
|
|
1107
|
-
if (!
|
|
1108
|
-
var
|
|
1109
|
-
|
|
1110
|
-
for (var
|
|
1111
|
-
for (P = M, M = []; ++X <
|
|
1128
|
+
function gr() {
|
|
1129
|
+
if (!W) {
|
|
1130
|
+
var f = Er(vr);
|
|
1131
|
+
W = !0;
|
|
1132
|
+
for (var h = M.length; h; ) {
|
|
1133
|
+
for (P = M, M = []; ++X < h; )
|
|
1112
1134
|
P && P[X].run();
|
|
1113
|
-
X = -1,
|
|
1135
|
+
X = -1, h = M.length;
|
|
1114
1136
|
}
|
|
1115
|
-
P = null,
|
|
1137
|
+
P = null, W = !1, Zr(f);
|
|
1116
1138
|
}
|
|
1117
1139
|
}
|
|
1118
|
-
|
|
1119
|
-
var
|
|
1140
|
+
m.nextTick = function(f) {
|
|
1141
|
+
var h = new Array(arguments.length - 1);
|
|
1120
1142
|
if (arguments.length > 1)
|
|
1121
|
-
for (var
|
|
1122
|
-
|
|
1123
|
-
M.push(new
|
|
1143
|
+
for (var s = 1; s < arguments.length; s++)
|
|
1144
|
+
h[s - 1] = arguments[s];
|
|
1145
|
+
M.push(new mr(f, h)), M.length === 1 && !W && Er(gr);
|
|
1124
1146
|
};
|
|
1125
|
-
function
|
|
1126
|
-
this.fun =
|
|
1147
|
+
function mr(f, h) {
|
|
1148
|
+
this.fun = f, this.array = h;
|
|
1127
1149
|
}
|
|
1128
|
-
|
|
1150
|
+
mr.prototype.run = function() {
|
|
1129
1151
|
this.fun.apply(null, this.array);
|
|
1130
1152
|
};
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1153
|
+
m.title = "browser";
|
|
1154
|
+
m.browser = !0;
|
|
1155
|
+
m.env = {};
|
|
1156
|
+
m.argv = [];
|
|
1157
|
+
m.version = "";
|
|
1158
|
+
m.versions = {};
|
|
1137
1159
|
function N() {
|
|
1138
1160
|
}
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1161
|
+
m.on = N;
|
|
1162
|
+
m.addListener = N;
|
|
1163
|
+
m.once = N;
|
|
1164
|
+
m.off = N;
|
|
1165
|
+
m.removeListener = N;
|
|
1166
|
+
m.removeAllListeners = N;
|
|
1167
|
+
m.emit = N;
|
|
1168
|
+
m.prependListener = N;
|
|
1169
|
+
m.prependOnceListener = N;
|
|
1170
|
+
m.listeners = function(f) {
|
|
1149
1171
|
return [];
|
|
1150
1172
|
};
|
|
1151
|
-
|
|
1173
|
+
m.binding = function(f) {
|
|
1152
1174
|
throw new Error("process.binding is not supported");
|
|
1153
1175
|
};
|
|
1154
|
-
|
|
1176
|
+
m.cwd = function() {
|
|
1155
1177
|
return "/";
|
|
1156
1178
|
};
|
|
1157
|
-
|
|
1179
|
+
m.chdir = function(f) {
|
|
1158
1180
|
throw new Error("process.chdir is not supported");
|
|
1159
1181
|
};
|
|
1160
|
-
|
|
1182
|
+
m.umask = function() {
|
|
1161
1183
|
return 0;
|
|
1162
1184
|
};
|
|
1163
|
-
var rt =
|
|
1185
|
+
var rt = Br.exports, tt = /* @__PURE__ */ Yr(rt);
|
|
1164
1186
|
const et = () => {
|
|
1165
|
-
self.addEventListener("unhandledrejection", (
|
|
1166
|
-
throw new Error(
|
|
1187
|
+
self.addEventListener("unhandledrejection", (f) => {
|
|
1188
|
+
throw new Error(f.reason);
|
|
1167
1189
|
});
|
|
1168
1190
|
};
|
|
1169
1191
|
globalThis.process = tt;
|
|
1170
1192
|
globalThis.Buffer = xr.Buffer;
|
|
1171
|
-
const nt = import("./snarkjsWorkerLogic-
|
|
1172
|
-
addEventListener("message", async (
|
|
1173
|
-
const { onWorkerMessage:
|
|
1174
|
-
f
|
|
1193
|
+
const nt = import("./snarkjsWorkerLogic-BAbiO5gj.js");
|
|
1194
|
+
addEventListener("message", async (f) => {
|
|
1195
|
+
const { onWorkerMessage: h } = await nt;
|
|
1196
|
+
h(f.data);
|
|
1175
1197
|
});
|
|
1176
1198
|
et();
|
|
1199
|
+
export {
|
|
1200
|
+
it as c,
|
|
1201
|
+
ot as g
|
|
1202
|
+
};
|