From d29a1fbdb8b9bd1a21d63d1f704e5449dd3cc905 Mon Sep 17 00:00:00 2001 From: ShahanaFarooqui Date: Tue, 27 Dec 2022 19:04:23 -0800 Subject: [PATCH] Removing lint and strict typecheck --- backend/controllers/eclair/webSocketClient.js | 2 +- backend/controllers/shared/authenticate.js | 12 ++++++------ backend/controllers/shared/pageSettings.js | 2 +- backend/routes/cln/balance.js | 2 +- backend/routes/cln/channels.js | 2 +- backend/routes/cln/fees.js | 2 +- backend/routes/cln/getInfo.js | 2 +- backend/routes/cln/index.js | 2 +- backend/routes/cln/invoices.js | 2 +- backend/routes/cln/network.js | 2 +- backend/routes/cln/offers.js | 2 +- backend/routes/cln/onchain.js | 2 +- backend/routes/cln/payments.js | 2 +- backend/routes/cln/peers.js | 2 +- backend/routes/cln/utility.js | 2 +- backend/routes/eclair/channels.js | 2 +- backend/routes/eclair/fees.js | 2 +- backend/routes/eclair/getInfo.js | 2 +- backend/routes/eclair/index.js | 2 +- backend/routes/eclair/invoices.js | 2 +- backend/routes/eclair/network.js | 2 +- backend/routes/eclair/onchain.js | 2 +- backend/routes/eclair/payments.js | 2 +- backend/routes/eclair/peers.js | 2 +- backend/routes/lnd/balance.js | 2 +- backend/routes/lnd/channels.js | 2 +- backend/routes/lnd/channelsBackup.js | 2 +- backend/routes/lnd/fees.js | 2 +- backend/routes/lnd/getInfo.js | 2 +- backend/routes/lnd/graph.js | 2 +- backend/routes/lnd/index.js | 2 +- backend/routes/lnd/invoices.js | 2 +- backend/routes/lnd/message.js | 2 +- backend/routes/lnd/newAddress.js | 2 +- backend/routes/lnd/payments.js | 2 +- backend/routes/lnd/peers.js | 2 +- backend/routes/lnd/switch.js | 2 +- backend/routes/lnd/transactions.js | 2 +- backend/routes/lnd/wallet.js | 2 +- backend/routes/shared/RTLConf.js | 2 +- backend/routes/shared/authenticate.js | 2 +- backend/routes/shared/boltz.js | 2 +- backend/routes/shared/index.js | 2 +- backend/routes/shared/loop.js | 2 +- backend/routes/shared/pageSettings.js | 2 +- backend/utils/database.js | 6 +++--- frontend/index.html | 2 +- frontend/polyfills.3b53c3445d79dc67.js | 1 + frontend/polyfills.8269cb405db5f44b.js | 1 - server/controllers/eclair/webSocketClient.ts | 2 +- server/controllers/shared/authenticate.ts | 12 ++++++------ server/controllers/shared/pageSettings.ts | 2 +- server/routes/cln/balance.ts | 2 +- server/routes/cln/channels.ts | 2 +- server/routes/cln/fees.ts | 2 +- server/routes/cln/getInfo.ts | 2 +- server/routes/cln/index.ts | 2 +- server/routes/cln/invoices.ts | 2 +- server/routes/cln/network.ts | 2 +- server/routes/cln/offers.ts | 2 +- server/routes/cln/onchain.ts | 2 +- server/routes/cln/payments.ts | 2 +- server/routes/cln/peers.ts | 2 +- server/routes/cln/utility.ts | 2 +- server/routes/eclair/channels.ts | 2 +- server/routes/eclair/fees.ts | 2 +- server/routes/eclair/getInfo.ts | 2 +- server/routes/eclair/index.ts | 2 +- server/routes/eclair/invoices.ts | 2 +- server/routes/eclair/network.ts | 2 +- server/routes/eclair/onchain.ts | 2 +- server/routes/eclair/payments.ts | 2 +- server/routes/eclair/peers.ts | 2 +- server/routes/lnd/balance.ts | 2 +- server/routes/lnd/channels.ts | 2 +- server/routes/lnd/channelsBackup.ts | 2 +- server/routes/lnd/fees.ts | 2 +- server/routes/lnd/getInfo.ts | 2 +- server/routes/lnd/graph.ts | 2 +- server/routes/lnd/index.ts | 2 +- server/routes/lnd/invoices.ts | 2 +- server/routes/lnd/message.ts | 2 +- server/routes/lnd/newAddress.ts | 2 +- server/routes/lnd/payments.ts | 2 +- server/routes/lnd/peers.ts | 2 +- server/routes/lnd/switch.ts | 2 +- server/routes/lnd/transactions.ts | 2 +- server/routes/lnd/wallet.ts | 2 +- server/routes/shared/RTLConf.ts | 2 +- server/routes/shared/authenticate.ts | 2 +- server/routes/shared/boltz.ts | 2 +- server/routes/shared/index.ts | 2 +- server/routes/shared/loop.ts | 2 +- server/routes/shared/pageSettings.ts | 2 +- server/utils/common.ts | 8 ++++---- server/utils/database.ts | 12 ++++++------ .../lnd/wallet/initialize/initialize.component.ts | 5 ++--- tsconfig.json | 2 +- 98 files changed, 118 insertions(+), 119 deletions(-) create mode 100644 frontend/polyfills.3b53c3445d79dc67.js delete mode 100644 frontend/polyfills.8269cb405db5f44b.js diff --git a/backend/controllers/eclair/webSocketClient.js b/backend/controllers/eclair/webSocketClient.js index 9f3b31c2..2f88b2fb 100644 --- a/backend/controllers/eclair/webSocketClient.js +++ b/backend/controllers/eclair/webSocketClient.js @@ -1,4 +1,4 @@ -import * as WebSocket from 'ws'; +import WebSocket from 'ws'; import { Logger } from '../../utils/logger.js'; import { Common } from '../../utils/common.js'; import { WSServer } from '../../utils/webSocketServer.js'; diff --git a/backend/controllers/shared/authenticate.js b/backend/controllers/shared/authenticate.js index 4325ede8..ff5e71ad 100644 --- a/backend/controllers/shared/authenticate.js +++ b/backend/controllers/shared/authenticate.js @@ -76,12 +76,12 @@ export const authenticateUser = (req, res, next) => { const password = req.body.authenticationValue; if (common.rtl_pass === password && failed.count < ALLOWED_LOGIN_ATTEMPTS) { if (req.body.twoFAToken && req.body.twoFAToken !== '') { - // if (!verifyToken(req.body.twoFAToken)) { - // logger.log({ selectedNode: req.session.selectedNode, level: 'ERROR', fileName: 'Authenticate', msg: 'Invalid Token! Failed IP ' + reqIP, error: { error: 'Invalid token.' } }); - // failed.count = failed.count + 1; - // failed.lastTried = currentTime; - // return res.status(401).json(handleMultipleFailedAttemptsError(failed, currentTime, 'Invalid 2FA Token!')); - // } + if (!verifyToken(req.body.twoFAToken)) { + logger.log({ selectedNode: req.session.selectedNode, level: 'ERROR', fileName: 'Authenticate', msg: 'Invalid Token! Failed IP ' + reqIP, error: { error: 'Invalid token.' } }); + failed.count = failed.count + 1; + failed.lastTried = currentTime; + return res.status(401).json(handleMultipleFailedAttemptsError(failed, currentTime, 'Invalid 2FA Token!')); + } } if (!req.session.selectedNode) { req.session.selectedNode = common.initSelectedNode; diff --git a/backend/controllers/shared/pageSettings.js b/backend/controllers/shared/pageSettings.js index 6040a8ab..9ded7b70 100644 --- a/backend/controllers/shared/pageSettings.js +++ b/backend/controllers/shared/pageSettings.js @@ -9,7 +9,7 @@ export const getPageSettings = (req, res, next) => { logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Page Settings', msg: 'Getting Page Settings..' }); databaseService.find(req.session.selectedNode, CollectionsEnum.PAGE_SETTINGS).then((settings) => { logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Page Settings', msg: 'Page Settings Received', data: settings }); - return res.status(200).json(settings); + res.status(200).json(settings); }).catch((errRes) => { const err = common.handleError(errRes, 'Page Settings', 'Page Settings Error', req.session.selectedNode); return res.status(err.statusCode).json({ message: err.message, error: err.error }); diff --git a/backend/routes/cln/balance.js b/backend/routes/cln/balance.js index 719afb47..67cb7945 100644 --- a/backend/routes/cln/balance.js +++ b/backend/routes/cln/balance.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getBalance } from '../../controllers/cln/balance.js'; diff --git a/backend/routes/cln/channels.js b/backend/routes/cln/channels.js index d4550d77..8d02c384 100644 --- a/backend/routes/cln/channels.js +++ b/backend/routes/cln/channels.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { listChannels, openChannel, setChannelFee, closeChannel, getLocalRemoteBalance, listForwards, funderUpdatePolicy, listForwardsPaginated } from '../../controllers/cln/channels.js'; diff --git a/backend/routes/cln/fees.js b/backend/routes/cln/fees.js index a1cd8eee..8dbf71d3 100644 --- a/backend/routes/cln/fees.js +++ b/backend/routes/cln/fees.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getFees } from '../../controllers/cln/fees.js'; diff --git a/backend/routes/cln/getInfo.js b/backend/routes/cln/getInfo.js index 4a9aedea..060cc96d 100644 --- a/backend/routes/cln/getInfo.js +++ b/backend/routes/cln/getInfo.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getInfo } from '../../controllers/cln/getInfo.js'; diff --git a/backend/routes/cln/index.js b/backend/routes/cln/index.js index 39865034..e679145f 100644 --- a/backend/routes/cln/index.js +++ b/backend/routes/cln/index.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import infoCLRoutes from './getInfo.js'; import feesCLRoutes from './fees.js'; diff --git a/backend/routes/cln/invoices.js b/backend/routes/cln/invoices.js index 3141b4ec..04998214 100644 --- a/backend/routes/cln/invoices.js +++ b/backend/routes/cln/invoices.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { listInvoices, addInvoice, deleteExpiredInvoice } from '../../controllers/cln/invoices.js'; diff --git a/backend/routes/cln/network.js b/backend/routes/cln/network.js index 7fa20690..e4fb2f22 100644 --- a/backend/routes/cln/network.js +++ b/backend/routes/cln/network.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getRoute, listNode, listChannel, feeRates, listNodes } from '../../controllers/cln/network.js'; diff --git a/backend/routes/cln/offers.js b/backend/routes/cln/offers.js index fe123949..bcc2738d 100644 --- a/backend/routes/cln/offers.js +++ b/backend/routes/cln/offers.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { listOfferBookmarks, deleteOfferBookmark, listOffers, disableOffer, createOffer, fetchOfferInvoice } from '../../controllers/cln/offers.js'; diff --git a/backend/routes/cln/onchain.js b/backend/routes/cln/onchain.js index f95be2c7..816590ee 100644 --- a/backend/routes/cln/onchain.js +++ b/backend/routes/cln/onchain.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getNewAddress, onChainWithdraw, getUTXOs } from '../../controllers/cln/onchain.js'; diff --git a/backend/routes/cln/payments.js b/backend/routes/cln/payments.js index 6f9c2f42..2f4c6cab 100644 --- a/backend/routes/cln/payments.js +++ b/backend/routes/cln/payments.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { listPayments, postPayment } from '../../controllers/cln/payments.js'; diff --git a/backend/routes/cln/peers.js b/backend/routes/cln/peers.js index 4ccaeb07..65b4315d 100644 --- a/backend/routes/cln/peers.js +++ b/backend/routes/cln/peers.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getPeers, postPeer, deletePeer } from '../../controllers/cln/peers.js'; diff --git a/backend/routes/cln/utility.js b/backend/routes/cln/utility.js index 1114df54..a8ef800d 100644 --- a/backend/routes/cln/utility.js +++ b/backend/routes/cln/utility.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { decodePayments, decodePayment, signMessage, verifyMessage, listConfigs } from '../../controllers/cln/utility.js'; diff --git a/backend/routes/eclair/channels.js b/backend/routes/eclair/channels.js index f51d8388..1148b457 100644 --- a/backend/routes/eclair/channels.js +++ b/backend/routes/eclair/channels.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getChannels, getChannelStats, openChannel, updateChannelRelayFee, closeChannel } from '../../controllers/eclair/channels.js'; diff --git a/backend/routes/eclair/fees.js b/backend/routes/eclair/fees.js index 48e3ab08..f28e1c8f 100644 --- a/backend/routes/eclair/fees.js +++ b/backend/routes/eclair/fees.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getFees, getPayments } from '../../controllers/eclair/fees.js'; diff --git a/backend/routes/eclair/getInfo.js b/backend/routes/eclair/getInfo.js index d542f3e1..4bfa4b68 100644 --- a/backend/routes/eclair/getInfo.js +++ b/backend/routes/eclair/getInfo.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getInfo } from '../../controllers/eclair/getInfo.js'; diff --git a/backend/routes/eclair/index.js b/backend/routes/eclair/index.js index 7fcb4cd0..104ec9e9 100644 --- a/backend/routes/eclair/index.js +++ b/backend/routes/eclair/index.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import infoECLRoutes from './getInfo.js'; import feesECLRoutes from './fees.js'; diff --git a/backend/routes/eclair/invoices.js b/backend/routes/eclair/invoices.js index 1770e6a4..06dddd4c 100644 --- a/backend/routes/eclair/invoices.js +++ b/backend/routes/eclair/invoices.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { listInvoices, getInvoice, createInvoice } from '../../controllers/eclair/invoices.js'; diff --git a/backend/routes/eclair/network.js b/backend/routes/eclair/network.js index ee6a8dd6..71179aac 100644 --- a/backend/routes/eclair/network.js +++ b/backend/routes/eclair/network.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getNodes } from '../../controllers/eclair/network.js'; diff --git a/backend/routes/eclair/onchain.js b/backend/routes/eclair/onchain.js index 4370cd59..b25ecc7f 100644 --- a/backend/routes/eclair/onchain.js +++ b/backend/routes/eclair/onchain.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getNewAddress, getBalance, getTransactions, sendFunds } from '../../controllers/eclair/onchain.js'; diff --git a/backend/routes/eclair/payments.js b/backend/routes/eclair/payments.js index c25db27e..b60fda24 100644 --- a/backend/routes/eclair/payments.js +++ b/backend/routes/eclair/payments.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { queryPaymentRoute, decodePayment, getSentPaymentsInformation, postPayment } from '../../controllers/eclair/payments.js'; diff --git a/backend/routes/eclair/peers.js b/backend/routes/eclair/peers.js index 7bbcde5e..3fe03191 100644 --- a/backend/routes/eclair/peers.js +++ b/backend/routes/eclair/peers.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getPeers, connectPeer, deletePeer } from '../../controllers/eclair/peers.js'; diff --git a/backend/routes/lnd/balance.js b/backend/routes/lnd/balance.js index 6b8e0eb7..929faae2 100644 --- a/backend/routes/lnd/balance.js +++ b/backend/routes/lnd/balance.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getBlockchainBalance } from '../../controllers/lnd/balance.js'; diff --git a/backend/routes/lnd/channels.js b/backend/routes/lnd/channels.js index 25bf6461..6bc1aa7f 100644 --- a/backend/routes/lnd/channels.js +++ b/backend/routes/lnd/channels.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getAllChannels, getPendingChannels, getClosedChannels, postChannel, postTransactions, closeChannel, postChanPolicy } from '../../controllers/lnd/channels.js'; diff --git a/backend/routes/lnd/channelsBackup.js b/backend/routes/lnd/channelsBackup.js index 814b4c91..c5884bea 100644 --- a/backend/routes/lnd/channelsBackup.js +++ b/backend/routes/lnd/channelsBackup.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getBackup, getRestoreList, postBackupVerify, postRestore } from '../../controllers/lnd/channelsBackup.js'; diff --git a/backend/routes/lnd/fees.js b/backend/routes/lnd/fees.js index bb90bfa3..9bb766b3 100644 --- a/backend/routes/lnd/fees.js +++ b/backend/routes/lnd/fees.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getFees } from '../../controllers/lnd/fees.js'; diff --git a/backend/routes/lnd/getInfo.js b/backend/routes/lnd/getInfo.js index 1c4e45fe..7edf39a7 100644 --- a/backend/routes/lnd/getInfo.js +++ b/backend/routes/lnd/getInfo.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getInfo } from '../../controllers/lnd/getInfo.js'; diff --git a/backend/routes/lnd/graph.js b/backend/routes/lnd/graph.js index 8e452f9a..4efa047f 100644 --- a/backend/routes/lnd/graph.js +++ b/backend/routes/lnd/graph.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getDescribeGraph, getGraphInfo, getAliasesForPubkeys, getGraphNode, getGraphEdge, getRemoteFeePolicy, getQueryRoutes } from '../../controllers/lnd/graph.js'; diff --git a/backend/routes/lnd/index.js b/backend/routes/lnd/index.js index 9c517183..bd17733c 100644 --- a/backend/routes/lnd/index.js +++ b/backend/routes/lnd/index.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import infoRoutes from './getInfo.js'; import channelsRoutes from './channels.js'; diff --git a/backend/routes/lnd/invoices.js b/backend/routes/lnd/invoices.js index eaec4746..fc7a3342 100644 --- a/backend/routes/lnd/invoices.js +++ b/backend/routes/lnd/invoices.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { listInvoices, invoiceLookup, addInvoice } from '../../controllers/lnd/invoices.js'; diff --git a/backend/routes/lnd/message.js b/backend/routes/lnd/message.js index 4bf132d5..00e2addf 100644 --- a/backend/routes/lnd/message.js +++ b/backend/routes/lnd/message.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { signMessage, verifyMessage } from '../../controllers/lnd/message.js'; diff --git a/backend/routes/lnd/newAddress.js b/backend/routes/lnd/newAddress.js index 0f74e083..fe2b9ecb 100644 --- a/backend/routes/lnd/newAddress.js +++ b/backend/routes/lnd/newAddress.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getNewAddress } from '../../controllers/lnd/newAddress.js'; diff --git a/backend/routes/lnd/payments.js b/backend/routes/lnd/payments.js index 368e2ae7..9a496d38 100644 --- a/backend/routes/lnd/payments.js +++ b/backend/routes/lnd/payments.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { decodePayment, decodePayments, getPayments, getAllLightningTransactions, paymentLookup } from '../../controllers/lnd/payments.js'; diff --git a/backend/routes/lnd/peers.js b/backend/routes/lnd/peers.js index 9dfb2b38..dcf26dd3 100644 --- a/backend/routes/lnd/peers.js +++ b/backend/routes/lnd/peers.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getPeers, postPeer, deletePeer } from '../../controllers/lnd/peers.js'; diff --git a/backend/routes/lnd/switch.js b/backend/routes/lnd/switch.js index c4c60385..c0a85155 100644 --- a/backend/routes/lnd/switch.js +++ b/backend/routes/lnd/switch.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { forwardingHistory } from '../../controllers/lnd/switch.js'; diff --git a/backend/routes/lnd/transactions.js b/backend/routes/lnd/transactions.js index 98c63687..f8191ad2 100644 --- a/backend/routes/lnd/transactions.js +++ b/backend/routes/lnd/transactions.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getTransactions, postTransactions } from '../../controllers/lnd/transactions.js'; diff --git a/backend/routes/lnd/wallet.js b/backend/routes/lnd/wallet.js index f4b09aa4..4f2fbc9d 100644 --- a/backend/routes/lnd/wallet.js +++ b/backend/routes/lnd/wallet.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { genSeed, updateSelNodeOptions, getUTXOs, operateWallet, bumpFee, labelTransaction, leaseUTXO, releaseUTXO } from '../../controllers/lnd/wallet.js'; diff --git a/backend/routes/shared/RTLConf.js b/backend/routes/shared/RTLConf.js index 13c1860e..d783092d 100644 --- a/backend/routes/shared/RTLConf.js +++ b/backend/routes/shared/RTLConf.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getRTLConfigInitial, getRTLConfig, updateUISettings, update2FASettings, getConfig, getFile, updateSelectedNode, updateDefaultNode, updateServiceSettings, updateSSO, getCurrencyRates } from '../../controllers/shared/RTLConf.js'; diff --git a/backend/routes/shared/authenticate.js b/backend/routes/shared/authenticate.js index 34cb73f2..0cbdbbe4 100644 --- a/backend/routes/shared/authenticate.js +++ b/backend/routes/shared/authenticate.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { authenticateUser, verifyToken, resetPassword, logoutUser } from '../../controllers/shared/authenticate.js'; const router = Router(); diff --git a/backend/routes/shared/boltz.js b/backend/routes/shared/boltz.js index 3961d675..f669753b 100644 --- a/backend/routes/shared/boltz.js +++ b/backend/routes/shared/boltz.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getInfo, getServiceInfo, listSwaps, getSwapInfo, createSwap, createReverseSwap, createChannel, deposit } from '../../controllers/shared/boltz.js'; diff --git a/backend/routes/shared/index.js b/backend/routes/shared/index.js index 1d8f0138..2fd7e10e 100644 --- a/backend/routes/shared/index.js +++ b/backend/routes/shared/index.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import authenticateRoutes from './authenticate.js'; import boltzRoutes from './boltz.js'; diff --git a/backend/routes/shared/loop.js b/backend/routes/shared/loop.js index ddc3ddd3..38436ef5 100644 --- a/backend/routes/shared/loop.js +++ b/backend/routes/shared/loop.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { loopInTerms, loopInQuote, loopInTermsAndQuotes, loopIn, loopOutTerms, loopOutQuote, loopOutTermsAndQuotes, loopOut, swaps, swap } from '../../controllers/shared/loop.js'; diff --git a/backend/routes/shared/pageSettings.js b/backend/routes/shared/pageSettings.js index 61c47a8c..6f3920c6 100644 --- a/backend/routes/shared/pageSettings.js +++ b/backend/routes/shared/pageSettings.js @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getPageSettings, savePageSettings } from '../../controllers/shared/pageSettings.js'; diff --git a/backend/utils/database.js b/backend/utils/database.js index be1ddd00..2a94a40b 100644 --- a/backend/utils/database.js +++ b/backend/utils/database.js @@ -224,7 +224,7 @@ export class DatabaseAdapter { } } catch (err) { - throw new Error(err); + throw new Error(JSON.stringify(err)); } const collectionFilePath = this.dbFilePath + sep + 'rtldb-' + this.selNode.ln_implementation + '-' + collectionName + '.json'; try { @@ -233,7 +233,7 @@ export class DatabaseAdapter { } } catch (err) { - throw new Error(err); + throw new Error(JSON.stringify(err)); } try { const otherFiles = fs.readdirSync(this.dbFilePath); @@ -264,7 +264,7 @@ export class DatabaseAdapter { return dataObj; } catch (err) { - throw new Error(err); + throw new Error(JSON.stringify(err)); } } getSelNode() { diff --git a/frontend/index.html b/frontend/index.html index e4125854..f4a222f0 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -13,6 +13,6 @@ - + \ No newline at end of file diff --git a/frontend/polyfills.3b53c3445d79dc67.js b/frontend/polyfills.3b53c3445d79dc67.js new file mode 100644 index 00000000..ef9cd8c0 --- /dev/null +++ b/frontend/polyfills.3b53c3445d79dc67.js @@ -0,0 +1 @@ +(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[429],{7435:(Fe,pe,$)=>{window.global=window,window.global.Buffer=window.global.Buffer||$(3172).Buffer},5343:(Fe,pe)=>{"use strict";pe.byteLength=function f(I){var L=N(I),_e=L[1];return 3*(L[0]+_e)/4-_e},pe.toByteArray=function me(I){var L,re,D=N(I),_e=D[0],de=D[1],fe=new ke(function ie(I,L,D){return 3*(L+D)/4-D}(0,_e,de)),we=0,Ne=de>0?_e-4:_e;for(re=0;re>16&255,fe[we++]=L>>8&255,fe[we++]=255&L;return 2===de&&(L=O[I.charCodeAt(re)]<<2|O[I.charCodeAt(re+1)]>>4,fe[we++]=255&L),1===de&&(L=O[I.charCodeAt(re)]<<10|O[I.charCodeAt(re+1)]<<4|O[I.charCodeAt(re+2)]>>2,fe[we++]=L>>8&255,fe[we++]=255&L),fe},pe.fromByteArray=function Z(I){for(var L,D=I.length,_e=D%3,de=[],we=0,Ne=D-_e;weNe?Ne:we+16383));return 1===_e?de.push($[(L=I[D-1])>>2]+$[L<<4&63]+"=="):2===_e&&de.push($[(L=(I[D-2]<<8)+I[D-1])>>10]+$[L>>4&63]+$[L<<2&63]+"="),de.join("")};for(var $=[],O=[],ke=typeof Uint8Array<"u"?Uint8Array:Array,Te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",K=0,ce=Te.length;K0)throw new Error("Invalid string. Length must be a multiple of 4");var D=I.indexOf("=");return-1===D&&(D=L),[D,D===L?0:4-D%4]}function se(I){return $[I>>18&63]+$[I>>12&63]+$[I>>6&63]+$[63&I]}function ae(I,L,D){for(var de=[],fe=L;fe{"use strict";var O=$(5343),ke=$(8461),Te="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;pe.Buffer=f,pe.SlowBuffer=function fe(n){return+n!=n&&(n=0),f.alloc(+n)},pe.INSPECT_MAX_BYTES=50;var K=2147483647;function N(n){if(n>K)throw new RangeError('The value "'+n+'" is invalid for option "size"');var e=new Uint8Array(n);return Object.setPrototypeOf(e,f.prototype),e}function f(n,e,t){if("number"==typeof n){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return ae(n)}return ie(n,e,t)}function ie(n,e,t){if("string"==typeof n)return function Z(n,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!f.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var t=0|we(n,e),i=N(t),a=i.write(n,e);return a!==t&&(i=i.slice(0,a)),i}(n,e);if(ArrayBuffer.isView(n))return function L(n){if(Se(n,Uint8Array)){var e=new Uint8Array(n);return D(e.buffer,e.byteOffset,e.byteLength)}return I(n)}(n);if(null==n)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n);if(Se(n,ArrayBuffer)||n&&Se(n.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Se(n,SharedArrayBuffer)||n&&Se(n.buffer,SharedArrayBuffer)))return D(n,e,t);if("number"==typeof n)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=n.valueOf&&n.valueOf();if(null!=i&&i!==n)return f.from(i,e,t);var a=function _e(n){if(f.isBuffer(n)){var e=0|de(n.length),t=N(e);return 0===t.length||n.copy(t,0,0,e),t}return void 0!==n.length?"number"!=typeof n.length||He(n.length)?N(0):I(n):"Buffer"===n.type&&Array.isArray(n.data)?I(n.data):void 0}(n);if(a)return a;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof n[Symbol.toPrimitive])return f.from(n[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n)}function me(n){if("number"!=typeof n)throw new TypeError('"size" argument must be of type number');if(n<0)throw new RangeError('The value "'+n+'" is invalid for option "size"')}function ae(n){return me(n),N(n<0?0:0|de(n))}function I(n){for(var e=n.length<0?0:0|de(n.length),t=N(e),i=0;i=K)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K.toString(16)+" bytes");return 0|n}function we(n,e){if(f.isBuffer(n))return n.length;if(ArrayBuffer.isView(n)||Se(n,ArrayBuffer))return n.byteLength;if("string"!=typeof n)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof n);var t=n.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===t)return 0;for(var a=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return Je(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return at(n).length;default:if(a)return i?-1:Je(n).length;e=(""+e).toLowerCase(),a=!0}}function Ne(n,e,t){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===t||t>this.length)&&(t=this.length),t<=0)||(t>>>=0)<=(e>>>=0))return"";for(n||(n="utf8");;)switch(n){case"hex":return ut(this,e,t);case"utf8":case"utf-8":return De(this,e,t);case"ascii":return nt(this,e,t);case"latin1":case"binary":return Ye(this,e,t);case"base64":return Ue(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return lt(this,e,t);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),i=!0}}function re(n,e,t){var i=n[e];n[e]=n[t],n[t]=i}function Ve(n,e,t,i,a){if(0===n.length)return-1;if("string"==typeof t?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),He(t=+t)&&(t=a?0:n.length-1),t<0&&(t=n.length+t),t>=n.length){if(a)return-1;t=n.length-1}else if(t<0){if(!a)return-1;t=0}if("string"==typeof e&&(e=f.from(e,i)),f.isBuffer(e))return 0===e.length?-1:qe(n,e,t,i,a);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(n,e,t):Uint8Array.prototype.lastIndexOf.call(n,e,t):qe(n,[e],t,i,a);throw new TypeError("val must be string, number or Buffer")}function qe(n,e,t,i,a){var h,r=1,o=n.length,u=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(n.length<2||e.length<2)return-1;r=2,o/=2,u/=2,t/=2}function c(S,R){return 1===r?S[R]:S.readUInt16BE(R*r)}if(a){var d=-1;for(h=t;ho&&(t=o-u),h=t;h>=0;h--){for(var E=!0,m=0;ma&&(i=a):i=a;var r=e.length;i>r/2&&(i=r/2);for(var o=0;o>8,r.push(t%256),r.push(i);return r}(e,n.length-t),n,t,i)}function Ue(n,e,t){return O.fromByteArray(0===e&&t===n.length?n:n.slice(e,t))}function De(n,e,t){t=Math.min(n.length,t);for(var i=[],a=e;a239?4:r>223?3:r>191?2:1;if(a+u<=t)switch(u){case 1:r<128&&(o=r);break;case 2:128==(192&(c=n[a+1]))&&(E=(31&r)<<6|63&c)>127&&(o=E);break;case 3:h=n[a+2],128==(192&(c=n[a+1]))&&128==(192&h)&&(E=(15&r)<<12|(63&c)<<6|63&h)>2047&&(E<55296||E>57343)&&(o=E);break;case 4:h=n[a+2],d=n[a+3],128==(192&(c=n[a+1]))&&128==(192&h)&&128==(192&d)&&(E=(15&r)<<18|(63&c)<<12|(63&h)<<6|63&d)>65535&&E<1114112&&(o=E)}null===o?(o=65533,u=1):o>65535&&(i.push((o-=65536)>>>10&1023|55296),o=56320|1023&o),i.push(o),a+=u}return function Pe(n){var e=n.length;if(e<=4096)return String.fromCharCode.apply(String,n);for(var t="",i=0;ii)&&(t=i);for(var a="",r=e;rt)throw new RangeError("Trying to access beyond buffer length")}function xe(n,e,t,i,a,r){if(!f.isBuffer(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||en.length)throw new RangeError("Index out of range")}function Ce(n,e,t,i,a,r){if(t+i>n.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function ze(n,e,t,i,a){return e=+e,t>>>=0,a||Ce(n,0,t,4),ke.write(n,e,t,i,23,4),t+4}function $e(n,e,t,i,a){return e=+e,t>>>=0,a||Ce(n,0,t,8),ke.write(n,e,t,i,52,8),t+8}pe.kMaxLength=K,!(f.TYPED_ARRAY_SUPPORT=function ce(){try{var n=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(n,e),42===n.foo()}catch{return!1}}())&&typeof console<"u"&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}}),f.poolSize=8192,f.from=function(n,e,t){return ie(n,e,t)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array),f.alloc=function(n,e,t){return function se(n,e,t){return me(n),n<=0?N(n):void 0!==e?"string"==typeof t?N(n).fill(e,t):N(n).fill(e):N(n)}(n,e,t)},f.allocUnsafe=function(n){return ae(n)},f.allocUnsafeSlow=function(n){return ae(n)},f.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==f.prototype},f.compare=function(e,t){if(Se(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),Se(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(e)||!f.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var i=e.length,a=t.length,r=0,o=Math.min(i,a);ra.length?f.from(o).copy(a,r):Uint8Array.prototype.set.call(a,o,r);else{if(!f.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(a,r)}r+=o.length}return a},f.byteLength=we,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tt&&(e+=" ... "),""},Te&&(f.prototype[Te]=f.prototype.inspect),f.prototype.compare=function(e,t,i,a,r){if(Se(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),!f.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===a&&(a=0),void 0===r&&(r=this.length),t<0||i>e.length||a<0||r>this.length)throw new RangeError("out of range index");if(a>=r&&t>=i)return 0;if(a>=r)return-1;if(t>=i)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(a>>>=0),u=(i>>>=0)-(t>>>=0),c=Math.min(o,u),h=this.slice(a,r),d=e.slice(t,i),E=0;E>>=0,isFinite(i)?(i>>>=0,void 0===a&&(a="utf8")):(a=i,i=void 0)}var r=this.length-t;if((void 0===i||i>r)&&(i=r),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var o=!1;;)switch(a){case"hex":return We(this,e,t,i);case"utf8":case"utf-8":return Qe(this,e,t,i);case"ascii":case"latin1":case"binary":return et(this,e,t,i);case"base64":return tt(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ae(this,e,t,i);default:if(o)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},f.prototype.slice=function(e,t){var i=this.length;(e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t>>=0,t>>>=0,i||ne(e,t,this.length);for(var a=this[e],r=1,o=0;++o>>=0,t>>>=0,i||ne(e,t,this.length);for(var a=this[e+--t],r=1;t>0&&(r*=256);)a+=this[e+--t]*r;return a},f.prototype.readUint8=f.prototype.readUInt8=function(e,t){return e>>>=0,t||ne(e,1,this.length),this[e]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(e,t){return e>>>=0,t||ne(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(e,t){return e>>>=0,t||ne(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(e,t){return e>>>=0,t||ne(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(e,t){return e>>>=0,t||ne(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||ne(e,t,this.length);for(var a=this[e],r=1,o=0;++o=(r*=128)&&(a-=Math.pow(2,8*t)),a},f.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||ne(e,t,this.length);for(var a=t,r=1,o=this[e+--a];a>0&&(r*=256);)o+=this[e+--a]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},f.prototype.readInt8=function(e,t){return e>>>=0,t||ne(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){e>>>=0,t||ne(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},f.prototype.readInt16BE=function(e,t){e>>>=0,t||ne(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},f.prototype.readInt32LE=function(e,t){return e>>>=0,t||ne(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,t){return e>>>=0,t||ne(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readFloatLE=function(e,t){return e>>>=0,t||ne(e,4,this.length),ke.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,t){return e>>>=0,t||ne(e,4,this.length),ke.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,t){return e>>>=0,t||ne(e,8,this.length),ke.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,t){return e>>>=0,t||ne(e,8,this.length),ke.read(this,e,!1,52,8)},f.prototype.writeUintLE=f.prototype.writeUIntLE=function(e,t,i,a){e=+e,t>>>=0,i>>>=0,a||xe(this,e,t,i,Math.pow(2,8*i)-1,0);var o=1,u=0;for(this[t]=255&e;++u>>=0,i>>>=0,a||xe(this,e,t,i,Math.pow(2,8*i)-1,0);var o=i-1,u=1;for(this[t+o]=255&e;--o>=0&&(u*=256);)this[t+o]=e/u&255;return t+i},f.prototype.writeUint8=f.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||xe(this,e,t,1,255,0),this[t]=255&e,t+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||xe(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||xe(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||xe(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(e,t,i){return e=+e,t>>>=0,i||xe(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},f.prototype.writeIntLE=function(e,t,i,a){if(e=+e,t>>>=0,!a){var r=Math.pow(2,8*i-1);xe(this,e,t,i,r-1,-r)}var o=0,u=1,c=0;for(this[t]=255&e;++o>0)-c&255;return t+i},f.prototype.writeIntBE=function(e,t,i,a){if(e=+e,t>>>=0,!a){var r=Math.pow(2,8*i-1);xe(this,e,t,i,r-1,-r)}var o=i-1,u=1,c=0;for(this[t+o]=255&e;--o>=0&&(u*=256);)e<0&&0===c&&0!==this[t+o+1]&&(c=1),this[t+o]=(e/u>>0)-c&255;return t+i},f.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||xe(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},f.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||xe(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},f.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||xe(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},f.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||xe(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},f.prototype.writeInt32BE=function(e,t,i){return e=+e,t>>>=0,i||xe(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},f.prototype.writeFloatLE=function(e,t,i){return ze(this,e,t,!0,i)},f.prototype.writeFloatBE=function(e,t,i){return ze(this,e,t,!1,i)},f.prototype.writeDoubleLE=function(e,t,i){return $e(this,e,t,!0,i)},f.prototype.writeDoubleBE=function(e,t,i){return $e(this,e,t,!1,i)},f.prototype.copy=function(e,t,i,a){if(!f.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),!a&&0!==a&&(a=this.length),t>=e.length&&(t=e.length),t||(t=0),a>0&&a=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-t>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&t<57344){if(!a){if(t>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(o+1===i){(e-=3)>-1&&r.push(239,191,189);continue}a=t;continue}if(t<56320){(e-=3)>-1&&r.push(239,191,189),a=t;continue}t=65536+(a-55296<<10|t-56320)}else a&&(e-=3)>-1&&r.push(239,191,189);if(a=null,t<128){if((e-=1)<0)break;r.push(t)}else if(t<2048){if((e-=2)<0)break;r.push(t>>6|192,63&t|128)}else if(t<65536){if((e-=3)<0)break;r.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return r}function at(n){return O.toByteArray(function ot(n){if((n=(n=n.split("=")[0]).trim().replace(it,"")).length<2)return"";for(;n.length%4!=0;)n+="=";return n}(n))}function je(n,e,t,i){for(var a=0;a=e.length||a>=n.length);++a)e[a+t]=n[a];return a}function Se(n,e){return n instanceof e||null!=n&&null!=n.constructor&&null!=n.constructor.name&&n.constructor.name===e.name}function He(n){return n!=n}var ht=function(){for(var n="0123456789abcdef",e=new Array(256),t=0;t<16;++t)for(var i=16*t,a=0;a<16;++a)e[i+a]=n[t]+n[a];return e}()},8461:(Fe,pe)=>{pe.read=function($,O,ke,Te,K){var ce,N,f=8*K-Te-1,ie=(1<>1,se=-7,ae=ke?K-1:0,Z=ke?-1:1,I=$[O+ae];for(ae+=Z,ce=I&(1<<-se)-1,I>>=-se,se+=f;se>0;ce=256*ce+$[O+ae],ae+=Z,se-=8);for(N=ce&(1<<-se)-1,ce>>=-se,se+=Te;se>0;N=256*N+$[O+ae],ae+=Z,se-=8);if(0===ce)ce=1-me;else{if(ce===ie)return N?NaN:1/0*(I?-1:1);N+=Math.pow(2,Te),ce-=me}return(I?-1:1)*N*Math.pow(2,ce-Te)},pe.write=function($,O,ke,Te,K,ce){var N,f,ie,me=8*ce-K-1,se=(1<>1,Z=23===K?Math.pow(2,-24)-Math.pow(2,-77):0,I=Te?0:ce-1,L=Te?1:-1,D=O<0||0===O&&1/O<0?1:0;for(O=Math.abs(O),isNaN(O)||O===1/0?(f=isNaN(O)?1:0,N=se):(N=Math.floor(Math.log(O)/Math.LN2),O*(ie=Math.pow(2,-N))<1&&(N--,ie*=2),(O+=N+ae>=1?Z/ie:Z*Math.pow(2,1-ae))*ie>=2&&(N++,ie/=2),N+ae>=se?(f=0,N=se):N+ae>=1?(f=(O*ie-1)*Math.pow(2,K),N+=ae):(f=O*Math.pow(2,ae-1)*Math.pow(2,K),N=0));K>=8;$[ke+I]=255&f,I+=L,f/=256,K-=8);for(N=N<0;$[ke+I]=255&N,I+=L,N/=256,me-=8);$[ke+I-L]|=128*D}},8583:()=>{"use strict";!function(r){const o=r.performance;function u(X){o&&o.mark&&o.mark(X)}function c(X,v){o&&o.measure&&o.measure(X,v)}u("Zone");const h=r.__Zone_symbol_prefix||"__zone_symbol__";function d(X){return h+X}const E=!0===r[d("forceDuplicateZoneCheck")];if(r.Zone){if(E||"function"!=typeof r.Zone.__symbol__)throw new Error("Zone already loaded.");return r.Zone}let m=(()=>{class X{constructor(s,l){this._parent=s,this._name=l?l.name||"unnamed":"",this._properties=l&&l.properties||{},this._zoneDelegate=new R(this,this._parent&&this._parent._zoneDelegate,l)}static assertZonePatched(){if(r.Promise!==Le.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let s=X.current;for(;s.parent;)s=s.parent;return s}static get current(){return ue.zone}static get currentTask(){return Be}static __load_patch(s,l,A=!1){if(Le.hasOwnProperty(s)){if(!A&&E)throw Error("Already loaded patch: "+s)}else if(!r["__Zone_disable_"+s]){const M="Zone:"+s;u(M),Le[s]=l(r,X,Ee),c(M,M)}}get parent(){return this._parent}get name(){return this._name}get(s){const l=this.getZoneWith(s);if(l)return l._properties[s]}getZoneWith(s){let l=this;for(;l;){if(l._properties.hasOwnProperty(s))return l;l=l._parent}return null}fork(s){if(!s)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,s)}wrap(s,l){if("function"!=typeof s)throw new Error("Expecting function got: "+s);const A=this._zoneDelegate.intercept(this,s,l),M=this;return function(){return M.runGuarded(A,this,arguments,l)}}run(s,l,A,M){ue={parent:ue,zone:this};try{return this._zoneDelegate.invoke(this,s,l,A,M)}finally{ue=ue.parent}}runGuarded(s,l=null,A,M){ue={parent:ue,zone:this};try{try{return this._zoneDelegate.invoke(this,s,l,A,M)}catch(ge){if(this._zoneDelegate.handleError(this,ge))throw ge}}finally{ue=ue.parent}}runTask(s,l,A){if(s.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(s.zone||ve).name+"; Execution: "+this.name+")");if(s.state===J&&(s.type===Ie||s.type===P))return;const M=s.state!=k;M&&s._transitionTo(k,Y),s.runCount++;const ge=Be;Be=s,ue={parent:ue,zone:this};try{s.type==P&&s.data&&!s.data.isPeriodic&&(s.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,s,l,A)}catch(y){if(this._zoneDelegate.handleError(this,y))throw y}}finally{s.state!==J&&s.state!==w&&(s.type==Ie||s.data&&s.data.isPeriodic?M&&s._transitionTo(Y,k):(s.runCount=0,this._updateTaskCount(s,-1),M&&s._transitionTo(J,k,J))),ue=ue.parent,Be=ge}}scheduleTask(s){if(s.zone&&s.zone!==this){let A=this;for(;A;){if(A===s.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${s.zone.name}`);A=A.parent}}s._transitionTo(ye,J);const l=[];s._zoneDelegates=l,s._zone=this;try{s=this._zoneDelegate.scheduleTask(this,s)}catch(A){throw s._transitionTo(w,ye,J),this._zoneDelegate.handleError(this,A),A}return s._zoneDelegates===l&&this._updateTaskCount(s,1),s.state==ye&&s._transitionTo(Y,ye),s}scheduleMicroTask(s,l,A,M){return this.scheduleTask(new b(W,s,l,A,M,void 0))}scheduleMacroTask(s,l,A,M,ge){return this.scheduleTask(new b(P,s,l,A,M,ge))}scheduleEventTask(s,l,A,M,ge){return this.scheduleTask(new b(Ie,s,l,A,M,ge))}cancelTask(s){if(s.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(s.zone||ve).name+"; Execution: "+this.name+")");if(s.state===Y||s.state===k){s._transitionTo(Q,Y,k);try{this._zoneDelegate.cancelTask(this,s)}catch(l){throw s._transitionTo(w,Q),this._zoneDelegate.handleError(this,l),l}return this._updateTaskCount(s,-1),s._transitionTo(J,Q),s.runCount=0,s}}_updateTaskCount(s,l){const A=s._zoneDelegates;-1==l&&(s._zoneDelegates=null);for(let M=0;MX.hasTask(s,l),onScheduleTask:(X,v,s,l)=>X.scheduleTask(s,l),onInvokeTask:(X,v,s,l,A,M)=>X.invokeTask(s,l,A,M),onCancelTask:(X,v,s,l)=>X.cancelTask(s,l)};class R{constructor(v,s,l){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=v,this._parentDelegate=s,this._forkZS=l&&(l&&l.onFork?l:s._forkZS),this._forkDlgt=l&&(l.onFork?s:s._forkDlgt),this._forkCurrZone=l&&(l.onFork?this.zone:s._forkCurrZone),this._interceptZS=l&&(l.onIntercept?l:s._interceptZS),this._interceptDlgt=l&&(l.onIntercept?s:s._interceptDlgt),this._interceptCurrZone=l&&(l.onIntercept?this.zone:s._interceptCurrZone),this._invokeZS=l&&(l.onInvoke?l:s._invokeZS),this._invokeDlgt=l&&(l.onInvoke?s:s._invokeDlgt),this._invokeCurrZone=l&&(l.onInvoke?this.zone:s._invokeCurrZone),this._handleErrorZS=l&&(l.onHandleError?l:s._handleErrorZS),this._handleErrorDlgt=l&&(l.onHandleError?s:s._handleErrorDlgt),this._handleErrorCurrZone=l&&(l.onHandleError?this.zone:s._handleErrorCurrZone),this._scheduleTaskZS=l&&(l.onScheduleTask?l:s._scheduleTaskZS),this._scheduleTaskDlgt=l&&(l.onScheduleTask?s:s._scheduleTaskDlgt),this._scheduleTaskCurrZone=l&&(l.onScheduleTask?this.zone:s._scheduleTaskCurrZone),this._invokeTaskZS=l&&(l.onInvokeTask?l:s._invokeTaskZS),this._invokeTaskDlgt=l&&(l.onInvokeTask?s:s._invokeTaskDlgt),this._invokeTaskCurrZone=l&&(l.onInvokeTask?this.zone:s._invokeTaskCurrZone),this._cancelTaskZS=l&&(l.onCancelTask?l:s._cancelTaskZS),this._cancelTaskDlgt=l&&(l.onCancelTask?s:s._cancelTaskDlgt),this._cancelTaskCurrZone=l&&(l.onCancelTask?this.zone:s._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const A=l&&l.onHasTask;(A||s&&s._hasTaskZS)&&(this._hasTaskZS=A?l:S,this._hasTaskDlgt=s,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=v,l.onScheduleTask||(this._scheduleTaskZS=S,this._scheduleTaskDlgt=s,this._scheduleTaskCurrZone=this.zone),l.onInvokeTask||(this._invokeTaskZS=S,this._invokeTaskDlgt=s,this._invokeTaskCurrZone=this.zone),l.onCancelTask||(this._cancelTaskZS=S,this._cancelTaskDlgt=s,this._cancelTaskCurrZone=this.zone))}fork(v,s){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,v,s):new m(v,s)}intercept(v,s,l){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,v,s,l):s}invoke(v,s,l,A,M){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,v,s,l,A,M):s.apply(l,A)}handleError(v,s){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,v,s)}scheduleTask(v,s){let l=s;if(this._scheduleTaskZS)this._hasTaskZS&&l._zoneDelegates.push(this._hasTaskDlgtOwner),l=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,v,s),l||(l=s);else if(s.scheduleFn)s.scheduleFn(s);else{if(s.type!=W)throw new Error("Task is missing scheduleFn.");B(s)}return l}invokeTask(v,s,l,A){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,v,s,l,A):s.callback.apply(l,A)}cancelTask(v,s){let l;if(this._cancelTaskZS)l=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,v,s);else{if(!s.cancelFn)throw Error("Task is not cancelable");l=s.cancelFn(s)}return l}hasTask(v,s){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,v,s)}catch(l){this.handleError(v,l)}}_updateTaskCount(v,s){const l=this._taskCounts,A=l[v],M=l[v]=A+s;if(M<0)throw new Error("More tasks executed then were scheduled.");0!=A&&0!=M||this.hasTask(this.zone,{microTask:l.microTask>0,macroTask:l.macroTask>0,eventTask:l.eventTask>0,change:v})}}class b{constructor(v,s,l,A,M,ge){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=v,this.source=s,this.data=A,this.scheduleFn=M,this.cancelFn=ge,!l)throw new Error("callback is not defined");this.callback=l;const y=this;this.invoke=v===Ie&&A&&A.useG?b.invokeTask:function(){return b.invokeTask.call(r,y,this,arguments)}}static invokeTask(v,s,l){v||(v=this),Re++;try{return v.runCount++,v.zone.runTask(v,s,l)}finally{1==Re&&g(),Re--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(J,ye)}_transitionTo(v,s,l){if(this._state!==s&&this._state!==l)throw new Error(`${this.type} '${this.source}': can not transition to '${v}', expecting state '${s}'${l?" or '"+l+"'":""}, was '${this._state}'.`);this._state=v,v==J&&(this._zoneDelegates=null)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const q=d("setTimeout"),G=d("Promise"),V=d("then");let be,oe=[],z=!1;function he(X){if(be||r[G]&&(be=r[G].resolve(0)),be){let v=be[V];v||(v=be.then),v.call(be,X)}else r[q](X,0)}function B(X){0===Re&&0===oe.length&&he(g),X&&oe.push(X)}function g(){if(!z){for(z=!0;oe.length;){const X=oe;oe=[];for(let v=0;vue,onUnhandledError:le,microtaskDrainDone:le,scheduleMicroTask:B,showUncaughtError:()=>!m[d("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:le,patchMethod:()=>le,bindArguments:()=>[],patchThen:()=>le,patchMacroTask:()=>le,patchEventPrototype:()=>le,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>le,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>le,wrapWithCurrentZone:()=>le,filterProperties:()=>[],attachOriginToPatched:()=>le,_redefineProperty:()=>le,patchCallbacks:()=>le,nativeScheduleMicroTask:he};let ue={parent:null,zone:new m(null,null)},Be=null,Re=0;function le(){}c("Zone","Zone"),r.Zone=m}(typeof window<"u"&&window||typeof self<"u"&&self||global);const Fe=Object.getOwnPropertyDescriptor,pe=Object.defineProperty,$=Object.getPrototypeOf,O=Object.create,ke=Array.prototype.slice,Te="addEventListener",K="removeEventListener",ce=Zone.__symbol__(Te),N=Zone.__symbol__(K),f="true",ie="false",me=Zone.__symbol__("");function se(r,o){return Zone.current.wrap(r,o)}function ae(r,o,u,c,h){return Zone.current.scheduleMacroTask(r,o,u,c,h)}const Z=Zone.__symbol__,I=typeof window<"u",L=I?window:void 0,D=I&&L||"object"==typeof self&&self||global;function de(r,o){for(let u=r.length-1;u>=0;u--)"function"==typeof r[u]&&(r[u]=se(r[u],o+"_"+u));return r}function we(r){return!r||!1!==r.writable&&!("function"==typeof r.get&&typeof r.set>"u")}const Ne=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,re=!("nw"in D)&&typeof D.process<"u"&&"[object process]"==={}.toString.call(D.process),Ve=!re&&!Ne&&!(!I||!L.HTMLElement),qe=typeof D.process<"u"&&"[object process]"==={}.toString.call(D.process)&&!Ne&&!(!I||!L.HTMLElement),We={},Qe=function(r){if(!(r=r||D.event))return;let o=We[r.type];o||(o=We[r.type]=Z("ON_PROPERTY"+r.type));const u=this||r.target||D,c=u[o];let h;if(Ve&&u===L&&"error"===r.type){const d=r;h=c&&c.call(this,d.message,d.filename,d.lineno,d.colno,d.error),!0===h&&r.preventDefault()}else h=c&&c.apply(this,arguments),null!=h&&!h&&r.preventDefault();return h};function et(r,o,u){let c=Fe(r,o);if(!c&&u&&Fe(u,o)&&(c={enumerable:!0,configurable:!0}),!c||!c.configurable)return;const h=Z("on"+o+"patched");if(r.hasOwnProperty(h)&&r[h])return;delete c.writable,delete c.value;const d=c.get,E=c.set,m=o.slice(2);let S=We[m];S||(S=We[m]=Z("ON_PROPERTY"+m)),c.set=function(R){let b=this;!b&&r===D&&(b=D),b&&("function"==typeof b[S]&&b.removeEventListener(m,Qe),E&&E.call(b,null),b[S]=R,"function"==typeof R&&b.addEventListener(m,Qe,!1))},c.get=function(){let R=this;if(!R&&r===D&&(R=D),!R)return null;const b=R[S];if(b)return b;if(d){let q=d.call(this);if(q)return c.set.call(this,q),"function"==typeof R.removeAttribute&&R.removeAttribute(o),q}return null},pe(r,o,c),r[h]=!0}function tt(r,o,u){if(o)for(let c=0;cfunction(E,m){const S=u(E,m);return S.cbIdx>=0&&"function"==typeof m[S.cbIdx]?ae(S.name,m[S.cbIdx],S,h):d.apply(E,m)})}function Pe(r,o){r[Z("OriginalDelegate")]=o}let nt=!1,Ye=!1;function lt(){if(nt)return Ye;nt=!0;try{const r=L.navigator.userAgent;(-1!==r.indexOf("MSIE ")||-1!==r.indexOf("Trident/")||-1!==r.indexOf("Edge/"))&&(Ye=!0)}catch{}return Ye}Zone.__load_patch("ZoneAwarePromise",(r,o,u)=>{const c=Object.getOwnPropertyDescriptor,h=Object.defineProperty,E=u.symbol,m=[],S=!0===r[E("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],R=E("Promise"),b=E("then");u.onUnhandledError=y=>{if(u.showUncaughtError()){const _=y&&y.rejection;_?console.error("Unhandled Promise rejection:",_ instanceof Error?_.message:_,"; Zone:",y.zone.name,"; Task:",y.task&&y.task.source,"; Value:",_,_ instanceof Error?_.stack:void 0):console.error(y)}},u.microtaskDrainDone=()=>{for(;m.length;){const y=m.shift();try{y.zone.runGuarded(()=>{throw y.throwOriginal?y.rejection:y})}catch(_){V(_)}}};const G=E("unhandledPromiseRejectionHandler");function V(y){u.onUnhandledError(y);try{const _=o[G];"function"==typeof _&&_.call(this,y)}catch{}}function oe(y){return y&&y.then}function z(y){return y}function be(y){return s.reject(y)}const he=E("state"),B=E("value"),g=E("finally"),ve=E("parentPromiseValue"),J=E("parentPromiseState"),Y=null,k=!0,Q=!1;function W(y,_){return p=>{try{Ee(y,_,p)}catch(T){Ee(y,!1,T)}}}const P=function(){let y=!1;return function(p){return function(){y||(y=!0,p.apply(null,arguments))}}},Le=E("currentTaskTrace");function Ee(y,_,p){const T=P();if(y===p)throw new TypeError("Promise resolved with itself");if(y[he]===Y){let C=null;try{("object"==typeof p||"function"==typeof p)&&(C=p&&p.then)}catch(F){return T(()=>{Ee(y,!1,F)})(),y}if(_!==Q&&p instanceof s&&p.hasOwnProperty(he)&&p.hasOwnProperty(B)&&p[he]!==Y)Be(p),Ee(y,p[he],p[B]);else if(_!==Q&&"function"==typeof C)try{C.call(p,T(W(y,_)),T(W(y,!1)))}catch(F){T(()=>{Ee(y,!1,F)})()}else{y[he]=_;const F=y[B];if(y[B]=p,y[g]===g&&_===k&&(y[he]=y[J],y[B]=y[ve]),_===Q&&p instanceof Error){const x=o.currentTask&&o.currentTask.data&&o.currentTask.data.__creationTrace__;x&&h(p,Le,{configurable:!0,enumerable:!1,writable:!0,value:x})}for(let x=0;x{try{const U=y[B],j=!!p&&g===p[g];j&&(p[ve]=U,p[J]=F);const H=_.run(x,void 0,j&&x!==be&&x!==z?[]:[U]);Ee(p,!0,H)}catch(U){Ee(p,!1,U)}},p)}const X=function(){},v=r.AggregateError;class s{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(_){return Ee(new this(null),k,_)}static reject(_){return Ee(new this(null),Q,_)}static any(_){if(!_||"function"!=typeof _[Symbol.iterator])return Promise.reject(new v([],"All promises were rejected"));const p=[];let T=0;try{for(let x of _)T++,p.push(s.resolve(x))}catch{return Promise.reject(new v([],"All promises were rejected"))}if(0===T)return Promise.reject(new v([],"All promises were rejected"));let C=!1;const F=[];return new s((x,U)=>{for(let j=0;j{C||(C=!0,x(H))},H=>{F.push(H),T--,0===T&&(C=!0,U(new v(F,"All promises were rejected")))})})}static race(_){let p,T,C=new this((U,j)=>{p=U,T=j});function F(U){p(U)}function x(U){T(U)}for(let U of _)oe(U)||(U=this.resolve(U)),U.then(F,x);return C}static all(_){return s.allWithCallback(_)}static allSettled(_){return(this&&this.prototype instanceof s?this:s).allWithCallback(_,{thenCallback:T=>({status:"fulfilled",value:T}),errorCallback:T=>({status:"rejected",reason:T})})}static allWithCallback(_,p){let T,C,F=new this((H,ee)=>{T=H,C=ee}),x=2,U=0;const j=[];for(let H of _){oe(H)||(H=this.resolve(H));const ee=U;try{H.then(te=>{j[ee]=p?p.thenCallback(te):te,x--,0===x&&T(j)},te=>{p?(j[ee]=p.errorCallback(te),x--,0===x&&T(j)):C(te)})}catch(te){C(te)}x++,U++}return x-=2,0===x&&T(j),F}constructor(_){const p=this;if(!(p instanceof s))throw new Error("Must be an instanceof Promise.");p[he]=Y,p[B]=[];try{const T=P();_&&_(T(W(p,k)),T(W(p,Q)))}catch(T){Ee(p,!1,T)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return s}then(_,p){var T;let C=null===(T=this.constructor)||void 0===T?void 0:T[Symbol.species];(!C||"function"!=typeof C)&&(C=this.constructor||s);const F=new C(X),x=o.current;return this[he]==Y?this[B].push(x,F,_,p):Re(this,x,F,_,p),F}catch(_){return this.then(null,_)}finally(_){var p;let T=null===(p=this.constructor)||void 0===p?void 0:p[Symbol.species];(!T||"function"!=typeof T)&&(T=s);const C=new T(X);C[g]=g;const F=o.current;return this[he]==Y?this[B].push(F,C,_,_):Re(this,F,C,_,_),C}}s.resolve=s.resolve,s.reject=s.reject,s.race=s.race,s.all=s.all;const l=r[R]=r.Promise;r.Promise=s;const A=E("thenPatched");function M(y){const _=y.prototype,p=c(_,"then");if(p&&(!1===p.writable||!p.configurable))return;const T=_.then;_[b]=T,y.prototype.then=function(C,F){return new s((U,j)=>{T.call(this,U,j)}).then(C,F)},y[A]=!0}return u.patchThen=M,l&&(M(l),De(r,"fetch",y=>function ge(y){return function(_,p){let T=y.apply(_,p);if(T instanceof s)return T;let C=T.constructor;return C[A]||M(C),T}}(y))),Promise[o.__symbol__("uncaughtPromiseErrors")]=m,s}),Zone.__load_patch("toString",r=>{const o=Function.prototype.toString,u=Z("OriginalDelegate"),c=Z("Promise"),h=Z("Error"),d=function(){if("function"==typeof this){const R=this[u];if(R)return"function"==typeof R?o.call(R):Object.prototype.toString.call(R);if(this===Promise){const b=r[c];if(b)return o.call(b)}if(this===Error){const b=r[h];if(b)return o.call(b)}}return o.call(this)};d[u]=o,Function.prototype.toString=d;const E=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":E.call(this)}});let ne=!1;if(typeof window<"u")try{const r=Object.defineProperty({},"passive",{get:function(){ne=!0}});window.addEventListener("test",r,r),window.removeEventListener("test",r,r)}catch{ne=!1}const xe={useG:!0},Ce={},ze={},$e=new RegExp("^"+me+"(\\w+)(true|false)$"),it=Z("propagationStopped");function ot(r,o){const u=(o?o(r):r)+ie,c=(o?o(r):r)+f,h=me+u,d=me+c;Ce[r]={},Ce[r][ie]=h,Ce[r][f]=d}function Je(r,o,u,c){const h=c&&c.add||Te,d=c&&c.rm||K,E=c&&c.listeners||"eventListeners",m=c&&c.rmAll||"removeAllListeners",S=Z(h),R="."+h+":",G=function(B,g,ve){if(B.isRemoved)return;const J=B.callback;let ye;"object"==typeof J&&J.handleEvent&&(B.callback=k=>J.handleEvent(k),B.originalDelegate=J);try{B.invoke(B,g,[ve])}catch(k){ye=k}const Y=B.options;return Y&&"object"==typeof Y&&Y.once&&g[d].call(g,ve.type,B.originalDelegate?B.originalDelegate:B.callback,Y),ye};function V(B,g,ve){if(!(g=g||r.event))return;const J=B||g.target||r,ye=J[Ce[g.type][ve?f:ie]];if(ye){const Y=[];if(1===ye.length){const k=G(ye[0],J,g);k&&Y.push(k)}else{const k=ye.slice();for(let Q=0;Q{throw Q})}}}const oe=function(B){return V(this,B,!1)},z=function(B){return V(this,B,!0)};function be(B,g){if(!B)return!1;let ve=!0;g&&void 0!==g.useG&&(ve=g.useG);const J=g&&g.vh;let ye=!0;g&&void 0!==g.chkDup&&(ye=g.chkDup);let Y=!1;g&&void 0!==g.rt&&(Y=g.rt);let k=B;for(;k&&!k.hasOwnProperty(h);)k=$(k);if(!k&&B[h]&&(k=B),!k||k[S])return!1;const Q=g&&g.eventNameToString,w={},W=k[S]=k[h],P=k[Z(d)]=k[d],Ie=k[Z(E)]=k[E],Le=k[Z(m)]=k[m];let Ee;function ue(p,T){return!ne&&"object"==typeof p&&p?!!p.capture:ne&&T?"boolean"==typeof p?{capture:p,passive:!0}:p?"object"==typeof p&&!1!==p.passive?Object.assign(Object.assign({},p),{passive:!0}):p:{passive:!0}:p}g&&g.prepend&&(Ee=k[Z(g.prepend)]=k[g.prepend]);const s=ve?function(p){if(!w.isExisting)return W.call(w.target,w.eventName,w.capture?z:oe,w.options)}:function(p){return W.call(w.target,w.eventName,p.invoke,w.options)},l=ve?function(p){if(!p.isRemoved){const T=Ce[p.eventName];let C;T&&(C=T[p.capture?f:ie]);const F=C&&p.target[C];if(F)for(let x=0;xfunction(h,d){h[it]=!0,c&&c.apply(h,d)})}function at(r,o,u,c,h){const d=Zone.__symbol__(c);if(o[d])return;const E=o[d]=o[c];o[c]=function(m,S,R){return S&&S.prototype&&h.forEach(function(b){const q=`${u}.${c}::`+b,G=S.prototype;try{if(G.hasOwnProperty(b)){const V=r.ObjectGetOwnPropertyDescriptor(G,b);V&&V.value?(V.value=r.wrapWithCurrentZone(V.value,q),r._redefineProperty(S.prototype,b,V)):G[b]&&(G[b]=r.wrapWithCurrentZone(G[b],q))}else G[b]&&(G[b]=r.wrapWithCurrentZone(G[b],q))}catch{}}),E.call(o,m,S,R)},r.attachOriginToPatched(o[c],E)}function je(r,o,u){if(!u||0===u.length)return o;const c=u.filter(d=>d.target===r);if(!c||0===c.length)return o;const h=c[0].ignoreProperties;return o.filter(d=>-1===h.indexOf(d))}function Se(r,o,u,c){r&&tt(r,je(r,o,u),c)}function He(r){return Object.getOwnPropertyNames(r).filter(o=>o.startsWith("on")&&o.length>2).map(o=>o.substring(2))}Zone.__load_patch("util",(r,o,u)=>{const c=He(r);u.patchOnProperties=tt,u.patchMethod=De,u.bindArguments=de,u.patchMacroTask=rt;const h=o.__symbol__("BLACK_LISTED_EVENTS"),d=o.__symbol__("UNPATCHED_EVENTS");r[d]&&(r[h]=r[d]),r[h]&&(o[h]=o[d]=r[h]),u.patchEventPrototype=ft,u.patchEventTarget=Je,u.isIEOrEdge=lt,u.ObjectDefineProperty=pe,u.ObjectGetOwnPropertyDescriptor=Fe,u.ObjectCreate=O,u.ArraySlice=ke,u.patchClass=Ue,u.wrapWithCurrentZone=se,u.filterProperties=je,u.attachOriginToPatched=Pe,u._redefineProperty=Object.defineProperty,u.patchCallbacks=at,u.getGlobalObjects=()=>({globalSources:ze,zoneSymbolEventNames:Ce,eventNames:c,isBrowser:Ve,isMix:qe,isNode:re,TRUE_STR:f,FALSE_STR:ie,ZONE_SYMBOL_PREFIX:me,ADD_EVENT_LISTENER_STR:Te,REMOVE_EVENT_LISTENER_STR:K})});const n=Z("zoneTask");function e(r,o,u,c){let h=null,d=null;u+=c;const E={};function m(R){const b=R.data;return b.args[0]=function(){return R.invoke.apply(this,arguments)},b.handleId=h.apply(r,b.args),R}function S(R){return d.call(r,R.data.handleId)}h=De(r,o+=c,R=>function(b,q){if("function"==typeof q[0]){const G={isPeriodic:"Interval"===c,delay:"Timeout"===c||"Interval"===c?q[1]||0:void 0,args:q},V=q[0];q[0]=function(){try{return V.apply(this,arguments)}finally{G.isPeriodic||("number"==typeof G.handleId?delete E[G.handleId]:G.handleId&&(G.handleId[n]=null))}};const oe=ae(o,q[0],G,m,S);if(!oe)return oe;const z=oe.data.handleId;return"number"==typeof z?E[z]=oe:z&&(z[n]=oe),z&&z.ref&&z.unref&&"function"==typeof z.ref&&"function"==typeof z.unref&&(oe.ref=z.ref.bind(z),oe.unref=z.unref.bind(z)),"number"==typeof z||z?z:oe}return R.apply(r,q)}),d=De(r,u,R=>function(b,q){const G=q[0];let V;"number"==typeof G?V=E[G]:(V=G&&G[n],V||(V=G)),V&&"string"==typeof V.type?"notScheduled"!==V.state&&(V.cancelFn&&V.data.isPeriodic||0===V.runCount)&&("number"==typeof G?delete E[G]:G&&(G[n]=null),V.zone.cancelTask(V)):R.apply(r,q)})}Zone.__load_patch("legacy",r=>{const o=r[Zone.__symbol__("legacyPatch")];o&&o()}),Zone.__load_patch("queueMicrotask",(r,o,u)=>{u.patchMethod(r,"queueMicrotask",c=>function(h,d){o.current.scheduleMicroTask("queueMicrotask",d[0])})}),Zone.__load_patch("timers",r=>{const o="set",u="clear";e(r,o,u,"Timeout"),e(r,o,u,"Interval"),e(r,o,u,"Immediate")}),Zone.__load_patch("requestAnimationFrame",r=>{e(r,"request","cancel","AnimationFrame"),e(r,"mozRequest","mozCancel","AnimationFrame"),e(r,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(r,o)=>{const u=["alert","prompt","confirm"];for(let c=0;cfunction(S,R){return o.current.run(d,r,R,m)})}),Zone.__load_patch("EventTarget",(r,o,u)=>{(function a(r,o){o.patchEventPrototype(r,o)})(r,u),function i(r,o){if(Zone[o.symbol("patchEventTarget")])return;const{eventNames:u,zoneSymbolEventNames:c,TRUE_STR:h,FALSE_STR:d,ZONE_SYMBOL_PREFIX:E}=o.getGlobalObjects();for(let S=0;S{Ue("MutationObserver"),Ue("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",(r,o,u)=>{Ue("IntersectionObserver")}),Zone.__load_patch("FileReader",(r,o,u)=>{Ue("FileReader")}),Zone.__load_patch("on_property",(r,o,u)=>{!function ht(r,o){if(re&&!qe||Zone[r.symbol("patchEvents")])return;const u=o.__Zone_ignore_on_properties;let c=[];if(Ve){const h=window;c=c.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const d=function ut(){try{const r=L.navigator.userAgent;if(-1!==r.indexOf("MSIE ")||-1!==r.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:h,ignoreProperties:["error"]}]:[];Se(h,He(h),u&&u.concat(d),$(h))}c=c.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let h=0;h{!function t(r,o){const{isBrowser:u,isMix:c}=o.getGlobalObjects();(u||c)&&r.customElements&&"customElements"in r&&o.patchCallbacks(o,r.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(r,u)}),Zone.__load_patch("XHR",(r,o)=>{!function S(R){const b=R.XMLHttpRequest;if(!b)return;const q=b.prototype;let V=q[ce],oe=q[N];if(!V){const w=R.XMLHttpRequestEventTarget;if(w){const W=w.prototype;V=W[ce],oe=W[N]}}const z="readystatechange",be="scheduled";function he(w){const W=w.data,P=W.target;P[d]=!1,P[m]=!1;const Ie=P[h];V||(V=P[ce],oe=P[N]),Ie&&oe.call(P,z,Ie);const Le=P[h]=()=>{if(P.readyState===P.DONE)if(!W.aborted&&P[d]&&w.state===be){const ue=P[o.__symbol__("loadfalse")];if(0!==P.status&&ue&&ue.length>0){const Be=w.invoke;w.invoke=function(){const Re=P[o.__symbol__("loadfalse")];for(let le=0;lefunction(w,W){return w[c]=0==W[2],w[E]=W[1],ve.apply(w,W)}),ye=Z("fetchTaskAborting"),Y=Z("fetchTaskScheduling"),k=De(q,"send",()=>function(w,W){if(!0===o.current[Y]||w[c])return k.apply(w,W);{const P={target:w,url:w[E],isPeriodic:!1,args:W,aborted:!1},Ie=ae("XMLHttpRequest.send",B,P,he,g);w&&!0===w[m]&&!P.aborted&&Ie.state===be&&Ie.invoke()}}),Q=De(q,"abort",()=>function(w,W){const P=function G(w){return w[u]}(w);if(P&&"string"==typeof P.type){if(null==P.cancelFn||P.data&&P.data.aborted)return;P.zone.cancelTask(P)}else if(!0===o.current[ye])return Q.apply(w,W)})}(r);const u=Z("xhrTask"),c=Z("xhrSync"),h=Z("xhrListener"),d=Z("xhrScheduled"),E=Z("xhrURL"),m=Z("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",r=>{r.navigator&&r.navigator.geolocation&&function fe(r,o){const u=r.constructor.name;for(let c=0;c{const S=function(){return m.apply(this,de(arguments,u+"."+h))};return Pe(S,m),S})(d)}}}(r.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(r,o)=>{function u(c){return function(h){st(r,c).forEach(E=>{const m=r.PromiseRejectionEvent;if(m){const S=new m(c,{promise:h.promise,reason:h.rejection});E.invoke(S)}})}}r.PromiseRejectionEvent&&(o[Z("unhandledPromiseRejectionHandler")]=u("unhandledrejection"),o[Z("rejectionHandledHandler")]=u("rejectionhandled"))})}},Fe=>{var pe=O=>Fe(Fe.s=O);pe(8583),pe(7435)}]); \ No newline at end of file diff --git a/frontend/polyfills.8269cb405db5f44b.js b/frontend/polyfills.8269cb405db5f44b.js deleted file mode 100644 index d431b062..00000000 --- a/frontend/polyfills.8269cb405db5f44b.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[429],{7435:(Fe,pe,$)=>{"use strict";window.global=window,window.global.Buffer=window.global.Buffer||$(3172).Buffer},5343:(Fe,pe)=>{"use strict";pe.byteLength=function f(I){var L=N(I),_e=L[1];return 3*(L[0]+_e)/4-_e},pe.toByteArray=function me(I){var L,re,D=N(I),_e=D[0],de=D[1],fe=new ke(function ie(I,L,D){return 3*(L+D)/4-D}(0,_e,de)),we=0,Ne=de>0?_e-4:_e;for(re=0;re>16&255,fe[we++]=L>>8&255,fe[we++]=255&L;return 2===de&&(L=O[I.charCodeAt(re)]<<2|O[I.charCodeAt(re+1)]>>4,fe[we++]=255&L),1===de&&(L=O[I.charCodeAt(re)]<<10|O[I.charCodeAt(re+1)]<<4|O[I.charCodeAt(re+2)]>>2,fe[we++]=L>>8&255,fe[we++]=255&L),fe},pe.fromByteArray=function Z(I){for(var L,D=I.length,_e=D%3,de=[],we=0,Ne=D-_e;weNe?Ne:we+16383));return 1===_e?de.push($[(L=I[D-1])>>2]+$[L<<4&63]+"=="):2===_e&&de.push($[(L=(I[D-2]<<8)+I[D-1])>>10]+$[L>>4&63]+$[L<<2&63]+"="),de.join("")};for(var $=[],O=[],ke=typeof Uint8Array<"u"?Uint8Array:Array,Te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",K=0,ce=Te.length;K0)throw new Error("Invalid string. Length must be a multiple of 4");var D=I.indexOf("=");return-1===D&&(D=L),[D,D===L?0:4-D%4]}function se(I){return $[I>>18&63]+$[I>>12&63]+$[I>>6&63]+$[63&I]}function ae(I,L,D){for(var de=[],fe=L;fe{"use strict";var O=$(5343),ke=$(8461),Te="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;pe.Buffer=f,pe.SlowBuffer=function fe(n){return+n!=n&&(n=0),f.alloc(+n)},pe.INSPECT_MAX_BYTES=50;var K=2147483647;function N(n){if(n>K)throw new RangeError('The value "'+n+'" is invalid for option "size"');var e=new Uint8Array(n);return Object.setPrototypeOf(e,f.prototype),e}function f(n,e,t){if("number"==typeof n){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return ae(n)}return ie(n,e,t)}function ie(n,e,t){if("string"==typeof n)return function Z(n,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!f.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var t=0|we(n,e),i=N(t),a=i.write(n,e);return a!==t&&(i=i.slice(0,a)),i}(n,e);if(ArrayBuffer.isView(n))return function L(n){if(Se(n,Uint8Array)){var e=new Uint8Array(n);return D(e.buffer,e.byteOffset,e.byteLength)}return I(n)}(n);if(null==n)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n);if(Se(n,ArrayBuffer)||n&&Se(n.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Se(n,SharedArrayBuffer)||n&&Se(n.buffer,SharedArrayBuffer)))return D(n,e,t);if("number"==typeof n)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=n.valueOf&&n.valueOf();if(null!=i&&i!==n)return f.from(i,e,t);var a=function _e(n){if(f.isBuffer(n)){var e=0|de(n.length),t=N(e);return 0===t.length||n.copy(t,0,0,e),t}return void 0!==n.length?"number"!=typeof n.length||He(n.length)?N(0):I(n):"Buffer"===n.type&&Array.isArray(n.data)?I(n.data):void 0}(n);if(a)return a;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof n[Symbol.toPrimitive])return f.from(n[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n)}function me(n){if("number"!=typeof n)throw new TypeError('"size" argument must be of type number');if(n<0)throw new RangeError('The value "'+n+'" is invalid for option "size"')}function ae(n){return me(n),N(n<0?0:0|de(n))}function I(n){for(var e=n.length<0?0:0|de(n.length),t=N(e),i=0;i=K)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K.toString(16)+" bytes");return 0|n}function we(n,e){if(f.isBuffer(n))return n.length;if(ArrayBuffer.isView(n)||Se(n,ArrayBuffer))return n.byteLength;if("string"!=typeof n)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof n);var t=n.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===t)return 0;for(var a=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return Je(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return at(n).length;default:if(a)return i?-1:Je(n).length;e=(""+e).toLowerCase(),a=!0}}function Ne(n,e,t){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===t||t>this.length)&&(t=this.length),t<=0)||(t>>>=0)<=(e>>>=0))return"";for(n||(n="utf8");;)switch(n){case"hex":return ut(this,e,t);case"utf8":case"utf-8":return De(this,e,t);case"ascii":return nt(this,e,t);case"latin1":case"binary":return Ye(this,e,t);case"base64":return Ue(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return lt(this,e,t);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),i=!0}}function re(n,e,t){var i=n[e];n[e]=n[t],n[t]=i}function Ve(n,e,t,i,a){if(0===n.length)return-1;if("string"==typeof t?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),He(t=+t)&&(t=a?0:n.length-1),t<0&&(t=n.length+t),t>=n.length){if(a)return-1;t=n.length-1}else if(t<0){if(!a)return-1;t=0}if("string"==typeof e&&(e=f.from(e,i)),f.isBuffer(e))return 0===e.length?-1:qe(n,e,t,i,a);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(n,e,t):Uint8Array.prototype.lastIndexOf.call(n,e,t):qe(n,[e],t,i,a);throw new TypeError("val must be string, number or Buffer")}function qe(n,e,t,i,a){var h,r=1,o=n.length,u=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(n.length<2||e.length<2)return-1;r=2,o/=2,u/=2,t/=2}function c(S,R){return 1===r?S[R]:S.readUInt16BE(R*r)}if(a){var d=-1;for(h=t;ho&&(t=o-u),h=t;h>=0;h--){for(var E=!0,m=0;ma&&(i=a):i=a;var r=e.length;i>r/2&&(i=r/2);for(var o=0;o>8,r.push(t%256),r.push(i);return r}(e,n.length-t),n,t,i)}function Ue(n,e,t){return O.fromByteArray(0===e&&t===n.length?n:n.slice(e,t))}function De(n,e,t){t=Math.min(n.length,t);for(var i=[],a=e;a239?4:r>223?3:r>191?2:1;if(a+u<=t)switch(u){case 1:r<128&&(o=r);break;case 2:128==(192&(c=n[a+1]))&&(E=(31&r)<<6|63&c)>127&&(o=E);break;case 3:h=n[a+2],128==(192&(c=n[a+1]))&&128==(192&h)&&(E=(15&r)<<12|(63&c)<<6|63&h)>2047&&(E<55296||E>57343)&&(o=E);break;case 4:h=n[a+2],d=n[a+3],128==(192&(c=n[a+1]))&&128==(192&h)&&128==(192&d)&&(E=(15&r)<<18|(63&c)<<12|(63&h)<<6|63&d)>65535&&E<1114112&&(o=E)}null===o?(o=65533,u=1):o>65535&&(i.push((o-=65536)>>>10&1023|55296),o=56320|1023&o),i.push(o),a+=u}return function Pe(n){var e=n.length;if(e<=4096)return String.fromCharCode.apply(String,n);for(var t="",i=0;ii)&&(t=i);for(var a="",r=e;rt)throw new RangeError("Trying to access beyond buffer length")}function xe(n,e,t,i,a,r){if(!f.isBuffer(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>a||en.length)throw new RangeError("Index out of range")}function Ce(n,e,t,i,a,r){if(t+i>n.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function ze(n,e,t,i,a){return e=+e,t>>>=0,a||Ce(n,0,t,4),ke.write(n,e,t,i,23,4),t+4}function $e(n,e,t,i,a){return e=+e,t>>>=0,a||Ce(n,0,t,8),ke.write(n,e,t,i,52,8),t+8}pe.kMaxLength=K,!(f.TYPED_ARRAY_SUPPORT=function ce(){try{var n=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(n,e),42===n.foo()}catch{return!1}}())&&typeof console<"u"&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}}),f.poolSize=8192,f.from=function(n,e,t){return ie(n,e,t)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array),f.alloc=function(n,e,t){return function se(n,e,t){return me(n),n<=0?N(n):void 0!==e?"string"==typeof t?N(n).fill(e,t):N(n).fill(e):N(n)}(n,e,t)},f.allocUnsafe=function(n){return ae(n)},f.allocUnsafeSlow=function(n){return ae(n)},f.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==f.prototype},f.compare=function(e,t){if(Se(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),Se(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(e)||!f.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var i=e.length,a=t.length,r=0,o=Math.min(i,a);ra.length?f.from(o).copy(a,r):Uint8Array.prototype.set.call(a,o,r);else{if(!f.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(a,r)}r+=o.length}return a},f.byteLength=we,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tt&&(e+=" ... "),""},Te&&(f.prototype[Te]=f.prototype.inspect),f.prototype.compare=function(e,t,i,a,r){if(Se(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),!f.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===a&&(a=0),void 0===r&&(r=this.length),t<0||i>e.length||a<0||r>this.length)throw new RangeError("out of range index");if(a>=r&&t>=i)return 0;if(a>=r)return-1;if(t>=i)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(a>>>=0),u=(i>>>=0)-(t>>>=0),c=Math.min(o,u),h=this.slice(a,r),d=e.slice(t,i),E=0;E>>=0,isFinite(i)?(i>>>=0,void 0===a&&(a="utf8")):(a=i,i=void 0)}var r=this.length-t;if((void 0===i||i>r)&&(i=r),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var o=!1;;)switch(a){case"hex":return We(this,e,t,i);case"utf8":case"utf-8":return Qe(this,e,t,i);case"ascii":case"latin1":case"binary":return et(this,e,t,i);case"base64":return tt(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ae(this,e,t,i);default:if(o)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},f.prototype.slice=function(e,t){var i=this.length;(e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t>>=0,t>>>=0,i||ne(e,t,this.length);for(var a=this[e],r=1,o=0;++o>>=0,t>>>=0,i||ne(e,t,this.length);for(var a=this[e+--t],r=1;t>0&&(r*=256);)a+=this[e+--t]*r;return a},f.prototype.readUint8=f.prototype.readUInt8=function(e,t){return e>>>=0,t||ne(e,1,this.length),this[e]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(e,t){return e>>>=0,t||ne(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(e,t){return e>>>=0,t||ne(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(e,t){return e>>>=0,t||ne(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(e,t){return e>>>=0,t||ne(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||ne(e,t,this.length);for(var a=this[e],r=1,o=0;++o=(r*=128)&&(a-=Math.pow(2,8*t)),a},f.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||ne(e,t,this.length);for(var a=t,r=1,o=this[e+--a];a>0&&(r*=256);)o+=this[e+--a]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},f.prototype.readInt8=function(e,t){return e>>>=0,t||ne(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){e>>>=0,t||ne(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},f.prototype.readInt16BE=function(e,t){e>>>=0,t||ne(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},f.prototype.readInt32LE=function(e,t){return e>>>=0,t||ne(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,t){return e>>>=0,t||ne(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readFloatLE=function(e,t){return e>>>=0,t||ne(e,4,this.length),ke.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,t){return e>>>=0,t||ne(e,4,this.length),ke.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,t){return e>>>=0,t||ne(e,8,this.length),ke.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,t){return e>>>=0,t||ne(e,8,this.length),ke.read(this,e,!1,52,8)},f.prototype.writeUintLE=f.prototype.writeUIntLE=function(e,t,i,a){e=+e,t>>>=0,i>>>=0,a||xe(this,e,t,i,Math.pow(2,8*i)-1,0);var o=1,u=0;for(this[t]=255&e;++u>>=0,i>>>=0,a||xe(this,e,t,i,Math.pow(2,8*i)-1,0);var o=i-1,u=1;for(this[t+o]=255&e;--o>=0&&(u*=256);)this[t+o]=e/u&255;return t+i},f.prototype.writeUint8=f.prototype.writeUInt8=function(e,t,i){return e=+e,t>>>=0,i||xe(this,e,t,1,255,0),this[t]=255&e,t+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(e,t,i){return e=+e,t>>>=0,i||xe(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(e,t,i){return e=+e,t>>>=0,i||xe(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(e,t,i){return e=+e,t>>>=0,i||xe(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(e,t,i){return e=+e,t>>>=0,i||xe(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},f.prototype.writeIntLE=function(e,t,i,a){if(e=+e,t>>>=0,!a){var r=Math.pow(2,8*i-1);xe(this,e,t,i,r-1,-r)}var o=0,u=1,c=0;for(this[t]=255&e;++o>0)-c&255;return t+i},f.prototype.writeIntBE=function(e,t,i,a){if(e=+e,t>>>=0,!a){var r=Math.pow(2,8*i-1);xe(this,e,t,i,r-1,-r)}var o=i-1,u=1,c=0;for(this[t+o]=255&e;--o>=0&&(u*=256);)e<0&&0===c&&0!==this[t+o+1]&&(c=1),this[t+o]=(e/u>>0)-c&255;return t+i},f.prototype.writeInt8=function(e,t,i){return e=+e,t>>>=0,i||xe(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},f.prototype.writeInt16LE=function(e,t,i){return e=+e,t>>>=0,i||xe(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},f.prototype.writeInt16BE=function(e,t,i){return e=+e,t>>>=0,i||xe(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},f.prototype.writeInt32LE=function(e,t,i){return e=+e,t>>>=0,i||xe(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},f.prototype.writeInt32BE=function(e,t,i){return e=+e,t>>>=0,i||xe(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},f.prototype.writeFloatLE=function(e,t,i){return ze(this,e,t,!0,i)},f.prototype.writeFloatBE=function(e,t,i){return ze(this,e,t,!1,i)},f.prototype.writeDoubleLE=function(e,t,i){return $e(this,e,t,!0,i)},f.prototype.writeDoubleBE=function(e,t,i){return $e(this,e,t,!1,i)},f.prototype.copy=function(e,t,i,a){if(!f.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),!a&&0!==a&&(a=this.length),t>=e.length&&(t=e.length),t||(t=0),a>0&&a=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-t>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&t<57344){if(!a){if(t>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(o+1===i){(e-=3)>-1&&r.push(239,191,189);continue}a=t;continue}if(t<56320){(e-=3)>-1&&r.push(239,191,189),a=t;continue}t=65536+(a-55296<<10|t-56320)}else a&&(e-=3)>-1&&r.push(239,191,189);if(a=null,t<128){if((e-=1)<0)break;r.push(t)}else if(t<2048){if((e-=2)<0)break;r.push(t>>6|192,63&t|128)}else if(t<65536){if((e-=3)<0)break;r.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return r}function at(n){return O.toByteArray(function ot(n){if((n=(n=n.split("=")[0]).trim().replace(it,"")).length<2)return"";for(;n.length%4!=0;)n+="=";return n}(n))}function je(n,e,t,i){for(var a=0;a=e.length||a>=n.length);++a)e[a+t]=n[a];return a}function Se(n,e){return n instanceof e||null!=n&&null!=n.constructor&&null!=n.constructor.name&&n.constructor.name===e.name}function He(n){return n!=n}var ht=function(){for(var n="0123456789abcdef",e=new Array(256),t=0;t<16;++t)for(var i=16*t,a=0;a<16;++a)e[i+a]=n[t]+n[a];return e}()},8461:(Fe,pe)=>{pe.read=function($,O,ke,Te,K){var ce,N,f=8*K-Te-1,ie=(1<>1,se=-7,ae=ke?K-1:0,Z=ke?-1:1,I=$[O+ae];for(ae+=Z,ce=I&(1<<-se)-1,I>>=-se,se+=f;se>0;ce=256*ce+$[O+ae],ae+=Z,se-=8);for(N=ce&(1<<-se)-1,ce>>=-se,se+=Te;se>0;N=256*N+$[O+ae],ae+=Z,se-=8);if(0===ce)ce=1-me;else{if(ce===ie)return N?NaN:1/0*(I?-1:1);N+=Math.pow(2,Te),ce-=me}return(I?-1:1)*N*Math.pow(2,ce-Te)},pe.write=function($,O,ke,Te,K,ce){var N,f,ie,me=8*ce-K-1,se=(1<>1,Z=23===K?Math.pow(2,-24)-Math.pow(2,-77):0,I=Te?0:ce-1,L=Te?1:-1,D=O<0||0===O&&1/O<0?1:0;for(O=Math.abs(O),isNaN(O)||O===1/0?(f=isNaN(O)?1:0,N=se):(N=Math.floor(Math.log(O)/Math.LN2),O*(ie=Math.pow(2,-N))<1&&(N--,ie*=2),(O+=N+ae>=1?Z/ie:Z*Math.pow(2,1-ae))*ie>=2&&(N++,ie/=2),N+ae>=se?(f=0,N=se):N+ae>=1?(f=(O*ie-1)*Math.pow(2,K),N+=ae):(f=O*Math.pow(2,ae-1)*Math.pow(2,K),N=0));K>=8;$[ke+I]=255&f,I+=L,f/=256,K-=8);for(N=N<0;$[ke+I]=255&N,I+=L,N/=256,me-=8);$[ke+I-L]|=128*D}},8583:()=>{"use strict";!function(r){const o=r.performance;function u(X){o&&o.mark&&o.mark(X)}function c(X,v){o&&o.measure&&o.measure(X,v)}u("Zone");const h=r.__Zone_symbol_prefix||"__zone_symbol__";function d(X){return h+X}const E=!0===r[d("forceDuplicateZoneCheck")];if(r.Zone){if(E||"function"!=typeof r.Zone.__symbol__)throw new Error("Zone already loaded.");return r.Zone}let m=(()=>{class X{constructor(s,l){this._parent=s,this._name=l?l.name||"unnamed":"",this._properties=l&&l.properties||{},this._zoneDelegate=new R(this,this._parent&&this._parent._zoneDelegate,l)}static assertZonePatched(){if(r.Promise!==Le.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let s=X.current;for(;s.parent;)s=s.parent;return s}static get current(){return ue.zone}static get currentTask(){return Be}static __load_patch(s,l,A=!1){if(Le.hasOwnProperty(s)){if(!A&&E)throw Error("Already loaded patch: "+s)}else if(!r["__Zone_disable_"+s]){const M="Zone:"+s;u(M),Le[s]=l(r,X,Ee),c(M,M)}}get parent(){return this._parent}get name(){return this._name}get(s){const l=this.getZoneWith(s);if(l)return l._properties[s]}getZoneWith(s){let l=this;for(;l;){if(l._properties.hasOwnProperty(s))return l;l=l._parent}return null}fork(s){if(!s)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,s)}wrap(s,l){if("function"!=typeof s)throw new Error("Expecting function got: "+s);const A=this._zoneDelegate.intercept(this,s,l),M=this;return function(){return M.runGuarded(A,this,arguments,l)}}run(s,l,A,M){ue={parent:ue,zone:this};try{return this._zoneDelegate.invoke(this,s,l,A,M)}finally{ue=ue.parent}}runGuarded(s,l=null,A,M){ue={parent:ue,zone:this};try{try{return this._zoneDelegate.invoke(this,s,l,A,M)}catch(ge){if(this._zoneDelegate.handleError(this,ge))throw ge}}finally{ue=ue.parent}}runTask(s,l,A){if(s.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(s.zone||ve).name+"; Execution: "+this.name+")");if(s.state===J&&(s.type===Ie||s.type===P))return;const M=s.state!=k;M&&s._transitionTo(k,Y),s.runCount++;const ge=Be;Be=s,ue={parent:ue,zone:this};try{s.type==P&&s.data&&!s.data.isPeriodic&&(s.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,s,l,A)}catch(y){if(this._zoneDelegate.handleError(this,y))throw y}}finally{s.state!==J&&s.state!==w&&(s.type==Ie||s.data&&s.data.isPeriodic?M&&s._transitionTo(Y,k):(s.runCount=0,this._updateTaskCount(s,-1),M&&s._transitionTo(J,k,J))),ue=ue.parent,Be=ge}}scheduleTask(s){if(s.zone&&s.zone!==this){let A=this;for(;A;){if(A===s.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${s.zone.name}`);A=A.parent}}s._transitionTo(ye,J);const l=[];s._zoneDelegates=l,s._zone=this;try{s=this._zoneDelegate.scheduleTask(this,s)}catch(A){throw s._transitionTo(w,ye,J),this._zoneDelegate.handleError(this,A),A}return s._zoneDelegates===l&&this._updateTaskCount(s,1),s.state==ye&&s._transitionTo(Y,ye),s}scheduleMicroTask(s,l,A,M){return this.scheduleTask(new b(W,s,l,A,M,void 0))}scheduleMacroTask(s,l,A,M,ge){return this.scheduleTask(new b(P,s,l,A,M,ge))}scheduleEventTask(s,l,A,M,ge){return this.scheduleTask(new b(Ie,s,l,A,M,ge))}cancelTask(s){if(s.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(s.zone||ve).name+"; Execution: "+this.name+")");if(s.state===Y||s.state===k){s._transitionTo(Q,Y,k);try{this._zoneDelegate.cancelTask(this,s)}catch(l){throw s._transitionTo(w,Q),this._zoneDelegate.handleError(this,l),l}return this._updateTaskCount(s,-1),s._transitionTo(J,Q),s.runCount=0,s}}_updateTaskCount(s,l){const A=s._zoneDelegates;-1==l&&(s._zoneDelegates=null);for(let M=0;MX.hasTask(s,l),onScheduleTask:(X,v,s,l)=>X.scheduleTask(s,l),onInvokeTask:(X,v,s,l,A,M)=>X.invokeTask(s,l,A,M),onCancelTask:(X,v,s,l)=>X.cancelTask(s,l)};class R{constructor(v,s,l){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=v,this._parentDelegate=s,this._forkZS=l&&(l&&l.onFork?l:s._forkZS),this._forkDlgt=l&&(l.onFork?s:s._forkDlgt),this._forkCurrZone=l&&(l.onFork?this.zone:s._forkCurrZone),this._interceptZS=l&&(l.onIntercept?l:s._interceptZS),this._interceptDlgt=l&&(l.onIntercept?s:s._interceptDlgt),this._interceptCurrZone=l&&(l.onIntercept?this.zone:s._interceptCurrZone),this._invokeZS=l&&(l.onInvoke?l:s._invokeZS),this._invokeDlgt=l&&(l.onInvoke?s:s._invokeDlgt),this._invokeCurrZone=l&&(l.onInvoke?this.zone:s._invokeCurrZone),this._handleErrorZS=l&&(l.onHandleError?l:s._handleErrorZS),this._handleErrorDlgt=l&&(l.onHandleError?s:s._handleErrorDlgt),this._handleErrorCurrZone=l&&(l.onHandleError?this.zone:s._handleErrorCurrZone),this._scheduleTaskZS=l&&(l.onScheduleTask?l:s._scheduleTaskZS),this._scheduleTaskDlgt=l&&(l.onScheduleTask?s:s._scheduleTaskDlgt),this._scheduleTaskCurrZone=l&&(l.onScheduleTask?this.zone:s._scheduleTaskCurrZone),this._invokeTaskZS=l&&(l.onInvokeTask?l:s._invokeTaskZS),this._invokeTaskDlgt=l&&(l.onInvokeTask?s:s._invokeTaskDlgt),this._invokeTaskCurrZone=l&&(l.onInvokeTask?this.zone:s._invokeTaskCurrZone),this._cancelTaskZS=l&&(l.onCancelTask?l:s._cancelTaskZS),this._cancelTaskDlgt=l&&(l.onCancelTask?s:s._cancelTaskDlgt),this._cancelTaskCurrZone=l&&(l.onCancelTask?this.zone:s._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const A=l&&l.onHasTask;(A||s&&s._hasTaskZS)&&(this._hasTaskZS=A?l:S,this._hasTaskDlgt=s,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=v,l.onScheduleTask||(this._scheduleTaskZS=S,this._scheduleTaskDlgt=s,this._scheduleTaskCurrZone=this.zone),l.onInvokeTask||(this._invokeTaskZS=S,this._invokeTaskDlgt=s,this._invokeTaskCurrZone=this.zone),l.onCancelTask||(this._cancelTaskZS=S,this._cancelTaskDlgt=s,this._cancelTaskCurrZone=this.zone))}fork(v,s){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,v,s):new m(v,s)}intercept(v,s,l){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,v,s,l):s}invoke(v,s,l,A,M){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,v,s,l,A,M):s.apply(l,A)}handleError(v,s){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,v,s)}scheduleTask(v,s){let l=s;if(this._scheduleTaskZS)this._hasTaskZS&&l._zoneDelegates.push(this._hasTaskDlgtOwner),l=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,v,s),l||(l=s);else if(s.scheduleFn)s.scheduleFn(s);else{if(s.type!=W)throw new Error("Task is missing scheduleFn.");B(s)}return l}invokeTask(v,s,l,A){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,v,s,l,A):s.callback.apply(l,A)}cancelTask(v,s){let l;if(this._cancelTaskZS)l=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,v,s);else{if(!s.cancelFn)throw Error("Task is not cancelable");l=s.cancelFn(s)}return l}hasTask(v,s){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,v,s)}catch(l){this.handleError(v,l)}}_updateTaskCount(v,s){const l=this._taskCounts,A=l[v],M=l[v]=A+s;if(M<0)throw new Error("More tasks executed then were scheduled.");0!=A&&0!=M||this.hasTask(this.zone,{microTask:l.microTask>0,macroTask:l.macroTask>0,eventTask:l.eventTask>0,change:v})}}class b{constructor(v,s,l,A,M,ge){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=v,this.source=s,this.data=A,this.scheduleFn=M,this.cancelFn=ge,!l)throw new Error("callback is not defined");this.callback=l;const y=this;this.invoke=v===Ie&&A&&A.useG?b.invokeTask:function(){return b.invokeTask.call(r,y,this,arguments)}}static invokeTask(v,s,l){v||(v=this),Re++;try{return v.runCount++,v.zone.runTask(v,s,l)}finally{1==Re&&g(),Re--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(J,ye)}_transitionTo(v,s,l){if(this._state!==s&&this._state!==l)throw new Error(`${this.type} '${this.source}': can not transition to '${v}', expecting state '${s}'${l?" or '"+l+"'":""}, was '${this._state}'.`);this._state=v,v==J&&(this._zoneDelegates=null)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}const q=d("setTimeout"),G=d("Promise"),V=d("then");let be,oe=[],z=!1;function he(X){if(be||r[G]&&(be=r[G].resolve(0)),be){let v=be[V];v||(v=be.then),v.call(be,X)}else r[q](X,0)}function B(X){0===Re&&0===oe.length&&he(g),X&&oe.push(X)}function g(){if(!z){for(z=!0;oe.length;){const X=oe;oe=[];for(let v=0;vue,onUnhandledError:le,microtaskDrainDone:le,scheduleMicroTask:B,showUncaughtError:()=>!m[d("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:le,patchMethod:()=>le,bindArguments:()=>[],patchThen:()=>le,patchMacroTask:()=>le,patchEventPrototype:()=>le,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>le,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>le,wrapWithCurrentZone:()=>le,filterProperties:()=>[],attachOriginToPatched:()=>le,_redefineProperty:()=>le,patchCallbacks:()=>le,nativeScheduleMicroTask:he};let ue={parent:null,zone:new m(null,null)},Be=null,Re=0;function le(){}c("Zone","Zone"),r.Zone=m}(typeof window<"u"&&window||typeof self<"u"&&self||global);const Fe=Object.getOwnPropertyDescriptor,pe=Object.defineProperty,$=Object.getPrototypeOf,O=Object.create,ke=Array.prototype.slice,Te="addEventListener",K="removeEventListener",ce=Zone.__symbol__(Te),N=Zone.__symbol__(K),f="true",ie="false",me=Zone.__symbol__("");function se(r,o){return Zone.current.wrap(r,o)}function ae(r,o,u,c,h){return Zone.current.scheduleMacroTask(r,o,u,c,h)}const Z=Zone.__symbol__,I=typeof window<"u",L=I?window:void 0,D=I&&L||"object"==typeof self&&self||global;function de(r,o){for(let u=r.length-1;u>=0;u--)"function"==typeof r[u]&&(r[u]=se(r[u],o+"_"+u));return r}function we(r){return!r||!1!==r.writable&&!("function"==typeof r.get&&typeof r.set>"u")}const Ne=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,re=!("nw"in D)&&typeof D.process<"u"&&"[object process]"==={}.toString.call(D.process),Ve=!re&&!Ne&&!(!I||!L.HTMLElement),qe=typeof D.process<"u"&&"[object process]"==={}.toString.call(D.process)&&!Ne&&!(!I||!L.HTMLElement),We={},Qe=function(r){if(!(r=r||D.event))return;let o=We[r.type];o||(o=We[r.type]=Z("ON_PROPERTY"+r.type));const u=this||r.target||D,c=u[o];let h;if(Ve&&u===L&&"error"===r.type){const d=r;h=c&&c.call(this,d.message,d.filename,d.lineno,d.colno,d.error),!0===h&&r.preventDefault()}else h=c&&c.apply(this,arguments),null!=h&&!h&&r.preventDefault();return h};function et(r,o,u){let c=Fe(r,o);if(!c&&u&&Fe(u,o)&&(c={enumerable:!0,configurable:!0}),!c||!c.configurable)return;const h=Z("on"+o+"patched");if(r.hasOwnProperty(h)&&r[h])return;delete c.writable,delete c.value;const d=c.get,E=c.set,m=o.slice(2);let S=We[m];S||(S=We[m]=Z("ON_PROPERTY"+m)),c.set=function(R){let b=this;!b&&r===D&&(b=D),b&&("function"==typeof b[S]&&b.removeEventListener(m,Qe),E&&E.call(b,null),b[S]=R,"function"==typeof R&&b.addEventListener(m,Qe,!1))},c.get=function(){let R=this;if(!R&&r===D&&(R=D),!R)return null;const b=R[S];if(b)return b;if(d){let q=d.call(this);if(q)return c.set.call(this,q),"function"==typeof R.removeAttribute&&R.removeAttribute(o),q}return null},pe(r,o,c),r[h]=!0}function tt(r,o,u){if(o)for(let c=0;cfunction(E,m){const S=u(E,m);return S.cbIdx>=0&&"function"==typeof m[S.cbIdx]?ae(S.name,m[S.cbIdx],S,h):d.apply(E,m)})}function Pe(r,o){r[Z("OriginalDelegate")]=o}let nt=!1,Ye=!1;function lt(){if(nt)return Ye;nt=!0;try{const r=L.navigator.userAgent;(-1!==r.indexOf("MSIE ")||-1!==r.indexOf("Trident/")||-1!==r.indexOf("Edge/"))&&(Ye=!0)}catch{}return Ye}Zone.__load_patch("ZoneAwarePromise",(r,o,u)=>{const c=Object.getOwnPropertyDescriptor,h=Object.defineProperty,E=u.symbol,m=[],S=!0===r[E("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],R=E("Promise"),b=E("then");u.onUnhandledError=y=>{if(u.showUncaughtError()){const _=y&&y.rejection;_?console.error("Unhandled Promise rejection:",_ instanceof Error?_.message:_,"; Zone:",y.zone.name,"; Task:",y.task&&y.task.source,"; Value:",_,_ instanceof Error?_.stack:void 0):console.error(y)}},u.microtaskDrainDone=()=>{for(;m.length;){const y=m.shift();try{y.zone.runGuarded(()=>{throw y.throwOriginal?y.rejection:y})}catch(_){V(_)}}};const G=E("unhandledPromiseRejectionHandler");function V(y){u.onUnhandledError(y);try{const _=o[G];"function"==typeof _&&_.call(this,y)}catch{}}function oe(y){return y&&y.then}function z(y){return y}function be(y){return s.reject(y)}const he=E("state"),B=E("value"),g=E("finally"),ve=E("parentPromiseValue"),J=E("parentPromiseState"),Y=null,k=!0,Q=!1;function W(y,_){return p=>{try{Ee(y,_,p)}catch(T){Ee(y,!1,T)}}}const P=function(){let y=!1;return function(p){return function(){y||(y=!0,p.apply(null,arguments))}}},Le=E("currentTaskTrace");function Ee(y,_,p){const T=P();if(y===p)throw new TypeError("Promise resolved with itself");if(y[he]===Y){let C=null;try{("object"==typeof p||"function"==typeof p)&&(C=p&&p.then)}catch(F){return T(()=>{Ee(y,!1,F)})(),y}if(_!==Q&&p instanceof s&&p.hasOwnProperty(he)&&p.hasOwnProperty(B)&&p[he]!==Y)Be(p),Ee(y,p[he],p[B]);else if(_!==Q&&"function"==typeof C)try{C.call(p,T(W(y,_)),T(W(y,!1)))}catch(F){T(()=>{Ee(y,!1,F)})()}else{y[he]=_;const F=y[B];if(y[B]=p,y[g]===g&&_===k&&(y[he]=y[J],y[B]=y[ve]),_===Q&&p instanceof Error){const x=o.currentTask&&o.currentTask.data&&o.currentTask.data.__creationTrace__;x&&h(p,Le,{configurable:!0,enumerable:!1,writable:!0,value:x})}for(let x=0;x{try{const U=y[B],j=!!p&&g===p[g];j&&(p[ve]=U,p[J]=F);const H=_.run(x,void 0,j&&x!==be&&x!==z?[]:[U]);Ee(p,!0,H)}catch(U){Ee(p,!1,U)}},p)}const X=function(){},v=r.AggregateError;class s{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(_){return Ee(new this(null),k,_)}static reject(_){return Ee(new this(null),Q,_)}static any(_){if(!_||"function"!=typeof _[Symbol.iterator])return Promise.reject(new v([],"All promises were rejected"));const p=[];let T=0;try{for(let x of _)T++,p.push(s.resolve(x))}catch{return Promise.reject(new v([],"All promises were rejected"))}if(0===T)return Promise.reject(new v([],"All promises were rejected"));let C=!1;const F=[];return new s((x,U)=>{for(let j=0;j{C||(C=!0,x(H))},H=>{F.push(H),T--,0===T&&(C=!0,U(new v(F,"All promises were rejected")))})})}static race(_){let p,T,C=new this((U,j)=>{p=U,T=j});function F(U){p(U)}function x(U){T(U)}for(let U of _)oe(U)||(U=this.resolve(U)),U.then(F,x);return C}static all(_){return s.allWithCallback(_)}static allSettled(_){return(this&&this.prototype instanceof s?this:s).allWithCallback(_,{thenCallback:T=>({status:"fulfilled",value:T}),errorCallback:T=>({status:"rejected",reason:T})})}static allWithCallback(_,p){let T,C,F=new this((H,ee)=>{T=H,C=ee}),x=2,U=0;const j=[];for(let H of _){oe(H)||(H=this.resolve(H));const ee=U;try{H.then(te=>{j[ee]=p?p.thenCallback(te):te,x--,0===x&&T(j)},te=>{p?(j[ee]=p.errorCallback(te),x--,0===x&&T(j)):C(te)})}catch(te){C(te)}x++,U++}return x-=2,0===x&&T(j),F}constructor(_){const p=this;if(!(p instanceof s))throw new Error("Must be an instanceof Promise.");p[he]=Y,p[B]=[];try{const T=P();_&&_(T(W(p,k)),T(W(p,Q)))}catch(T){Ee(p,!1,T)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return s}then(_,p){var T;let C=null===(T=this.constructor)||void 0===T?void 0:T[Symbol.species];(!C||"function"!=typeof C)&&(C=this.constructor||s);const F=new C(X),x=o.current;return this[he]==Y?this[B].push(x,F,_,p):Re(this,x,F,_,p),F}catch(_){return this.then(null,_)}finally(_){var p;let T=null===(p=this.constructor)||void 0===p?void 0:p[Symbol.species];(!T||"function"!=typeof T)&&(T=s);const C=new T(X);C[g]=g;const F=o.current;return this[he]==Y?this[B].push(F,C,_,_):Re(this,F,C,_,_),C}}s.resolve=s.resolve,s.reject=s.reject,s.race=s.race,s.all=s.all;const l=r[R]=r.Promise;r.Promise=s;const A=E("thenPatched");function M(y){const _=y.prototype,p=c(_,"then");if(p&&(!1===p.writable||!p.configurable))return;const T=_.then;_[b]=T,y.prototype.then=function(C,F){return new s((U,j)=>{T.call(this,U,j)}).then(C,F)},y[A]=!0}return u.patchThen=M,l&&(M(l),De(r,"fetch",y=>function ge(y){return function(_,p){let T=y.apply(_,p);if(T instanceof s)return T;let C=T.constructor;return C[A]||M(C),T}}(y))),Promise[o.__symbol__("uncaughtPromiseErrors")]=m,s}),Zone.__load_patch("toString",r=>{const o=Function.prototype.toString,u=Z("OriginalDelegate"),c=Z("Promise"),h=Z("Error"),d=function(){if("function"==typeof this){const R=this[u];if(R)return"function"==typeof R?o.call(R):Object.prototype.toString.call(R);if(this===Promise){const b=r[c];if(b)return o.call(b)}if(this===Error){const b=r[h];if(b)return o.call(b)}}return o.call(this)};d[u]=o,Function.prototype.toString=d;const E=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":E.call(this)}});let ne=!1;if(typeof window<"u")try{const r=Object.defineProperty({},"passive",{get:function(){ne=!0}});window.addEventListener("test",r,r),window.removeEventListener("test",r,r)}catch{ne=!1}const xe={useG:!0},Ce={},ze={},$e=new RegExp("^"+me+"(\\w+)(true|false)$"),it=Z("propagationStopped");function ot(r,o){const u=(o?o(r):r)+ie,c=(o?o(r):r)+f,h=me+u,d=me+c;Ce[r]={},Ce[r][ie]=h,Ce[r][f]=d}function Je(r,o,u,c){const h=c&&c.add||Te,d=c&&c.rm||K,E=c&&c.listeners||"eventListeners",m=c&&c.rmAll||"removeAllListeners",S=Z(h),R="."+h+":",G=function(B,g,ve){if(B.isRemoved)return;const J=B.callback;let ye;"object"==typeof J&&J.handleEvent&&(B.callback=k=>J.handleEvent(k),B.originalDelegate=J);try{B.invoke(B,g,[ve])}catch(k){ye=k}const Y=B.options;return Y&&"object"==typeof Y&&Y.once&&g[d].call(g,ve.type,B.originalDelegate?B.originalDelegate:B.callback,Y),ye};function V(B,g,ve){if(!(g=g||r.event))return;const J=B||g.target||r,ye=J[Ce[g.type][ve?f:ie]];if(ye){const Y=[];if(1===ye.length){const k=G(ye[0],J,g);k&&Y.push(k)}else{const k=ye.slice();for(let Q=0;Q{throw Q})}}}const oe=function(B){return V(this,B,!1)},z=function(B){return V(this,B,!0)};function be(B,g){if(!B)return!1;let ve=!0;g&&void 0!==g.useG&&(ve=g.useG);const J=g&&g.vh;let ye=!0;g&&void 0!==g.chkDup&&(ye=g.chkDup);let Y=!1;g&&void 0!==g.rt&&(Y=g.rt);let k=B;for(;k&&!k.hasOwnProperty(h);)k=$(k);if(!k&&B[h]&&(k=B),!k||k[S])return!1;const Q=g&&g.eventNameToString,w={},W=k[S]=k[h],P=k[Z(d)]=k[d],Ie=k[Z(E)]=k[E],Le=k[Z(m)]=k[m];let Ee;function ue(p,T){return!ne&&"object"==typeof p&&p?!!p.capture:ne&&T?"boolean"==typeof p?{capture:p,passive:!0}:p?"object"==typeof p&&!1!==p.passive?Object.assign(Object.assign({},p),{passive:!0}):p:{passive:!0}:p}g&&g.prepend&&(Ee=k[Z(g.prepend)]=k[g.prepend]);const s=ve?function(p){if(!w.isExisting)return W.call(w.target,w.eventName,w.capture?z:oe,w.options)}:function(p){return W.call(w.target,w.eventName,p.invoke,w.options)},l=ve?function(p){if(!p.isRemoved){const T=Ce[p.eventName];let C;T&&(C=T[p.capture?f:ie]);const F=C&&p.target[C];if(F)for(let x=0;xfunction(h,d){h[it]=!0,c&&c.apply(h,d)})}function at(r,o,u,c,h){const d=Zone.__symbol__(c);if(o[d])return;const E=o[d]=o[c];o[c]=function(m,S,R){return S&&S.prototype&&h.forEach(function(b){const q=`${u}.${c}::`+b,G=S.prototype;try{if(G.hasOwnProperty(b)){const V=r.ObjectGetOwnPropertyDescriptor(G,b);V&&V.value?(V.value=r.wrapWithCurrentZone(V.value,q),r._redefineProperty(S.prototype,b,V)):G[b]&&(G[b]=r.wrapWithCurrentZone(G[b],q))}else G[b]&&(G[b]=r.wrapWithCurrentZone(G[b],q))}catch{}}),E.call(o,m,S,R)},r.attachOriginToPatched(o[c],E)}function je(r,o,u){if(!u||0===u.length)return o;const c=u.filter(d=>d.target===r);if(!c||0===c.length)return o;const h=c[0].ignoreProperties;return o.filter(d=>-1===h.indexOf(d))}function Se(r,o,u,c){r&&tt(r,je(r,o,u),c)}function He(r){return Object.getOwnPropertyNames(r).filter(o=>o.startsWith("on")&&o.length>2).map(o=>o.substring(2))}Zone.__load_patch("util",(r,o,u)=>{const c=He(r);u.patchOnProperties=tt,u.patchMethod=De,u.bindArguments=de,u.patchMacroTask=rt;const h=o.__symbol__("BLACK_LISTED_EVENTS"),d=o.__symbol__("UNPATCHED_EVENTS");r[d]&&(r[h]=r[d]),r[h]&&(o[h]=o[d]=r[h]),u.patchEventPrototype=ft,u.patchEventTarget=Je,u.isIEOrEdge=lt,u.ObjectDefineProperty=pe,u.ObjectGetOwnPropertyDescriptor=Fe,u.ObjectCreate=O,u.ArraySlice=ke,u.patchClass=Ue,u.wrapWithCurrentZone=se,u.filterProperties=je,u.attachOriginToPatched=Pe,u._redefineProperty=Object.defineProperty,u.patchCallbacks=at,u.getGlobalObjects=()=>({globalSources:ze,zoneSymbolEventNames:Ce,eventNames:c,isBrowser:Ve,isMix:qe,isNode:re,TRUE_STR:f,FALSE_STR:ie,ZONE_SYMBOL_PREFIX:me,ADD_EVENT_LISTENER_STR:Te,REMOVE_EVENT_LISTENER_STR:K})});const n=Z("zoneTask");function e(r,o,u,c){let h=null,d=null;u+=c;const E={};function m(R){const b=R.data;return b.args[0]=function(){return R.invoke.apply(this,arguments)},b.handleId=h.apply(r,b.args),R}function S(R){return d.call(r,R.data.handleId)}h=De(r,o+=c,R=>function(b,q){if("function"==typeof q[0]){const G={isPeriodic:"Interval"===c,delay:"Timeout"===c||"Interval"===c?q[1]||0:void 0,args:q},V=q[0];q[0]=function(){try{return V.apply(this,arguments)}finally{G.isPeriodic||("number"==typeof G.handleId?delete E[G.handleId]:G.handleId&&(G.handleId[n]=null))}};const oe=ae(o,q[0],G,m,S);if(!oe)return oe;const z=oe.data.handleId;return"number"==typeof z?E[z]=oe:z&&(z[n]=oe),z&&z.ref&&z.unref&&"function"==typeof z.ref&&"function"==typeof z.unref&&(oe.ref=z.ref.bind(z),oe.unref=z.unref.bind(z)),"number"==typeof z||z?z:oe}return R.apply(r,q)}),d=De(r,u,R=>function(b,q){const G=q[0];let V;"number"==typeof G?V=E[G]:(V=G&&G[n],V||(V=G)),V&&"string"==typeof V.type?"notScheduled"!==V.state&&(V.cancelFn&&V.data.isPeriodic||0===V.runCount)&&("number"==typeof G?delete E[G]:G&&(G[n]=null),V.zone.cancelTask(V)):R.apply(r,q)})}Zone.__load_patch("legacy",r=>{const o=r[Zone.__symbol__("legacyPatch")];o&&o()}),Zone.__load_patch("queueMicrotask",(r,o,u)=>{u.patchMethod(r,"queueMicrotask",c=>function(h,d){o.current.scheduleMicroTask("queueMicrotask",d[0])})}),Zone.__load_patch("timers",r=>{const o="set",u="clear";e(r,o,u,"Timeout"),e(r,o,u,"Interval"),e(r,o,u,"Immediate")}),Zone.__load_patch("requestAnimationFrame",r=>{e(r,"request","cancel","AnimationFrame"),e(r,"mozRequest","mozCancel","AnimationFrame"),e(r,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(r,o)=>{const u=["alert","prompt","confirm"];for(let c=0;cfunction(S,R){return o.current.run(d,r,R,m)})}),Zone.__load_patch("EventTarget",(r,o,u)=>{(function a(r,o){o.patchEventPrototype(r,o)})(r,u),function i(r,o){if(Zone[o.symbol("patchEventTarget")])return;const{eventNames:u,zoneSymbolEventNames:c,TRUE_STR:h,FALSE_STR:d,ZONE_SYMBOL_PREFIX:E}=o.getGlobalObjects();for(let S=0;S{Ue("MutationObserver"),Ue("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",(r,o,u)=>{Ue("IntersectionObserver")}),Zone.__load_patch("FileReader",(r,o,u)=>{Ue("FileReader")}),Zone.__load_patch("on_property",(r,o,u)=>{!function ht(r,o){if(re&&!qe||Zone[r.symbol("patchEvents")])return;const u=o.__Zone_ignore_on_properties;let c=[];if(Ve){const h=window;c=c.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);const d=function ut(){try{const r=L.navigator.userAgent;if(-1!==r.indexOf("MSIE ")||-1!==r.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:h,ignoreProperties:["error"]}]:[];Se(h,He(h),u&&u.concat(d),$(h))}c=c.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let h=0;h{!function t(r,o){const{isBrowser:u,isMix:c}=o.getGlobalObjects();(u||c)&&r.customElements&&"customElements"in r&&o.patchCallbacks(o,r.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(r,u)}),Zone.__load_patch("XHR",(r,o)=>{!function S(R){const b=R.XMLHttpRequest;if(!b)return;const q=b.prototype;let V=q[ce],oe=q[N];if(!V){const w=R.XMLHttpRequestEventTarget;if(w){const W=w.prototype;V=W[ce],oe=W[N]}}const z="readystatechange",be="scheduled";function he(w){const W=w.data,P=W.target;P[d]=!1,P[m]=!1;const Ie=P[h];V||(V=P[ce],oe=P[N]),Ie&&oe.call(P,z,Ie);const Le=P[h]=()=>{if(P.readyState===P.DONE)if(!W.aborted&&P[d]&&w.state===be){const ue=P[o.__symbol__("loadfalse")];if(0!==P.status&&ue&&ue.length>0){const Be=w.invoke;w.invoke=function(){const Re=P[o.__symbol__("loadfalse")];for(let le=0;lefunction(w,W){return w[c]=0==W[2],w[E]=W[1],ve.apply(w,W)}),ye=Z("fetchTaskAborting"),Y=Z("fetchTaskScheduling"),k=De(q,"send",()=>function(w,W){if(!0===o.current[Y]||w[c])return k.apply(w,W);{const P={target:w,url:w[E],isPeriodic:!1,args:W,aborted:!1},Ie=ae("XMLHttpRequest.send",B,P,he,g);w&&!0===w[m]&&!P.aborted&&Ie.state===be&&Ie.invoke()}}),Q=De(q,"abort",()=>function(w,W){const P=function G(w){return w[u]}(w);if(P&&"string"==typeof P.type){if(null==P.cancelFn||P.data&&P.data.aborted)return;P.zone.cancelTask(P)}else if(!0===o.current[ye])return Q.apply(w,W)})}(r);const u=Z("xhrTask"),c=Z("xhrSync"),h=Z("xhrListener"),d=Z("xhrScheduled"),E=Z("xhrURL"),m=Z("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",r=>{r.navigator&&r.navigator.geolocation&&function fe(r,o){const u=r.constructor.name;for(let c=0;c{const S=function(){return m.apply(this,de(arguments,u+"."+h))};return Pe(S,m),S})(d)}}}(r.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(r,o)=>{function u(c){return function(h){st(r,c).forEach(E=>{const m=r.PromiseRejectionEvent;if(m){const S=new m(c,{promise:h.promise,reason:h.rejection});E.invoke(S)}})}}r.PromiseRejectionEvent&&(o[Z("unhandledPromiseRejectionHandler")]=u("unhandledrejection"),o[Z("rejectionHandledHandler")]=u("rejectionhandled"))})}},Fe=>{var pe=O=>Fe(Fe.s=O);pe(8583),pe(7435)}]); \ No newline at end of file diff --git a/server/controllers/eclair/webSocketClient.ts b/server/controllers/eclair/webSocketClient.ts index 82baed84..f70a964e 100644 --- a/server/controllers/eclair/webSocketClient.ts +++ b/server/controllers/eclair/webSocketClient.ts @@ -1,4 +1,4 @@ -import * as WebSocket from 'ws'; +import WebSocket from 'ws'; import { Logger, LoggerService } from '../../utils/logger.js'; import { Common, CommonService } from '../../utils/common.js'; diff --git a/server/controllers/shared/authenticate.ts b/server/controllers/shared/authenticate.ts index 6898bb68..1275ae48 100644 --- a/server/controllers/shared/authenticate.ts +++ b/server/controllers/shared/authenticate.ts @@ -75,12 +75,12 @@ export const authenticateUser = (req, res, next) => { const password = req.body.authenticationValue; if (common.rtl_pass === password && failed.count < ALLOWED_LOGIN_ATTEMPTS) { if (req.body.twoFAToken && req.body.twoFAToken !== '') { - // if (!verifyToken(req.body.twoFAToken)) { - // logger.log({ selectedNode: req.session.selectedNode, level: 'ERROR', fileName: 'Authenticate', msg: 'Invalid Token! Failed IP ' + reqIP, error: { error: 'Invalid token.' } }); - // failed.count = failed.count + 1; - // failed.lastTried = currentTime; - // return res.status(401).json(handleMultipleFailedAttemptsError(failed, currentTime, 'Invalid 2FA Token!')); - // } + if (!verifyToken(req.body.twoFAToken)) { + logger.log({ selectedNode: req.session.selectedNode, level: 'ERROR', fileName: 'Authenticate', msg: 'Invalid Token! Failed IP ' + reqIP, error: { error: 'Invalid token.' } }); + failed.count = failed.count + 1; + failed.lastTried = currentTime; + return res.status(401).json(handleMultipleFailedAttemptsError(failed, currentTime, 'Invalid 2FA Token!')); + } } if (!req.session.selectedNode) { req.session.selectedNode = common.initSelectedNode; } delete failedLoginAttempts[reqIP]; diff --git a/server/controllers/shared/pageSettings.ts b/server/controllers/shared/pageSettings.ts index cd2e6e4e..f8c59d8c 100644 --- a/server/controllers/shared/pageSettings.ts +++ b/server/controllers/shared/pageSettings.ts @@ -11,7 +11,7 @@ export const getPageSettings = (req, res, next) => { logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Page Settings', msg: 'Getting Page Settings..' }); databaseService.find(req.session.selectedNode, CollectionsEnum.PAGE_SETTINGS).then((settings: any) => { logger.log({ selectedNode: req.session.selectedNode, level: 'INFO', fileName: 'Page Settings', msg: 'Page Settings Received', data: settings }); - return res.status(200).json(settings); + res.status(200).json(settings); }).catch((errRes) => { const err = common.handleError(errRes, 'Page Settings', 'Page Settings Error', req.session.selectedNode); return res.status(err.statusCode).json({ message: err.message, error: err.error }); diff --git a/server/routes/cln/balance.ts b/server/routes/cln/balance.ts index 67564c6c..2f821a58 100644 --- a/server/routes/cln/balance.ts +++ b/server/routes/cln/balance.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getBalance } from '../../controllers/cln/balance.js'; diff --git a/server/routes/cln/channels.ts b/server/routes/cln/channels.ts index 33679b41..60f673a0 100644 --- a/server/routes/cln/channels.ts +++ b/server/routes/cln/channels.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { listChannels, openChannel, setChannelFee, closeChannel, getLocalRemoteBalance, listForwards, funderUpdatePolicy, listForwardsPaginated } from '../../controllers/cln/channels.js'; diff --git a/server/routes/cln/fees.ts b/server/routes/cln/fees.ts index 1d41b52b..7a7fcbc2 100644 --- a/server/routes/cln/fees.ts +++ b/server/routes/cln/fees.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getFees } from '../../controllers/cln/fees.js'; diff --git a/server/routes/cln/getInfo.ts b/server/routes/cln/getInfo.ts index d8e6016e..0053e93e 100644 --- a/server/routes/cln/getInfo.ts +++ b/server/routes/cln/getInfo.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getInfo } from '../../controllers/cln/getInfo.js'; diff --git a/server/routes/cln/index.ts b/server/routes/cln/index.ts index 991083b1..2e574c2d 100644 --- a/server/routes/cln/index.ts +++ b/server/routes/cln/index.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import infoCLRoutes from './getInfo.js'; import feesCLRoutes from './fees.js'; diff --git a/server/routes/cln/invoices.ts b/server/routes/cln/invoices.ts index 642af3b9..fb0bd491 100644 --- a/server/routes/cln/invoices.ts +++ b/server/routes/cln/invoices.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { listInvoices, addInvoice, deleteExpiredInvoice } from '../../controllers/cln/invoices.js'; diff --git a/server/routes/cln/network.ts b/server/routes/cln/network.ts index 09867f08..6e1c8e4e 100644 --- a/server/routes/cln/network.ts +++ b/server/routes/cln/network.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getRoute, listNode, listChannel, feeRates, listNodes } from '../../controllers/cln/network.js'; diff --git a/server/routes/cln/offers.ts b/server/routes/cln/offers.ts index cd09a145..5f1b9970 100644 --- a/server/routes/cln/offers.ts +++ b/server/routes/cln/offers.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { listOfferBookmarks, deleteOfferBookmark, listOffers, disableOffer, createOffer, fetchOfferInvoice } from '../../controllers/cln/offers.js'; diff --git a/server/routes/cln/onchain.ts b/server/routes/cln/onchain.ts index 9bdab4c3..3867ffb4 100644 --- a/server/routes/cln/onchain.ts +++ b/server/routes/cln/onchain.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getNewAddress, onChainWithdraw, getUTXOs } from '../../controllers/cln/onchain.js'; diff --git a/server/routes/cln/payments.ts b/server/routes/cln/payments.ts index a4d97fd4..d9c01d5b 100644 --- a/server/routes/cln/payments.ts +++ b/server/routes/cln/payments.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { listPayments, postPayment } from '../../controllers/cln/payments.js'; diff --git a/server/routes/cln/peers.ts b/server/routes/cln/peers.ts index 3de5493a..0a47d726 100644 --- a/server/routes/cln/peers.ts +++ b/server/routes/cln/peers.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getPeers, postPeer, deletePeer } from '../../controllers/cln/peers.js'; diff --git a/server/routes/cln/utility.ts b/server/routes/cln/utility.ts index 6a5fbab9..3ff993a4 100644 --- a/server/routes/cln/utility.ts +++ b/server/routes/cln/utility.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { decodePayments, decodePayment, signMessage, verifyMessage, listConfigs } from '../../controllers/cln/utility.js'; diff --git a/server/routes/eclair/channels.ts b/server/routes/eclair/channels.ts index f8a8eb65..aa4de77b 100644 --- a/server/routes/eclair/channels.ts +++ b/server/routes/eclair/channels.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getChannels, getChannelStats, openChannel, updateChannelRelayFee, closeChannel } from '../../controllers/eclair/channels.js'; diff --git a/server/routes/eclair/fees.ts b/server/routes/eclair/fees.ts index 92be674e..48778cad 100644 --- a/server/routes/eclair/fees.ts +++ b/server/routes/eclair/fees.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getFees, getPayments } from '../../controllers/eclair/fees.js'; diff --git a/server/routes/eclair/getInfo.ts b/server/routes/eclair/getInfo.ts index 1849fbce..5870da24 100644 --- a/server/routes/eclair/getInfo.ts +++ b/server/routes/eclair/getInfo.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getInfo } from '../../controllers/eclair/getInfo.js'; diff --git a/server/routes/eclair/index.ts b/server/routes/eclair/index.ts index 0ab8b347..5551a663 100644 --- a/server/routes/eclair/index.ts +++ b/server/routes/eclair/index.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import infoECLRoutes from './getInfo.js'; import feesECLRoutes from './fees.js'; diff --git a/server/routes/eclair/invoices.ts b/server/routes/eclair/invoices.ts index dab51247..a2af20f5 100644 --- a/server/routes/eclair/invoices.ts +++ b/server/routes/eclair/invoices.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { listInvoices, getInvoice, createInvoice } from '../../controllers/eclair/invoices.js'; diff --git a/server/routes/eclair/network.ts b/server/routes/eclair/network.ts index 9d847dcf..42df8997 100644 --- a/server/routes/eclair/network.ts +++ b/server/routes/eclair/network.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getNodes } from '../../controllers/eclair/network.js'; diff --git a/server/routes/eclair/onchain.ts b/server/routes/eclair/onchain.ts index b3c8f433..e124ba92 100644 --- a/server/routes/eclair/onchain.ts +++ b/server/routes/eclair/onchain.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getNewAddress, getBalance, getTransactions, sendFunds } from '../../controllers/eclair/onchain.js'; diff --git a/server/routes/eclair/payments.ts b/server/routes/eclair/payments.ts index fec053e7..07b01d59 100644 --- a/server/routes/eclair/payments.ts +++ b/server/routes/eclair/payments.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { queryPaymentRoute, decodePayment, getSentPaymentsInformation, postPayment } from '../../controllers/eclair/payments.js'; diff --git a/server/routes/eclair/peers.ts b/server/routes/eclair/peers.ts index 24a363be..95f9744b 100644 --- a/server/routes/eclair/peers.ts +++ b/server/routes/eclair/peers.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getPeers, connectPeer, deletePeer } from '../../controllers/eclair/peers.js'; diff --git a/server/routes/lnd/balance.ts b/server/routes/lnd/balance.ts index 35fefd8a..43e7b15f 100644 --- a/server/routes/lnd/balance.ts +++ b/server/routes/lnd/balance.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getBlockchainBalance } from '../../controllers/lnd/balance.js'; diff --git a/server/routes/lnd/channels.ts b/server/routes/lnd/channels.ts index 40c52f9d..d7f2745c 100644 --- a/server/routes/lnd/channels.ts +++ b/server/routes/lnd/channels.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getAllChannels, getPendingChannels, getClosedChannels, postChannel, postTransactions, closeChannel, postChanPolicy } from '../../controllers/lnd/channels.js'; diff --git a/server/routes/lnd/channelsBackup.ts b/server/routes/lnd/channelsBackup.ts index e2f81777..520e7ea8 100644 --- a/server/routes/lnd/channelsBackup.ts +++ b/server/routes/lnd/channelsBackup.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getBackup, getRestoreList, postBackupVerify, postRestore } from '../../controllers/lnd/channelsBackup.js'; diff --git a/server/routes/lnd/fees.ts b/server/routes/lnd/fees.ts index b77b9158..5ca59e51 100644 --- a/server/routes/lnd/fees.ts +++ b/server/routes/lnd/fees.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getFees } from '../../controllers/lnd/fees.js'; diff --git a/server/routes/lnd/getInfo.ts b/server/routes/lnd/getInfo.ts index a5457e27..475588e4 100644 --- a/server/routes/lnd/getInfo.ts +++ b/server/routes/lnd/getInfo.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getInfo } from '../../controllers/lnd/getInfo.js'; diff --git a/server/routes/lnd/graph.ts b/server/routes/lnd/graph.ts index b5cc42a2..eddfe0d6 100644 --- a/server/routes/lnd/graph.ts +++ b/server/routes/lnd/graph.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getDescribeGraph, getGraphInfo, getAliasesForPubkeys, getGraphNode, getGraphEdge, getRemoteFeePolicy, getQueryRoutes } from '../../controllers/lnd/graph.js'; diff --git a/server/routes/lnd/index.ts b/server/routes/lnd/index.ts index 210b5e66..e151d9df 100644 --- a/server/routes/lnd/index.ts +++ b/server/routes/lnd/index.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import infoRoutes from './getInfo.js'; import channelsRoutes from './channels.js'; diff --git a/server/routes/lnd/invoices.ts b/server/routes/lnd/invoices.ts index 6dcde537..a668cb68 100644 --- a/server/routes/lnd/invoices.ts +++ b/server/routes/lnd/invoices.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { listInvoices, invoiceLookup, addInvoice } from '../../controllers/lnd/invoices.js'; diff --git a/server/routes/lnd/message.ts b/server/routes/lnd/message.ts index 754e2b4e..7ed00221 100644 --- a/server/routes/lnd/message.ts +++ b/server/routes/lnd/message.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { signMessage, verifyMessage } from '../../controllers/lnd/message.js'; diff --git a/server/routes/lnd/newAddress.ts b/server/routes/lnd/newAddress.ts index 9942eadc..0d6142ec 100644 --- a/server/routes/lnd/newAddress.ts +++ b/server/routes/lnd/newAddress.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getNewAddress } from '../../controllers/lnd/newAddress.js'; diff --git a/server/routes/lnd/payments.ts b/server/routes/lnd/payments.ts index 8d82d40b..272c62ba 100644 --- a/server/routes/lnd/payments.ts +++ b/server/routes/lnd/payments.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { decodePayment, decodePayments, getPayments, getAllLightningTransactions, paymentLookup } from '../../controllers/lnd/payments.js'; diff --git a/server/routes/lnd/peers.ts b/server/routes/lnd/peers.ts index 209569ba..91dfbd34 100644 --- a/server/routes/lnd/peers.ts +++ b/server/routes/lnd/peers.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getPeers, postPeer, deletePeer } from '../../controllers/lnd/peers.js'; diff --git a/server/routes/lnd/switch.ts b/server/routes/lnd/switch.ts index a50f1119..1c766bcd 100644 --- a/server/routes/lnd/switch.ts +++ b/server/routes/lnd/switch.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { forwardingHistory } from '../../controllers/lnd/switch.js'; diff --git a/server/routes/lnd/transactions.ts b/server/routes/lnd/transactions.ts index 631806a5..b037be00 100644 --- a/server/routes/lnd/transactions.ts +++ b/server/routes/lnd/transactions.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getTransactions, postTransactions } from '../../controllers/lnd/transactions.js'; diff --git a/server/routes/lnd/wallet.ts b/server/routes/lnd/wallet.ts index f51fc1e1..e0210005 100644 --- a/server/routes/lnd/wallet.ts +++ b/server/routes/lnd/wallet.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { genSeed, updateSelNodeOptions, getUTXOs, operateWallet, bumpFee, labelTransaction, leaseUTXO, releaseUTXO } from '../../controllers/lnd/wallet.js'; diff --git a/server/routes/shared/RTLConf.ts b/server/routes/shared/RTLConf.ts index 85cbd494..032b87b8 100644 --- a/server/routes/shared/RTLConf.ts +++ b/server/routes/shared/RTLConf.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getRTLConfigInitial, getRTLConfig, updateUISettings, update2FASettings, getConfig, getFile, updateSelectedNode, updateDefaultNode, updateServiceSettings, updateSSO, getCurrencyRates } from '../../controllers/shared/RTLConf.js'; diff --git a/server/routes/shared/authenticate.ts b/server/routes/shared/authenticate.ts index 200f2c1e..e4785b1f 100644 --- a/server/routes/shared/authenticate.ts +++ b/server/routes/shared/authenticate.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { authenticateUser, verifyToken, resetPassword, logoutUser } from '../../controllers/shared/authenticate.js'; diff --git a/server/routes/shared/boltz.ts b/server/routes/shared/boltz.ts index bebc7cc5..ef6c8e22 100644 --- a/server/routes/shared/boltz.ts +++ b/server/routes/shared/boltz.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getInfo, getServiceInfo, listSwaps, getSwapInfo, createSwap, createReverseSwap, createChannel, deposit } from '../../controllers/shared/boltz.js'; diff --git a/server/routes/shared/index.ts b/server/routes/shared/index.ts index c04d3abf..234153f9 100644 --- a/server/routes/shared/index.ts +++ b/server/routes/shared/index.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import authenticateRoutes from './authenticate.js'; import boltzRoutes from './boltz.js'; diff --git a/server/routes/shared/loop.ts b/server/routes/shared/loop.ts index d7e3f004..21f82ec4 100644 --- a/server/routes/shared/loop.ts +++ b/server/routes/shared/loop.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { loopInTerms, loopInQuote, loopInTermsAndQuotes, loopIn, loopOutTerms, loopOutQuote, loopOutTermsAndQuotes, loopOut, swaps, swap } from '../../controllers/shared/loop.js'; diff --git a/server/routes/shared/pageSettings.ts b/server/routes/shared/pageSettings.ts index 4a7c23ae..dc2ccc56 100644 --- a/server/routes/shared/pageSettings.ts +++ b/server/routes/shared/pageSettings.ts @@ -1,4 +1,4 @@ -import * as exprs from 'express'; +import exprs from 'express'; const { Router } = exprs; import { isAuthenticated } from '../../utils/authCheck.js'; import { getPageSettings, savePageSettings } from '../../controllers/shared/pageSettings.js'; diff --git a/server/utils/common.ts b/server/utils/common.ts index c3838825..b2778e00 100644 --- a/server/utils/common.ts +++ b/server/utils/common.ts @@ -329,7 +329,7 @@ export class CommonService { if (exists) { try { this.cookie_value = fs.readFileSync(this.rtl_cookie_path, 'utf-8'); - } catch (err: any) { + } catch (err) { this.logger.log({ selectedNode: this.initSelectedNode, level: 'ERROR', fileName: 'Config', msg: 'Something went wrong while reading cookie: \n' + err }); throw new Error(err); } @@ -339,7 +339,7 @@ export class CommonService { this.createDirectory(directoryName); fs.writeFileSync(this.rtl_cookie_path, crypto.randomBytes(64).toString('hex')); this.cookie_value = fs.readFileSync(this.rtl_cookie_path, 'utf-8'); - } catch (err: any) { + } catch (err) { this.logger.log({ selectedNode: this.initSelectedNode, level: 'ERROR', fileName: 'Config', msg: 'Something went wrong while reading the cookie: \n' + err }); throw new Error(err); } @@ -350,7 +350,7 @@ export class CommonService { try { fs.writeFileSync(this.rtl_cookie_path, crypto.randomBytes(64).toString('hex')); this.cookie_value = fs.readFileSync(this.rtl_cookie_path, 'utf-8'); - } catch (err: any) { + } catch (err) { this.logger.log({ selectedNode: this.initSelectedNode, level: 'ERROR', fileName: 'Common', msg: 'Something went wrong while refreshing cookie', error: err }); throw new Error(err); } @@ -364,7 +364,7 @@ export class CommonService { if (!fs.existsSync(curDir)) { fs.mkdirSync(curDir); } - } catch (err: any) { + } catch (err) { if (err.code !== 'EEXIST') { if (err.code === 'ENOENT') { throw new Error(`ENOENT: No such file or directory, mkdir '${directoryName}'. Ensure that the path separator is '${sep}'`); diff --git a/server/utils/database.ts b/server/utils/database.ts index ec168c53..23db7c30 100644 --- a/server/utils/database.ts +++ b/server/utils/database.ts @@ -225,16 +225,16 @@ export class DatabaseAdapter { if (!fs.existsSync(this.dbFilePath)) { this.common.createDirectory(this.dbFilePath); } - } catch (err: any) { - throw new Error(err); + } catch (err) { + throw new Error(JSON.stringify(err)); } const collectionFilePath = this.dbFilePath + sep + 'rtldb-' + this.selNode.ln_implementation + '-' + collectionName + '.json'; try { if (!fs.existsSync(collectionFilePath)) { fs.writeFileSync(collectionFilePath, '[]'); } - } catch (err: any) { - throw new Error(err); + } catch (err) { + throw new Error(JSON.stringify(err)); } try { const otherFiles = fs.readdirSync(this.dbFilePath); @@ -264,8 +264,8 @@ export class DatabaseAdapter { const dataFromFile = fs.readFileSync(collectionFilePath, 'utf-8'); const dataObj = !dataFromFile ? null : (JSON.parse(dataFromFile)); return dataObj; - } catch (err: any) { - throw new Error(err); + } catch (err) { + throw new Error(JSON.stringify(err)); } } diff --git a/src/app/lnd/wallet/initialize/initialize.component.ts b/src/app/lnd/wallet/initialize/initialize.component.ts index b890c796..135d1bbb 100644 --- a/src/app/lnd/wallet/initialize/initialize.component.ts +++ b/src/app/lnd/wallet/initialize/initialize.component.ts @@ -1,9 +1,8 @@ import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core'; -import { Router } from '@angular/router'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { Store } from '@ngrx/store'; -import { UntypedFormBuilder, UntypedFormGroup, Validators, ValidatorFn, ValidationErrors } from '@angular/forms'; +import { UntypedFormBuilder, UntypedFormGroup, Validators, ValidationErrors, AbstractControlOptions } from '@angular/forms'; import { STEPPER_GLOBAL_OPTIONS } from '@angular/cdk/stepper'; import { MatStepper } from '@angular/material/stepper'; @@ -50,7 +49,7 @@ export class InitializeWalletComponent implements OnInit, OnDestroy { this.passwordFormGroup = this.formBuilder.group({ initWalletPassword: ['', [Validators.required, Validators.minLength(8)]], initWalletConfirmPassword: ['', [Validators.required, Validators.minLength(8)]] - }, { validators: matchedPasswords }); + }, { validators: matchedPasswords } as AbstractControlOptions); this.cipherFormGroup = this.formBuilder.group({ existingCipher: [false], cipherSeed: [{ value: '', disabled: true }, [cipherSeedLength]] diff --git a/tsconfig.json b/tsconfig.json index a017bcc3..c9f285cf 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,7 @@ "outDir": "./backend", "forceConsistentCasingInFileNames": true, "allowSyntheticDefaultImports": true, - "strict": true, + "strict": false, "noImplicitOverride": false, "noPropertyAccessFromIndexSignature": false, "strictPropertyInitialization":false,